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:
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user