--- ray/src/hd/rholo.c 2005/06/15 15:36:51 3.69 +++ ray/src/hd/rholo.c 2008/12/05 00:22:33 3.74 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rholo.c,v 3.69 2005/06/15 15:36:51 greg Exp $"; +static const char RCSid[] = "$Id: rholo.c,v 3.74 2008/12/05 00:22:33 greg Exp $"; #endif /* * Radiance holodeck generation controller @@ -21,7 +21,7 @@ static const char RCSid[] = "$Id: rholo.c,v 3.69 2005/ #define FRAGWARN 20 /* fragmentation for warning (%) */ #endif #ifndef MAXQTIME -#define MAXQTIME 5 /* target maximum seconds in queue */ +#define MAXQTIME 3 /* target maximum seconds in queue */ #endif /* manual cache flushing frequency */ #ifndef RTFLUSH @@ -164,7 +164,7 @@ main( quit(0); userr: fprintf(stderr, -"Usage: %s [-n nprocs][-o disp][-w][-r|-f] output.hdk [control.hif|+|- [VAR=val ..]]\n", +"Usage: %s [-n nprocs][-o disp][-i][-w][-r|-f] output.hdk [control.hif|+|- [VAR=val ..]]\n", progname); quit(1); return 1; /* pro forma return */ @@ -319,7 +319,7 @@ memerr: static int rholo(void) /* holodeck main loop */ { - static long nextfragwarn = 100L<<20; + static off_t nextfragwarn = 100L<<20; static int idle = 0; PACKET *pl = NULL, *plend; off_t fsiz; @@ -338,7 +338,7 @@ rholo(void) /* holodeck main loop */ return(0); /* all done */ fsiz = hdfilen(hdlist[0]->fd); /* check file size */ if (maxdisk > 0 && fsiz >= maxdisk) { - error(WARNING, "file limit exceeded"); + error(USER, "file limit exceeded"); done_rtrace(); return(1); /* comes back */ } @@ -356,7 +356,7 @@ rholo(void) /* holodeck main loop */ #endif t = time(NULL); /* check time */ if (endtime > 0 && t >= endtime) { - error(WARNING, "time limit exceeded"); + error(USER, "time limit exceeded"); done_rtrace(); return(1); /* comes back */ } @@ -534,9 +534,10 @@ loadholo(void) /* start loading a holodeck from fnam error(SYSTEM, errmsg); } if (ncprocs > 0) { - sprintf(errmsg, - "\"%s\" opened read-only; new rays will be discarded", - hdkfile); + sprintf(errmsg, "\"%s\" is read-only", hdkfile); + if (outdev == NULL) + error(USER, errmsg); + strcat(errmsg, "; new rays will be discarded"); error(WARNING, errmsg); force = -1; }