Annotation of coherent/b/lib/libc/string/strspn.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * strspn.c
        !             3:  * ANSI 4.11.5.6.
        !             4:  * Search string for string characters.
        !             5:  */
        !             6: 
        !             7: #include <string.h>
        !             8: 
        !             9: size_t *strspn(s1, s2) char *s1; char *s2;
        !            10: {
        !            11:        register char *cp1, *cp2;
        !            12:        register char c1, c2;
        !            13: 
        !            14:        for (cp1 = s1; c1 = *cp1; cp1++) {
        !            15:                for (cp2 = s2; c2 = *cp2; cp2++)
        !            16:                        if (c1 == c2)
        !            17:                                break;
        !            18:                if (c2 == '\0')
        !            19:                        break;
        !            20:        }
        !            21:        return((size_t)(cp1 - s1));
        !            22: }

unix.superglobalmegacorp.com

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