aboutsummaryrefslogtreecommitdiff
path: root/libio/genops.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-03 21:40:46 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-03 21:40:46 +0000
commit6f98fd7ebb025b6aa3731139c1897bd46a6278fb (patch)
tree3ad7eea0344dea3564fff300949b55d3bc8f1163 /libio/genops.c
parent4a9e89d5eaf441ab9c834b92f5042eeebb9ffa63 (diff)
downloadglibc-6f98fd7ebb025b6aa3731139c1897bd46a6278fb.zip
glibc-6f98fd7ebb025b6aa3731139c1897bd46a6278fb.tar.gz
glibc-6f98fd7ebb025b6aa3731139c1897bd46a6278fb.tar.bz2
Update.
2000-07-03 Ulrich Drepper <drepper@redhat.com> * 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 <rwb197@ecs.soton.ac.uk>.
Diffstat (limited to 'libio/genops.c')
-rw-r--r--libio/genops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libio/genops.c b/libio/genops.c
index bffc355..89a3dfc 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;