various fixes and improvements

This commit is contained in:
eck
1989-06-26 10:37:05 +00:00
parent 11349c78cd
commit 27d7d5ed68
24 changed files with 173 additions and 417 deletions

View File

@@ -14,6 +14,11 @@ int
_flushbuf(int c, FILE * stream)
{
if (fileno(stream) < 0) return EOF;
if (!io_testflag(stream, _IOWRITE)) return EOF;
if (io_testflag(stream, _IOREADING) && !feof(stream)) return EOF;
stream->_flags &= ~_IOREADING;
stream->_flags |= _IOWRITING;
if (!io_testflag(stream, _IONBF)) {
if (!stream->_buf) {
if (stream == stdout && isatty(fileno(stdout))) {