|
|
1.1 ! root 1: /* ! 2: * Standard stream library for the ! 3: * C compiler and other compilers that use ! 4: * C compiler factilities. ! 5: * Output a byte. ! 6: */ ! 7: ! 8: #include <stdio.h> ! 9: #ifdef vax ! 10: #include "INC$LIB:mch.h" ! 11: #include "INC$LIB:stream.h" ! 12: #else ! 13: #include "mch.h" ! 14: #include "stream.h" ! 15: #endif ! 16: ! 17: extern FILE *ofp; ! 18: ! 19: bput(b) ! 20: int b; ! 21: { ! 22: #if 0 ! 23: /* ! 24: * Some versions VAX and i8086 stdio putc(b, ofp) return EOF (-1) ! 25: * for char arg 255 (because the argument gets sign-extended from ! 26: * char 0xFF to int 0xFFFF, and putc returns its arg on success ! 27: * without masking it). The following line avoids this bug. ! 28: */ ! 29: b &= 0xFF; /* avoid putc sign-extension bug */ ! 30: #endif ! 31: #if TEMPBUF ! 32: if (ofp == NULL) { ! 33: if (outbufp == outbufmax) ! 34: cfatal("out of space in memory buffer"); ! 35: *outbufp++ = b; ! 36: return; ! 37: } ! 38: #endif ! 39: #if MSDOS ! 40: if (_binputc(b, ofp) == EOF) ! 41: #else ! 42: if (putc(b, ofp) == EOF) ! 43: #endif ! 44: cfatal("temporary file write error"); ! 45: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.