Replaced calls to the custom strindex() and strrindex() functions with the

exactly equivalent and standard strchr() and strrchr() functions instead.
This commit is contained in:
dtrg
2006-07-23 20:01:02 +00:00
parent 80b4463439
commit 9c722420dd
40 changed files with 112 additions and 116 deletions

View File

@@ -20,12 +20,12 @@ getwdir(fn)
char *fn;
{
register char *p;
char *strrindex();
char *strrchr();
p = strrindex(fn, '/');
p = strrchr(fn, '/');
while (p && *(p + 1) == '\0') { /* remove trailing /'s */
*p = '\0';
p = strrindex(fn, '/');
p = strrchr(fn, '/');
}
if (fn[0] == '\0' || (fn[0] == '/' && p == &fn[0])) /* absolute path */