1 |
< |
/* Copyright (c) 1994 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1996 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
57 |
|
|
58 |
|
while (*cp) if (*cp++ != *s++) return(0); |
59 |
|
if (r == NULL) return(1); |
60 |
< |
while (*s) *r++ = *s++; |
60 |
> |
while (*s && !isspace(*s)) *r++ = *s++; |
61 |
|
*r = '\0'; |
62 |
|
return(1); |
63 |
|
} |
89 |
|
putc(quote, fp); |
90 |
|
} else |
91 |
|
fputs(*av++, fp); |
92 |
< |
putc(' ', fp); |
92 |
> |
putc(ac ? ' ' : '\n', fp); |
93 |
|
} |
94 |
– |
putc('\n', fp); |
94 |
|
} |
95 |
|
|
96 |
|
|
153 |
|
ungetc(buf[MAXLINE-2], fp); /* prevent false end */ |
154 |
|
buf[MAXLINE-2] = '\0'; |
155 |
|
} |
156 |
< |
if (f != NULL) |
157 |
< |
(*f)(buf, p); |
156 |
> |
if (f != NULL && (*f)(buf, p) < 0) |
157 |
> |
return(-1); |
158 |
|
} |
159 |
|
} |
160 |
|
|