| 168 |
|
FILE *fp |
| 169 |
|
) |
| 170 |
|
{ |
| 171 |
– |
#if defined(_WIN32) || defined(_WIN64) |
| 172 |
– |
extern char *fixargv0(char *arg0); |
| 173 |
– |
char myav0[128]; |
| 174 |
– |
/* clean up Windows executable path */ |
| 175 |
– |
if (ac-- <= 0) return; |
| 176 |
– |
fputs(fixargv0(strcpy(myav0, *av++)), fp); |
| 177 |
– |
fputc(ac ? ' ' : '\n', fp); |
| 178 |
– |
#endif |
| 171 |
|
while (ac-- > 0) { |
| 172 |
|
fputword(*av++, fp); |
| 173 |
|
fputc(ac ? ' ' : '\n', fp); |
| 183 |
|
{ |
| 184 |
|
const char *cp = FMTSTR; |
| 185 |
|
char *r = fmt; |
| 186 |
< |
|
| 186 |
> |
/* check against format string */ |
| 187 |
|
while (*cp) if (*cp++ != *s++) return(0); |
| 188 |
|
while (isspace(*s)) s++; |
| 189 |
|
if (!*s) return(0); |
| 190 |
< |
if (r == NULL) return(1); |
| 191 |
< |
do |
| 190 |
> |
if (r == NULL) /* just checking if format? */ |
| 191 |
> |
return(1); |
| 192 |
> |
do /* copy format ID */ |
| 193 |
|
*r++ = *s++; |
| 194 |
< |
while (*s && !isspace(*s) && r-fmt < MAXFMTLEN-1); |
| 195 |
< |
*r = '\0'; |
| 194 |
> |
while (*s && r-fmt < MAXFMTLEN-1); |
| 195 |
> |
|
| 196 |
> |
do /* remove trailing white space */ |
| 197 |
> |
*r-- = '\0'; |
| 198 |
> |
while (r > fmt && isspace(*r)); |
| 199 |
> |
|
| 200 |
|
return(1); |
| 201 |
|
} |
| 202 |
|
|