ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rpict.c
(Generate patch)

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.30 by greg, Thu Oct 28 15:24:19 1993 UTC vs.
Revision 2.31 by greg, Thu Nov 18 09:22:55 1993 UTC

# Line 20 | Line 20 | static char SCCSid[] = "$SunId$ LBL";
20   #include  <sys/types.h>
21   #include  <sys/times.h>
22   #include  <limits.h>
23 + extern time_t   time();
24   #endif
25 + #else
26 + extern unsigned long    time();
27   #endif
28  
29   #include  <signal.h>
# Line 83 | Line 86 | int  ralrm = 0;                                /* seconds between reports */
86  
87   double  pctdone = 0.0;                  /* percentage done */
88  
89 < long  tlastrept = 0L;                   /* time at last report */
89 > unsigned long  tlastrept = 0L;          /* time at last report */
90  
91 < extern long  time();
89 < extern long  tstart;                    /* starting time */
91 > extern unsigned long  tstart;           /* starting time */
92  
93   extern unsigned long  nrays;            /* number of rays traced */
94  
# Line 138 | Line 140 | report()               /* report progress */
140          struct tms  tbuf;
141   #endif
142  
143 <        tlastrept = time((long *)0);
143 >        tlastrept = time((unsigned long *)NULL);
144   #ifdef BSD
145          getrusage(RUSAGE_SELF, &rubuf);
146          u = rubuf.ru_utime.tv_sec + rubuf.ru_utime.tv_usec/1e6;
# Line 162 | Line 164 | report()               /* report progress */
164   #else
165   report()                /* report progress */
166   {
167 <        tlastrept = time((long *)0);
167 >        tlastrept = time((unsigned long *)NULL);
168          sprintf(errmsg, "%lu rays, %4.2f%% after %5.4f hours\n",
169                          nrays, pctdone, (tlastrept-tstart)/3600.0);
170          eputs(errmsg);
# Line 422 | Line 424 | char  *zfile, *oldfile;
424                          goto writerr;
425                                                          /* record progress */
426                  pctdone = 100.0*(vres-1-ypos)/vres;
427 <                if (ralrm > 0 && time((long *)0) >= tlastrept+ralrm)
427 >                if (ralrm > 0 && time((unsigned long *)NULL) >= tlastrept+ralrm)
428                          report();
429   #ifndef  BSD
430                  else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines