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

1.1       root        1: /*
                      2:  * strchr.c
                      3:  * ANSI 4.11.5.2.
                      4:  * Search for character in string.
                      5:  * Previously known as index().
                      6:  */
                      7: 
                      8: #include <string.h>
                      9: 
                     10: char *strchr(s, c) register char *s; int c;
                     11: {
                     12:        char ch;
                     13: 
                     14:        ch = (char)c;
                     15:        do {
                     16:                if (*s == ch)
                     17:                        return (s);
                     18:        } while (*s++);
                     19:        return (NULL);
                     20: }

unix.superglobalmegacorp.com

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