91 |
|
if (!strncmp(s, "OBSTRUCTIONS=", 13)) { |
92 |
|
s += 13; |
93 |
|
while (*s == ' ') s++; |
94 |
< |
if (*s == 't' | *s == 'T') |
94 |
> |
if ((*s == 't') | (*s == 'T')) |
95 |
|
*hf |= H_OBST; |
96 |
< |
else if (*s == 'f' | *s == 'F') |
96 |
> |
else if ((*s == 'f') | (*s == 'F')) |
97 |
|
*hf |= H_OBSF; |
98 |
|
else |
99 |
|
error(WARNING, "bad OBSTRUCTIONS value in holodeck"); |
107 |
|
char *fname; |
108 |
|
int append; |
109 |
|
{ |
110 |
– |
extern long ftell(); |
110 |
|
FILE *fp; |
111 |
|
int fd; |
112 |
|
int hflags = 0; |
194 |
|
bpcmp(b1p, b2p) /* compare beam positions on disk */ |
195 |
|
int *b1p, *b2p; |
196 |
|
{ |
197 |
< |
register long pdif = beamdir[*b1p].fo - beamdir[*b2p].fo; |
197 |
> |
register off_t pdif = beamdir[*b1p].fo - beamdir[*b2p].fo; |
198 |
|
|
199 |
|
if (pdif > 0L) return(1); |
200 |
|
if (pdif < 0L) return(-1); |
298 |
|
int eshft; |
299 |
|
double emult; |
300 |
|
RESOLU prs; |
301 |
< |
FLOAT vl[2]; |
301 |
> |
RREAL vl[2]; |
302 |
|
FVECT ro, rd; |
303 |
|
double aftd; |
304 |
|
COLOR ctmp; |
314 |
|
error(SYSTEM, pcf); |
315 |
|
} |
316 |
|
/* load picture header */ |
317 |
< |
copystruct(&phd.vw, &stdview); |
317 |
> |
phd.vw = stdview; |
318 |
|
phd.expos = 1.0; |
319 |
|
phd.badfmt = phd.gotview = phd.altprims = 0; |
320 |
|
if (getheader(pfp, picheadline, (char *)&phd) < 0 || |
333 |
|
error(WARNING, errmsg); |
334 |
|
} |
335 |
|
/* figure out what to do about exposure */ |
336 |
< |
if (phd.expos < 0.99 | phd.expos > 1.01) { |
336 |
> |
if ((phd.expos < 0.99) | (phd.expos > 1.01)) { |
337 |
|
emult = -log(phd.expos)/log(2.); |
338 |
|
eshft = emult >= 0. ? emult+.5 : emult-.5; |
339 |
|
emult -= (double)eshft; |
340 |
< |
if (emult <= 0.01 & emult >= -0.01) |
340 |
> |
if ((emult <= 0.01) & (emult >= -0.01)) |
341 |
|
emult = -1.; |
342 |
|
else { |
343 |
|
emult = 1./phd.expos; |
350 |
|
/* allocate buffers */ |
351 |
|
cscn = (COLR *)malloc(scanlen(&prs)*sizeof(COLR)); |
352 |
|
zscn = (float *)malloc(scanlen(&prs)*sizeof(float)); |
353 |
< |
if (cscn == NULL | zscn == NULL) |
353 |
> |
if ((cscn == NULL) | (zscn == NULL)) |
354 |
|
error(SYSTEM, "out of memory in addpicz"); |
355 |
|
/* read and process each scanline */ |
356 |
|
for (j = 0; j < numscans(&prs); j++) { |