Root/
Source at commit 2187 created 11 years 4 months ago. By ifabio, Update Chameleon.xcodeproj | |
---|---|
1 | /*␉Copyright (C) 2004 Garrett A. Kajmowicz␊ |
2 | ␊ |
3 | ␉This file is part of the uClibc++ Library.␊ |
4 | ␊ |
5 | ␉This library is free software; you can redistribute it and/or␊ |
6 | ␉modify it under the terms of the GNU Lesser General Public␊ |
7 | ␉License as published by the Free Software Foundation; either␊ |
8 | ␉version 2.1 of the License, or (at your option) 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 GNU␊ |
13 | ␉Lesser General Public License for more details.␊ |
14 | ␊ |
15 | ␉You should have received a copy of the GNU Lesser General Public␊ |
16 | ␉License along with this library; if not, write to the Free Software␊ |
17 | ␉Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA␊ |
18 | ␊ |
19 | */␊ |
20 | ␊ |
21 | #define __UCLIBCXX_COMPILE_ISTREAM__ 1␊ |
22 | ␊ |
23 | #include <istream>␊ |
24 | ␊ |
25 | ␊ |
26 | namespace std{␊ |
27 | ␊ |
28 | #ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__␊ |
29 | ␊ |
30 | ␉template <> _UCXXEXPORT string _readToken<char, char_traits<char> >(istream & stream)␊ |
31 | ␉{␊ |
32 | ␉␉string temp;␊ |
33 | ␉␉char_traits<char>::int_type c;␊ |
34 | ␉␉while(true){␊ |
35 | ␉␉␉c = stream.rdbuf()->sgetc();␊ |
36 | ␉␉␉if(c != char_traits<char>::eof() && isspace(c) == false){␊ |
37 | ␉␉␉␉stream.rdbuf()->sbumpc();␊ |
38 | ␉␉␉␉temp.append(1, char_traits<char>::to_char_type(c));␊ |
39 | ␉␉␉}else{␊ |
40 | ␉␉␉␉break;␊ |
41 | ␉␉␉}␊ |
42 | ␉␉}␊ |
43 | ␉␉if (temp.size() == 0)␊ |
44 | ␉␉␉stream.setstate(ios_base::eofbit|ios_base::failbit);␊ |
45 | ␊ |
46 | ␉␉return temp;␊ |
47 | }␊ |
48 | ␊ |
49 | ␉template _UCXXEXPORT istream::int_type istream::get();␊ |
50 | ␉template _UCXXEXPORT istream & istream::get(char &c);␊ |
51 | ␊ |
52 | ␉template _UCXXEXPORT istream & istream::operator>>(bool &n);␊ |
53 | ␉template _UCXXEXPORT istream & istream::operator>>(short &n);␊ |
54 | ␉template _UCXXEXPORT istream & istream::operator>>(unsigned short &n);␊ |
55 | ␉template _UCXXEXPORT istream & istream::operator>>(int &n);␊ |
56 | ␉template _UCXXEXPORT istream & istream::operator>>(unsigned int &n);␊ |
57 | ␉template _UCXXEXPORT istream & istream::operator>>(long unsigned &n);␊ |
58 | ␉template _UCXXEXPORT istream & istream::operator>>(long int &n);␊ |
59 | ␉template _UCXXEXPORT istream & istream::operator>>(void *& p);␊ |
60 | ␉template _UCXXEXPORT istream & operator>>(istream & is, char & c);␊ |
61 | ␊ |
62 | ␊ |
63 | #ifdef __UCLIBCXX_HAS_FLOATS__␊ |
64 | ␉template _UCXXEXPORT istream & istream::operator>>(float &f);␊ |
65 | ␉template _UCXXEXPORT istream & istream::operator>>(double &f);␊ |
66 | ␉template _UCXXEXPORT istream & istream::operator>>(long double &f);␊ |
67 | #endif␊ |
68 | ␊ |
69 | ␉template _UCXXEXPORT void __skipws(basic_istream<char, char_traits<char> >& is);␊ |
70 | ␊ |
71 | #endif␊ |
72 | ␊ |
73 | ␊ |
74 | }␊ |
75 | ␊ |
76 |