=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/Attic/aux.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/mail/Attic/aux.c 1996/06/11 12:53:32 1.2 +++ src/usr.bin/mail/Attic/aux.c 1997/01/17 07:12:44 1.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: aux.c,v 1.2 1996/06/11 12:53:32 deraadt Exp $ */ +/* $OpenBSD: aux.c,v 1.3 1997/01/17 07:12:44 millert Exp $ */ /* $NetBSD: aux.c,v 1.4 1996/06/08 19:48:10 christos Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: aux.c,v 1.2 1996/06/11 12:53:32 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: aux.c,v 1.3 1997/01/17 07:12:44 millert Exp $"; #endif #endif /* not lint */ @@ -414,7 +414,7 @@ cp = skin(name1(mp, reptype)); if (reptype != 0 || charcount(cp, '!') < 2) return(cp); - cp2 = rindex(cp, '!'); + cp2 = strrchr(cp, '!'); cp2--; while (cp2 > cp && *cp2 != '!') cp2--; @@ -466,8 +466,8 @@ if (name == NOSTR) return(NOSTR); - if (index(name, '(') == NOSTR && index(name, '<') == NOSTR - && index(name, ' ') == NOSTR) + if (strchr(name, '(') == NOSTR && strchr(name, '<') == NOSTR + && strchr(name, ' ') == NOSTR) return(name); gotlt = 0; lastsp = 0; @@ -592,24 +592,24 @@ *cp2 = '\0'; if (readline(ibuf, linebuf, LINESIZE) < 0) return(savestr(namebuf)); - if ((cp = index(linebuf, 'F')) == NULL) + if ((cp = strchr(linebuf, 'F')) == NULL) return(savestr(namebuf)); if (strncmp(cp, "From", 4) != 0) return(savestr(namebuf)); - while ((cp = index(cp, 'r')) != NULL) { + while ((cp = strchr(cp, 'r')) != NULL) { if (strncmp(cp, "remote", 6) == 0) { - if ((cp = index(cp, 'f')) == NULL) + if ((cp = strchr(cp, 'f')) == NULL) break; if (strncmp(cp, "from", 4) != 0) break; - if ((cp = index(cp, ' ')) == NULL) + if ((cp = strchr(cp, ' ')) == NULL) break; cp++; if (first) { strcpy(namebuf, cp); first = 0; } else - strcpy(rindex(namebuf, '!')+1, cp); + strcpy(strrchr(namebuf, '!')+1, cp); strcat(namebuf, "!"); goto newname; } @@ -644,7 +644,7 @@ { while (*s1) - if (index(s2, *s1++)) + if (strchr(s2, *s1++)) return 1; return 0; }