--- ray/src/meta/dgraph.c 2003/08/01 14:14:24 1.2 +++ ray/src/meta/dgraph.c 2003/11/15 02:13:36 1.3 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: dgraph.c,v 1.2 2003/08/01 14:14:24 schorsch Exp $"; +static const char RCSid[] = "$Id: dgraph.c,v 1.3 2003/11/15 02:13:36 schorsch Exp $"; #endif /* * dgraph.c - program to send plots to dumb terminal. @@ -9,8 +9,12 @@ static const char RCSid[] = "$Id: dgraph.c,v 1.2 2003/ * Greg Ward Larson */ +#include #include +#include "rterror.h" +#include "mgvars.h" +#include "meta.h" #define isopt(s) (s[0] == '+' || s[0] == '-') @@ -18,10 +22,14 @@ char *progname; char *libpath[4]; +static void dofile(int optc, char *optv[], char *file); -main(argc, argv) -int argc; -char *argv[]; + +int +main( + int argc, + char *argv[] +) { char *getenv(); int i, file0; @@ -44,13 +52,16 @@ char *argv[]; dofile(file0-1, argv+1, argv[i]); quit(0); + return 0; /* pro forma return */ } -dofile(optc, optv, file) /* plot a file */ -int optc; -char *optv[]; -char *file; +void +dofile( /* plot a file */ + int optc, + char *optv[], + char *file +) { int width = 79; int length = 21; @@ -84,15 +95,19 @@ char *file; } -eputs(msg) /* print error message */ -char *msg; +void +eputs( /* print error message */ + char *msg +) { fputs(msg, stderr); } -quit(code) /* quit program */ -int code; +void +quit( /* quit program */ + int code +) { exit(code); }