Annotation of coherent/d/lib/libc/stdio/gets.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Standard I/O Library
                      3:  * Get string from standard input
                      4:  * deleting trailing '\n'
                      5:  */
                      6: 
                      7: #include <stdio.h>
                      8: 
                      9: char *
                     10: gets(is)
                     11: register char  *is;
                     12: {
                     13:        register char   *s = is;
                     14:        register int    c;
                     15: 
                     16:        while ((c=getchar())!=EOF && c!='\n')
                     17:                *s++ = c;
                     18:        *s = 0;
                     19:        return (c==EOF && s==is ? NULL : is);
                     20: }

unix.superglobalmegacorp.com

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