--- ray/src/px/pfilt.c 2010/09/03 21:18:15 2.31 +++ 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.31 2010/09/03 21:18:15 greg 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.31 2010/ #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 */ @@ -348,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 */ @@ -371,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); @@ -480,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; @@ -561,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; @@ -584,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)