--- ray/src/util/rad.c 2004/10/23 18:55:53 2.80 +++ ray/src/util/rad.c 2008/03/11 02:21:47 2.83 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rad.c,v 2.80 2004/10/23 18:55:53 schorsch Exp $"; +static const char RCSid[] = "$Id: rad.c,v 2.83 2008/03/11 02:21:47 greg Exp $"; #endif /* * Executive program for oconv, rpict and pfilt @@ -1013,7 +1013,8 @@ specview( /* get proper view spec from vs */ zpos = -1; vs++; } viewtype = 'v'; - if((*vs == 'v') | (*vs == 'l') | (*vs == 'a') | (*vs == 'h') | (*vs == 'c')) + if ((*vs == 'v') | (*vs == 'l') | (*vs == 'a') | + (*vs == 'h') | (*vs == 'c') | (*vs == 's')) viewtype = *vs++; cp = viewopts; if ((!*vs || isspace(*vs)) && (xpos|ypos|zpos)) { /* got one! */ @@ -1320,14 +1321,12 @@ rpict( /* run rpict and pfilt for each view */ zopt, oct1name, rawfile); if (pfile != NULL && inchild()) { /* rpict persistent mode */ - if (!silent) { + if (!silent) printf("\t%s\n", combuf); - fflush(stdout); - } + fflush(stdout); sprintf(combuf, "rpict%s %s %s%s%s %s > %s", rep, rppopt, res, po, opts, oct1name, rawfile); - fflush(stdout); fp = popen(combuf, "w"); if (fp == NULL) goto rperror; @@ -1365,7 +1364,7 @@ rpict( /* run rpict and pfilt for each view */ } wait_process(1); /* wait for children to finish */ if (pfile != NULL) { /* clean up rpict persistent mode */ - int pid; + RT_PID pid; fp = fopen(pfile, "r"); if (fp != NULL) { if (fscanf(fp, "%*s %d", &pid) != 1 || @@ -1408,7 +1407,7 @@ runcom( /* run command */ printf("\t%s\n", cs); if (!nprocs) return(0); - fflush(stdout); /* flush output and pass to shell */ + fflush(NULL); /* flush output and pass to shell */ return(system(cs)); } @@ -1444,7 +1443,7 @@ mvfile( /* move a file */ static int next_process(void) /* fork the next process (max. nprocs) */ { - int child_pid; + RT_PID child_pid; if (nprocs <= 1) return(0); /* it's us or no one */ @@ -1455,7 +1454,7 @@ next_process(void) /* fork the next process (max. np } if (children_running >= nprocs) wait_process(0); /* wait for someone to finish */ - fflush(stdout); + fflush(NULL); /* flush output */ child_pid = fork(); /* split process */ if (child_pid == 0) { /* we're the child */ children_running = -1; @@ -1475,7 +1474,7 @@ wait_process( /* wait for process(es) to finish */ ) { int ourstatus = 0; - int pid, status; + RT_PID pid, status; if (all) all = children_running; @@ -1512,7 +1511,7 @@ int all; } int kill(pid, sig) /* win|unix_process.c should also wait and kill */ -int pid, sig; +RT_PID pid, sig; { return 0; }