| 7 |
|
* External symbols declared in paths.h |
| 8 |
|
*/ |
| 9 |
|
|
| 10 |
– |
#include "copyright.h" |
| 11 |
– |
|
| 10 |
|
#include <ctype.h> |
| 11 |
|
#include <string.h> |
| 12 |
|
|
| 13 |
< |
extern char * |
| 14 |
< |
fixargv0(av0) /* extract command name from full path */ |
| 17 |
< |
char *av0; |
| 13 |
> |
char * |
| 14 |
> |
fixargv0(char *av0) /* extract command name from full path */ |
| 15 |
|
{ |
| 16 |
< |
register char *cp = av0, *end = av0; |
| 16 |
> |
char *cp = av0, *end; |
| 17 |
|
|
| 18 |
|
while (*cp) cp++; /* start from end */ |
| 19 |
|
end = cp; |
| 26 |
|
case '\\': /* remove directory */ |
| 27 |
|
/* make sure the original pointer remains the same */ |
| 28 |
|
memmove(av0, cp+1, end-cp); |
| 29 |
< |
break; |
| 29 |
> |
return(av0); |
| 30 |
|
default: /* convert to lower case */ |
| 31 |
|
*cp = tolower(*cp); |
| 32 |
|
continue; |
| 33 |
|
} |
| 34 |
|
return(av0); |
| 35 |
|
} |
| 39 |
– |
|
| 40 |
– |
|