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

Comparing ray/src/ot/oconv.c (file contents):
Revision 2.5 by greg, Fri Oct 9 10:26:28 1992 UTC vs.
Revision 2.6 by greg, Fri Feb 12 18:43:24 1993 UTC

# Line 51 | Line 51 | char  **argv;
51          extern char  *getenv();
52          FVECT  bbmin, bbmax;
53          char  *infile = NULL;
54 +        int  inpfrozen = 0;
55          int  outflags = IO_ALL;
56          OBJECT  startobj;
57          int  i;
# Line 65 | Line 66 | char  **argv;
66          for (i = 1; i < argc && argv[i][0] == '-'; i++)
67                  switch (argv[i][1]) {
68                  case '\0':                              /* scene from stdin */
69 +                        outflags &= ~IO_FILES;
70                          goto breakopt;
71                  case 'i':                               /* input octree */
72                          infile = argv[++i];
# Line 100 | Line 102 | breakopt:
102                  if (thescene.cusize > FTINY)
103                          error(USER, "only one of '-b' or '-i'");
104                  nfiles = readoct(infile, IO_ALL, &thescene, ofname);
105 <                if (nfiles == 0 && outflags & IO_FILES) {
106 <                        error(WARNING, "frozen octree");
105 <                        outflags &= ~IO_FILES;
106 <                }
105 >                if (nfiles == 0)
106 >                        inpfrozen++;
107          }
108  
109          printargs(argc, argv, stdout);  /* info. header */
# Line 123 | Line 123 | breakopt:
123                  }
124  
125          ofname[nfiles] = NULL;
126 +
127 +        if (inpfrozen && outflags & IO_FILES) {
128 +                error(WARNING, "frozen octree");
129 +                outflags &= ~IO_FILES;
130 +        }
131                                                  /* find bounding box */
132          bbmin[0] = bbmin[1] = bbmin[2] = FHUGE;
133          bbmax[0] = bbmax[1] = bbmax[2] = -FHUGE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines