From b8fb8a57facb26af0c2984fe284cdc4fdcf9067c Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 14 Aug 1987 20:32:08 +0000 Subject: [PATCH] fixed setbuf. count field was set wrong --- lang/cem/libcc/stdio/setbuf.c | 5 +++-- lang/cem/libcc/stdio/timezone.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lang/cem/libcc/stdio/setbuf.c b/lang/cem/libcc/stdio/setbuf.c index 83cefc5f6..64ff3ef08 100644 --- a/lang/cem/libcc/stdio/setbuf.c +++ b/lang/cem/libcc/stdio/setbuf.c @@ -1,7 +1,6 @@ /* $Header$ */ #include - setbuf(iop, buffer) register FILE *iop; char *buffer; @@ -13,9 +12,11 @@ char *buffer; iop->_buf = (unsigned char *) buffer; + iop->_count = 0; if ( iop->_buf == NULL ) iop->_flags |= IO_UNBUFF; + else + iop->_count = BUFSIZ; iop->_ptr = iop->_buf; - iop->_count = 0; } diff --git a/lang/cem/libcc/stdio/timezone.c b/lang/cem/libcc/stdio/timezone.c index b57813e90..818c85481 100644 --- a/lang/cem/libcc/stdio/timezone.c +++ b/lang/cem/libcc/stdio/timezone.c @@ -1,4 +1,5 @@ /* $Header$ */ +#ifndef __USG static struct zonetable { int offset; char *stdzone; @@ -58,3 +59,4 @@ timezone(zone, dst) *c = '\0'; return buf; } +#endif -- 2.34.1