Annotation of coherent/b/bin/c/common/sget.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Standard stream library for the
        !             3:  * C compiler and other compilers that use
        !             4:  * C compiler factilities.
        !             5:  * Input a string of max. length 'n'.
        !             6:  */
        !             7: #include <stdio.h>
        !             8: #ifdef   vax
        !             9: #include "INC$LIB:mch.h"
        !            10: #else
        !            11: #include "mch.h"
        !            12: #endif
        !            13: 
        !            14: sget(p, n)
        !            15: register char  *p;
        !            16: register       n;
        !            17: {
        !            18:        register c;
        !            19: 
        !            20:        while (c = bget()) {
        !            21:                if (c == EOF)
        !            22:                        cfatal("unexpected EOF");
        !            23:                if (n>1) {
        !            24:                        *p++ = c;
        !            25:                        --n;
        !            26:                }
        !            27:        }
        !            28:        *p = 0;
        !            29: }

unix.superglobalmegacorp.com

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