9 |
|
* Greg Ward Larson |
10 |
|
*/ |
11 |
|
|
12 |
+ |
#include <stdlib.h> |
13 |
|
#include <stdio.h> |
14 |
|
|
15 |
+ |
#include "rterror.h" |
16 |
+ |
#include "meta.h" |
17 |
+ |
#include "mgvars.h" |
18 |
+ |
|
19 |
|
#define istyp(s) (s[0] == '-') |
20 |
|
|
21 |
|
#define isvar(s) (s[0] == '+') |
24 |
|
|
25 |
|
char *libpath[4]; |
26 |
|
|
27 |
+ |
static void dofile(int optc, char *optv[], char *file); |
28 |
|
|
29 |
< |
main(argc, argv) |
30 |
< |
int argc; |
31 |
< |
char *argv[]; |
29 |
> |
int |
30 |
> |
main( |
31 |
> |
int argc, |
32 |
> |
char *argv[] |
33 |
> |
) |
34 |
|
{ |
35 |
|
char *getenv(); |
36 |
|
int i, file0; |
57 |
|
dofile(file0-1, argv+1, argv[i]); |
58 |
|
|
59 |
|
quit(0); |
60 |
+ |
return 0; /* pro forma return */ |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
< |
dofile(optc, optv, file) /* plot a file */ |
65 |
< |
int optc; |
66 |
< |
char *optv[]; |
67 |
< |
char *file; |
64 |
> |
void |
65 |
> |
dofile( /* plot a file */ |
66 |
> |
int optc, |
67 |
> |
char *optv[], |
68 |
> |
char *file |
69 |
> |
) |
70 |
|
{ |
71 |
|
char types[16], stmp[256], *strcat(); |
72 |
|
int i; |
89 |
|
} |
90 |
|
|
91 |
|
|
92 |
< |
eputs(msg) /* print error message */ |
93 |
< |
char *msg; |
92 |
> |
void |
93 |
> |
eputs( /* print error message */ |
94 |
> |
char *msg |
95 |
> |
) |
96 |
|
{ |
97 |
|
fputs(msg, stderr); |
98 |
|
} |
99 |
|
|
100 |
|
|
101 |
< |
quit(code) /* quit program */ |
102 |
< |
int code; |
101 |
> |
void |
102 |
> |
quit( /* quit program */ |
103 |
> |
int code |
104 |
> |
) |
105 |
|
{ |
106 |
|
exit(code); |
107 |
|
} |