Annotation of researchv10no/ipc/mgrs/svcmgr/subr.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * miscellany
                      3:  */
                      4: 
                      5: #include "mgr.h"
                      6: 
                      7: /*
                      8:  * read input up to a null
                      9:  */
                     10: char *
                     11: rdline(f)
                     12: int f;
                     13: {
                     14:        static char buf[2*ARB];
                     15:        register char *p;
                     16:        register int n;
                     17: 
                     18:        for (p = buf; p-buf<ARB-1; p++) {
                     19:                n = read(f, p, 1);
                     20:                if (n <= 0)
                     21:                        break;
                     22:                if (*p == '\0')
                     23:                        return (buf);
                     24:        }
                     25:        return NULL;
                     26: }

unix.superglobalmegacorp.com

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