Annotation of 43BSD/lib/libc/gen/rindex.c, revision 1.1

1.1     ! root        1: #if defined(LIBC_SCCS) && !defined(lint)
        !             2: static char sccsid[] = "@(#)rindex.c   5.2 (Berkeley) 3/9/86";
        !             3: #endif LIBC_SCCS and not lint
        !             4: 
        !             5: /*
        !             6:  * Return the ptr in sp at which the character c last
        !             7:  * appears; NULL if not found
        !             8:  */
        !             9: 
        !            10: #define NULL 0
        !            11: 
        !            12: char *
        !            13: rindex(sp, c)
        !            14: register char *sp, c;
        !            15: {
        !            16:        register char *r;
        !            17: 
        !            18:        r = NULL;
        !            19:        do {
        !            20:                if (*sp == c)
        !            21:                        r = sp;
        !            22:        } while (*sp++);
        !            23:        return(r);
        !            24: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.