Annotation of 40BSD/cmd/uucp/index.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: 
        !             3: 
        !             4: /*******
        !             5:  *     char *
        !             6:  *     index(str, c)   return pointer to character c
        !             7:  *     char c, *str;
        !             8:  *
        !             9:  *     return codes:
        !            10:  *             NULL  -  character not found
        !            11:  *             pointer  -  pointer to character
        !            12:  */
        !            13: 
        !            14: char *
        !            15: index(str, c)
        !            16: char c, *str;
        !            17: {
        !            18:        for (; *str != '\0'; str++) {
        !            19:                if (*str == c)
        !            20:                        return(str);
        !            21:        }
        !            22: 
        !            23:        return(NULL);
        !            24: }

unix.superglobalmegacorp.com

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