| 9 |
|
* Greg Ward Larson |
| 10 |
|
*/ |
| 11 |
|
|
| 12 |
+ |
#include <stdlib.h> |
| 13 |
|
#include <stdio.h> |
| 14 |
|
|
| 15 |
+ |
#include "rterror.h" |
| 16 |
+ |
#include "mgvars.h" |
| 17 |
+ |
#include "meta.h" |
| 18 |
|
|
| 19 |
|
#define isopt(s) (s[0] == '+' || s[0] == '-') |
| 20 |
|
|
| 22 |
|
|
| 23 |
|
char *libpath[4]; |
| 24 |
|
|
| 25 |
+ |
static void dofile(int optc, char *optv[], char *file); |
| 26 |
|
|
| 27 |
< |
main(argc, argv) |
| 28 |
< |
int argc; |
| 29 |
< |
char *argv[]; |
| 27 |
> |
|
| 28 |
> |
int |
| 29 |
> |
main( |
| 30 |
> |
int argc, |
| 31 |
> |
char *argv[] |
| 32 |
> |
) |
| 33 |
|
{ |
| 34 |
|
char *getenv(); |
| 35 |
|
int i, file0; |
| 52 |
|
dofile(file0-1, argv+1, argv[i]); |
| 53 |
|
|
| 54 |
|
quit(0); |
| 55 |
+ |
return 0; /* pro forma return */ |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
|
| 59 |
< |
dofile(optc, optv, file) /* plot a file */ |
| 60 |
< |
int optc; |
| 61 |
< |
char *optv[]; |
| 62 |
< |
char *file; |
| 59 |
> |
void |
| 60 |
> |
dofile( /* plot a file */ |
| 61 |
> |
int optc, |
| 62 |
> |
char *optv[], |
| 63 |
> |
char *file |
| 64 |
> |
) |
| 65 |
|
{ |
| 66 |
|
int width = 79; |
| 67 |
|
int length = 21; |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
|
| 98 |
< |
eputs(msg) /* print error message */ |
| 99 |
< |
char *msg; |
| 98 |
> |
void |
| 99 |
> |
eputs( /* print error message */ |
| 100 |
> |
char *msg |
| 101 |
> |
) |
| 102 |
|
{ |
| 103 |
|
fputs(msg, stderr); |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
|
| 107 |
< |
quit(code) /* quit program */ |
| 108 |
< |
int code; |
| 107 |
> |
void |
| 108 |
> |
quit( /* quit program */ |
| 109 |
> |
int code |
| 110 |
> |
) |
| 111 |
|
{ |
| 112 |
|
exit(code); |
| 113 |
|
} |