--- ray/src/rt/renderopts.c 2004/03/30 16:13:01 2.4 +++ ray/src/rt/renderopts.c 2005/05/31 18:01:09 2.8 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: renderopts.c,v 2.4 2004/03/30 16:13:01 schorsch Exp $"; +static const char RCSid[] = "$Id: renderopts.c,v 2.8 2005/05/31 18:01:09 greg Exp $"; #endif /* * renderopts.c - process common rendering options @@ -10,6 +10,7 @@ static const char RCSid[] = "$Id: renderopts.c,v 2.4 2 #include "copyright.h" #include "ray.h" +#include "paths.h" extern int @@ -143,12 +144,12 @@ getrenderopt( /* get next render option */ getpath(av[1],getrlibpath(),R_OK)); if (rval < 0) { sprintf(errmsg, - "cannot open ambient include file \"%s\"", av[0]); + "cannot open ambient include file \"%s\"", av[1]); error(SYSTEM, errmsg); } amblp += rval; } else { - *amblp++ = av[1]; + *amblp++ = savqstr(av[1]); *amblp = NULL; } return(1); @@ -164,18 +165,18 @@ getrenderopt( /* get next render option */ getpath(av[1],getrlibpath(),R_OK)); if (rval < 0) { sprintf(errmsg, - "cannot open ambient exclude file \"%s\"", av[0]); + "cannot open ambient exclude file \"%s\"", av[1]); error(SYSTEM, errmsg); } amblp += rval; } else { - *amblp++ = av[1]; + *amblp++ = savqstr(av[1]); *amblp = NULL; } return(1); case 'f': /* file */ check(3,"s"); - ambfile= av[1]; + ambfile = savqstr(av[1]); return(1); } break; @@ -244,6 +245,7 @@ print_rdefaults(void) /* print default render values colval(salbedo,GRN), colval(salbedo,BLU)); printf("-mg %f\t\t\t# mist scattering eccentricity\n", seccg); printf("-ms %f\t\t\t# mist sampling distance\n", ssampdist); - printf("-lr %-9d\t\t\t# limit reflection\n", maxdepth); + printf("-lr %-9d\t\t\t# limit reflection%s\n", maxdepth, + maxdepth<=0 ? " (Russian roulette)" : ""); printf("-lw %f\t\t\t# limit weight\n", minweight); }