--- ray/src/rt/rcmain.c 2012/06/22 22:03:02 2.7 +++ ray/src/rt/rcmain.c 2013/08/11 13:48:48 2.11 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcmain.c,v 2.7 2012/06/22 22:03:02 greg Exp $"; +static const char RCSid[] = "$Id: rcmain.c,v 2.11 2013/08/11 13:48:48 greg Exp $"; #endif /* * rcmain.c - main for rtcontrib ray contribution tracer @@ -8,6 +8,7 @@ static const char RCSid[] = "$Id: rcmain.c,v 2.7 2012/ #include "copyright.h" #include +#include #include "rcontrib.h" #include "random.h" #include "source.h" @@ -45,14 +46,12 @@ int nmods = 0; /* number of modifiers */ void (*addobjnotify[8])() = {ambnotify, NULL}; -char RCCONTEXT[] = "RCONTRIB"; /* our special evaluation context */ +char RCCONTEXT[] = "RC"; /* our special evaluation context */ static void printdefaults(void) /* print default values to stdout */ { - char *cp; - printf("-c %-5d\t\t\t# accumulated rays per record\n", accumulate); printf("-V%c\t\t\t\t# output %s\n", contrib ? '+' : '-', contrib ? "contributions" : "coefficients"); @@ -290,6 +289,8 @@ main(int argc, char *argv[]) goto badopt; } } + if (nmods <= 0) + error(USER, "missing required modifier argument"); /* override some option settings */ override_options(); /* initialize object types */ @@ -335,8 +336,6 @@ main(int argc, char *argv[]) nsceneobjs = nobjects; marksources(); /* find and mark sources */ - for (i = 0; i < nsources; i++) /* tracing to sources as well */ - source[i].sflags |= SFOLLOW; setambient(); /* initialize ambient calculation */