From 6f98fd7ebb025b6aa3731139c1897bd46a6278fb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 Jul 2000 21:40:46 +0000 Subject: Update. 2000-07-03 Ulrich Drepper * libio/genops.c (__overflow): Use _IO_fwide to orient the stream. (__uflow): Likewise. (__underflow): Likewise. * libio/wgenops.c (__wunderflow): Likewise. * stdio-common/tst-unbputc.c: New file. * stdio-common/tst-unbputc.sh: New file. * stdio-common/Makefile: Add rules to build and run tst-unbputc. * po/en_GB.po: New file. Contributed by Robert Brady . --- libio/genops.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libio/genops.c') diff --git a/libio/genops.c b/libio/genops.c index bffc355fa5..89a3dfc152 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -194,6 +194,9 @@ __overflow (f, ch) _IO_FILE *f; int ch; { + /* This is a single-byte stream. */ + if (f->_mode == 0) + _IO_fwide (f, -1); return _IO_OVERFLOW (f, ch); } @@ -285,6 +288,8 @@ __underflow (fp) if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1) return EOF; + if (fp->_mode == 0) + _IO_fwide (fp, -1); if (_IO_in_put_mode (fp)) if (_IO_switch_to_get_mode (fp) == EOF) return EOF; @@ -313,6 +318,8 @@ __uflow (fp) if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1) return EOF; + if (fp->_mode == 0) + _IO_fwide (fp, -11); if (_IO_in_put_mode (fp)) if (_IO_switch_to_get_mode (fp) == EOF) return EOF; -- cgit v1.2.1