131 |
|
|
132 |
|
#define DEF_RPICT_PATH "rpict" /* default rpict path */ |
133 |
|
|
134 |
+ |
#define R_CMDMAX (5*PATH_MAX+512) |
135 |
|
/* command paths */ |
136 |
|
char c_oconv[256] = "oconv"; |
137 |
|
char c_mkillum[256] = "mkillum"; |
145 |
|
|
146 |
|
int children_running = 0; /* set negative in children */ |
147 |
|
|
147 |
– |
char *progname; /* global argv[0] */ |
148 |
|
char *rifname; /* global rad input file name */ |
149 |
|
|
150 |
|
char radname[PATH_MAX]; /* root Radiance file name */ |
197 |
|
char ropts[512]; |
198 |
|
char popts[64]; |
199 |
|
int i; |
200 |
< |
|
201 |
< |
progname = argv[0]; |
200 |
> |
/* set global progname */ |
201 |
> |
fixargv0(argv[0]); |
202 |
|
/* get options */ |
203 |
|
for (i = 1; i < argc && argv[i][0] == '-'; i++) |
204 |
|
switch (argv[i][1]) { |
528 |
|
oconv(void) /* run oconv and mkillum if necessary */ |
529 |
|
{ |
530 |
|
static char illumtmp[] = "ilXXXXXX"; |
531 |
< |
char combuf[PATH_MAX], ocopts[64], mkopts[1024]; |
531 |
> |
char combuf[R_CMDMAX], ocopts[64], mkopts[1024]; |
532 |
|
|
533 |
|
oconvopts(ocopts); /* get options */ |
534 |
|
if (octreedate < scenedate) { /* check date on original octree */ |
1415 |
|
) |
1416 |
|
{ |
1417 |
|
char *vw; |
1418 |
< |
char combuf[PATH_MAX]; |
1418 |
> |
char combuf[R_CMDMAX]; |
1419 |
|
/* build command */ |
1420 |
|
if (touchonly || (vw = getview(0, NULL)) == NULL) |
1421 |
|
return; |
1613 |
|
} else { |
1614 |
|
if (overture) { /* run overture calculation */ |
1615 |
|
sprintf(combuf, |
1616 |
< |
"%s%s %s%s -x 64 -y 64 -ps 1 %s > %s", |
1617 |
< |
c_rpict, rep, vw, opts, |
1616 |
> |
"%s%s %s%s%s -x 64 -y 64 -ps 1 %s > %s", |
1617 |
> |
c_rpict, rep, vw, opts, po, |
1618 |
|
oct1name, overfile); |
1619 |
|
if (!do_rpiece || !next_process(0)) { |
1620 |
|
if (runcom(combuf)) { |