--- ray/src/util/rad.c 2003/09/24 14:55:54 2.72 +++ ray/src/util/rad.c 2004/01/01 19:31:46 2.75 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rad.c,v 2.72 2003/09/24 14:55:54 greg Exp $"; +static const char RCSid[] = "$Id: rad.c,v 2.75 2004/01/01 19:31:46 greg Exp $"; #endif /* * Executive program for oconv, rpict and pfilt @@ -11,6 +11,7 @@ static const char RCSid[] = "$Id: rad.c,v 2.72 2003/09 #include #include "platform.h" +#include "rtprocess.h" #include "view.h" #include "paths.h" #include "vars.h" @@ -106,7 +107,7 @@ int silent = 0; /* do work silently */ int touchonly = 0; /* touch files only */ int nprocs = 1; /* maximum executing processes */ int sayview = 0; /* print view out */ -char *rvdevice = NULL; /* rview output device */ +char *rvdevice = NULL; /* rvu output device */ char *viewselect = NULL; /* specific view only */ int overture = 0; /* overture calculation needed */ @@ -199,7 +200,7 @@ char *argv[]; renderopts(ropts, popts); xferopts(ropts); if (rvdevice != NULL) - rview(ropts, popts); + rvu(ropts, popts); else rpict(ropts, popts); quit(0); @@ -311,7 +312,6 @@ checkfiles() /* check for existence and modified tim getoctcube(org, sizp) /* get octree bounding cube */ double org[3], *sizp; { - extern FILE *popen(); static double oorg[3], osiz = 0.; double min[3], max[3]; char buf[1024]; @@ -1083,7 +1083,7 @@ again: } -rview(opts, po) /* run rview with first view */ +rvu(opts, po) /* run rvu with first view */ char *opts, *po; { char *vw; @@ -1093,14 +1093,14 @@ char *opts, *po; return; if (sayview) myprintview(vw, stdout); - sprintf(combuf, "rview %s%s%s -R %s ", vw, po, opts, rifname); + sprintf(combuf, "rvu %s%s%s -R %s ", vw, po, opts, rifname); if (rvdevice != NULL) sprintf(combuf+strlen(combuf), "-o %s ", rvdevice); if (vdef(EXPOSURE)) sprintf(combuf+strlen(combuf), "-pe %s ", vval(EXPOSURE)); strcat(combuf, oct1name); if (runcom(combuf)) { /* run it */ - fprintf(stderr, "%s: error running rview\n", progname); + fprintf(stderr, "%s: error running rvu\n", progname); quit(1); } } @@ -1264,7 +1264,7 @@ char *opts, *po; mvfile(rawfile, combuf); } else rmfile(rawfile); - finish_process(); /* leave if child */ + finish_process(); /* exit if child */ } wait_process(1); /* wait for children to finish */ if (pfile != NULL) { /* clean up rpict persistent mode */ @@ -1272,7 +1272,7 @@ char *opts, *po; fp = fopen(pfile, "r"); if (fp != NULL) { if (fscanf(fp, "%*s %d", &pid) != 1 || - kill(pid, 1) == -1) + kill(pid, 1) < 0) unlink(pfile); fclose(fp); } @@ -1343,7 +1343,7 @@ next_process() /* fork the next process (max. nprocs if (nprocs <= 1) return(0); /* it's us or no one */ if (inchild()) { - fprintf(stderr, "%s: internal error 1 in spawn_process()\n", + fprintf(stderr, "%s: internal error 1 in next_process()\n", progname); quit(1); }