gccxml_gem 0.9-x86-darwin-9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/Rakefile +75 -0
  2. data/bin/gccxml +0 -0
  3. data/bin/gccxml_cc1plus +0 -0
  4. data/gccxml.rb +44 -0
  5. data/share/doc/gccxml-0.9/Copyright.txt +55 -0
  6. data/share/doc/gccxml-0.9/gccxml.html +168 -0
  7. data/share/doc/gccxml-0.9/gccxml.txt +293 -0
  8. data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
  9. data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
  10. data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
  11. data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
  12. data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
  13. data/share/gccxml-0.9/GCC/2.95/complex +38 -0
  14. data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
  15. data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
  16. data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
  17. data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
  18. data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
  19. data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
  20. data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
  21. data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
  22. data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
  23. data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
  24. data/share/gccxml-0.9/GCC/2.95/deque +19 -0
  25. data/share/gccxml-0.9/GCC/2.95/exception +20 -0
  26. data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
  27. data/share/gccxml-0.9/GCC/2.95/functional +64 -0
  28. data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
  29. data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
  30. data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
  31. data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
  32. data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
  33. data/share/gccxml-0.9/GCC/2.95/list +19 -0
  34. data/share/gccxml-0.9/GCC/2.95/map +20 -0
  35. data/share/gccxml-0.9/GCC/2.95/memory +21 -0
  36. data/share/gccxml-0.9/GCC/2.95/new +13 -0
  37. data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
  38. data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
  39. data/share/gccxml-0.9/GCC/2.95/queue +20 -0
  40. data/share/gccxml-0.9/GCC/2.95/set +20 -0
  41. data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
  42. data/share/gccxml-0.9/GCC/2.95/stack +19 -0
  43. data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
  44. data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
  45. data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
  46. data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
  47. data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
  48. data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
  49. data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
  50. data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
  51. data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
  52. data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
  53. data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
  54. data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
  55. data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
  56. data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
  57. data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
  58. data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
  59. data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
  60. data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
  61. data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
  62. data/share/gccxml-0.9/GCC/2.95/string +26 -0
  63. data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
  64. data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
  65. data/share/gccxml-0.9/GCC/2.95/utility +25 -0
  66. data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
  67. data/share/gccxml-0.9/GCC/2.95/vector +19 -0
  68. data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
  69. data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
  70. data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
  71. data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
  72. data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
  73. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
  74. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
  75. data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
  76. data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
  77. data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
  78. data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
  79. data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
  80. data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
  81. data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
  82. data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
  83. data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
  84. data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
  85. data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
  86. data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
  87. data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
  88. data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
  89. data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
  90. data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
  91. data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
  92. data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
  93. data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
  94. data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
  95. data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
  96. data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
  97. data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
  98. data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
  99. data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
  100. data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
  101. data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +618 -0
  102. data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
  103. data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
  104. data/share/gccxml-0.9/GCC/find_flags +105 -0
  105. data/share/gccxml-0.9/Intel/find_flags +56 -0
  106. data/share/gccxml-0.9/Intel/pthread.h +16 -0
  107. data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
  108. data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
  109. data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
  110. data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
  111. data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
  112. data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
  113. data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
  114. data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
  115. data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
  116. data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
  117. data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
  118. data/share/gccxml-0.9/MIPSpro/find_flags +137 -0
  119. data/share/gccxml-0.9/Sun/5.8/adaptation.patch +168 -0
  120. data/share/gccxml-0.9/Sun/README +8 -0
  121. data/share/gccxml-0.9/Sun/adapt_headers.sh +24 -0
  122. data/share/gccxml-0.9/Sun/find_flags +69 -0
  123. data/share/gccxml-0.9/gccxml_config +2 -0
  124. data/share/gccxml-0.9/gccxml_find_flags +93 -0
  125. data/share/man/man1/gccxml.1 +246 -0
  126. metadata +204 -0
