Annotation of coherent/b/lib/libc/string/memchr.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * memchr.c
                      3:  * ANSI 4.11.5.1.
                      4:  * Search memory.
                      5:  */
                      6: 
                      7: #include <string.h>
                      8: 
                      9: char *memchr(s, c, n) register char *s; int c; size_t n;
                     10: {
                     11:        register unsigned char uc;
                     12: 
                     13:        uc = c;
                     14:        while (n--)
                     15:                if (*s++ == uc)
                     16:                        return((char *)--s);
                     17:        return (NULL);
                     18: }

unix.superglobalmegacorp.com

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