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.70 by schorsch, Mon Jul 21 22:30:19 2003 UTC vs.
Revision 2.71 by schorsch, Sun Jul 27 22:12:03 2003 UTC

# Line 169 | Line 169 | char   *argv[];
169                  goto userr;
170          rifname = argv[i];
171                                  /* check command-line options */
172 <        if (nprocs > 1 & viewselect != NULL)
172 >        if ((nprocs > 1) & (viewselect != NULL))
173                  nprocs = 1;
174                                  /* assign Radiance root file name */
175          rootname(radname, rifname);
# Line 216 | Line 216 | register char  *rn, *fn;
216   {
217          char    *tp, *dp;
218  
219 <        for (tp = NULL, dp = rn; *rn = *fn++; rn++)
219 >        for (tp = NULL, dp = rn; (*rn = *fn++); rn++)
220                  if (ISDIRSEP(*rn))
221                          dp = rn;
222                  else if (*rn == '.')
# Line 448 | Line 448 | oconv()                                /* run oconv and mkillum if necessary */
448          }
449          if (oct1name == vval(OCTREE))           /* no mkillum? */
450                  oct1date = octreedate > matdate ? octreedate : matdate;
451 <        if (oct1date >= octreedate & oct1date >= matdate
452 <                        & oct1date >= illumdate)        /* all done */
451 >        if ((oct1date >= octreedate) & (oct1date >= matdate)
452 >                        & (oct1date >= illumdate))      /* all done */
453                  return;
454                                                  /* make octree0 */
455 <        if (oct0date < scenedate | oct0date < illumdate) {
455 >        if ((oct0date < scenedate) | (oct0date < illumdate)) {
456                  if (touchonly && oct0date)
457                          touch(oct0name);
458                  else {                          /* build command */
# Line 523 | Line 523 | addarg(op, arg)                                /* add argument and advance pointer
523   register char   *op, *arg;
524   {
525          *op = ' ';
526 <        while (*++op = *arg++)
526 >        while ( (*++op = *arg++) )
527                  ;
528          return(op);
529   }
# Line 613 | Line 613 | char   *po;
613                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
614                  badvalue(ZONE);
615          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
616 <        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
616 >        if ((siz[0] <= FTINY) | (siz[1] <= FTINY) | (siz[2] <= FTINY))
617                  badvalue(ZONE);
618          getoctcube(org, &d);
619          d *= 3./(siz[0]+siz[1]+siz[2]);
# Line 681 | Line 681 | char   *po;
681                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
682                  badvalue(ZONE);
683          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
684 <        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
684 >        if ((siz[0] <= FTINY) | (siz[1] <= FTINY) | (siz[2] <= FTINY))
685                  badvalue(ZONE);
686          getoctcube(org, &d);
687          asz = (siz[0]+siz[1]+siz[2])/3.;
# Line 718 | Line 718 | char   *po;
718          else
719                  op = addarg(op, "-ds .3");
720          op = addarg(op, "-dt .1 -dc .5 -dr 1 -sj .7 -st .1");
721 <        if (overture = vint(INDIRECT)) {
721 >        if ( (overture = vint(INDIRECT)) ) {
722                  sprintf(op, " -ab %d", overture);
723                  op += strlen(op);
724          }
# Line 759 | Line 759 | char   *po;
759                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
760                  badvalue(ZONE);
761          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
762 <        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
762 >        if ((siz[0] <= FTINY) | (siz[1] <= FTINY) | (siz[2] <= FTINY))
763                  badvalue(ZONE);
764          getoctcube(org, &d);
765          asz = (siz[0]+siz[1]+siz[2])/3.;
# Line 907 | Line 907 | register char  *vs;
907                          upax = 1-'X'+UPPER(vval(UP)[1]);
908                  else
909                          upax = 1-'X'+vlet(UP);
910 <                if (upax < 1 | upax > 3)
910 >                if ((upax < 1) | (upax > 3))
911                          badvalue(UP);
912                  if (vval(UP)[0] == '-')
913                          upax = -upax;
# Line 930 | Line 930 | register char  *vs;
930                  zpos = -1; vs++;
931          }
932          viewtype = 'v';
933 <        if (*vs == 'v' | *vs == 'l' | *vs == 'a' | *vs == 'h' | *vs == 'c')
933 >        if((*vs == 'v') | (*vs == 'l') | (*vs == 'a') | (*vs == 'h') | (*vs == 'c'))
934                  viewtype = *vs++;
935          cp = viewopts;
936          if ((!*vs || isspace(*vs)) && (xpos|ypos|zpos)) {       /* got one! */
# Line 1041 | Line 1041 | char   *vn;            /* returned view name */
1041                  return(specview(viewselect));   /* standard view? */
1042          }
1043          mv = nvalue(VIEWS, n);          /* use view n */
1044 <        if (vn != NULL & mv != NULL) {
1044 >        if ((vn != NULL) & (mv != NULL)) {
1045                  register char   *mv2 = mv;
1046                  if (*mv2 != '-')
1047                          while (*mv2 && !isspace(*mv2))
# Line 1159 | Line 1159 | char   *opts, *po;
1159                          badvalue(REPORT);
1160          }
1161                                          /* set up parallel rendering */
1162 <        if (nprocs > 1 & !vdef(ZFILE)) {
1162 >        if ((nprocs > 1) & (!vdef(ZFILE))) {
1163                  strcpy(rppopt, "-S 1 -PP pfXXXXXX");
1164                  pfile = rppopt+9;
1165                  if (mktemp(pfile) == NULL)
# Line 1380 | Line 1380 | int    all;
1380                  status = status>>8 & 0xff;
1381                  --children_running;
1382                  if (status != 0) {      /* child's problem is our problem */
1383 <                        if (ourstatus == 0 & children_running > 0)
1383 >                        if ((ourstatus == 0) & (children_running > 0))
1384                                  fprintf(stderr, "%s: waiting for remaining processes\n",
1385                                                  progname);
1386                          ourstatus = status;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines