--- ray/src/px/psum.c 1998/10/27 09:08:26 2.4 +++ ray/src/px/psum.c 2004/01/02 12:47:01 2.7 @@ -1,9 +1,6 @@ -/* Copyright (c) 1986 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: psum.c,v 2.7 2004/01/02 12:47:01 schorsch Exp $"; #endif - /* * psum.c - program to sum pictures. * @@ -11,10 +8,11 @@ static char SCCSid[] = "$SunId$ LBL"; */ #include - #include #include "color.h" +#include "resolu.h" +#include "rterror.h" #define MAXFILE 8 @@ -28,10 +26,14 @@ FILE *fptr[MAXFILE]; /* the file pointers */ COLOR scale[MAXFILE]; /* scaling factors */ int nfile; /* number of files */ +static gethfunc tabputs; -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)); @@ -97,7 +99,7 @@ char *argv[]; /* get header */ fputs(fname[nfile], stdout); fputs(":\n", stdout); - getheader(fptr[nfile], tabputs); + getheader(fptr[nfile], tabputs, NULL); /* get picture size */ if (fgetresolu(&xres, &yres, fptr[nfile]) != (YMAJOR|YDECR)) { fprintf(stderr, "%s: bad picture size\n", progname); @@ -155,11 +157,12 @@ psum() /* sum the files */ quit(1); } } - free((char *)scanin); - free((char *)scanout); + free((void *)scanin); + free((void *)scanout); } +void quit(code) /* exit gracefully */ int code; {