11 |
|
#include "copyright.h" |
12 |
|
|
13 |
|
#include <signal.h> |
14 |
< |
#include <string.h> |
15 |
< |
|
14 |
> |
#include "pfilt.h" |
15 |
|
#include "platform.h" |
17 |
– |
#include "standard.h" |
18 |
– |
#include "rtio.h" |
19 |
– |
#include "color.h" |
20 |
– |
#include "view.h" |
16 |
|
#include "paths.h" |
17 |
< |
#include "pfilt.h" |
17 |
> |
#include "view.h" |
18 |
|
|
24 |
– |
|
19 |
|
#define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) |
20 |
|
|
21 |
|
double CHECKRAD = 2.0; /* radius to check for filtering */ |
81 |
|
static gethfunc headline; |
82 |
|
static brightfunc_t rgb_bright; |
83 |
|
static brightfunc_t xyz_bright; |
90 |
– |
//static double rgb_bright(COLOR clr); |
91 |
– |
//static double xyz_bright(COLOR clr); |
84 |
|
static void copyfile(FILE *in, FILE *out); |
85 |
|
static void pass1(FILE *in); |
86 |
|
static void pass2(FILE *in); |
342 |
|
void *p |
343 |
|
) |
344 |
|
{ |
345 |
< |
char fmt[32]; |
345 |
> |
char fmt[MAXFMTLEN]; |
346 |
|
|
347 |
|
fputs(s, stdout); /* copy to output */ |
348 |
|
if (isaspect(s)) /* get aspect ratio */ |
365 |
|
|
366 |
|
static void |
367 |
|
copyfile( /* copy a file */ |
368 |
< |
register FILE *in, |
369 |
< |
register FILE *out |
368 |
> |
FILE *in, |
369 |
> |
FILE *out |
370 |
|
) |
371 |
|
{ |
372 |
< |
register int c; |
372 |
> |
int c; |
373 |
|
|
374 |
|
while ((c = getc(in)) != EOF) |
375 |
|
putc(c, out); |
474 |
|
{ |
475 |
|
COLOR ctmp; |
476 |
|
double d; |
477 |
< |
register int i; |
477 |
> |
int i; |
478 |
|
|
479 |
|
xbrad = xres/ncols/2 + 1; |
480 |
|
ybrad = yres/nrows/2 + 1; |
555 |
|
static int nextrow = 0; |
556 |
|
COLOR ctmp; |
557 |
|
int ybot; |
558 |
< |
register int c; |
558 |
> |
int c; |
559 |
|
/* average input scanlines */ |
560 |
|
while (nextrow <= r+orad && nextrow < nrows) { |
561 |
|
ybot = (nextrow+.5)*yres/nrows; |
578 |
|
static void |
579 |
|
scan2flush(void) /* flush output buffer */ |
580 |
|
{ |
581 |
< |
register int r; |
581 |
> |
int r; |
582 |
|
|
583 |
|
for (r = nrows-orad; r < nrows; r++) |
584 |
|
if (fwritescan(scoutbar[r%obarsize], ncols, stdout) < 0) |