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

@@ -39,9 +39,9 @@ getwdir(fn)
register char *fn;
{
register char *p;
char *strrindex();
char *strrchr();
while ((p = strrindex(fn,'/')) && *(p + 1) == '\0') {
while ((p = strrchr(fn,'/')) && *(p + 1) == '\0') {
/* remove trailing /'s */
*p = '\0';
}

View File

@@ -168,7 +168,7 @@ DoOption(text)
char *t;
while (c = *text++) {
char *strindex();
char *strchr();
t = text;
size = txt2int(&t);
@@ -178,7 +178,7 @@ DoOption(text)
algn = txt2int(&t);
text = t;
}
if (! strindex("wislfdpS", c)) {
if (! strchr("wislfdpS", c)) {
error("-V: bad type indicator %c\n", c);
}
if (size != 0) switch (c) {