ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/ot/getbbox.c
(Generate patch)

Comparing ray/src/ot/getbbox.c (file contents):
Revision 1.2 by greg, Wed May 29 17:51:44 1991 UTC vs.
Revision 2.2 by greg, Thu Dec 19 15:06:44 1991 UTC

# Line 41 | Line 41 | main(argc, argv)               /* read object files and compute bou
41   int  argc;
42   char  **argv;
43   {
44 <        char  *getenv();
45 <        double  atof();
44 >        extern char  *getenv();
45 >        int  nohead = 0;
46          int  i;
47  
48          progname = argv[0];
# Line 50 | Line 50 | char  **argv;
50          if ((libpath = getenv("RAYPATH")) == NULL)
51                  libpath = DEFPATH;
52  
53 <        if (!strcmp(argv[1], "-w")) {
54 <                nowarn = 1;
55 <                i = 2;
56 <        } else
57 <                i = 1;
58 < breakopt:
53 >        for (i = 1; i < argc && argv[i][0] == '-'; i++) {
54 >                switch (argv[i][1]) {
55 >                case 'w':
56 >                        nowarn = 1;
57 >                        continue;
58 >                case 'h':
59 >                        nohead = 1;
60 >                        continue;
61 >                }
62 >                break;
63 >        }
64                                                  /* find bounding box */
65          bbmin[0] = bbmin[1] = bbmin[2] = FHUGE;
66          bbmax[0] = bbmax[1] = bbmax[2] = -FHUGE;
# Line 69 | Line 74 | breakopt:
74                          else                            /* from file */
75                                  readobj(argv[i], addobject);
76                                                  /* print bounding box */
77 <        printf("      xmin      xmax      ymin      ymax      zmin      zmax\n");
77 >        if (!nohead)
78 >                printf(
79 > "      xmin      xmax      ymin      ymax      zmin      zmax\n");
80 >
81          printf("%9g %9g %9g %9g %9g %9g\n", bbmin[0], bbmax[0],
82                          bbmin[1], bbmax[1], bbmin[2], bbmax[2]);
83          quit(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines