22 |
|
|
23 |
|
#include <ctype.h> |
24 |
|
|
25 |
< |
#define CTRL(c) ('c'-'@') |
25 |
> |
#define CTRL(c) ((c)-'@') |
26 |
|
|
27 |
|
extern char VersionID[]; |
28 |
|
extern char *progname; |
75 |
|
sprintf(buf, "view type (%c): ", ourview.type); |
76 |
|
(*dev->comout)(buf); |
77 |
|
(*dev->comin)(buf, NULL); |
78 |
< |
if (buf[0] == CTRL(C)) return; |
78 |
> |
if (buf[0] == CTRL('C')) return; |
79 |
|
if (buf[0] && buf[0] != ourview.type) { |
80 |
|
nv.type = buf[0]; |
81 |
|
change++; |
85 |
|
ourview.vp[0], ourview.vp[1], ourview.vp[2]); |
86 |
|
(*dev->comout)(buf); |
87 |
|
(*dev->comin)(buf, NULL); |
88 |
< |
if (buf[0] == CTRL(C)) return; |
88 |
> |
if (buf[0] == CTRL('C')) return; |
89 |
|
if (sscanf(buf, "%lf %lf %lf", &nv.vp[0], &nv.vp[1], &nv.vp[2]) == 3) |
90 |
|
change++; |
91 |
|
else |
94 |
|
ourview.vdir[0], ourview.vdir[1], ourview.vdir[2]); |
95 |
|
(*dev->comout)(buf); |
96 |
|
(*dev->comin)(buf, NULL); |
97 |
< |
if (buf[0] == CTRL(C)) return; |
97 |
> |
if (buf[0] == CTRL('C')) return; |
98 |
|
if (sscanf(buf,"%lf %lf %lf",&nv.vdir[0],&nv.vdir[1],&nv.vdir[2]) == 3) |
99 |
|
change++; |
100 |
|
else |
103 |
|
ourview.vup[0], ourview.vup[1], ourview.vup[2]); |
104 |
|
(*dev->comout)(buf); |
105 |
|
(*dev->comin)(buf, NULL); |
106 |
< |
if (buf[0] == CTRL(C)) return; |
106 |
> |
if (buf[0] == CTRL('C')) return; |
107 |
|
if (sscanf(buf,"%lf %lf %lf",&nv.vup[0],&nv.vup[1],&nv.vup[2]) == 3) |
108 |
|
change++; |
109 |
|
else |
112 |
|
ourview.horiz, ourview.vert); |
113 |
|
(*dev->comout)(buf); |
114 |
|
(*dev->comin)(buf, NULL); |
115 |
< |
if (buf[0] == CTRL(C)) return; |
115 |
> |
if (buf[0] == CTRL('C')) return; |
116 |
|
if (sscanf(buf, "%lf %lf", &nv.horiz, &nv.vert) == 2) |
117 |
|
change++; |
118 |
|
else { |
122 |
|
ourview.hoff, ourview.voff); |
123 |
|
(*dev->comout)(buf); |
124 |
|
(*dev->comin)(buf, NULL); |
125 |
< |
if (buf[0] == CTRL(C)) return; |
125 |
> |
if (buf[0] == CTRL('C')) return; |
126 |
|
if (sscanf(buf, "%lf %lf", &nv.hoff, &nv.voff) == 2) |
127 |
|
change++; |
128 |
|
else { |
246 |
|
getexposure(s) /* get new exposure */ |
247 |
|
char *s; |
248 |
|
{ |
249 |
– |
double atof(), pow(), fabs(); |
249 |
|
char buf[128]; |
250 |
|
register char *cp; |
251 |
|
register PNODE *p; |