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; |
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]; |
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 */ |
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; |