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.81 by schorsch, Mon Sep 12 14:40:13 2005 UTC vs.
Revision 2.84 by greg, Tue Mar 11 12:42:07 2008 UTC

# Line 1012 | Line 1012 | specview(                              /* get proper view spec from vs */
1012          } else if (*vs == 'z') {
1013                  zpos = -1; vs++;
1014          }
1015 <        viewtype = 'v';
1016 <        if((*vs == 'v') | (*vs == 'l') | (*vs == 'a') | (*vs == 'h') | (*vs == 'c'))
1015 >        switch (*vs) {
1016 >        case VT_PER:
1017 >        case VT_PAR:
1018 >        case VT_ANG:
1019 >        case VT_HEM:
1020 >        case VT_PLS:
1021 >        case VT_CYL:
1022                  viewtype = *vs++;
1023 +                break;
1024 +        default:
1025 +                viewtype = VT_PER;
1026 +                break;
1027 +        }
1028          cp = viewopts;
1029          if ((!*vs || isspace(*vs)) && (xpos|ypos|zpos)) {       /* got one! */
1030                  *cp++ = '-'; *cp++ = 'v'; *cp++ = 't'; *cp++ = viewtype;
# Line 1056 | Line 1066 | specview(                              /* get proper view spec from vs */
1066                  }
1067                  cp = addarg(cp, vup[upax+3]);
1068                  switch (viewtype) {
1069 <                case 'v':
1069 >                case VT_PER:
1070                          cp = addarg(cp, "-vh 45 -vv 45");
1071                          break;
1072 <                case 'l':
1072 >                case VT_PAR:
1073                          d = sqrt(dim[0]*dim[0]+dim[1]*dim[1]+dim[2]*dim[2]);
1074                          sprintf(cp, " -vh %.2g -vv %.2g", d, d);
1075                          cp += strlen(cp);
1076                          break;
1077 <                case 'a':
1078 <                case 'h':
1077 >                case VT_ANG:
1078 >                case VT_HEM:
1079 >                case VT_PLS:
1080                          cp = addarg(cp, "-vh 180 -vv 180");
1081                          break;
1082 <                case 'c':
1082 >                case VT_CYL:
1083                          cp = addarg(cp, "-vh 180 -vv 90");
1084                          break;
1085                  }
# Line 1320 | Line 1331 | rpict(                         /* run rpict and pfilt for each view */
1331                                          zopt, oct1name, rawfile);
1332                          if (pfile != NULL && inchild()) {
1333                                                  /* rpict persistent mode */
1334 <                                if (!silent) {
1334 >                                if (!silent)
1335                                          printf("\t%s\n", combuf);
1336 <                                        fflush(stdout);
1326 <                                }
1336 >                                fflush(stdout);
1337                                  sprintf(combuf, "rpict%s %s %s%s%s %s > %s",
1338                                                  rep, rppopt, res, po, opts,
1339                                                  oct1name, rawfile);
1330                                fflush(stdout);
1340                                  fp = popen(combuf, "w");
1341                                  if (fp == NULL)
1342                                          goto rperror;
# Line 1408 | Line 1417 | runcom(                        /* run command */
1417                  printf("\t%s\n", cs);
1418          if (!nprocs)
1419                  return(0);
1420 <        fflush(stdout);         /* flush output and pass to shell */
1420 >        fflush(NULL);           /* flush output and pass to shell */
1421          return(system(cs));
1422   }
1423  
# Line 1455 | Line 1464 | next_process(void)                     /* fork the next process (max. np
1464          }
1465          if (children_running >= nprocs)
1466                  wait_process(0);        /* wait for someone to finish */
1467 <        fflush(stdout);
1467 >        fflush(NULL);                   /* flush output */
1468          child_pid = fork();             /* split process */
1469          if (child_pid == 0) {           /* we're the child */
1470                  children_running = -1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines