--- ray/src/px/pfilt.c 2004/03/29 00:34:23 2.30 +++ ray/src/px/pfilt.c 2023/12/07 21:15:54 2.35 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pfilt.c,v 2.30 2004/03/29 00:34:23 schorsch Exp $"; +static const char RCSid[] = "$Id: pfilt.c,v 2.35 2023/12/07 21:15:54 greg Exp $"; #endif /* * pfilt.c - program to post-process picture file. @@ -11,17 +11,11 @@ static const char RCSid[] = "$Id: pfilt.c,v 2.30 2004/ #include "copyright.h" #include -#include - +#include "pfilt.h" #include "platform.h" -#include "standard.h" -#include "rtio.h" -#include "color.h" -#include "view.h" #include "paths.h" -#include "pfilt.h" +#include "view.h" - #define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) double CHECKRAD = 2.0; /* radius to check for filtering */ @@ -87,8 +81,6 @@ char *progname; static gethfunc headline; static brightfunc_t rgb_bright; static brightfunc_t xyz_bright; -//static double rgb_bright(COLOR clr); -//static double xyz_bright(COLOR clr); static void copyfile(FILE *in, FILE *out); static void pass1(FILE *in); static void pass2(FILE *in); @@ -350,7 +342,7 @@ headline( /* process line from header */ void *p ) { - char fmt[32]; + char fmt[MAXFMTLEN]; fputs(s, stdout); /* copy to output */ if (isaspect(s)) /* get aspect ratio */ @@ -373,11 +365,11 @@ headline( /* process line from header */ static void copyfile( /* copy a file */ - register FILE *in, - register FILE *out + FILE *in, + FILE *out ) { - register int c; + int c; while ((c = getc(in)) != EOF) putc(c, out); @@ -482,7 +474,7 @@ scan2init(void) /* prepare scanline arrays */ { COLOR ctmp; double d; - register int i; + int i; xbrad = xres/ncols/2 + 1; ybrad = yres/nrows/2 + 1; @@ -563,7 +555,7 @@ scan2sync( /* synchronize grey averages and output s static int nextrow = 0; COLOR ctmp; int ybot; - register int c; + int c; /* average input scanlines */ while (nextrow <= r+orad && nextrow < nrows) { ybot = (nextrow+.5)*yres/nrows; @@ -586,7 +578,7 @@ scan2sync( /* synchronize grey averages and output s static void scan2flush(void) /* flush output buffer */ { - register int r; + int r; for (r = nrows-orad; r < nrows; r++) if (fwritescan(scoutbar[r%obarsize], ncols, stdout) < 0)