From: ceriel Date: Fri, 14 Aug 1987 20:32:08 +0000 (+0000) Subject: fixed setbuf. count field was set wrong X-Git-Tag: release-5-5~3895 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b8fb8a57facb26af0c2984fe284cdc4fdcf9067c;p=ack.git fixed setbuf. count field was set wrong --- 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