fixed setbuf. count field was set wrong
This commit is contained in:
parent
1f2fa05492
commit
8be09b6814
@ -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…
x
Reference in New Issue
Block a user