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 */

View File

@@ -93,7 +93,7 @@ compile(argc, argv)
}
struct idf *file_head;
extern char *strrindex();
extern char *strrchr();
list_dependencies(source)
char *source;
@@ -101,7 +101,7 @@ list_dependencies(source)
register struct idf *p = file_head;
if (source) {
register char *s = strrindex(source, '.');
register char *s = strrchr(source, '.');
if (s && *(s+1)) {
s++;
@@ -111,7 +111,7 @@ list_dependencies(source)
* object generated, so don't include the pathname
* leading to it.
*/
if (s = strrindex(source, '/')) {
if (s = strrchr(source, '/')) {
source = s + 1;
}
}