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

Comparing ray/src/util/rad.c (file contents):
Revision 2.93 by greg, Tue May 18 00:01:02 2010 UTC vs.
Revision 2.94 by greg, Tue May 18 04:24:17 2010 UTC

# Line 1316 | Line 1316 | rpict(                         /* run rpict and pfilt for each view */
1316                                          getview(0, vs) != NULL) {
1317                  if (!strcmp(c_rpict, DEF_RPICT_PATH) &&
1318                                  getview(1, NULL) == NULL) {
1319 <                        sprintf(sfile, "rpiece_%s.txt", vs);
1319 >                        sprintf(sfile, "rpsync_%s.txt", vs);
1320                          strcpy(rppopt, "-PP pfXXXXXX");
1321                  } else {
1322                          strcpy(rppopt, "-S 1 -PP pfXXXXXX");
1323                  }
1324                  pfile = rppopt + strlen(rppopt) - 8;
1325 <                if (mktemp(pfile) == NULL)
1325 >                if (mktemp(pfile) == NULL) {
1326                          if (do_rpiece) {
1327                                  fprintf(stderr, "%s: cannot create\n", pfile);
1328                                  quit(1);
1329 <                        } else
1330 <                                pfile = NULL;
1329 >                        }
1330 >                        pfile = NULL;
1331 >                }
1332          }
1333          vn = 0;                                 /* do each view */
1334          while ((vw = getview(vn++, vs)) != NULL) {
# Line 1356 | Line 1357 | rpict(                         /* run rpict and pfilt for each view */
1357                  }
1358                                                  /* parallel running? */
1359                  if (do_rpiece) {
1360 <                        if (rfdt < oct1date || fdate(sfile) < oct1date) {
1360 >                        if (rfdt < oct1date || !fdate(sfile)) {
1361                                  rfdt = 0;               /* start fresh */
1362                                  if ((fp = fopen(sfile, "w")) == NULL) {
1363                                          fprintf(stderr, "%s: cannot create\n",
# Line 1467 | Line 1468 | rpict(                         /* run rpict and pfilt for each view */
1468                          finish_process();       /* exit if child */
1469          }
1470          wait_process(1);                /* wait for children to finish */
1471 <        if (pfile != NULL) {            /* clean up rpict persistent mode */
1471 >        if (pfile != NULL) {            /* clean up persistent rpict */
1472                  RT_PID  pid;
1473                  fp = fopen(pfile, "r");
1474                  if (fp != NULL) {
# Line 1494 | Line 1495 | touch(                 /* update a file */
1495                  printf("\ttouch %s\n", fn);
1496          if (!nprocs)
1497                  return(0);
1497 #ifdef notused
1498        if (access(fn, F_OK) == -1)             /* create it */
1499                if (close(open(fn, O_WRONLY|O_CREAT, 0666)) == -1)
1500                        return(-1);
1501 #endif
1498          return(setfdate(fn, time((time_t *)NULL)));
1499   }
1500  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines