| 52 |
|
|
| 53 |
|
static int wrongformat = 0; |
| 54 |
|
|
| 55 |
< |
SCAN *scanretire(); |
| 55 |
> |
static SCAN * claimscan(int y); |
| 56 |
> |
static COLR * getpictscan(int y); |
| 57 |
> |
static double pict_val(FVECT vd); |
| 58 |
> |
static void rt_compute(float *pb, int np); |
| 59 |
> |
static gethfunc getexpos; |
| 60 |
> |
static SCAN * scanretire(void); |
| 61 |
> |
static void initscans(void); |
| 62 |
> |
static void donescans(void); |
| 63 |
|
|
| 57 |
– |
extern long ftell(); |
| 64 |
|
|
| 65 |
< |
|
| 66 |
< |
SCAN * |
| 67 |
< |
claimscan(y) /* claim scanline from buffers */ |
| 68 |
< |
int y; |
| 65 |
> |
static SCAN * |
| 66 |
> |
claimscan( /* claim scanline from buffers */ |
| 67 |
> |
int y |
| 68 |
> |
) |
| 69 |
|
{ |
| 70 |
|
int hi = shash(y); |
| 71 |
|
SCAN *slast; |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
|
| 94 |
< |
COLR * |
| 95 |
< |
getpictscan(y) /* get picture scanline */ |
| 96 |
< |
int y; |
| 94 |
> |
static COLR * |
| 95 |
> |
getpictscan( /* get picture scanline */ |
| 96 |
> |
int y |
| 97 |
> |
) |
| 98 |
|
{ |
| 99 |
|
register SCAN *sl; |
| 100 |
|
register int i; |
| 144 |
|
|
| 145 |
|
|
| 146 |
|
#ifdef DEBUG |
| 147 |
< |
pict_stats() /* print out picture read statistics */ |
| 147 |
> |
void |
| 148 |
> |
pict_stats(void) /* print out picture read statistics */ |
| 149 |
|
{ |
| 150 |
|
static long lastcall = 0L; /* ncall at last report */ |
| 151 |
|
static long lastread = 0L; /* nread at last report */ |
| 162 |
|
#endif |
| 163 |
|
|
| 164 |
|
|
| 165 |
< |
double |
| 166 |
< |
pict_val(vd) /* find picture value for view direction */ |
| 167 |
< |
FVECT vd; |
| 165 |
> |
static double |
| 166 |
> |
pict_val( /* find picture value for view direction */ |
| 167 |
> |
FVECT vd |
| 168 |
> |
) |
| 169 |
|
{ |
| 170 |
|
FVECT pp; |
| 171 |
|
FVECT ip; |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
|
| 188 |
< |
double |
| 189 |
< |
getviewpix(vh, vv) /* compute single view pixel */ |
| 190 |
< |
int vh, vv; |
| 188 |
> |
extern double |
| 189 |
> |
getviewpix( /* compute single view pixel */ |
| 190 |
> |
int vh, |
| 191 |
> |
int vv |
| 192 |
> |
) |
| 193 |
|
{ |
| 194 |
|
FVECT dir; |
| 195 |
|
float rt_buf[12]; |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
|
| 218 |
< |
getviewspan(vv, vb) /* compute a span of view pixels */ |
| 219 |
< |
int vv; |
| 220 |
< |
float *vb; |
| 218 |
> |
extern void |
| 219 |
> |
getviewspan( /* compute a span of view pixels */ |
| 220 |
> |
int vv, |
| 221 |
> |
float *vb |
| 222 |
> |
) |
| 223 |
|
{ |
| 224 |
|
float rt_buf[6*MAXPIX]; /* rtrace send/receive buffer */ |
| 225 |
|
register int n; /* number of pixels in buffer */ |
| 271 |
|
} |
| 272 |
|
|
| 273 |
|
|
| 274 |
< |
rt_compute(pb, np) /* process buffer through rtrace */ |
| 275 |
< |
float *pb; |
| 276 |
< |
int np; |
| 274 |
> |
static void |
| 275 |
> |
rt_compute( /* process buffer through rtrace */ |
| 276 |
> |
float *pb, |
| 277 |
> |
int np |
| 278 |
> |
) |
| 279 |
|
{ |
| 280 |
|
#ifdef DEBUG |
| 281 |
|
if (verbose && np > 1) |
| 292 |
|
} |
| 293 |
|
|
| 294 |
|
|
| 295 |
< |
int |
| 296 |
< |
getexpos(s) /* get exposure from header line */ |
| 297 |
< |
char *s; |
| 295 |
> |
static int |
| 296 |
> |
getexpos( /* get exposure from header line */ |
| 297 |
> |
char *s, |
| 298 |
> |
void *p |
| 299 |
> |
) |
| 300 |
|
{ |
| 301 |
|
char fmt[32]; |
| 302 |
|
|
| 310 |
|
} |
| 311 |
|
|
| 312 |
|
|
| 313 |
< |
open_pict(fn) /* open picture file */ |
| 314 |
< |
char *fn; |
| 313 |
> |
extern void |
| 314 |
> |
open_pict( /* open picture file */ |
| 315 |
> |
char *fn |
| 316 |
> |
) |
| 317 |
|
{ |
| 318 |
|
if ((pictfp = fopen(fn, "r")) == NULL) { |
| 319 |
|
fprintf(stderr, "%s: cannot open\n", fn); |
| 329 |
|
} |
| 330 |
|
|
| 331 |
|
|
| 332 |
< |
close_pict() /* done with picture */ |
| 332 |
> |
extern void |
| 333 |
> |
close_pict(void) /* done with picture */ |
| 334 |
|
{ |
| 335 |
|
if (pictfp == NULL) |
| 336 |
|
return; |
| 340 |
|
} |
| 341 |
|
|
| 342 |
|
|
| 343 |
< |
fork_rtrace(av) /* open pipe and start rtrace */ |
| 344 |
< |
char *av[]; |
| 343 |
> |
extern void |
| 344 |
> |
fork_rtrace( /* open pipe and start rtrace */ |
| 345 |
> |
char *av[] |
| 346 |
> |
) |
| 347 |
|
{ |
| 348 |
|
int rval; |
| 349 |
|
|
| 363 |
|
} |
| 364 |
|
|
| 365 |
|
|
| 366 |
< |
done_rtrace() /* wait for rtrace to finish */ |
| 366 |
> |
extern void |
| 367 |
> |
done_rtrace(void) /* wait for rtrace to finish */ |
| 368 |
|
{ |
| 369 |
|
int status; |
| 370 |
|
|
| 378 |
|
} |
| 379 |
|
|
| 380 |
|
|
| 381 |
< |
SCAN * |
| 382 |
< |
scanretire() /* retire old scanlines to free list */ |
| 381 |
> |
static SCAN * |
| 382 |
> |
scanretire(void) /* retire old scanlines to free list */ |
| 383 |
|
{ |
| 384 |
|
SCAN *sold[NRETIRE]; |
| 385 |
|
int n; |
| 422 |
|
static char *scan_buf; |
| 423 |
|
|
| 424 |
|
|
| 425 |
< |
initscans() /* initialize scanline buffers */ |
| 425 |
> |
static void |
| 426 |
> |
initscans(void) /* initialize scanline buffers */ |
| 427 |
|
{ |
| 428 |
|
int scansize; |
| 429 |
|
register SCAN *ptr; |
| 462 |
|
} |
| 463 |
|
|
| 464 |
|
|
| 465 |
< |
donescans() /* free up scanlines */ |
| 465 |
> |
static void |
| 466 |
> |
donescans(void) /* free up scanlines */ |
| 467 |
|
{ |
| 468 |
|
bfree(scan_buf, scanbufsiz); |
| 469 |
|
bfree((char *)scanpos, pysiz*sizeof(long)); |