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.42 by greg, Tue Jan 23 16:27:31 1996 UTC vs.
Revision 2.44 by greg, Wed Feb 14 15:18:05 1996 UTC

# Line 20 | Line 20 | static char SCCSid[] = "$SunId$ LBL";
20   #include  <sys/resource.h>
21   #else
22   #include  <sys/times.h>
23 #include  <sys/utsname.h>
23   #include  <unistd.h>
24   #endif
25   #endif
# Line 78 | Line 77 | int  maxdepth = 6;                     /* maximum recursion depth */
77   double  minweight = 5e-3;               /* minimum ray weight */
78  
79   COLOR  ambval = BLKCOLOR;               /* ambient value */
80 + int  ambvwt = 0;                        /* initial weight for ambient value */
81   double  ambacc = 0.2;                   /* ambient accuracy */
82   int  ambres = 32;                       /* ambient resolution */
83   int  ambdiv = 128;                      /* ambient divisions */
# Line 140 | Line 140 | int  code;
140   #ifndef NIX
141   report()                /* report progress */
142   {
143 +        extern char  *myhostname();
144          double  u, s;
145   #ifdef BSD
145        char  hostname[257];
146          struct rusage  rubuf;
147   #else
148          struct tms  tbuf;
149        struct utsname  nambuf;
149          double  period;
151 #define hostname  nambuf.nodename
150   #endif
151  
152          tlastrept = time((time_t *)NULL);
# Line 159 | Line 157 | report()               /* report progress */
157          getrusage(RUSAGE_CHILDREN, &rubuf);
158          u += rubuf.ru_utime.tv_sec + rubuf.ru_utime.tv_usec/1e6;
159          s += rubuf.ru_stime.tv_sec + rubuf.ru_stime.tv_usec/1e6;
162        gethostname(hostname, sizeof(hostname));
160   #else
161          times(&tbuf);
162   #ifdef _SC_CLK_TCK
# Line 169 | Line 166 | report()               /* report progress */
166   #endif
167          u = ( tbuf.tms_utime + tbuf.tms_cutime ) * period;
168          s = ( tbuf.tms_stime + tbuf.tms_cstime ) * period;
172        uname(&nambuf);
169   #endif
170  
171          sprintf(errmsg,
172                  "%lu rays, %4.2f%% after %.3fu %.3fs %.3fr hours on %s\n",
173                          nrays, pctdone, u/3600., s/3600.,
174 <                        (tlastrept-tstart)/3600., hostname);
174 >                        (tlastrept-tstart)/3600., myhostname());
175          eputs(errmsg);
176   #ifndef BSD
177          signal(SIGCONT, report);
182 #undef hostname
178   #endif
179   }
180   #else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines