Annotation of researchv9/cmd/cfront/libC/stream/circbuf.c, revision 1.1.1.1

1.1       root        1: #include "stream.h"
                      2: 
                      3: /*
                      4:  *     Come here on a put to a full buffer.  Allocate the buffer if 
                      5:  *     it is uninitialized.
                      6:  *     Returns:        EOF on error
                      7:  *                     the input character on success
                      8:  */
                      9: virtual int circbuf.overflow(int c)
                     10: {
                     11:        if (allocate() == EOF) return EOF;
                     12: 
                     13:        pptr = base;
                     14:        if (c != EOF) *pptr++ = c;
                     15: 
                     16:        return c & 0377;
                     17: }
                     18: 
                     19: /*
                     20:  *     Fill a buffer.
                     21:  *     Returns:        EOF on error or end of input
                     22:  *                     next character on success
                     23:  */
                     24: virtual int circbuf.underflow()
                     25: {
                     26:        return EOF;
                     27: }

unix.superglobalmegacorp.com

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