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.20 by greg, Tue Aug 24 21:44:55 1993 UTC vs.
Revision 2.21 by greg, Tue Aug 24 22:14:21 1993 UTC

# Line 110 | Line 110 | long   matdate;                /* date of latest material file */
110   int     explicate = 0;          /* explicate variables */
111   int     silent = 0;             /* do work silently */
112   int     noaction = 0;           /* don't do anything */
113 < int     vwonly = 0;             /* print view only */
113 > int     sayview = 0;            /* print view out */
114   char    *rvdevice = NULL;       /* rview output device */
115   char    *viewselect = NULL;     /* specific view only */
116  
# Line 145 | Line 145 | char   *argv[];
145                          rvdevice = argv[++i];
146                          break;
147                  case 'V':
148 <                        vwonly++;
149 <                /* fall through */
148 >                        sayview++;
149 >                        break;
150                  case 'v':
151                          viewselect = argv[++i];
152                          break;
# Line 171 | Line 171 | char   *argv[];
171                                  /* print all values if requested */
172          if (explicate)
173                  printvals();
174                                /* print view and exit? */
175        if (vwonly)
176                exit(printview()==0 ? 0 : 1);
174                                  /* build octree */
175          oconv();
176                                  /* check date on ambient file */
# Line 1013 | Line 1010 | char   *vn;            /* returned view name */
1010   }
1011  
1012  
1013 < printview()                     /* print out selected view */
1013 > printview(vopts)                        /* print out selected view */
1014 > register char   *vopts;
1015   {
1016          extern char     *atos();
1017          char    buf[256];
1018          FILE    *fp;
1019 <        register char   *vopts, *cp;
1019 >        register char   *cp;
1020  
1023        vopts = getview(0, NULL);
1021          if (vopts == NULL)
1022                  return(-1);
1023          fputs("VIEW=", stdout);
# Line 1063 | Line 1060 | printview()                    /* print out selected view */
1060   rview(opts)                             /* run rview with first view */
1061   char    *opts;
1062   {
1063 +        char    *vw;
1064          char    combuf[512];
1065                                          /* build command */
1066 <        sprintf(combuf, "rview %s%s ", getview(0, NULL), opts);
1066 >        if ((vw = getview(0, NULL)) == NULL)
1067 >                return;
1068 >        if (sayview)
1069 >                printview(vw);
1070 >        sprintf(combuf, "rview %s%s ", vw, opts);
1071          if (rvdevice != NULL)
1072                  sprintf(combuf+strlen(combuf), "-o %s ", rvdevice);
1073          strcat(combuf, vval(OCTREE));
# Line 1120 | Line 1122 | char   *opts;
1122                                          /* do each view */
1123          vn = 0;
1124          while ((vw = getview(vn++, vs)) != NULL) {
1125 +                if (sayview)
1126 +                        printview(vw);
1127                  if (!vs[0])
1128                          sprintf(vs, "%d", vn);
1129                  sprintf(picfile, "%s_%s.pic", vval(PICTURE), vs);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines