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