--- ray/src/util/rad.c 2023/11/16 23:37:29 2.132 +++ ray/src/util/rad.c 2025/06/03 21:31:51 2.134 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rad.c,v 2.132 2023/11/16 23:37:29 greg Exp $"; +static const char RCSid[] = "$Id: rad.c,v 2.134 2025/06/03 21:31:51 greg Exp $"; #endif /* * Executive program for oconv, rpict and pfilt @@ -131,6 +131,7 @@ char *viewselect = NULL; /* specific view only */ #define DEF_RPICT_PATH "rpict" /* default rpict path */ +#define R_CMDMAX (5*PATH_MAX+512) /* command paths */ char c_oconv[256] = "oconv"; char c_mkillum[256] = "mkillum"; @@ -144,7 +145,6 @@ int overture = 0; /* overture calculation needed */ int children_running = 0; /* set negative in children */ -char *progname; /* global argv[0] */ char *rifname; /* global rad input file name */ char radname[PATH_MAX]; /* root Radiance file name */ @@ -197,8 +197,8 @@ main( char ropts[512]; char popts[64]; int i; - - progname = argv[0]; + /* set global progname */ + fixargv0(argv[0]); /* get options */ for (i = 1; i < argc && argv[i][0] == '-'; i++) switch (argv[i][1]) { @@ -528,7 +528,7 @@ static void oconv(void) /* run oconv and mkillum if necessary */ { static char illumtmp[] = "ilXXXXXX"; - char combuf[PATH_MAX], ocopts[64], mkopts[1024]; + char combuf[R_CMDMAX], ocopts[64], mkopts[1024]; oconvopts(ocopts); /* get options */ if (octreedate < scenedate) { /* check date on original octree */ @@ -1415,7 +1415,7 @@ rvu( /* run rvu with first view */ ) { char *vw; - char combuf[PATH_MAX]; + char combuf[R_CMDMAX]; /* build command */ if (touchonly || (vw = getview(0, NULL)) == NULL) return;