Annotation of researchv10no/libc/gen/strpbrk.C, revision 1.1

1.1     ! root        1: /*     @(#)strpbrk.c   1.2     */
        !             2: /*LINTLIBRARY*/
        !             3: /*
        !             4:  * Return ptr to first occurance of any character from `brkset'
        !             5:  * in the character string `string'; NULL if none exists.
        !             6:  */
        !             7: 
        !             8: #define        NULL    (char *) 0
        !             9: 
        !            10: char *
        !            11: strpbrk(string, brkset)
        !            12: register char *string, *brkset;
        !            13: {
        !            14:        register char *p;
        !            15: 
        !            16:        do {
        !            17:                for(p=brkset; *p != '\0' && *p != *string; ++p)
        !            18:                        ;
        !            19:                if(*p != '\0')
        !            20:                        return(string);
        !            21:        }
        !            22:        while(*string++);
        !            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.