Annotation of researchv10no/cmd/uucp/strpbrk.c, revision 1.1

1.1     ! root        1: /*     /sccs/src/cmd/uucp/s.strpbrk.c
        !             2:        strpbrk.c       1.1     8/30/84 17:37:42
        !             3: */
        !             4: #include "uucp.h"
        !             5: VERSION(@(#)strpbrk.c  1.1);
        !             6: 
        !             7: /*
        !             8:  * Return ptr to first occurance of any character from `brkset'
        !             9:  * in the character string `string'; NULL if none exists.
        !            10:  */
        !            11: 
        !            12: char *
        !            13: strpbrk(string, brkset)
        !            14: register char *string, *brkset;
        !            15: {
        !            16:        register char *p;
        !            17: 
        !            18:        if(!string || !brkset)
        !            19:                return(0);
        !            20:        do {
        !            21:                for(p=brkset; *p != '\0' && *p != *string; ++p)
        !            22:                        ;
        !            23:                if(*p != '\0')
        !            24:                        return(string);
        !            25:        }
        !            26:        while(*string++);
        !            27:        return(0);
        !            28: }

unix.superglobalmegacorp.com

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