| 281 |
|
return(0); |
| 282 |
|
while ((fnames = nextword(thisfile, PATH_MAX, fnames)) != NULL) { |
| 283 |
|
if (thisfile[0] == '!' || |
| 284 |
< |
(thisfile[0] == '\\' && thisfile[1] == '!')) |
| 284 |
> |
(thisfile[0] == '\\' && thisfile[1] == '!')) { |
| 285 |
> |
if (!lastdate) |
| 286 |
> |
lastdate = 1; |
| 287 |
|
continue; |
| 288 |
+ |
} |
| 289 |
|
if (!(thisdate = fdate(thisfile))) |
| 290 |
|
syserr(thisfile); |
| 291 |
|
if (thisdate > lastdate) |
| 472 |
|
oconv(void) /* run oconv and mkillum if necessary */ |
| 473 |
|
{ |
| 474 |
|
static char illumtmp[] = "ilXXXXXX"; |
| 475 |
< |
char combuf[PATH_MAX], ocopts[64], mkopts[64]; |
| 475 |
> |
char combuf[PATH_MAX], ocopts[64], mkopts[1024]; |
| 476 |
|
|
| 477 |
|
oconvopts(ocopts); /* get options */ |
| 478 |
|
if (octreedate < scenedate) { /* check date on original octree */ |
| 599 |
|
|
| 600 |
|
static void |
| 601 |
|
mkillumopts( /* get mkillum options */ |
| 602 |
< |
register char *mo |
| 602 |
> |
char *mo |
| 603 |
|
) |
| 604 |
|
{ |
| 605 |
|
/* BEWARE: This may be called via setdefaults(), so no assumptions */ |
| 606 |
|
|
| 607 |
< |
*mo = '\0'; |
| 607 |
> |
if (nprocs > 1) { |
| 608 |
> |
sprintf(mo, " -n %d", nprocs); |
| 609 |
> |
while (*mo) |
| 610 |
> |
mo++; |
| 611 |
> |
} else |
| 612 |
> |
*mo = '\0'; |
| 613 |
|
if (vdef(MKILLUM)) |
| 614 |
|
addarg(mo, vval(MKILLUM)); |
| 615 |
|
} |
| 1145 |
|
VIEW vwr; |
| 1146 |
|
char buf[128]; |
| 1147 |
|
register char *cp; |
| 1148 |
+ |
#ifdef _WIN32 |
| 1149 |
+ |
/* XXX Should we allow something like this for all platforms? */ |
| 1150 |
+ |
/* XXX Or is it still required at all? */ |
| 1151 |
+ |
again: |
| 1152 |
+ |
#endif |
| 1153 |
|
if (vopts == NULL) |
| 1154 |
|
return(-1); |
| 1155 |
|
#ifdef _WIN32 |
| 1320 |
|
zopt, oct1name, rawfile); |
| 1321 |
|
if (pfile != NULL && inchild()) { |
| 1322 |
|
/* rpict persistent mode */ |
| 1323 |
< |
if (!silent) |
| 1323 |
> |
if (!silent) { |
| 1324 |
|
printf("\t%s\n", combuf); |
| 1325 |
+ |
fflush(stdout); |
| 1326 |
+ |
} |
| 1327 |
|
sprintf(combuf, "rpict%s %s %s%s%s %s > %s", |
| 1328 |
|
rep, rppopt, res, po, opts, |
| 1329 |
|
oct1name, rawfile); |
| 1365 |
|
} |
| 1366 |
|
wait_process(1); /* wait for children to finish */ |
| 1367 |
|
if (pfile != NULL) { /* clean up rpict persistent mode */ |
| 1368 |
< |
int pid; |
| 1368 |
> |
RT_PID pid; |
| 1369 |
|
fp = fopen(pfile, "r"); |
| 1370 |
|
if (fp != NULL) { |
| 1371 |
|
if (fscanf(fp, "%*s %d", &pid) != 1 || |
| 1444 |
|
static int |
| 1445 |
|
next_process(void) /* fork the next process (max. nprocs) */ |
| 1446 |
|
{ |
| 1447 |
< |
int child_pid; |
| 1447 |
> |
RT_PID child_pid; |
| 1448 |
|
|
| 1449 |
|
if (nprocs <= 1) |
| 1450 |
|
return(0); /* it's us or no one */ |
| 1475 |
|
) |
| 1476 |
|
{ |
| 1477 |
|
int ourstatus = 0; |
| 1478 |
< |
int pid, status; |
| 1478 |
> |
RT_PID pid, status; |
| 1479 |
|
|
| 1480 |
|
if (all) |
| 1481 |
|
all = children_running; |
| 1512 |
|
} |
| 1513 |
|
int |
| 1514 |
|
kill(pid, sig) /* win|unix_process.c should also wait and kill */ |
| 1515 |
< |
int pid, sig; |
| 1515 |
> |
RT_PID pid, sig; |
| 1516 |
|
{ |
| 1517 |
|
return 0; |
| 1518 |
|
} |