@@ -0,0 +1,26 @@
1
+ #ifndef GCCXML_STRING
2
+ #define GCCXML_STRING
3
+
4
+ #include_next <string>
5
+
6
+ // 21.2/2
7
+ namespace std
8
+ {
9
+ //using ::char_traits;
10
+ using ::basic_string;
11
+ using ::operator+;
12
+ using ::operator==;
13
+ using ::operator!=;
14
+ using ::operator<;
15
+ using ::operator>;
16
+ using ::operator<=;
17
+ using ::operator>=;
18
+ //using ::swap;
19
+ using ::operator>>;
20
+ using ::operator<<;
21
+ using ::getline;
22
+ using ::string;
23
+ //using ::wstring;
24
+ }
25
+
26
+ #endif
@@ -0,0 +1,23 @@
1
+ #ifndef GCCXML_STRSTREAM
2
+ #define GCCXML_STRSTREAM
3
+
4
+ #include_next <strstream>
5
+
6
+ // GCC 2.95 does not conform.
7
+ namespace std
8
+ {
9
+ using ::ios;
10
+ using ::streamoff;
11
+ using ::streampos;
12
+ using ::streamsize;
13
+ using ::streambuf;
14
+ using ::istream;
15
+ using ::ostream;
16
+ using ::iostream;
17
+ using ::istrstream;
18
+ using ::ostrstream;
19
+ using ::strstream;
20
+ using ::ends;
21
+ }
22
+
23
+ #endif
@@ -0,0 +1,11 @@
1
+ #ifndef GCCXML_TYPEINFO
2
+ #define GCCXML_TYPEINFO
3
+
4
+ #include_next <typeinfo>
5
+
6
+ // 18.5/1
7
+ using std::type_info;
8
+ using std::bad_cast;
9
+ using std::bad_typeid;
10
+
11
+ #endif
@@ -0,0 +1,25 @@
1
+ #ifndef GCCXML_UTILITY
2
+ #define GCCXML_UTILITY
3
+
4
+ #include_next <utility>
5
+
6
+ // 20.2/1
7
+ namespace std
8
+ {
9
+ namespace rel_ops
10
+ {
11
+ using ::operator!=;
12
+ using ::operator>;
13
+ using ::operator<=;
14
+ using ::operator>=;
15
+ }
16
+ using ::pair;
17
+ using ::operator==;
18
+ using ::operator!=;
19
+ using ::operator<;
20
+ using ::operator>;
21
+ using ::operator<=;
22
+ using ::operator>=;
23
+ }
24
+
25
+ #endif
@@ -0,0 +1,52 @@
1
+ #ifndef GCCXML_VALARRAY
2
+ #define GCCXML_VALARRAY
3
+
4
+ #include_next <valarray>
5
+
6
+ // 26.3.1
7
+ namespace std
8
+ {
9
+ using ::valarray;
10
+ using ::slice;
11
+ using ::slice_array;
12
+ using ::gslice;
13
+ using ::gslice_array;
14
+ using ::mask_array;
15
+ using ::indirect_array;
16
+ using ::operator*;
17
+ using ::operator/;
18
+ using ::operator%;
19
+ using ::operator+;
20
+ using ::operator-;
21
+ using ::operator^;
22
+ using ::operator&;
23
+ using ::operator|;
24
+ using ::operator<<;
25
+ using ::operator>>;
26
+ using ::operator&&;
27
+ using ::operator||;
28
+ using ::operator==;
29
+ using ::operator!=;
30
+ using ::operator<;
31
+ using ::operator>;
32
+ using ::operator<=;
33
+ using ::operator>=;
34
+ using ::abs;
35
+ using ::acos;
36
+ using ::asin;
37
+ using ::atan;
38
+ using ::atan2;
39
+ using ::cos;
40
+ using ::cosh;
41
+ using ::exp;
42
+ using ::log;
43
+ using ::log10;
44
+ using ::pow;
45
+ using ::sin;
46
+ using ::sinh;
47
+ using ::sqrt;
48
+ using ::tan;
49
+ using ::tanh;
50
+ }
51
+
52
+ #endif
@@ -0,0 +1,19 @@
1
+ #ifndef GCCXML_VECTOR
2
+ #define GCCXML_VECTOR
3
+
4
+ #include_next <vector>
5
+
6
+ // 23.2
7
+ namespace std
8
+ {
9
+ using ::vector;
10
+ using ::operator==;
11
+ using ::operator!=;
12
+ using ::operator<;
13
+ using ::operator>;
14
+ using ::operator<=;
15
+ using ::operator>=;
16
+ using ::swap;
17
+ }
18
+
19
+ #endif
@@ -0,0 +1,305 @@
1
+ #ifndef GCCXML_SSTREAM
2
+ #define GCCXML_SSTREAM
3
+
4
+ /* This is part of libio/iostream, providing -*- C++ -*- input/output.
5
+ Copyright (C) 2000 Free Software Foundation
6
+
7
+ This file is part of the GNU IO Library. This library is free
8
+ software; you can redistribute it and/or modify it under the
9
+ terms of the GNU General Public License as published by the
10
+ Free Software Foundation; either version 2, or (at your option)
11
+ any later version.
12
+
13
+ This library is distributed in the hope that it will be useful,
14
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ GNU General Public License for more details.
17
+
18
+ You should have received a copy of the GNU General Public License
19
+ along with this library; see the file COPYING. If not, write to the Free
20
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
+
22
+ As a special exception, if you link this library with files
23
+ compiled with a GNU compiler to produce an executable, this does not cause
24
+ the resulting executable to be covered by the GNU General Public License.
25
+ This exception does not however invalidate any other reasons why
26
+ the executable file might be covered by the GNU General Public License. */
27
+
28
+ /* Written by Magnus Fromreide (magfr@lysator.liu.se). */
29
+
30
+ #ifndef __SSTREAM__
31
+ #define __SSTREAM__
32
+
33
+ #include <string>
34
+ #include <iostream.h>
35
+ #include <streambuf.h>
36
+
37
+ namespace std
38
+ {
39
+ class stringbuf : public streambuf
40
+ {
41
+ public:
42
+ typedef char char_type;
43
+ typedef int int_type;
44
+ typedef streampos pos_type;
45
+ typedef streamoff off_type;
46
+
47
+ explicit stringbuf(int which=ios::in|ios::out) :
48
+ streambuf(which), buf(), mode(static_cast<ios::open_mode>(which)),
49
+ rpos(0), bufsize(1)
50
+ { }
51
+
52
+ explicit stringbuf(const std::string &s, int which=ios::in|ios::out) :
53
+ streambuf(which), buf(s), mode(static_cast<ios::open_mode>(which)),
54
+ bufsize(1)
55
+ {
56
+ if(mode & ios::in)
57
+ {
58
+ setg(&defbuf, &defbuf + bufsize, &defbuf + bufsize);
59
+ }
60
+ if(mode & ios::out)
61
+ {
62
+ setp(&defbuf, &defbuf + bufsize);
63
+ }
64
+ rpos = (mode & ios::ate ? s.size() : 0);
65
+ }
66
+
67
+ std::string str() const
68
+ {
69
+ const_cast<stringbuf*>(this)->sync(); // Sigh, really ugly hack
70
+ return buf;
71
+ };
72
+
73
+ void str(const std::string& s)
74
+ {
75
+ buf = s;
76
+ if(mode & ios::in)
77
+ {
78
+ gbump(egptr() - gptr());
79
+ }
80
+ if(mode & ios::out)
81
+ {
82
+ pbump(pbase() - pptr());
83
+ }
84
+ rpos = (mode & ios::ate ? s.size() : 0);
85
+ }
86
+ inline streampos seekoff(streamoff o, _seek_dir d, int mode=ios::in|ios::out);
87
+ inline streampos seekpos(streampos pos, int mode = ios::in|ios::out);
88
+
89
+ protected:
90
+ inline virtual int sync();
91
+ inline virtual int overflow(int = EOF);
92
+ inline virtual int underflow();
93
+ private:
94
+ std::string buf;
95
+ ios::open_mode mode;
96
+ std::string::size_type rpos;
97
+ streamsize bufsize;
98
+ char defbuf;
99
+ };
100
+
101
+ class stringstreambase : virtual public ios {
102
+ protected:
103
+ stringbuf __my_sb;
104
+ public:
105
+ std::string str() const
106
+ {
107
+ return dynamic_cast<stringbuf*>(_strbuf)->str();
108
+ }
109
+ void str(const std::string& s)
110
+ {
111
+ clear();
112
+ dynamic_cast<stringbuf*>(_strbuf)->str(s);
113
+ }
114
+
115
+ stringbuf* rdbuf()
116
+ {
117
+ return &__my_sb;
118
+ }
119
+ protected:
120
+ stringstreambase(int which) :
121
+ __my_sb(which)
122
+ {
123
+ init (&__my_sb);
124
+ }
125
+
126
+ stringstreambase(const std::string& s, int which) :
127
+ __my_sb(s, which)
128
+ {
129
+ init (&__my_sb);
130
+ }
131
+ };
132
+
133
+ class istringstream : public stringstreambase, public istream {
134
+ public:
135
+ istringstream(int which=ios::in) :
136
+ stringstreambase(which)
137
+ { }
138
+
139
+ istringstream(const std::string& s, int which=ios::in) :
140
+ stringstreambase(s, which)
141
+ { }
142
+
143
+ istringstream& seekg(streampos pos)
144
+ { pos = __my_sb.seekpos(pos, ios::in); if (pos == streampos(EOF)) set(ios::badbit); return *this; }
145
+
146
+ istringstream& seekg(streamoff off, _seek_dir dir)
147
+ { off = __my_sb.seekoff(off, dir, ios::in); if (off == streamoff(EOF)) set(ios::badbit); return *this; }
148
+
149
+ streampos tellg()
150
+ { streampos pos = __my_sb.seekoff(0, ios::cur, ios::in); if (pos == streampos(EOF)) set(ios::badbit); return pos; }
151
+ };
152
+
153
+ class ostringstream : public stringstreambase, public ostream {
154
+ public:
155
+ ostringstream(int which=ios::out) :
156
+ stringstreambase(which)
157
+ { }
158
+
159
+ ostringstream(const std::string& s, int which=ios::out) :
160
+ stringstreambase(s, which)
161
+ { }
162
+
163
+ ostringstream& seekp(streampos pos)
164
+ { pos = __my_sb.seekpos(pos, ios::out); if (pos == streampos(EOF)) set(ios::badbit); return *this; }
165
+
166
+ ostringstream& seekp(streamoff off, _seek_dir dir)
167
+ { off = __my_sb.seekoff(off, dir, ios::out); if (off == streamoff(EOF)) set(ios::badbit); return *this; }
168
+
169
+ streampos tellp()
170
+ { streampos pos = __my_sb.seekoff(0, ios::cur, ios::out); if (pos == streampos(EOF)) set(ios::badbit); return pos; }
171
+ };
172
+
173
+ class stringstream : public stringstreambase, public iostream {
174
+ public:
175
+ stringstream(int which=ios::in|ios::out) :
176
+ stringstreambase(which)
177
+ { }
178
+
179
+ stringstream(const std::string &s, int which=ios::in|ios::out) :
180
+ stringstreambase(s, which)
181
+ { }
182
+
183
+ stringstream& seekg(streampos pos)
184
+ { pos = __my_sb.seekpos(pos, ios::in); if (pos == streampos(EOF)) set(ios::badbit); return *this; }
185
+
186
+ stringstream& seekg(streamoff off, _seek_dir dir)
187
+ { off = __my_sb.seekoff(off, dir, ios::in); if (off == streamoff(EOF)) set(ios::badbit); return *this; }
188
+
189
+ streampos tellg()
190
+ { streampos pos = __my_sb.seekoff(0, ios::cur, ios::in); if (pos == streampos(EOF)) set(ios::badbit); return pos; }
191
+
192
+ stringstream& seekp(streampos pos)
193
+ { pos = __my_sb.seekpos(pos, ios::out); if (pos == streampos(EOF)) set(ios::badbit); return *this; }
194
+
195
+ stringstream& seekp(streamoff off, _seek_dir dir)
196
+ { off = __my_sb.seekoff(off, dir, ios::out); if (off == streamoff(EOF)) set(ios::badbit); return *this; }
197
+
198
+ streampos tellp()
199
+ { streampos pos = __my_sb.seekoff(0, ios::cur, ios::out); if (pos == streampos(EOF)) set(ios::badbit); return pos; }
200
+ };
201
+ }
202
+
203
+ inline int std::stringbuf::sync()
204
+ {
205
+ if((mode & ios::out) == 0)
206
+ return EOF;
207
+
208
+ streamsize n = pptr() - pbase();
209
+ if(n)
210
+ {
211
+ buf.replace(rpos, std::string::npos, pbase(), n);
212
+ if(buf.size() - rpos != (std::string::size_type) n)
213
+ return EOF;
214
+ rpos += n;
215
+ pbump(-n);
216
+ gbump(egptr() - gptr());
217
+ }
218
+ return 0;
219
+ }
220
+
221
+ inline int std::stringbuf::overflow(int ch)
222
+ {
223
+ if((mode & ios::out) == 0)
224
+ return EOF;
225
+
226
+ streamsize n = pptr() - pbase();
227
+
228
+ if(n && sync())
229
+ return EOF;
230
+
231
+ if(ch != EOF)
232
+ {
233
+ buf.replace(rpos, std::string::npos, ch);
234
+ ++rpos;
235
+ }
236
+ return 0;
237
+ }
238
+
239
+ inline int std::stringbuf::underflow()
240
+ {
241
+ sync();
242
+ if((mode & ios::in) == 0)
243
+ {
244
+ return EOF;
245
+ }
246
+ if(rpos >= buf.size())
247
+ {
248
+ return EOF;
249
+ }
250
+
251
+ std::string::size_type n = egptr() - eback();
252
+ std::string::size_type s;
253
+
254
+ s = buf.copy(eback(), n, rpos);
255
+ pbump(pbase() - pptr());
256
+ gbump(eback() - gptr());
257
+ int res = (0377 & buf[rpos]);
258
+ rpos += s;
259
+ return res;
260
+ }
261
+
262
+ inline streampos std::stringbuf::seekoff(streamoff o, _seek_dir d, int mode)
263
+ {
264
+ sync();
265
+ streamoff newpos = rpos;
266
+ switch (d)
267
+ {
268
+ case ios::beg: newpos = o; break;
269
+ case ios::cur: if ((mode & (ios::in|ios::out)) == (ios::in|ios::out))
270
+ return streampos(EOF);
271
+ newpos += o; break;
272
+ case ios::end: newpos = buf.size() + o; break;
273
+ }
274
+ if (newpos < 0 || newpos > buf.size())
275
+ return streampos(EOF);
276
+ rpos = newpos;
277
+ return newpos;
278
+ }
279
+
280
+ inline streampos std::stringbuf::seekpos(streampos pos, int mode)
281
+ {
282
+ return seekoff(pos, ios::beg, mode);
283
+ }
284
+
285
+ #endif /* not __STRSTREAM__ */
286
+
287
+ // GCC 2.95 does not conform.
288
+ namespace std
289
+ {
290
+ using ::ios;
291
+ using ::streamoff;
292
+ using ::streampos;
293
+ using ::streamsize;
294
+ using ::streambuf;
295
+ using ::istream;
296
+ using ::ostream;
297
+ using ::iostream;
298
+ }
299
+
300
+ using std::stringbuf;
301
+ using std::istringstream;
302
+ using std::ostringstream;
303
+ using std::stringstream;
304
+
305
+ #endif