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 |
|
|
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; |
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 */ |
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); |
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)); |
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); |