| 26 |
|
char *input; |
| 27 |
|
{ |
| 28 |
|
FILE *popen(); |
| 29 |
< |
char *fgets(); |
| 29 |
> |
char *fgets(), *fgetline(); |
| 30 |
|
FILE *infp; |
| 31 |
|
char buf[512]; |
| 32 |
|
register int c; |
| 48 |
|
continue; |
| 49 |
|
if (c == '#') { /* comment */ |
| 50 |
|
fgets(buf, sizeof(buf), infp); |
| 51 |
< |
} else if (c == '!') { /* pipe */ |
| 51 |
> |
} else if (c == '!') { /* command */ |
| 52 |
|
ungetc(c, infp); |
| 53 |
< |
fgets(buf, sizeof(buf), infp); |
| 54 |
< |
c = strlen(buf); |
| 55 |
< |
if (buf[c-1] == '\n') |
| 56 |
< |
buf[c-1] = '\0'; |
| 53 |
> |
fgetline(buf, sizeof(buf), infp); |
| 54 |
|
readobj(buf); |
| 55 |
|
} else { /* object */ |
| 56 |
|
ungetc(c, infp); |
| 105 |
|
error(USER, errmsg); |
| 106 |
|
} |
| 107 |
|
objp->otype = objptr(alias)->otype; |
| 108 |
< |
bcopy(&objptr(alias)->oargs, &objp->oargs, sizeof(FUNARGS)); |
| 108 |
> |
copystruct(&objp->oargs, &objptr(alias)->oargs); |
| 109 |
|
} else if (readfargs(&objp->oargs, fp) < 0) { |
| 110 |
|
sprintf(errmsg, "(%s): bad arguments", name); |
| 111 |
|
objerror(objp, USER, errmsg); |