--- ray/src/meta/bgraph.c 2003/02/22 02:07:26 1.1 +++ ray/src/meta/bgraph.c 2003/11/15 02:13:36 1.4 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bgraph.c,v 1.1 2003/02/22 02:07:26 greg Exp $"; +static const char RCSid[] = "$Id: bgraph.c,v 1.4 2003/11/15 02:13:36 schorsch Exp $"; #endif /* * bgraph.c - program to send plots to metafile graphics programs. @@ -12,6 +12,8 @@ static const char RCSid[] = "$Id: bgraph.c,v 1.1 2003/ #include #include "meta.h" +#include "mgvars.h" +#include "mgraph.h" #define istyp(s) (s[0] == '-') @@ -21,19 +23,17 @@ 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[] +) { -#if UNIX || MAC char *getenv(); -#endif int i, file0; -#ifdef CPM -#define getenv(s) NULL - fixargs("bgraph", &argc, &argv); -#endif progname = argv[0]; libpath[0] = ""; if ((libpath[i=1] = getenv("MDIR")) != NULL) @@ -56,13 +56,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; +static void +dofile( /* plot a file */ + int optc, + char *optv[], + char *file +) { char stmp[256]; int i; @@ -89,13 +92,7 @@ char *file; } -eputs(msg) /* print error message */ -char *msg; -{ - fputs(msg, stderr); -} - - +void quit(code) /* quit program */ int code; {