summaryrefslogtreecommitdiff
path: root/libio/streambuf.h
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-24 20:09:55 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-24 20:09:55 +0000
commitc006f3428e75b7661dbc94665e96c27f996af256 (patch)
treef485ddeceda3dbb34f3e39bb297d61e69e0a6445 /libio/streambuf.h
parent1f5536f4436516c4c6833b0ca64bd0252f3ca6e6 (diff)
downloadgcc-c006f3428e75b7661dbc94665e96c27f996af256.tar.gz
Changes for _G_IO_IO_FILE_VERSION == 0x20001:
* libioP.h (_IO_showmanyc_t, _IO_SHOWMANYC, _IO_imbue_t, _IO_IMBUE): New definitions. (struct _IO_jump_t): Add __showmanyc and __imbue fields. (_IO_file_fopen): Add new fourth argument. * filebuf.cc (filebuf::open): Pass new fourth argument to _IO_file_fopen. * iolibio.h (_IO_freopen): Likewise. * streambuf.cc (streambuf::showmanyc, streambuf::imbue): New functions. * streambuf.h (_IO_wchar_t): Define to _G_wchar_t. (ios::fill): Remove casts. (struct streambuf): Add showmanyc and imbue members. * iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >= 1]: Initialize new fields is_char of struct printf_info. (ostream::operator<<(long double n)) [__GLIBC_MINOR__ >= 1]: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18222 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libio/streambuf.h')
-rw-r--r--libio/streambuf.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/libio/streambuf.h b/libio/streambuf.h
index 9ef47243be6..bc734bc75b0 100644
--- a/libio/streambuf.h
+++ b/libio/streambuf.h
@@ -55,8 +55,12 @@ extern "C" {
#endif
#ifndef _IO_wchar_t
+#if _G_IO_IO_FILE_VERSION == 0x20001
+#define _IO_wchar_t _G_wchar_t
+#else
#define _IO_wchar_t short
#endif
+#endif
extern "C++" {
class istream; /* Work-around for a g++ name mangling bug. Fixed in 2.6. */
@@ -176,9 +180,9 @@ class ios : public _ios_fields {
ostream* tie(ostream* val) { ostream* save=_tie; _tie=val; return save; }
// Methods to change the format state.
- _IO_wchar_t fill() const { return (_IO_wchar_t)_fill; }
+ _IO_wchar_t fill() const { return _fill; }
_IO_wchar_t fill(_IO_wchar_t newf)
- {_IO_wchar_t oldf = (_IO_wchar_t)_fill; _fill = (char)newf; return oldf;}
+ {_IO_wchar_t oldf = _fill; _fill = newf; return oldf;}
fmtflags flags() const { return _flags; }
fmtflags flags(fmtflags new_val) {
fmtflags old_val = _flags; _flags = new_val; return old_val; }
@@ -409,6 +413,10 @@ struct streambuf : public _IO_FILE { // protected??
virtual streampos sys_seek(streamoff, _seek_dir);
virtual int sys_close();
virtual int sys_stat(void*); // Actually, a (struct stat*)
+#if _G_IO_IO_FILE_VERSION == 0x20001
+ virtual int showmanyc();
+ virtual void imbue(void *);
+#endif
};
// A backupbuf is a streambuf with full backup and savepoints on reading.