11 |
|
#include <time.h> |
12 |
|
|
13 |
|
#include "platform.h" |
14 |
+ |
#include "rtprocess.h" |
15 |
|
#include "view.h" |
16 |
|
#include "paths.h" |
17 |
|
#include "vars.h" |
107 |
|
int touchonly = 0; /* touch files only */ |
108 |
|
int nprocs = 1; /* maximum executing processes */ |
109 |
|
int sayview = 0; /* print view out */ |
110 |
< |
char *rvdevice = NULL; /* rview output device */ |
110 |
> |
char *rvdevice = NULL; /* rvu output device */ |
111 |
|
char *viewselect = NULL; /* specific view only */ |
112 |
|
|
113 |
|
int overture = 0; /* overture calculation needed */ |
200 |
|
renderopts(ropts, popts); |
201 |
|
xferopts(ropts); |
202 |
|
if (rvdevice != NULL) |
203 |
< |
rview(ropts, popts); |
203 |
> |
rvu(ropts, popts); |
204 |
|
else |
205 |
|
rpict(ropts, popts); |
206 |
|
quit(0); |
312 |
|
getoctcube(org, sizp) /* get octree bounding cube */ |
313 |
|
double org[3], *sizp; |
314 |
|
{ |
314 |
– |
extern FILE *popen(); |
315 |
|
static double oorg[3], osiz = 0.; |
316 |
|
double min[3], max[3]; |
317 |
|
char buf[1024]; |
1083 |
|
} |
1084 |
|
|
1085 |
|
|
1086 |
< |
rview(opts, po) /* run rview with first view */ |
1086 |
> |
rvu(opts, po) /* run rvu with first view */ |
1087 |
|
char *opts, *po; |
1088 |
|
{ |
1089 |
|
char *vw; |
1093 |
|
return; |
1094 |
|
if (sayview) |
1095 |
|
myprintview(vw, stdout); |
1096 |
< |
sprintf(combuf, "rview %s%s%s -R %s ", vw, po, opts, rifname); |
1096 |
> |
sprintf(combuf, "rvu %s%s%s -R %s ", vw, po, opts, rifname); |
1097 |
|
if (rvdevice != NULL) |
1098 |
|
sprintf(combuf+strlen(combuf), "-o %s ", rvdevice); |
1099 |
|
if (vdef(EXPOSURE)) |
1100 |
|
sprintf(combuf+strlen(combuf), "-pe %s ", vval(EXPOSURE)); |
1101 |
|
strcat(combuf, oct1name); |
1102 |
|
if (runcom(combuf)) { /* run it */ |
1103 |
< |
fprintf(stderr, "%s: error running rview\n", progname); |
1103 |
> |
fprintf(stderr, "%s: error running rvu\n", progname); |
1104 |
|
quit(1); |
1105 |
|
} |
1106 |
|
} |
1264 |
|
mvfile(rawfile, combuf); |
1265 |
|
} else |
1266 |
|
rmfile(rawfile); |
1267 |
< |
finish_process(); /* leave if child */ |
1267 |
> |
finish_process(); /* exit if child */ |
1268 |
|
} |
1269 |
|
wait_process(1); /* wait for children to finish */ |
1270 |
|
if (pfile != NULL) { /* clean up rpict persistent mode */ |
1272 |
|
fp = fopen(pfile, "r"); |
1273 |
|
if (fp != NULL) { |
1274 |
|
if (fscanf(fp, "%*s %d", &pid) != 1 || |
1275 |
< |
kill(pid, 1) == -1) |
1275 |
> |
kill(pid, 1) < 0) |
1276 |
|
unlink(pfile); |
1277 |
|
fclose(fp); |
1278 |
|
} |
1343 |
|
if (nprocs <= 1) |
1344 |
|
return(0); /* it's us or no one */ |
1345 |
|
if (inchild()) { |
1346 |
< |
fprintf(stderr, "%s: internal error 1 in spawn_process()\n", |
1346 |
> |
fprintf(stderr, "%s: internal error 1 in next_process()\n", |
1347 |
|
progname); |
1348 |
|
quit(1); |
1349 |
|
} |