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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user