13 |
|
#include <signal.h> |
14 |
|
#include <string.h> |
15 |
|
|
16 |
– |
#include "standard.h" |
16 |
|
#include "platform.h" |
17 |
+ |
#include "standard.h" |
18 |
+ |
#include "rtio.h" |
19 |
|
#include "color.h" |
20 |
|
#include "view.h" |
21 |
|
#include "paths.h" |
22 |
+ |
#include "pfilt.h" |
23 |
|
|
22 |
– |
extern float *matchlamp(); |
24 |
|
|
25 |
|
#define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) |
26 |
|
|
84 |
|
|
85 |
|
char *progname; |
86 |
|
|
87 |
+ |
static gethfunc headline; |
88 |
+ |
static brightfunc_t rgb_bright; |
89 |
+ |
static brightfunc_t xyz_bright; |
90 |
+ |
static void copyfile(FILE *in, FILE *out); |
91 |
+ |
static void pass1(FILE *in); |
92 |
+ |
static void pass2(FILE *in); |
93 |
+ |
static void scan2init(void); |
94 |
+ |
static void scan2sync(int r); |
95 |
+ |
static void scan2flush(void); |
96 |
|
|
97 |
< |
main(argc, argv) |
98 |
< |
int argc; |
99 |
< |
char **argv; |
97 |
> |
|
98 |
> |
int |
99 |
> |
main( |
100 |
> |
int argc, |
101 |
> |
char **argv |
102 |
> |
) |
103 |
|
{ |
91 |
– |
extern int headline(); |
104 |
|
FILE *fin; |
105 |
|
float *lampcolor; |
106 |
|
char *lamptype = NULL; |
318 |
|
pass2(fin); |
319 |
|
|
320 |
|
quit(estatus); |
321 |
+ |
return estatus; /* pro forma return */ |
322 |
|
} |
323 |
|
|
324 |
|
|
325 |
< |
double |
326 |
< |
rgb_bright(clr) |
327 |
< |
COLOR clr; |
325 |
> |
static double |
326 |
> |
rgb_bright( |
327 |
> |
COLOR clr |
328 |
> |
) |
329 |
|
{ |
330 |
|
return(bright(clr)); |
331 |
|
} |
332 |
|
|
333 |
|
|
334 |
< |
double |
335 |
< |
xyz_bright(clr) |
336 |
< |
COLOR clr; |
334 |
> |
static double |
335 |
> |
xyz_bright( |
336 |
> |
COLOR clr |
337 |
> |
) |
338 |
|
{ |
339 |
|
return(clr[CIEY]); |
340 |
|
} |
341 |
|
|
342 |
|
|
343 |
< |
double (*ourbright)() = rgb_bright; |
343 |
> |
brightfunc_t *ourbright = rgb_bright; |
344 |
|
|
345 |
< |
|
346 |
< |
int |
347 |
< |
headline(s) /* process line from header */ |
348 |
< |
char *s; |
345 |
> |
static int |
346 |
> |
headline( /* process line from header */ |
347 |
> |
char *s, |
348 |
> |
void *p |
349 |
> |
) |
350 |
|
{ |
351 |
|
char fmt[32]; |
352 |
|
|
369 |
|
} |
370 |
|
|
371 |
|
|
372 |
< |
copyfile(in, out) /* copy a file */ |
373 |
< |
register FILE *in, *out; |
372 |
> |
static void |
373 |
> |
copyfile( /* copy a file */ |
374 |
> |
register FILE *in, |
375 |
> |
register FILE *out |
376 |
> |
) |
377 |
|
{ |
378 |
|
register int c; |
379 |
|
|
387 |
|
} |
388 |
|
|
389 |
|
|
390 |
< |
pass1(in) /* first pass of picture file */ |
391 |
< |
FILE *in; |
390 |
> |
static void |
391 |
> |
pass1( /* first pass of picture file */ |
392 |
> |
FILE *in |
393 |
> |
) |
394 |
|
{ |
395 |
|
int i; |
396 |
|
COLOR *scan; |
422 |
|
} |
423 |
|
|
424 |
|
|
425 |
< |
pass2(in) /* last pass on file, write to stdout */ |
426 |
< |
FILE *in; |
425 |
> |
static void |
426 |
> |
pass2( /* last pass on file, write to stdout */ |
427 |
> |
FILE *in |
428 |
> |
) |
429 |
|
{ |
430 |
|
int yread; |
431 |
|
int ycent, xcent; |
475 |
|
} |
476 |
|
|
477 |
|
|
478 |
< |
scan2init() /* prepare scanline arrays */ |
478 |
> |
static void |
479 |
> |
scan2init(void) /* prepare scanline arrays */ |
480 |
|
{ |
481 |
|
COLOR ctmp; |
482 |
|
double d; |
553 |
|
} |
554 |
|
|
555 |
|
|
556 |
< |
scan2sync(r) /* synchronize grey averages and output scan */ |
557 |
< |
int r; |
556 |
> |
static void |
557 |
> |
scan2sync( /* synchronize grey averages and output scan */ |
558 |
> |
int r |
559 |
> |
) |
560 |
|
{ |
561 |
|
static int nextrow = 0; |
562 |
|
COLOR ctmp; |
581 |
|
} |
582 |
|
|
583 |
|
|
584 |
< |
scan2flush() /* flush output buffer */ |
584 |
> |
static void |
585 |
> |
scan2flush(void) /* flush output buffer */ |
586 |
|
{ |
587 |
|
register int r; |
588 |
|
|