2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: c_iostream.h /main/4 1996/08/21 15:54:57 drk $ */
28 #include "utility/c_ios.h"
30 class istream : public virtual ios
33 istream& _getline(char* b, int lim, int delim, int fill_zero);
34 int eatw(); // return EOF if no char available.
35 // Otherwise, return the first no white char.
36 // The char is still in the buffer.
39 istream(streambuf* sb);
40 virtual ~istream() {};
42 istream& seekg(streampos delta, ios::seek_dir d) ;
45 istream& get(char& c);
47 istream& putback(char c);
49 istream& getline(char* b, int lim, char delim='\n');
51 istream& read(char* s,int n);
55 istream& operator>>(unsigned short& c);
56 istream& operator>>(unsigned int& c);
57 istream& operator>>(int& c);
58 istream& operator>>(long& c);
59 istream& operator>>(char* s);
60 istream& operator>>(char& c);
63 class ostream : virtual public ios
67 ostream(streambuf* sb);
68 virtual ~ostream() {};
70 ostream& operator<<(void*);
71 ostream& operator<<(const char*);
72 ostream& operator<<(char c);
73 ostream& operator<<(int);
74 ostream& operator<<(unsigned int);
75 ostream& operator<<(long);
76 ostream& operator<< (ostream& (*f)(ostream&));
82 ostream& write(const char* s,int n);
85 //class iostream : public istream, public ostream
86 class iostream : public istream, public ostream
89 iostream(streambuf* sb);
90 virtual ~iostream() {};
93 ostream& endl(ostream& i) ;
96 #define cout (*cout_ptr)
97 #define cin (*cin_ptr)
98 #define cerr (*cerr_ptr)
99 extern ostream *cout_ptr;
100 extern istream *cin_ptr;
101 extern ostream *cerr_ptr;