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

Comparing ray/src/hd/rholo2l.c (file contents):
Revision 3.2 by gregl, Fri Oct 31 11:44:09 1997 UTC vs.
Revision 3.7 by gregl, Tue Dec 2 16:35:45 1997 UTC

# Line 10 | Line 10 | static char SCCSid[] = "$SunId$ SGI";
10  
11   #include "rholo.h"
12   #include "random.h"
13 + #include "paths.h"
14 + #include "selcall.h"
15   #include <signal.h>
16   #include <sys/time.h>
17  
# Line 17 | Line 19 | static char SCCSid[] = "$SunId$ SGI";
19   #define MAXPROC         16
20   #endif
21  
22 < static char     PFILE[] = "/usr/tmp/RHpersist"; /* persist file name */
22 > static char     pfile[] = TEMPLATE;             /* persist file name */
23  
24   static int      rtpd[MAXPROC][3];               /* process descriptors */
25   static float    *rtbuf = NULL;                  /* allocated i/o buffer */
# Line 53 | Line 55 | start_rtrace()                 /* start rtrace process */
55          rtargv[rtargc++] = "-x"; rtargv[rtargc++] = buf1;
56          rtargv[rtargc++] = "-y"; rtargv[rtargc++] = "0";
57          rtargv[rtargc++] = "-fff";
58 <        rtargv[rtargc++] = "-ovl";
59 <        rtargv[rtargc++] = nowarn ? "-w-" : "-w+";
58 >        rtargv[rtargc++] = vbool(VDIST) ? "-ovl" : "-ovL";
59 >        if (nowarn)
60 >                rtargv[rtargc++] = "-w-";
61          if (npt > 1) {
62 <                rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = PFILE;
62 >                mktemp(pfile);
63 >                rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = pfile;
64          }
65          rtargv[rtargc++] = vval(OCTREE);
66          rtargv[rtargc] = NULL;
# Line 218 | Line 222 | int    poll;
222          }
223          return(pldone);                         /* return finished packets */
224   eoferr:
225 <        error(USER, "unexpected EOF from rtrace process");
225 >        error(USER, "rtrace process died");
226   }
227  
228  
# Line 252 | Line 256 | flush_queue()                  /* empty all rtrace queues */
256                  if (pqlen[i]) {
257                          if (rpdone == NULL) {           /* tack on queue */
258                                  rpdone = rpl = pqueue[i];
259 <                                nr = rpl->nr;
259 >                                if ((nr = rpl->nr) < RPACKSIZ) nr++;
260                          } else {
261                                  rpl->next = pqueue[i];
262                                  nr = 0;
# Line 290 | Line 294 | killpersist()                  /* kill persistent process */
294          FILE    *fp;
295          int     pid;
296  
297 <        if ((fp = fopen(PFILE, "r")) == NULL)
297 >        if ((fp = fopen(pfile, "r")) == NULL)
298                  return;
299          if (fscanf(fp, "%*s %d", &pid) != 1 || kill(pid, SIGALRM) < 0)
300 <                unlink(PFILE);
300 >                unlink(pfile);
301          fclose(fp);
302   }
303  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines