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.8 by gregl, Thu Dec 11 11:51:20 1997 UTC vs.
Revision 3.9 by gregl, Fri Dec 12 11:13:17 1997 UTC

# Line 36 | Line 36 | start_rtrace()                 /* start rtrace process */
36   {
37          static char     buf1[8];
38          int     rmaxpack = 0;
39 <        int     psiz, npt, n;
39 >        int     psiz, n;
40                                          /* get number of processes */
41 <        if ((npt = ncprocs) <= 0)
41 >        if (ncprocs <= 0)
42                  return(0);
43 <        if (npt > MAXPROC) {
43 >        if (ncprocs > MAXPROC) {
44                  sprintf(errmsg,
45                          "number of rtrace processes reduced from %d to %d",
46 <                                npt, MAXPROC);
46 >                                ncprocs, MAXPROC);
47                  error(WARNING, errmsg);
48 <                npt = MAXPROC;
48 >                ncprocs = MAXPROC;
49          }
50 <                                        /* add compulsory options */
51 <        rtargv[rtargc++] = "-i-";
52 <        rtargv[rtargc++] = "-I-";
53 <        rtargv[rtargc++] = "-h-";
54 <        rtargv[rtargc++] = "-ld-";
55 <        sprintf(buf1, "%d", RPACKSIZ);
56 <        rtargv[rtargc++] = "-x"; rtargv[rtargc++] = buf1;
57 <        rtargv[rtargc++] = "-y"; rtargv[rtargc++] = "0";
58 <        rtargv[rtargc++] = "-fff";
59 <        rtargv[rtargc++] = vbool(VDIST) ? "-ovl" : "-ovL";
60 <        if (nowarn)
61 <                rtargv[rtargc++] = "-w-";
62 <        if (npt > 1) {
63 <                mktemp(pfile);
64 <                rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = pfile;
50 >        if (rtargv[rtargc-1] != vval(OCTREE)) {
51 >                                                /* add compulsory options */
52 >                rtargv[rtargc++] = "-i-";
53 >                rtargv[rtargc++] = "-I-";
54 >                rtargv[rtargc++] = "-h-";
55 >                rtargv[rtargc++] = "-ld-";
56 >                sprintf(buf1, "%d", RPACKSIZ);
57 >                rtargv[rtargc++] = "-x"; rtargv[rtargc++] = buf1;
58 >                rtargv[rtargc++] = "-y"; rtargv[rtargc++] = "0";
59 >                rtargv[rtargc++] = "-fff";
60 >                rtargv[rtargc++] = vbool(VDIST) ? "-ovl" : "-ovL";
61 >                if (nowarn)
62 >                        rtargv[rtargc++] = "-w-";
63 >                if (ncprocs > 1) {
64 >                        mktemp(pfile);
65 >                        rtargv[rtargc++] = "-PP"; rtargv[rtargc++] = pfile;
66 >                }
67 >                rtargv[rtargc++] = vval(OCTREE);
68 >                rtargv[rtargc] = NULL;
69          }
66        rtargv[rtargc++] = vval(OCTREE);
67        rtargv[rtargc] = NULL;
70          maxqlen = 0;
71 <        for (nprocs = 0; nprocs < npt; nprocs++) {      /* spawn children */
71 >        for (nprocs = 0; nprocs < ncprocs; nprocs++) {  /* spawn children */
72                  psiz = open_process(rtpd[nprocs], rtargv);
73                  if (psiz <= 0)
74                          error(SYSTEM, "cannot start rtrace process");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines