1/* 2Copyright (C) 1993 Free Software Foundation 3 4This file is part of the GNU IO Library. This library is free 5software; you can redistribute it and/or modify it under the 6terms of the GNU General Public License as published by the 7Free Software Foundation; either version 2, or (at your option) 8any later version. 9 10This library is distributed in the hope that it will be useful, 11but WITHOUT ANY WARRANTY; without even the implied warranty of 12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13GNU General Public License for more details. 14 15You should have received a copy of the GNU General Public License 16along with this library; see the file COPYING. If not, write to the Free 17Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19As a special exception, if you link this library with files 20compiled with a GNU compiler to produce an executable, this does not cause 21the resulting executable to be covered by the GNU General Public License. 22This exception does not however invalidate any other reasons why 23the executable file might be covered by the GNU General Public License. */ 24 25#ifdef __GNUC__ 26#pragma implementation 27#endif 28#define _STREAM_COMPAT 29#include "builtinbuf.h" 30#include "iostreamP.h" 31#if !_IO_UNIFIED_JUMPTABLES 32int builtinbuf::overflow(int ch) { return _IO_OVERFLOW (this, ch); } 33 34int builtinbuf::underflow() { return _IO_UNDERFLOW (this); } 35 36streamsize builtinbuf::xsgetn(char* buf, streamsize n) 37{ return _IO_XSGETN (this, buf, n); } 38 39streamsize builtinbuf::xsputn(const char* buf, streamsize n) 40{ return _IO_XSPUTN (this, buf, n); } 41 42int builtinbuf::doallocate() { return _IO_DOALLOCATE (this); } 43 44builtinbuf::~builtinbuf() { _IO_FINISH (this); } 45 46int builtinbuf::sync() { return _IO_SYNC (this); } 47 48streambuf* builtinbuf::setbuf(char *buf, int n) 49{ return (streambuf*)_IO_SETBUF (this, buf, n); } 50 51streampos builtinbuf::seekoff(streamoff off, _seek_dir dir, int mode) 52{ 53 return _IO_SEEKOFF (this, off, dir, mode); 54} 55 56streampos builtinbuf::seekpos(streampos pos, int mode) 57{ 58 return _IO_SEEKPOS (this, pos, mode); 59} 60 61int builtinbuf::pbackfail(int c) 62{ return _IO_PBACKFAIL (this, c); } 63 64streamsize builtinbuf::sys_read(char* buf, streamsize size) 65{ return _IO_SYSREAD (this, buf, size); } 66 67streampos builtinbuf::sys_seek(streamoff off, _seek_dir dir) 68{ return _IO_SYSSEEK (this, off, dir); } 69 70streamsize builtinbuf::sys_write(const char* buf, streamsize size) 71{ return _IO_SYSWRITE (this, buf, size); } 72 73int builtinbuf::sys_stat(void* buf) // Actually, a (struct stat*) 74{ return _IO_SYSSTAT (this, buf); } 75 76int builtinbuf::sys_close() 77{ return _IO_SYSCLOSE (this); } 78#endif 79