75 |
|
static int oputo(), oputd(), oputv(), oputl(), oputL(), |
76 |
|
oputp(), oputn(), oputN(), oputs(), oputw(), oputm(); |
77 |
|
|
78 |
+ |
static int ourtrace(), tabin(); |
79 |
|
static int (*ray_out[10])(), (*every_out[10])(); |
80 |
|
static int castonly; |
81 |
|
|
87 |
|
quit(code) /* quit program */ |
88 |
|
int code; |
89 |
|
{ |
90 |
+ |
#ifndef NIX |
91 |
+ |
headclean(); /* delete header file */ |
92 |
+ |
pfclean(); /* clean up persist files */ |
93 |
+ |
#endif |
94 |
|
exit(code); |
95 |
|
} |
96 |
|
|
140 |
|
default: |
141 |
|
error(CONSISTENCY, "botched output format"); |
142 |
|
} |
143 |
< |
if (hresolu > 0 && vresolu > 0) |
144 |
< |
fprtresolu(hresolu, vresolu, stdout); |
143 |
> |
if (hresolu > 0) { |
144 |
> |
if (vresolu > 0) |
145 |
> |
fprtresolu(hresolu, vresolu, stdout); |
146 |
> |
fflush(stdout); |
147 |
> |
} |
148 |
|
/* process file */ |
149 |
|
while (getvec(orig, inform, fp) == 0 && |
150 |
|
getvec(direc, inform, fp) == 0) { |
169 |
|
if (--vcount == 0) /* check for end */ |
170 |
|
break; |
171 |
|
} |
172 |
+ |
fflush(stdout); |
173 |
|
if (vcount > 0) |
174 |
|
error(USER, "read error"); |
175 |
< |
fclose(fp); |
175 |
> |
if (fname != NULL) |
176 |
> |
fclose(fp); |
177 |
|
} |
178 |
|
|
179 |
|
|
180 |
|
setoutput(vs) /* set up output tables */ |
181 |
|
register char *vs; |
182 |
|
{ |
183 |
< |
extern int ourtrace(), (*trace)(); |
183 |
> |
extern int (*trace)(); |
184 |
|
register int (**table)() = ray_out; |
185 |
|
|
186 |
|
castonly = 1; |