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.5 by gregl, Mon Nov 24 15:18:47 1997 UTC vs.
Revision 3.8 by gregl, Thu Dec 11 11:51:20 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  
18   #ifndef MAXPROC
19 < #define MAXPROC         16
19 > #define MAXPROC         64
20   #endif
21  
22 < static char     PFILE[] = "/usr/tmp/RHpersist"; /* persist file name */
22 > int     nprocs = 0;                             /* running process count */
23  
24 + static char     pfile[] = TEMPLATE;             /* persist file name */
25 +
26   static int      rtpd[MAXPROC][3];               /* process descriptors */
27   static float    *rtbuf = NULL;                  /* allocated i/o buffer */
28   static int      maxqlen = 0;                    /* maximum packets per queue */
26 static int      nprocs = 0;                     /* number of processes */
29  
30   static PACKET   *pqueue[MAXPROC];               /* packet queues */
31   static int      pqlen[MAXPROC];                 /* packet queue lengths */
# Line 54 | Line 56 | start_rtrace()                 /* start rtrace process */
56          rtargv[rtargc++] = "-x"; rtargv[rtargc++] = buf1;
57          rtargv[rtargc++] = "-y"; rtargv[rtargc++] = "0";
58          rtargv[rtargc++] = "-fff";
59 <        rtargv[rtargc++] = "-ovL";
60 <        rtargv[rtargc++] = nowarn ? "-w-" : "-w+";
59 >        rtargv[rtargc++] = vbool(VDIST) ? "-ovl" : "-ovL";
60 >        if (nowarn)
61 >                rtargv[rtargc++] = "-w-";
62          if (npt > 1) {
63 <                rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = PFILE;
63 >                mktemp(pfile);
64 >                rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = pfile;
65          }
66          rtargv[rtargc++] = vval(OCTREE);
67          rtargv[rtargc] = NULL;
# Line 291 | Line 295 | killpersist()                  /* kill persistent process */
295          FILE    *fp;
296          int     pid;
297  
298 <        if ((fp = fopen(PFILE, "r")) == NULL)
298 >        if ((fp = fopen(pfile, "r")) == NULL)
299                  return;
300          if (fscanf(fp, "%*s %d", &pid) != 1 || kill(pid, SIGALRM) < 0)
301 <                unlink(PFILE);
301 >                unlink(pfile);
302          fclose(fp);
303   }
304  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines