fixed setbuf. count field was set wrong
This commit is contained in:
parent
a2d921040d
commit
b8fb8a57fa
2 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
setbuf(iop, buffer)
|
setbuf(iop, buffer)
|
||||||
register FILE *iop;
|
register FILE *iop;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
@ -13,9 +12,11 @@ char *buffer;
|
||||||
|
|
||||||
iop->_buf = (unsigned char *) buffer;
|
iop->_buf = (unsigned char *) buffer;
|
||||||
|
|
||||||
|
iop->_count = 0;
|
||||||
if ( iop->_buf == NULL )
|
if ( iop->_buf == NULL )
|
||||||
iop->_flags |= IO_UNBUFF;
|
iop->_flags |= IO_UNBUFF;
|
||||||
|
else
|
||||||
|
iop->_count = BUFSIZ;
|
||||||
|
|
||||||
iop->_ptr = iop->_buf;
|
iop->_ptr = iop->_buf;
|
||||||
iop->_count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* $Header$ */
|
/* $Header$ */
|
||||||
|
#ifndef __USG
|
||||||
static struct zonetable {
|
static struct zonetable {
|
||||||
int offset;
|
int offset;
|
||||||
char *stdzone;
|
char *stdzone;
|
||||||
|
@ -58,3 +59,4 @@ timezone(zone, dst)
|
||||||
*c = '\0';
|
*c = '\0';
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue