--- ray/src/meta/gcalc.c 2003/06/30 14:59:12 1.2 +++ ray/src/meta/gcalc.c 2003/11/15 02:13:37 1.3 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: gcalc.c,v 1.2 2003/06/30 14:59:12 schorsch Exp $"; +static const char RCSid[] = "$Id: gcalc.c,v 1.3 2003/11/15 02:13:37 schorsch Exp $"; #endif /* * gcalc.c - routines to do calculations on graph files. @@ -19,11 +19,16 @@ static double xmin, xmax, ymin, ymax; static double lastx, lasty, rsum; static int npts; +static void gcheader(char *types); +static void calcpoint(int c, double x, double y); +static void gcvalue(int c, char *types); -gcalc(types) /* do a calculation */ -char *types; +void +gcalc( /* do a calculation */ + char *types +) { - int i, calcpoint(); + int i; if (strchr(types, 'h') == NULL) gcheader(types); @@ -45,8 +50,10 @@ char *types; } -gcheader(types) /* print header */ -register char *types; +void +gcheader( /* print header */ + register char *types +) { printf("__"); while (*types) @@ -73,9 +80,11 @@ register char *types; } -gcvalue(c, types) /* print the values for the curve */ -int c; -register char *types; +void +gcvalue( /* print the values for the curve */ + int c, + register char *types +) { double d1, d2, d3, sqrt(); @@ -113,9 +122,12 @@ register char *types; } -calcpoint(c, x, y) /* add a point to our calculation */ -int c; -double x, y; +void +calcpoint( /* add a point to our calculation */ + int c, + double x, + double y +) { if (x < xmin || x > xmax) return;