ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/Development/ray/src/rt/rmain.c
(Generate patch)

Comparing ray/src/rt/rmain.c (file contents):
Revision 1.18 by greg, Fri Jul 28 23:45:07 1989 UTC vs.
Revision 1.19 by greg, Sat Jul 29 00:01:24 1989 UTC

# Line 38 | Line 38 | static char SCCSid[] = "$SunId$ LBL";
38  
39   char  *progname;                        /* argv[0] */
40  
41 + char  *octname;                         /* octree name */
42 +
43   char  *libpath;                         /* library directory list */
44  
45   char  *sigerr[NSIG];                    /* signal error messages */
# Line 371 | Line 373 | char  *argv[];
373                          break;
374   #endif
375                  default:
376 < badopt:
375 <                        sprintf(errmsg, "command line error at '%s'", argv[i]);
376 <                        error(USER, errmsg);
377 <                        break;
376 >                        goto badopt;
377                  }
378          }
379   #if  RPICT|RVIEW
# Line 409 | Line 408 | badopt:
408   #ifdef  NICE
409          nice(NICE);                     /* lower priority */
410   #endif
411 +                                        /* get octree */
412   #if  RVIEW
413          loadflags &= ~IO_INFO;
414   #endif
415 #if  RPICT
415          if (i == argc)
416 <                readoct(NULL, loadflags, &thescene, NULL);
416 >                octname = NULL;
417 >        else if (i == argc-1)
418 >                octname = argv[i];
419          else
420 +                goto badopt;
421 + #if  RVIEW|RTRACE
422 +        if (octname == NULL)
423 +                error(USER, "missing octree argument");
424   #endif
425 <        if (i == argc-1)
421 <                readoct(argv[i], loadflags, &thescene, NULL);
422 <        else
423 <                error(USER, "single octree required");
425 >        readoct(octname, loadflags, &thescene, NULL);
426  
427          if (loadflags & IO_INFO) {      /* print header */
428                  printargs(i, argv, stdout);
# Line 451 | Line 453 | badopt:
453          rview();                        /* go */
454   #endif
455          quit(0);
456 +
457 + badopt:
458 +        sprintf(errmsg, "command line error at '%s'", argv[i]);
459 +        error(USER, errmsg);
460 +
461   #undef  check
462   }
463  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)