--- ray/src/px/psum.c 2003/10/27 10:22:27 2.6 +++ ray/src/px/psum.c 2004/03/28 20:33:14 2.8 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: psum.c,v 2.6 2003/10/27 10:22:27 schorsch Exp $"; +static const char RCSid[] = "$Id: psum.c,v 2.8 2004/03/28 20:33:14 schorsch Exp $"; #endif /* * psum.c - program to sum pictures. @@ -26,19 +26,27 @@ FILE *fptr[MAXFILE]; /* the file pointers */ COLOR scale[MAXFILE]; /* scaling factors */ int nfile; /* number of files */ +static gethfunc tabputs; +static void psum(void); -int -tabputs(s) /* print line preceded by a tab */ -char *s; + + +static int +tabputs( /* print line preceded by a tab */ + char *s, + void *p +) { putc('\t', stdout); return(fputs(s, stdout)); } -main(argc, argv) -int argc; -char *argv[]; +int +main( + int argc, + char *argv[] +) { double d; int xres, yres; @@ -119,10 +127,12 @@ char *argv[]; psum(); quit(0); + return 0; /* pro forma return */ } -psum() /* sum the files */ +static void +psum(void) /* sum the files */ { COLOR *scanin, *scanout; int y, i; @@ -159,8 +169,9 @@ psum() /* sum the files */ void -quit(code) /* exit gracefully */ -int code; +quit( /* exit gracefully */ + int code +) { exit(code); }