6 |
|
* on simple drivers |
7 |
|
*/ |
8 |
|
|
9 |
+ |
#include <string.h> |
10 |
|
|
11 |
|
#include "meta.h" |
12 |
|
|
12 |
– |
|
13 |
|
/* vector characters file */ |
14 |
|
#define VINPUT "vchars.mta" |
15 |
|
|
41 |
|
short *exlist |
42 |
|
) |
43 |
|
{ |
44 |
< |
static PRIMITIVE pincl = {PINCL, 02, -1, -1, -1, -1, VINPUT}; |
44 |
> |
static PRIMITIVE pincl = {PINCL, 02, {-1, -1, -1, -1}, VINPUT, NULL}; |
45 |
|
static short vcloaded = FALSE; |
46 |
|
|
47 |
|
xlist = exlist; |
85 |
|
{ |
86 |
|
int xflag = xlist[comndx(p->com)]; |
87 |
|
/* 1==expand, 0==pass, -1==discard */ |
88 |
< |
if (xflag != -1) |
88 |
> |
if (xflag != -1) { |
89 |
|
if (xflag == 1) |
90 |
|
switch (p->com) { |
91 |
|
|
126 |
|
segprim(p); |
127 |
|
else |
128 |
|
writep(p, stdout); |
129 |
< |
|
129 |
> |
} |
130 |
|
} |
131 |
|
|
132 |
|
|
171 |
|
) |
172 |
|
{ |
173 |
|
PRIMITIVE pout; |
174 |
< |
int xadv, yadv; |
174 |
> |
int xadv = 0, yadv = 0; |
175 |
|
char s[3]; |
176 |
|
register char *cp; |
177 |
|
|
242 |
|
char *fname |
243 |
|
) |
244 |
|
{ |
245 |
< |
register FILE *fp; |
245 |
> |
register FILE *fp = NULL; |
246 |
|
|
247 |
|
if (fname == NULL) |
248 |
|
error(USER, "missing include file name in include"); |
249 |
|
|
250 |
< |
if (code == 2 || (fp = fopen(fname, "r")) == NULL) |
250 |
> |
if (code == 2 || (fp = fopen(fname, "r")) == NULL) { |
251 |
|
if (code != 0) |
252 |
|
fp = mfopen(fname, "r"); |
253 |
|
else { |
254 |
|
sprintf(errmsg, "cannot open user include file \"%s\"", fname); |
255 |
|
error(USER, errmsg); |
256 |
|
} |
257 |
+ |
} |
258 |
|
|
259 |
|
exfile(fp); |
260 |
|
fclose(fp); |
268 |
|
PRIMITIVE *p |
269 |
|
) |
270 |
|
{ |
271 |
< |
char *nextscan(); |
272 |
< |
int firstx, firsty, lastx, lasty, x, y; |
271 |
> |
char firstx, firsty, x, y; |
272 |
> |
int lastx, lasty; |
273 |
|
register char *cp; |
274 |
|
|
275 |
|
if ((cp=nextscan(nextscan(p->args,"%d",&firstx),"%d",&firsty)) == NULL) { |