]>
Commit | Line | Data |
---|---|---|
45516216 | 1 | # 1 "test.cpp" |
2 | # 1 "<built-in>" | |
3 | # 1 "<command line>" | |
4 | # 1 "test.cpp" | |
5 | # 1 "./boost/format.hpp" 1 | |
6 | # 17 "./boost/format.hpp" | |
7 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 1 3 | |
8 | # 63 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 3 | |
9 | ||
10 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 3 | |
11 | ||
12 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/functexcept.h" 1 3 | |
13 | # 41 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/functexcept.h" 3 | |
14 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/exception_defines.h" 1 3 | |
15 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/functexcept.h" 2 3 | |
16 | ||
17 | namespace std | |
18 | { | |
19 | ||
20 | void | |
21 | __throw_bad_exception(void) __attribute__((__noreturn__)); | |
22 | ||
23 | ||
24 | void | |
25 | __throw_bad_alloc(void) __attribute__((__noreturn__)); | |
26 | ||
27 | ||
28 | void | |
29 | __throw_bad_cast(void) __attribute__((__noreturn__)); | |
30 | ||
31 | void | |
32 | __throw_bad_typeid(void) __attribute__((__noreturn__)); | |
33 | ||
34 | ||
35 | void | |
36 | __throw_logic_error(const char*) __attribute__((__noreturn__)); | |
37 | ||
38 | void | |
39 | __throw_domain_error(const char*) __attribute__((__noreturn__)); | |
40 | ||
41 | void | |
42 | __throw_invalid_argument(const char*) __attribute__((__noreturn__)); | |
43 | ||
44 | void | |
45 | __throw_length_error(const char*) __attribute__((__noreturn__)); | |
46 | ||
47 | void | |
48 | __throw_out_of_range(const char*) __attribute__((__noreturn__)); | |
49 | ||
50 | void | |
51 | __throw_runtime_error(const char*) __attribute__((__noreturn__)); | |
52 | ||
53 | void | |
54 | __throw_range_error(const char*) __attribute__((__noreturn__)); | |
55 | ||
56 | void | |
57 | __throw_overflow_error(const char*) __attribute__((__noreturn__)); | |
58 | ||
59 | void | |
60 | __throw_underflow_error(const char*) __attribute__((__noreturn__)); | |
61 | ||
62 | ||
63 | void | |
64 | __throw_ios_failure(const char*) __attribute__((__noreturn__)); | |
65 | } | |
66 | # 66 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
67 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 1 3 | |
68 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
69 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++config.h" 1 3 | |
70 | # 35 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++config.h" 3 | |
71 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/os_defines.h" 1 3 | |
72 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/os_defines.h" 3 | |
73 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/features.h" 1 3 4 | |
74 | # 35 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/features.h" 3 4 | |
75 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_config.h" 1 3 4 | |
76 | # 36 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/features.h" 2 3 4 | |
77 | ||
78 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_arch_features.h" 1 3 4 | |
79 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/features.h" 2 3 4 | |
80 | # 356 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/features.h" 3 4 | |
81 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/cdefs.h" 1 3 4 | |
82 | # 357 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/features.h" 2 3 4 | |
83 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/os_defines.h" 2 3 | |
84 | # 36 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++config.h" 2 3 | |
85 | ||
86 | ||
87 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/cpu_defines.h" 1 3 | |
88 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++config.h" 2 3 | |
89 | ||
90 | ||
91 | ||
92 | ||
93 | namespace __gnu_debug_def { } | |
94 | ||
95 | namespace __gnu_debug | |
96 | { | |
97 | using namespace __gnu_debug_def; | |
98 | } | |
99 | # 65 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
100 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstring" 1 3 | |
101 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstring" 3 | |
102 | ||
103 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstring" 3 | |
104 | ||
105 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstddef" 1 3 | |
106 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstddef" 3 | |
107 | ||
108 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstddef" 3 | |
109 | ||
110 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
111 | # 152 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 3 4 | |
112 | typedef long int ptrdiff_t; | |
113 | # 214 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 3 4 | |
114 | typedef long unsigned int size_t; | |
115 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstddef" 2 3 | |
116 | ||
117 | namespace std | |
118 | { | |
119 | using ::ptrdiff_t; | |
120 | using ::size_t; | |
121 | } | |
122 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstring" 2 3 | |
123 | ||
124 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 1 3 4 | |
125 | # 28 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
126 | extern "C" { | |
127 | ||
128 | ||
129 | ||
130 | ||
131 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
132 | # 34 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 2 3 4 | |
133 | ||
134 | ||
135 | ||
136 | ||
137 | extern void *memcpy (void *__restrict __dest, | |
138 | __const void *__restrict __src, size_t __n) | |
139 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
140 | ||
141 | ||
142 | extern void *memmove (void *__dest, __const void *__src, size_t __n) | |
143 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
144 | ||
145 | ||
146 | ||
147 | ||
148 | ||
149 | ||
150 | extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, | |
151 | int __c, size_t __n) | |
152 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
153 | ||
154 | ||
155 | ||
156 | ||
157 | ||
158 | extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
159 | ||
160 | ||
161 | extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) | |
162 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
163 | ||
164 | ||
165 | extern void *memchr (__const void *__s, int __c, size_t __n) | |
166 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
167 | ||
168 | ||
169 | ||
170 | ||
171 | ||
172 | extern void *rawmemchr (__const void *__s, int __c) | |
173 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
174 | ||
175 | ||
176 | extern void *memrchr (__const void *__s, int __c, size_t __n) | |
177 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
178 | ||
179 | ||
180 | ||
181 | ||
182 | ||
183 | extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) | |
184 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
185 | ||
186 | extern char *strncpy (char *__restrict __dest, | |
187 | __const char *__restrict __src, size_t __n) | |
188 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
189 | ||
190 | ||
191 | extern char *strcat (char *__restrict __dest, __const char *__restrict __src) | |
192 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
193 | ||
194 | extern char *strncat (char *__restrict __dest, __const char *__restrict __src, | |
195 | size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
196 | ||
197 | ||
198 | extern int strcmp (__const char *__s1, __const char *__s2) | |
199 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
200 | ||
201 | extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) | |
202 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
203 | ||
204 | ||
205 | extern int strcoll (__const char *__s1, __const char *__s2) | |
206 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
207 | ||
208 | extern size_t strxfrm (char *__restrict __dest, | |
209 | __const char *__restrict __src, size_t __n) | |
210 | throw () __attribute__ ((__nonnull__ (2))); | |
211 | ||
212 | # 130 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
213 | extern char *strdup (__const char *__s) | |
214 | throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
215 | ||
216 | ||
217 | ||
218 | ||
219 | ||
220 | ||
221 | extern char *strndup (__const char *__string, size_t __n) | |
222 | throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
223 | # 165 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
224 | ||
225 | ||
226 | extern char *strchr (__const char *__s, int __c) | |
227 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
228 | ||
229 | extern char *strrchr (__const char *__s, int __c) | |
230 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
231 | ||
232 | ||
233 | ||
234 | ||
235 | ||
236 | extern char *strchrnul (__const char *__s, int __c) | |
237 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
238 | ||
239 | ||
240 | ||
241 | ||
242 | ||
243 | extern size_t strcspn (__const char *__s, __const char *__reject) | |
244 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
245 | ||
246 | ||
247 | extern size_t strspn (__const char *__s, __const char *__accept) | |
248 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
249 | ||
250 | extern char *strpbrk (__const char *__s, __const char *__accept) | |
251 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
252 | ||
253 | extern char *strstr (__const char *__haystack, __const char *__needle) | |
254 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
255 | ||
256 | ||
257 | ||
258 | extern char *strtok (char *__restrict __s, __const char *__restrict __delim) | |
259 | throw () __attribute__ ((__nonnull__ (2))); | |
260 | ||
261 | # 212 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
262 | extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, | |
263 | char **__restrict __save_ptr) | |
264 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
265 | ||
266 | ||
267 | ||
268 | ||
269 | extern char *strcasestr (__const char *__haystack, __const char *__needle) | |
270 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
271 | ||
272 | ||
273 | ||
274 | ||
275 | ||
276 | ||
277 | extern void *memmem (__const void *__haystack, size_t __haystacklen, | |
278 | __const void *__needle, size_t __needlelen) | |
279 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); | |
280 | # 238 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
281 | extern void *mempcpy (void *__restrict __dest, | |
282 | __const void *__restrict __src, size_t __n) | |
283 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
284 | ||
285 | ||
286 | ||
287 | ||
288 | ||
289 | extern size_t strlen (__const char *__s) | |
290 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
291 | ||
292 | ||
293 | ||
294 | ||
295 | ||
296 | extern size_t strnlen (__const char *__string, size_t __maxlen) | |
297 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
298 | ||
299 | ||
300 | ||
301 | ||
302 | ||
303 | extern char *strerror (int __errnum) throw (); | |
304 | ||
305 | # 285 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
306 | extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen) | |
307 | throw () __attribute__ ((__nonnull__ (2))); | |
308 | ||
309 | extern char * strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __asm__ ("_" "__glibc_strerror_r") __attribute__ ((__nonnull__ (2))); | |
310 | # 306 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
311 | extern void bcopy (__const void *__src, void *__dest, size_t __n) | |
312 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
313 | ||
314 | ||
315 | extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
316 | ||
317 | ||
318 | extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) | |
319 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
320 | ||
321 | ||
322 | extern char *index (__const char *__s, int __c) | |
323 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
324 | ||
325 | ||
326 | extern char *rindex (__const char *__s, int __c) | |
327 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
328 | # 339 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
329 | extern int ffs (int __i) throw () __attribute__ ((__const__)); | |
330 | # 352 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
331 | extern int strcasecmp (__const char *__s1, __const char *__s2) | |
332 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
333 | ||
334 | ||
335 | extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) | |
336 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
337 | # 375 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
338 | extern char *strsep (char **__restrict __stringp, | |
339 | __const char *__restrict __delim) | |
340 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
341 | # 388 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
342 | extern char *strsignal (int __sig) throw (); | |
343 | ||
344 | ||
345 | ||
346 | ||
347 | ||
348 | ||
349 | extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
350 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
351 | # 405 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
352 | extern char *stpncpy (char *__restrict __dest, | |
353 | __const char *__restrict __src, size_t __n) | |
354 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
355 | # 422 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/string.h" 3 4 | |
356 | extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); | |
357 | ||
358 | ||
359 | ||
360 | ||
361 | ||
362 | ||
363 | extern size_t strlcat(char *__restrict dst, const char *__restrict src, | |
364 | size_t n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
365 | extern size_t strlcpy(char *__restrict dst, const char *__restrict src, | |
366 | size_t n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
367 | ||
368 | ||
369 | } | |
370 | # 53 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstring" 2 3 | |
371 | # 78 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstring" 3 | |
372 | namespace std | |
373 | { | |
374 | using ::memcpy; | |
375 | using ::memmove; | |
376 | using ::strcpy; | |
377 | using ::strncpy; | |
378 | using ::strcat; | |
379 | using ::strncat; | |
380 | using ::memcmp; | |
381 | using ::strcmp; | |
382 | using ::strcoll; | |
383 | using ::strncmp; | |
384 | using ::strxfrm; | |
385 | using ::strcspn; | |
386 | using ::strspn; | |
387 | using ::strtok; | |
388 | using ::memset; | |
389 | using ::strerror; | |
390 | using ::strlen; | |
391 | ||
392 | using ::memchr; | |
393 | ||
394 | inline void* | |
395 | memchr(void* __p, int __c, size_t __n) | |
396 | { return memchr(const_cast<const void*>(__p), __c, __n); } | |
397 | ||
398 | using ::strchr; | |
399 | ||
400 | inline char* | |
401 | strchr(char* __s1, int __n) | |
402 | { return __builtin_strchr(const_cast<const char*>(__s1), __n); } | |
403 | ||
404 | using ::strpbrk; | |
405 | ||
406 | inline char* | |
407 | strpbrk(char* __s1, const char* __s2) | |
408 | { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); } | |
409 | ||
410 | using ::strrchr; | |
411 | ||
412 | inline char* | |
413 | strrchr(char* __s1, int __n) | |
414 | { return __builtin_strrchr(const_cast<const char*>(__s1), __n); } | |
415 | ||
416 | using ::strstr; | |
417 | ||
418 | inline char* | |
419 | strstr(char* __s1, const char* __s2) | |
420 | { return __builtin_strstr(const_cast<const char*>(__s1), __s2); } | |
421 | } | |
422 | # 66 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
423 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/climits" 1 3 | |
424 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/climits" 3 | |
425 | ||
426 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/climits" 3 | |
427 | ||
428 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/limits.h" 1 3 4 | |
429 | # 11 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/limits.h" 3 4 | |
430 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/syslimits.h" 1 3 4 | |
431 | ||
432 | ||
433 | ||
434 | ||
435 | ||
436 | ||
437 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/limits.h" 1 3 4 | |
438 | # 122 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/limits.h" 3 4 | |
439 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/limits.h" 1 3 4 | |
440 | # 144 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/limits.h" 3 4 | |
441 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/posix1_lim.h" 1 3 4 | |
442 | # 153 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/posix1_lim.h" 3 4 | |
443 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/local_lim.h" 1 3 4 | |
444 | # 36 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/local_lim.h" 3 4 | |
445 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/linux/limits.h" 1 3 4 | |
446 | # 37 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/local_lim.h" 2 3 4 | |
447 | # 154 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/posix1_lim.h" 2 3 4 | |
448 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_local_lim.h" 1 3 4 | |
449 | # 155 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/posix1_lim.h" 2 3 4 | |
450 | # 145 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/limits.h" 2 3 4 | |
451 | ||
452 | ||
453 | ||
454 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/posix2_lim.h" 1 3 4 | |
455 | # 149 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/limits.h" 2 3 4 | |
456 | ||
457 | ||
458 | ||
459 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/xopen_lim.h" 1 3 4 | |
460 | # 34 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/xopen_lim.h" 3 4 | |
461 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/stdio_lim.h" 1 3 4 | |
462 | # 35 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/xopen_lim.h" 2 3 4 | |
463 | # 153 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/limits.h" 2 3 4 | |
464 | # 123 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/limits.h" 2 3 4 | |
465 | # 8 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/syslimits.h" 2 3 4 | |
466 | # 12 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/limits.h" 2 3 4 | |
467 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/climits" 2 3 | |
468 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
469 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdlib" 1 3 | |
470 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdlib" 3 | |
471 | ||
472 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdlib" 3 | |
473 | # 71 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdlib" 3 | |
474 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 1 3 4 | |
475 | # 35 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
476 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
477 | # 36 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 2 3 4 | |
478 | ||
479 | extern "C" { | |
480 | ||
481 | ||
482 | ||
483 | ||
484 | ||
485 | ||
486 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/waitflags.h" 1 3 4 | |
487 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 2 3 4 | |
488 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/waitstatus.h" 1 3 4 | |
489 | # 65 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/waitstatus.h" 3 4 | |
490 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/endian.h" 1 3 4 | |
491 | # 37 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/endian.h" 3 4 | |
492 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/endian.h" 1 3 4 | |
493 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/endian.h" 2 3 4 | |
494 | # 66 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/waitstatus.h" 2 3 4 | |
495 | ||
496 | union wait | |
497 | { | |
498 | int w_status; | |
499 | struct | |
500 | { | |
501 | ||
502 | unsigned int __w_termsig:7; | |
503 | unsigned int __w_coredump:1; | |
504 | unsigned int __w_retcode:8; | |
505 | unsigned int:16; | |
506 | ||
507 | ||
508 | ||
509 | ||
510 | ||
511 | ||
512 | ||
513 | } __wait_terminated; | |
514 | struct | |
515 | { | |
516 | ||
517 | unsigned int __w_stopval:8; | |
518 | unsigned int __w_stopsig:8; | |
519 | unsigned int:16; | |
520 | ||
521 | ||
522 | ||
523 | ||
524 | ||
525 | ||
526 | } __wait_stopped; | |
527 | }; | |
528 | # 46 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 2 3 4 | |
529 | # 98 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
530 | ||
531 | ||
532 | typedef struct | |
533 | { | |
534 | int quot; | |
535 | int rem; | |
536 | } div_t; | |
537 | ||
538 | ||
539 | ||
540 | typedef struct | |
541 | { | |
542 | long int quot; | |
543 | long int rem; | |
544 | } ldiv_t; | |
545 | ||
546 | ||
547 | ||
548 | ||
549 | ||
550 | ||
551 | ||
552 | __extension__ typedef struct | |
553 | { | |
554 | long long int quot; | |
555 | long long int rem; | |
556 | } lldiv_t; | |
557 | ||
558 | ||
559 | # 151 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
560 | ||
561 | ||
562 | ||
563 | extern double atof (__const char *__nptr) | |
564 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
565 | ||
566 | ||
567 | extern int atoi (__const char *__nptr) | |
568 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
569 | ||
570 | extern long int atol (__const char *__nptr) | |
571 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
572 | ||
573 | ||
574 | ||
575 | ||
576 | ||
577 | __extension__ extern long long int atoll (__const char *__nptr) | |
578 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
579 | ||
580 | ||
581 | ||
582 | ||
583 | ||
584 | ||
585 | extern double strtod (__const char *__restrict __nptr, | |
586 | char **__restrict __endptr) | |
587 | throw () __attribute__ ((__nonnull__ (1))) ; | |
588 | ||
589 | ||
590 | ||
591 | ||
592 | ||
593 | extern float strtof (__const char *__restrict __nptr, | |
594 | char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; | |
595 | ||
596 | extern long double strtold (__const char *__restrict __nptr, | |
597 | char **__restrict __endptr) | |
598 | throw () __attribute__ ((__nonnull__ (1))) ; | |
599 | ||
600 | ||
601 | ||
602 | ||
603 | ||
604 | ||
605 | extern long int strtol (__const char *__restrict __nptr, | |
606 | char **__restrict __endptr, int __base) | |
607 | throw () __attribute__ ((__nonnull__ (1))) ; | |
608 | ||
609 | extern unsigned long int strtoul (__const char *__restrict __nptr, | |
610 | char **__restrict __endptr, int __base) | |
611 | throw () __attribute__ ((__nonnull__ (1))) ; | |
612 | ||
613 | ||
614 | ||
615 | ||
616 | __extension__ | |
617 | extern long long int strtoq (__const char *__restrict __nptr, | |
618 | char **__restrict __endptr, int __base) | |
619 | throw () __attribute__ ((__nonnull__ (1))) ; | |
620 | ||
621 | __extension__ | |
622 | extern unsigned long long int strtouq (__const char *__restrict __nptr, | |
623 | char **__restrict __endptr, int __base) | |
624 | throw () __attribute__ ((__nonnull__ (1))) ; | |
625 | ||
626 | ||
627 | ||
628 | ||
629 | ||
630 | __extension__ | |
631 | extern long long int strtoll (__const char *__restrict __nptr, | |
632 | char **__restrict __endptr, int __base) | |
633 | throw () __attribute__ ((__nonnull__ (1))) ; | |
634 | ||
635 | __extension__ | |
636 | extern unsigned long long int strtoull (__const char *__restrict __nptr, | |
637 | char **__restrict __endptr, int __base) | |
638 | throw () __attribute__ ((__nonnull__ (1))) ; | |
639 | ||
640 | # 297 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
641 | extern char *l64a (long int __n) throw () ; | |
642 | ||
643 | ||
644 | extern long int a64l (__const char *__s) | |
645 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
646 | ||
647 | ||
648 | ||
649 | ||
650 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 1 3 4 | |
651 | # 29 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 3 4 | |
652 | extern "C" { | |
653 | ||
654 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 1 3 4 | |
655 | # 28 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 3 4 | |
656 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/wordsize.h" 1 3 4 | |
657 | # 29 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 2 3 4 | |
658 | ||
659 | ||
660 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
661 | # 32 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 2 3 4 | |
662 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/kernel_types.h" 1 3 4 | |
663 | # 10 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/kernel_types.h" 3 4 | |
664 | typedef unsigned short __kernel_dev_t; | |
665 | typedef unsigned long __kernel_ino_t; | |
666 | typedef unsigned short __kernel_mode_t; | |
667 | typedef unsigned short __kernel_nlink_t; | |
668 | typedef long __kernel_off_t; | |
669 | typedef int __kernel_pid_t; | |
670 | typedef unsigned int __kernel_ipc_pid_t; | |
671 | typedef unsigned int __kernel_uid_t; | |
672 | typedef unsigned int __kernel_gid_t; | |
673 | typedef unsigned int __kernel_size_t; | |
674 | typedef int __kernel_ssize_t; | |
675 | typedef int __kernel_ptrdiff_t; | |
676 | typedef long __kernel_time_t; | |
677 | typedef long __kernel_suseconds_t; | |
678 | typedef long __kernel_clock_t; | |
679 | typedef int __kernel_daddr_t; | |
680 | typedef char * __kernel_caddr_t; | |
681 | typedef unsigned short __kernel_uid16_t; | |
682 | typedef unsigned short __kernel_gid16_t; | |
683 | typedef unsigned int __kernel_uid32_t; | |
684 | typedef unsigned int __kernel_gid32_t; | |
685 | typedef unsigned short __kernel_old_uid_t; | |
686 | typedef unsigned short __kernel_old_gid_t; | |
687 | typedef long long __kernel_loff_t; | |
688 | typedef __kernel_dev_t __kernel_old_dev_t; | |
689 | ||
690 | typedef struct { | |
691 | ||
692 | ||
693 | ||
694 | int __val[2]; | |
695 | ||
696 | } __kernel_fsid_t; | |
697 | # 33 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 2 3 4 | |
698 | ||
699 | ||
700 | typedef unsigned char __u_char; | |
701 | typedef unsigned short int __u_short; | |
702 | typedef unsigned int __u_int; | |
703 | typedef unsigned long int __u_long; | |
704 | ||
705 | ||
706 | typedef signed char __int8_t; | |
707 | typedef unsigned char __uint8_t; | |
708 | typedef signed short int __int16_t; | |
709 | typedef unsigned short int __uint16_t; | |
710 | typedef signed int __int32_t; | |
711 | typedef unsigned int __uint32_t; | |
712 | ||
713 | ||
714 | ||
715 | ||
716 | __extension__ typedef signed long long int __int64_t; | |
717 | __extension__ typedef unsigned long long int __uint64_t; | |
718 | ||
719 | ||
720 | ||
721 | ||
722 | ||
723 | ||
724 | ||
725 | __extension__ typedef long long int __quad_t; | |
726 | __extension__ typedef unsigned long long int __u_quad_t; | |
727 | # 135 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 3 4 | |
728 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/typesizes.h" 1 3 4 | |
729 | # 136 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 2 3 4 | |
730 | ||
731 | ||
732 | __extension__ typedef __u_quad_t __dev_t; | |
733 | __extension__ typedef unsigned int __uid_t; | |
734 | __extension__ typedef unsigned int __gid_t; | |
735 | __extension__ typedef unsigned long int __ino_t; | |
736 | __extension__ typedef __u_quad_t __ino64_t; | |
737 | __extension__ typedef unsigned int __mode_t; | |
738 | __extension__ typedef unsigned int __nlink_t; | |
739 | __extension__ typedef long int __off_t; | |
740 | __extension__ typedef __quad_t __off64_t; | |
741 | __extension__ typedef int __pid_t; | |
742 | __extension__ typedef struct { int __val[2]; } __fsid_t; | |
743 | __extension__ typedef long int __clock_t; | |
744 | __extension__ typedef unsigned long int __rlim_t; | |
745 | __extension__ typedef __u_quad_t __rlim64_t; | |
746 | __extension__ typedef unsigned int __id_t; | |
747 | __extension__ typedef long int __time_t; | |
748 | __extension__ typedef unsigned int __useconds_t; | |
749 | __extension__ typedef long int __suseconds_t; | |
750 | ||
751 | __extension__ typedef int __daddr_t; | |
752 | __extension__ typedef long int __swblk_t; | |
753 | __extension__ typedef int __key_t; | |
754 | ||
755 | ||
756 | __extension__ typedef int __clockid_t; | |
757 | ||
758 | ||
759 | __extension__ typedef void * __timer_t; | |
760 | ||
761 | ||
762 | __extension__ typedef long int __blksize_t; | |
763 | ||
764 | ||
765 | ||
766 | ||
767 | __extension__ typedef long int __blkcnt_t; | |
768 | __extension__ typedef __quad_t __blkcnt64_t; | |
769 | ||
770 | ||
771 | __extension__ typedef unsigned long int __fsblkcnt_t; | |
772 | __extension__ typedef __u_quad_t __fsblkcnt64_t; | |
773 | ||
774 | ||
775 | __extension__ typedef unsigned long int __fsfilcnt_t; | |
776 | __extension__ typedef __u_quad_t __fsfilcnt64_t; | |
777 | ||
778 | __extension__ typedef long int __ssize_t; | |
779 | ||
780 | ||
781 | ||
782 | typedef __off64_t __loff_t; | |
783 | typedef __quad_t *__qaddr_t; | |
784 | typedef char *__caddr_t; | |
785 | ||
786 | ||
787 | __extension__ typedef int __intptr_t; | |
788 | ||
789 | ||
790 | __extension__ typedef unsigned int __socklen_t; | |
791 | ||
792 | ||
793 | ||
794 | ||
795 | ||
796 | typedef __kernel_ipc_pid_t __ipc_pid_t; | |
797 | ||
798 | ||
799 | ||
800 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/pthreadtypes.h" 1 3 4 | |
801 | # 23 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/pthreadtypes.h" 3 4 | |
802 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sched.h" 1 3 4 | |
803 | # 91 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sched.h" 3 4 | |
804 | struct __sched_param | |
805 | { | |
806 | int __sched_priority; | |
807 | }; | |
808 | # 24 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/pthreadtypes.h" 2 3 4 | |
809 | ||
810 | ||
811 | struct _pthread_fastlock | |
812 | { | |
813 | long int __status; | |
814 | int __spinlock; | |
815 | ||
816 | }; | |
817 | ||
818 | ||
819 | ||
820 | typedef struct _pthread_descr_struct *_pthread_descr; | |
821 | ||
822 | ||
823 | ||
824 | ||
825 | ||
826 | typedef struct __pthread_attr_s | |
827 | { | |
828 | int __detachstate; | |
829 | int __schedpolicy; | |
830 | struct __sched_param __schedparam; | |
831 | int __inheritsched; | |
832 | int __scope; | |
833 | size_t __guardsize; | |
834 | int __stackaddr_set; | |
835 | void *__stackaddr; | |
836 | size_t __stacksize; | |
837 | } pthread_attr_t; | |
838 | ||
839 | ||
840 | ||
841 | typedef struct | |
842 | { | |
843 | struct _pthread_fastlock __c_lock; | |
844 | _pthread_descr __c_waiting; | |
845 | } pthread_cond_t; | |
846 | ||
847 | ||
848 | ||
849 | typedef struct | |
850 | { | |
851 | int __dummy; | |
852 | } pthread_condattr_t; | |
853 | ||
854 | ||
855 | typedef unsigned int pthread_key_t; | |
856 | ||
857 | ||
858 | ||
859 | ||
860 | ||
861 | typedef struct | |
862 | { | |
863 | int __m_reserved; | |
864 | int __m_count; | |
865 | _pthread_descr __m_owner; | |
866 | int __m_kind; | |
867 | struct _pthread_fastlock __m_lock; | |
868 | } pthread_mutex_t; | |
869 | ||
870 | ||
871 | ||
872 | typedef struct | |
873 | { | |
874 | int __mutexkind; | |
875 | } pthread_mutexattr_t; | |
876 | ||
877 | ||
878 | ||
879 | typedef int pthread_once_t; | |
880 | ||
881 | ||
882 | ||
883 | ||
884 | typedef struct _pthread_rwlock_t | |
885 | { | |
886 | struct _pthread_fastlock __rw_lock; | |
887 | int __rw_readers; | |
888 | _pthread_descr __rw_writer; | |
889 | _pthread_descr __rw_read_waiting; | |
890 | _pthread_descr __rw_write_waiting; | |
891 | int __rw_kind; | |
892 | int __rw_pshared; | |
893 | } pthread_rwlock_t; | |
894 | ||
895 | ||
896 | ||
897 | typedef struct | |
898 | { | |
899 | int __lockkind; | |
900 | int __pshared; | |
901 | } pthread_rwlockattr_t; | |
902 | ||
903 | ||
904 | ||
905 | ||
906 | typedef volatile int pthread_spinlock_t; | |
907 | ||
908 | ||
909 | typedef struct { | |
910 | struct _pthread_fastlock __ba_lock; | |
911 | int __ba_required; | |
912 | int __ba_present; | |
913 | _pthread_descr __ba_waiting; | |
914 | } pthread_barrier_t; | |
915 | ||
916 | ||
917 | typedef struct { | |
918 | int __pshared; | |
919 | } pthread_barrierattr_t; | |
920 | ||
921 | ||
922 | ||
923 | ||
924 | ||
925 | typedef unsigned long int pthread_t; | |
926 | # 207 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/types.h" 2 3 4 | |
927 | # 32 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 2 3 4 | |
928 | ||
929 | ||
930 | ||
931 | typedef __u_char u_char; | |
932 | typedef __u_short u_short; | |
933 | typedef __u_int u_int; | |
934 | typedef __u_long u_long; | |
935 | typedef __quad_t quad_t; | |
936 | typedef __u_quad_t u_quad_t; | |
937 | typedef __fsid_t fsid_t; | |
938 | ||
939 | ||
940 | ||
941 | ||
942 | typedef __loff_t loff_t; | |
943 | ||
944 | ||
945 | ||
946 | typedef __ino_t ino_t; | |
947 | ||
948 | ||
949 | ||
950 | ||
951 | ||
952 | ||
953 | typedef __ino64_t ino64_t; | |
954 | ||
955 | ||
956 | ||
957 | ||
958 | typedef __dev_t dev_t; | |
959 | ||
960 | ||
961 | ||
962 | ||
963 | typedef __gid_t gid_t; | |
964 | ||
965 | ||
966 | ||
967 | ||
968 | typedef __mode_t mode_t; | |
969 | ||
970 | ||
971 | ||
972 | ||
973 | typedef __nlink_t nlink_t; | |
974 | ||
975 | ||
976 | ||
977 | ||
978 | typedef __uid_t uid_t; | |
979 | ||
980 | ||
981 | ||
982 | ||
983 | ||
984 | typedef __off_t off_t; | |
985 | ||
986 | ||
987 | ||
988 | ||
989 | ||
990 | ||
991 | typedef __off64_t off64_t; | |
992 | ||
993 | ||
994 | ||
995 | ||
996 | typedef __pid_t pid_t; | |
997 | ||
998 | ||
999 | ||
1000 | ||
1001 | typedef __id_t id_t; | |
1002 | ||
1003 | ||
1004 | ||
1005 | ||
1006 | typedef __ssize_t ssize_t; | |
1007 | ||
1008 | ||
1009 | ||
1010 | ||
1011 | ||
1012 | typedef __daddr_t daddr_t; | |
1013 | typedef __caddr_t caddr_t; | |
1014 | ||
1015 | ||
1016 | ||
1017 | ||
1018 | ||
1019 | typedef __key_t key_t; | |
1020 | # 133 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 3 4 | |
1021 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 1 3 4 | |
1022 | # 59 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1023 | ||
1024 | ||
1025 | typedef __clock_t clock_t; | |
1026 | ||
1027 | ||
1028 | ||
1029 | # 75 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1030 | ||
1031 | ||
1032 | typedef __time_t time_t; | |
1033 | ||
1034 | ||
1035 | ||
1036 | # 93 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1037 | typedef __clockid_t clockid_t; | |
1038 | # 105 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1039 | typedef __timer_t timer_t; | |
1040 | # 134 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 2 3 4 | |
1041 | ||
1042 | ||
1043 | ||
1044 | typedef __useconds_t useconds_t; | |
1045 | ||
1046 | ||
1047 | ||
1048 | typedef __suseconds_t suseconds_t; | |
1049 | ||
1050 | ||
1051 | ||
1052 | ||
1053 | ||
1054 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
1055 | # 148 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 2 3 4 | |
1056 | ||
1057 | ||
1058 | ||
1059 | typedef unsigned long int ulong; | |
1060 | typedef unsigned short int ushort; | |
1061 | typedef unsigned int uint; | |
1062 | # 195 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 3 4 | |
1063 | typedef int int8_t __attribute__ ((__mode__ (__QI__))); | |
1064 | typedef int int16_t __attribute__ ((__mode__ (__HI__))); | |
1065 | typedef int int32_t __attribute__ ((__mode__ (__SI__))); | |
1066 | typedef int int64_t __attribute__ ((__mode__ (__DI__))); | |
1067 | ||
1068 | ||
1069 | typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); | |
1070 | typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); | |
1071 | typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); | |
1072 | typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); | |
1073 | ||
1074 | typedef int register_t __attribute__ ((__mode__ (__word__))); | |
1075 | # 220 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 3 4 | |
1076 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 1 3 4 | |
1077 | # 31 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 3 4 | |
1078 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/select.h" 1 3 4 | |
1079 | # 32 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 2 3 4 | |
1080 | ||
1081 | ||
1082 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sigset.h" 1 3 4 | |
1083 | # 23 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sigset.h" 3 4 | |
1084 | typedef int __sig_atomic_t; | |
1085 | ||
1086 | ||
1087 | ||
1088 | ||
1089 | typedef struct | |
1090 | { | |
1091 | unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; | |
1092 | } __sigset_t; | |
1093 | # 35 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 2 3 4 | |
1094 | ||
1095 | ||
1096 | ||
1097 | typedef __sigset_t sigset_t; | |
1098 | ||
1099 | ||
1100 | ||
1101 | ||
1102 | ||
1103 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 1 3 4 | |
1104 | # 121 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1105 | struct timespec | |
1106 | { | |
1107 | __time_t tv_sec; | |
1108 | long int tv_nsec; | |
1109 | }; | |
1110 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 2 3 4 | |
1111 | ||
1112 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/time.h" 1 3 4 | |
1113 | # 73 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/time.h" 3 4 | |
1114 | struct timeval | |
1115 | { | |
1116 | __time_t tv_sec; | |
1117 | __suseconds_t tv_usec; | |
1118 | }; | |
1119 | # 47 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 2 3 4 | |
1120 | # 55 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 3 4 | |
1121 | typedef long int __fd_mask; | |
1122 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 3 4 | |
1123 | typedef struct | |
1124 | { | |
1125 | ||
1126 | ||
1127 | ||
1128 | __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; | |
1129 | ||
1130 | ||
1131 | ||
1132 | ||
1133 | ||
1134 | } fd_set; | |
1135 | ||
1136 | ||
1137 | ||
1138 | ||
1139 | ||
1140 | ||
1141 | typedef __fd_mask fd_mask; | |
1142 | # 99 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 3 4 | |
1143 | extern "C" { | |
1144 | # 109 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 3 4 | |
1145 | extern int select (int __nfds, fd_set *__restrict __readfds, | |
1146 | fd_set *__restrict __writefds, | |
1147 | fd_set *__restrict __exceptfds, | |
1148 | struct timeval *__restrict __timeout); | |
1149 | # 121 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/select.h" 3 4 | |
1150 | extern int pselect (int __nfds, fd_set *__restrict __readfds, | |
1151 | fd_set *__restrict __writefds, | |
1152 | fd_set *__restrict __exceptfds, | |
1153 | const struct timespec *__restrict __timeout, | |
1154 | const __sigset_t *__restrict __sigmask); | |
1155 | ||
1156 | ||
1157 | } | |
1158 | # 221 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 2 3 4 | |
1159 | ||
1160 | ||
1161 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/sysmacros.h" 1 3 4 | |
1162 | # 29 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/sysmacros.h" 3 4 | |
1163 | __extension__ | |
1164 | static __inline unsigned int gnu_dev_major (unsigned long long int __dev) | |
1165 | throw (); | |
1166 | __extension__ | |
1167 | static __inline unsigned int gnu_dev_minor (unsigned long long int __dev) | |
1168 | throw (); | |
1169 | __extension__ | |
1170 | static __inline unsigned long long int gnu_dev_makedev (unsigned int __major, | |
1171 | unsigned int __minor) | |
1172 | throw (); | |
1173 | ||
1174 | ||
1175 | __extension__ static __inline unsigned int | |
1176 | gnu_dev_major (unsigned long long int __dev) throw () | |
1177 | { | |
1178 | return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); | |
1179 | } | |
1180 | ||
1181 | __extension__ static __inline unsigned int | |
1182 | gnu_dev_minor (unsigned long long int __dev) throw () | |
1183 | { | |
1184 | return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); | |
1185 | } | |
1186 | ||
1187 | __extension__ static __inline unsigned long long int | |
1188 | gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () | |
1189 | { | |
1190 | return ((__minor & 0xff) | ((__major & 0xfff) << 8) | |
1191 | | (((unsigned long long int) (__minor & ~0xff)) << 12) | |
1192 | | (((unsigned long long int) (__major & ~0xfff)) << 32)); | |
1193 | } | |
1194 | # 224 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 2 3 4 | |
1195 | ||
1196 | ||
1197 | ||
1198 | ||
1199 | typedef __blksize_t blksize_t; | |
1200 | ||
1201 | ||
1202 | ||
1203 | ||
1204 | ||
1205 | ||
1206 | typedef __blkcnt_t blkcnt_t; | |
1207 | ||
1208 | ||
1209 | ||
1210 | typedef __fsblkcnt_t fsblkcnt_t; | |
1211 | ||
1212 | ||
1213 | ||
1214 | typedef __fsfilcnt_t fsfilcnt_t; | |
1215 | # 262 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 3 4 | |
1216 | typedef __blkcnt64_t blkcnt64_t; | |
1217 | typedef __fsblkcnt64_t fsblkcnt64_t; | |
1218 | typedef __fsfilcnt64_t fsfilcnt64_t; | |
1219 | ||
1220 | ||
1221 | ||
1222 | ||
1223 | ||
1224 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/pthreadtypes.h" 1 3 4 | |
1225 | # 271 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sys/types.h" 2 3 4 | |
1226 | ||
1227 | ||
1228 | } | |
1229 | # 307 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 2 3 4 | |
1230 | ||
1231 | ||
1232 | ||
1233 | ||
1234 | ||
1235 | ||
1236 | extern long int random (void) throw (); | |
1237 | ||
1238 | ||
1239 | extern void srandom (unsigned int __seed) throw (); | |
1240 | ||
1241 | ||
1242 | ||
1243 | ||
1244 | ||
1245 | extern char *initstate (unsigned int __seed, char *__statebuf, | |
1246 | size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); | |
1247 | ||
1248 | ||
1249 | ||
1250 | extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); | |
1251 | ||
1252 | ||
1253 | ||
1254 | ||
1255 | ||
1256 | ||
1257 | ||
1258 | struct random_data | |
1259 | { | |
1260 | int32_t *fptr; | |
1261 | int32_t *rptr; | |
1262 | int32_t *state; | |
1263 | int rand_type; | |
1264 | int rand_deg; | |
1265 | int rand_sep; | |
1266 | int32_t *end_ptr; | |
1267 | }; | |
1268 | ||
1269 | extern int random_r (struct random_data *__restrict __buf, | |
1270 | int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
1271 | ||
1272 | extern int srandom_r (unsigned int __seed, struct random_data *__buf) | |
1273 | throw () __attribute__ ((__nonnull__ (2))); | |
1274 | ||
1275 | extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, | |
1276 | size_t __statelen, | |
1277 | struct random_data *__restrict __buf) | |
1278 | throw () __attribute__ ((__nonnull__ (2, 4))); | |
1279 | ||
1280 | extern int setstate_r (char *__restrict __statebuf, | |
1281 | struct random_data *__restrict __buf) | |
1282 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1283 | ||
1284 | ||
1285 | ||
1286 | ||
1287 | ||
1288 | ||
1289 | extern int rand (void) throw (); | |
1290 | ||
1291 | extern void srand (unsigned int __seed) throw (); | |
1292 | ||
1293 | ||
1294 | ||
1295 | ||
1296 | extern int rand_r (unsigned int *__seed) throw (); | |
1297 | # 382 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1298 | extern double drand48 (void) throw (); | |
1299 | extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); | |
1300 | ||
1301 | ||
1302 | ||
1303 | extern long int lrand48 (void) throw (); | |
1304 | extern long int nrand48 (unsigned short int __xsubi[3]) | |
1305 | throw () __attribute__ ((__nonnull__ (1))); | |
1306 | ||
1307 | ||
1308 | extern long int mrand48 (void) throw (); | |
1309 | extern long int jrand48 (unsigned short int __xsubi[3]) | |
1310 | throw () __attribute__ ((__nonnull__ (1))); | |
1311 | ||
1312 | ||
1313 | extern void srand48 (long int __seedval) throw (); | |
1314 | extern unsigned short int *seed48 (unsigned short int __seed16v[3]) | |
1315 | throw () __attribute__ ((__nonnull__ (1))); | |
1316 | extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); | |
1317 | ||
1318 | ||
1319 | ||
1320 | ||
1321 | ||
1322 | struct drand48_data | |
1323 | { | |
1324 | unsigned short int __x[3]; | |
1325 | unsigned short int __old_x[3]; | |
1326 | unsigned short int __c; | |
1327 | unsigned short int __init; | |
1328 | unsigned long long int __a; | |
1329 | }; | |
1330 | ||
1331 | ||
1332 | ||
1333 | extern int drand48_r (struct drand48_data *__restrict __buffer, | |
1334 | double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
1335 | extern int erand48_r (unsigned short int __xsubi[3], | |
1336 | struct drand48_data *__restrict __buffer, | |
1337 | double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
1338 | ||
1339 | ||
1340 | ||
1341 | extern int lrand48_r (struct drand48_data *__restrict __buffer, | |
1342 | long int *__restrict __result) | |
1343 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1344 | extern int nrand48_r (unsigned short int __xsubi[3], | |
1345 | struct drand48_data *__restrict __buffer, | |
1346 | long int *__restrict __result) | |
1347 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1348 | ||
1349 | ||
1350 | extern int mrand48_r (struct drand48_data *__restrict __buffer, | |
1351 | long int *__restrict __result) | |
1352 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1353 | extern int jrand48_r (unsigned short int __xsubi[3], | |
1354 | struct drand48_data *__restrict __buffer, | |
1355 | long int *__restrict __result) | |
1356 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1357 | ||
1358 | ||
1359 | extern int srand48_r (long int __seedval, struct drand48_data *__buffer) | |
1360 | throw () __attribute__ ((__nonnull__ (2))); | |
1361 | ||
1362 | extern int seed48_r (unsigned short int __seed16v[3], | |
1363 | struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); | |
1364 | ||
1365 | extern int lcong48_r (unsigned short int __param[7], | |
1366 | struct drand48_data *__buffer) | |
1367 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | ||
1377 | extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; | |
1378 | ||
1379 | extern void *calloc (size_t __nmemb, size_t __size) | |
1380 | throw () __attribute__ ((__malloc__)) ; | |
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | ||
1386 | ||
1387 | ||
1388 | extern void *realloc (void *__ptr, size_t __size) | |
1389 | throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
1390 | ||
1391 | extern void free (void *__ptr) throw (); | |
1392 | ||
1393 | ||
1394 | ||
1395 | ||
1396 | extern void cfree (void *__ptr) throw (); | |
1397 | ||
1398 | ||
1399 | ||
1400 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/alloca.h" 1 3 4 | |
1401 | # 25 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/alloca.h" 3 4 | |
1402 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
1403 | # 26 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/alloca.h" 2 3 4 | |
1404 | ||
1405 | extern "C" { | |
1406 | ||
1407 | ||
1408 | ||
1409 | ||
1410 | ||
1411 | extern void *alloca (size_t __size) throw (); | |
1412 | ||
1413 | ||
1414 | ||
1415 | ||
1416 | ||
1417 | ||
1418 | ||
1419 | } | |
1420 | # 485 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 2 3 4 | |
1421 | ||
1422 | ||
1423 | ||
1424 | ||
1425 | extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; | |
1426 | ||
1427 | ||
1428 | ||
1429 | ||
1430 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) | |
1431 | throw () __attribute__ ((__nonnull__ (1))) ; | |
1432 | ||
1433 | ||
1434 | ||
1435 | ||
1436 | extern void abort (void) throw () __attribute__ ((__noreturn__)); | |
1437 | ||
1438 | ||
1439 | ||
1440 | extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); | |
1441 | ||
1442 | ||
1443 | ||
1444 | ||
1445 | ||
1446 | extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) | |
1447 | throw () __attribute__ ((__nonnull__ (1))); | |
1448 | ||
1449 | ||
1450 | ||
1451 | ||
1452 | ||
1453 | ||
1454 | extern void exit (int __status) throw () __attribute__ ((__noreturn__)); | |
1455 | ||
1456 | ||
1457 | ||
1458 | ||
1459 | ||
1460 | ||
1461 | extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); | |
1462 | ||
1463 | ||
1464 | ||
1465 | ||
1466 | ||
1467 | ||
1468 | extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; | |
1469 | ||
1470 | ||
1471 | ||
1472 | ||
1473 | extern char *__secure_getenv (__const char *__name) | |
1474 | throw () __attribute__ ((__nonnull__ (1))) ; | |
1475 | ||
1476 | ||
1477 | ||
1478 | ||
1479 | ||
1480 | extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); | |
1481 | ||
1482 | ||
1483 | ||
1484 | ||
1485 | ||
1486 | extern int setenv (__const char *__name, __const char *__value, int __replace) | |
1487 | throw () __attribute__ ((__nonnull__ (2))); | |
1488 | ||
1489 | ||
1490 | extern int unsetenv (__const char *__name) throw (); | |
1491 | # 570 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1492 | extern int clearenv (void) throw (); | |
1493 | # 579 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1494 | extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; | |
1495 | # 590 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1496 | extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; | |
1497 | # 600 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1498 | extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; | |
1499 | # 610 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1500 | extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; | |
1501 | ||
1502 | ||
1503 | ||
1504 | ||
1505 | ||
1506 | ||
1507 | ||
1508 | ||
1509 | extern int system (__const char *__command) ; | |
1510 | ||
1511 | # 639 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1512 | extern char *realpath (__const char *__restrict __name, | |
1513 | char *__restrict __resolved) throw () __attribute__ ((__nonnull__ (2))); | |
1514 | ||
1515 | ||
1516 | ||
1517 | ||
1518 | ||
1519 | ||
1520 | typedef int (*__compar_fn_t) (__const void *, __const void *); | |
1521 | ||
1522 | ||
1523 | typedef __compar_fn_t comparison_fn_t; | |
1524 | ||
1525 | ||
1526 | ||
1527 | ||
1528 | ||
1529 | ||
1530 | extern void *bsearch (__const void *__key, __const void *__base, | |
1531 | size_t __nmemb, size_t __size, __compar_fn_t __compar) | |
1532 | __attribute__ ((__nonnull__ (1, 2, 5))) ; | |
1533 | ||
1534 | ||
1535 | ||
1536 | extern void qsort (void *__base, size_t __nmemb, size_t __size, | |
1537 | __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); | |
1538 | ||
1539 | ||
1540 | ||
1541 | extern int abs (int __x) throw () __attribute__ ((__const__)) ; | |
1542 | extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; | |
1543 | ||
1544 | ||
1545 | ||
1546 | __extension__ extern long long int llabs (long long int __x) | |
1547 | throw () __attribute__ ((__const__)) ; | |
1548 | ||
1549 | ||
1550 | ||
1551 | ||
1552 | ||
1553 | ||
1554 | ||
1555 | extern div_t div (int __numer, int __denom) | |
1556 | throw () __attribute__ ((__const__)) ; | |
1557 | extern ldiv_t ldiv (long int __numer, long int __denom) | |
1558 | throw () __attribute__ ((__const__)) ; | |
1559 | ||
1560 | ||
1561 | ||
1562 | ||
1563 | __extension__ extern lldiv_t lldiv (long long int __numer, | |
1564 | long long int __denom) | |
1565 | throw () __attribute__ ((__const__)) ; | |
1566 | ||
1567 | # 720 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1568 | extern char *gcvt (double __value, int __ndigit, char *__buf) | |
1569 | throw () __attribute__ ((__nonnull__ (3))) ; | |
1570 | # 786 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1571 | extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; | |
1572 | # 797 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1573 | extern int getsubopt (char **__restrict __optionp, | |
1574 | char *__const *__restrict __tokens, | |
1575 | char **__restrict __valuep) | |
1576 | throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; | |
1577 | ||
1578 | ||
1579 | ||
1580 | ||
1581 | ||
1582 | extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); | |
1583 | ||
1584 | ||
1585 | ||
1586 | ||
1587 | ||
1588 | ||
1589 | ||
1590 | extern int posix_openpt (int __oflag) ; | |
1591 | ||
1592 | ||
1593 | ||
1594 | ||
1595 | ||
1596 | ||
1597 | ||
1598 | extern int grantpt (int __fd) throw (); | |
1599 | ||
1600 | ||
1601 | ||
1602 | extern int unlockpt (int __fd) throw (); | |
1603 | ||
1604 | ||
1605 | ||
1606 | ||
1607 | extern char *ptsname (int __fd) throw () ; | |
1608 | ||
1609 | ||
1610 | ||
1611 | ||
1612 | ||
1613 | ||
1614 | extern int ptsname_r (int __fd, char *__buf, size_t __buflen) | |
1615 | throw () __attribute__ ((__nonnull__ (2))); | |
1616 | ||
1617 | ||
1618 | extern int getpt (void); | |
1619 | # 863 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdlib.h" 3 4 | |
1620 | } | |
1621 | # 72 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdlib" 2 3 | |
1622 | # 103 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdlib" 3 | |
1623 | namespace std | |
1624 | { | |
1625 | using ::div_t; | |
1626 | using ::ldiv_t; | |
1627 | ||
1628 | using ::abort; | |
1629 | using ::abs; | |
1630 | using ::atexit; | |
1631 | using ::atof; | |
1632 | using ::atoi; | |
1633 | using ::atol; | |
1634 | using ::bsearch; | |
1635 | using ::calloc; | |
1636 | using ::div; | |
1637 | using ::exit; | |
1638 | using ::free; | |
1639 | using ::getenv; | |
1640 | using ::labs; | |
1641 | using ::ldiv; | |
1642 | using ::malloc; | |
1643 | ||
1644 | ||
1645 | ||
1646 | ||
1647 | ||
1648 | using ::qsort; | |
1649 | using ::rand; | |
1650 | using ::realloc; | |
1651 | using ::srand; | |
1652 | using ::strtod; | |
1653 | using ::strtol; | |
1654 | using ::strtoul; | |
1655 | using ::system; | |
1656 | ||
1657 | ||
1658 | ||
1659 | ||
1660 | ||
1661 | inline long | |
1662 | abs(long __i) { return labs(__i); } | |
1663 | ||
1664 | inline ldiv_t | |
1665 | div(long __i, long __j) { return ldiv(__i, __j); } | |
1666 | } | |
1667 | # 68 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
1668 | ||
1669 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 1 3 | |
1670 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 3 | |
1671 | ||
1672 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 3 | |
1673 | ||
1674 | ||
1675 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++locale.h" 1 3 | |
1676 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++locale.h" 3 | |
1677 | ||
1678 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++locale.h" 3 | |
1679 | ||
1680 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/clocale" 1 3 | |
1681 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/clocale" 3 | |
1682 | ||
1683 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/clocale" 3 | |
1684 | ||
1685 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/locale.h" 1 3 4 | |
1686 | # 29 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/locale.h" 3 4 | |
1687 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
1688 | # 30 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/locale.h" 2 3 4 | |
1689 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_locale.h" 1 3 4 | |
1690 | # 31 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/locale.h" 2 3 4 | |
1691 | ||
1692 | extern "C" { | |
1693 | # 54 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/locale.h" 3 4 | |
1694 | struct lconv | |
1695 | { | |
1696 | ||
1697 | ||
1698 | char *decimal_point; | |
1699 | char *thousands_sep; | |
1700 | ||
1701 | ||
1702 | ||
1703 | ||
1704 | ||
1705 | char *grouping; | |
1706 | ||
1707 | ||
1708 | ||
1709 | ||
1710 | ||
1711 | char *int_curr_symbol; | |
1712 | char *currency_symbol; | |
1713 | char *mon_decimal_point; | |
1714 | char *mon_thousands_sep; | |
1715 | char *mon_grouping; | |
1716 | char *positive_sign; | |
1717 | char *negative_sign; | |
1718 | char int_frac_digits; | |
1719 | char frac_digits; | |
1720 | ||
1721 | char p_cs_precedes; | |
1722 | ||
1723 | char p_sep_by_space; | |
1724 | ||
1725 | char n_cs_precedes; | |
1726 | ||
1727 | char n_sep_by_space; | |
1728 | ||
1729 | ||
1730 | ||
1731 | ||
1732 | ||
1733 | ||
1734 | char p_sign_posn; | |
1735 | char n_sign_posn; | |
1736 | ||
1737 | ||
1738 | char int_p_cs_precedes; | |
1739 | ||
1740 | char int_p_sep_by_space; | |
1741 | ||
1742 | char int_n_cs_precedes; | |
1743 | ||
1744 | char int_n_sep_by_space; | |
1745 | ||
1746 | ||
1747 | ||
1748 | ||
1749 | ||
1750 | ||
1751 | char int_p_sign_posn; | |
1752 | char int_n_sign_posn; | |
1753 | # 121 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/locale.h" 3 4 | |
1754 | }; | |
1755 | ||
1756 | ||
1757 | ||
1758 | ||
1759 | ||
1760 | extern char *setlocale (int __category, __const char *__locale) throw (); | |
1761 | ||
1762 | ||
1763 | extern struct lconv *localeconv (void) throw (); | |
1764 | ||
1765 | ||
1766 | # 223 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/locale.h" 3 4 | |
1767 | } | |
1768 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/clocale" 2 3 | |
1769 | ||
1770 | ||
1771 | ||
1772 | ||
1773 | ||
1774 | namespace std | |
1775 | { | |
1776 | using ::lconv; | |
1777 | using ::setlocale; | |
1778 | using ::localeconv; | |
1779 | } | |
1780 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++locale.h" 2 3 | |
1781 | ||
1782 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdio" 1 3 | |
1783 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdio" 3 | |
1784 | ||
1785 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdio" 3 | |
1786 | ||
1787 | ||
1788 | ||
1789 | ||
1790 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 1 3 4 | |
1791 | # 30 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
1792 | extern "C" { | |
1793 | ||
1794 | ||
1795 | ||
1796 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
1797 | # 35 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 2 3 4 | |
1798 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
1799 | ||
1800 | ||
1801 | typedef struct __STDIO_FILE_STRUCT FILE; | |
1802 | ||
1803 | ||
1804 | ||
1805 | ||
1806 | ||
1807 | # 62 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
1808 | typedef struct __STDIO_FILE_STRUCT __FILE; | |
1809 | # 72 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
1810 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 1 3 4 | |
1811 | # 119 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 3 4 | |
1812 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_mutex.h" 1 3 4 | |
1813 | # 15 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_mutex.h" 3 4 | |
1814 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 1 3 4 | |
1815 | # 20 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
1816 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sched.h" 1 3 4 | |
1817 | # 29 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sched.h" 3 4 | |
1818 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 1 3 4 | |
1819 | # 30 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sched.h" 2 3 4 | |
1820 | ||
1821 | ||
1822 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sched.h" 1 3 4 | |
1823 | # 65 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sched.h" 3 4 | |
1824 | struct sched_param | |
1825 | { | |
1826 | int __sched_priority; | |
1827 | }; | |
1828 | ||
1829 | extern "C" { | |
1830 | ||
1831 | ||
1832 | ||
1833 | extern int clone (int (*__fn) (void *__arg), void *__child_stack, | |
1834 | int __flags, void *__arg, ...) throw (); | |
1835 | ||
1836 | ||
1837 | ||
1838 | ||
1839 | ||
1840 | ||
1841 | ||
1842 | } | |
1843 | # 106 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sched.h" 3 4 | |
1844 | typedef unsigned long int __cpu_mask; | |
1845 | ||
1846 | ||
1847 | ||
1848 | ||
1849 | ||
1850 | ||
1851 | typedef struct | |
1852 | { | |
1853 | __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; | |
1854 | } cpu_set_t; | |
1855 | # 33 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sched.h" 2 3 4 | |
1856 | ||
1857 | ||
1858 | ||
1859 | ||
1860 | extern "C" { | |
1861 | ||
1862 | ||
1863 | extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) | |
1864 | throw (); | |
1865 | ||
1866 | ||
1867 | extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); | |
1868 | ||
1869 | ||
1870 | extern int sched_setscheduler (__pid_t __pid, int __policy, | |
1871 | __const struct sched_param *__param) throw (); | |
1872 | ||
1873 | ||
1874 | extern int sched_getscheduler (__pid_t __pid) throw (); | |
1875 | ||
1876 | ||
1877 | extern int sched_yield (void) throw (); | |
1878 | ||
1879 | ||
1880 | extern int sched_get_priority_max (int __algorithm) throw (); | |
1881 | ||
1882 | ||
1883 | extern int sched_get_priority_min (int __algorithm) throw (); | |
1884 | ||
1885 | ||
1886 | extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); | |
1887 | # 76 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/sched.h" 3 4 | |
1888 | extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, | |
1889 | __const cpu_set_t *__cpuset) throw (); | |
1890 | ||
1891 | ||
1892 | extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, | |
1893 | cpu_set_t *__cpuset) throw (); | |
1894 | ||
1895 | ||
1896 | } | |
1897 | # 21 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 2 3 4 | |
1898 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 1 3 4 | |
1899 | # 31 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1900 | extern "C" { | |
1901 | ||
1902 | ||
1903 | ||
1904 | ||
1905 | ||
1906 | ||
1907 | ||
1908 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
1909 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 2 3 4 | |
1910 | ||
1911 | ||
1912 | ||
1913 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/time.h" 1 3 4 | |
1914 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/time.h" 3 4 | |
1915 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_clk_tck.h" 1 3 4 | |
1916 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/time.h" 2 3 4 | |
1917 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 2 3 4 | |
1918 | # 132 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1919 | ||
1920 | ||
1921 | struct tm | |
1922 | { | |
1923 | int tm_sec; | |
1924 | int tm_min; | |
1925 | int tm_hour; | |
1926 | int tm_mday; | |
1927 | int tm_mon; | |
1928 | int tm_year; | |
1929 | int tm_wday; | |
1930 | int tm_yday; | |
1931 | int tm_isdst; | |
1932 | ||
1933 | ||
1934 | ||
1935 | long int tm_gmtoff; | |
1936 | __const char *tm_zone; | |
1937 | ||
1938 | ||
1939 | ||
1940 | ||
1941 | ||
1942 | }; | |
1943 | ||
1944 | ||
1945 | ||
1946 | ||
1947 | ||
1948 | ||
1949 | ||
1950 | ||
1951 | struct itimerspec | |
1952 | { | |
1953 | struct timespec it_interval; | |
1954 | struct timespec it_value; | |
1955 | }; | |
1956 | ||
1957 | ||
1958 | struct sigevent; | |
1959 | # 183 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1960 | ||
1961 | ||
1962 | ||
1963 | extern clock_t clock (void) throw (); | |
1964 | ||
1965 | ||
1966 | extern time_t time (time_t *__timer) throw (); | |
1967 | ||
1968 | ||
1969 | ||
1970 | extern double difftime (time_t __time1, time_t __time0) | |
1971 | throw () __attribute__ ((__const__)); | |
1972 | ||
1973 | ||
1974 | ||
1975 | extern time_t mktime (struct tm *__tp) throw (); | |
1976 | ||
1977 | ||
1978 | ||
1979 | ||
1980 | ||
1981 | extern size_t strftime (char *__restrict __s, size_t __maxsize, | |
1982 | __const char *__restrict __format, | |
1983 | __const struct tm *__restrict __tp) throw (); | |
1984 | ||
1985 | ||
1986 | ||
1987 | ||
1988 | ||
1989 | extern char *strptime (__const char *__restrict __s, | |
1990 | __const char *__restrict __fmt, struct tm *__tp) | |
1991 | throw (); | |
1992 | # 235 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
1993 | ||
1994 | ||
1995 | ||
1996 | extern struct tm *gmtime (__const time_t *__timer) throw (); | |
1997 | ||
1998 | ||
1999 | ||
2000 | extern struct tm *localtime (__const time_t *__timer) throw (); | |
2001 | ||
2002 | ||
2003 | ||
2004 | ||
2005 | ||
2006 | extern struct tm *gmtime_r (__const time_t *__restrict __timer, | |
2007 | struct tm *__restrict __tp) throw (); | |
2008 | ||
2009 | ||
2010 | ||
2011 | extern struct tm *localtime_r (__const time_t *__restrict __timer, | |
2012 | struct tm *__restrict __tp) throw (); | |
2013 | ||
2014 | ||
2015 | ||
2016 | ||
2017 | ||
2018 | extern char *asctime (__const struct tm *__tp) throw (); | |
2019 | ||
2020 | ||
2021 | extern char *ctime (__const time_t *__timer) throw (); | |
2022 | ||
2023 | ||
2024 | ||
2025 | ||
2026 | ||
2027 | ||
2028 | ||
2029 | extern char *asctime_r (__const struct tm *__restrict __tp, | |
2030 | char *__restrict __buf) throw (); | |
2031 | ||
2032 | ||
2033 | extern char *ctime_r (__const time_t *__restrict __timer, | |
2034 | char *__restrict __buf) throw (); | |
2035 | # 291 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
2036 | extern char *tzname[2]; | |
2037 | ||
2038 | ||
2039 | ||
2040 | extern void tzset (void) throw (); | |
2041 | ||
2042 | ||
2043 | ||
2044 | extern int daylight; | |
2045 | extern long int timezone; | |
2046 | ||
2047 | ||
2048 | ||
2049 | ||
2050 | ||
2051 | extern int stime (__const time_t *__when) throw (); | |
2052 | # 321 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
2053 | extern time_t timegm (struct tm *__tp) throw (); | |
2054 | ||
2055 | ||
2056 | extern time_t timelocal (struct tm *__tp) throw (); | |
2057 | ||
2058 | ||
2059 | extern int dysize (int __year) throw () __attribute__ ((__const__)); | |
2060 | # 336 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
2061 | extern int nanosleep (__const struct timespec *__requested_time, | |
2062 | struct timespec *__remaining); | |
2063 | ||
2064 | ||
2065 | ||
2066 | extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); | |
2067 | ||
2068 | ||
2069 | extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); | |
2070 | ||
2071 | ||
2072 | extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) | |
2073 | throw (); | |
2074 | # 368 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
2075 | extern int timer_create (clockid_t __clock_id, | |
2076 | struct sigevent *__restrict __evp, | |
2077 | timer_t *__restrict __timerid) throw (); | |
2078 | ||
2079 | ||
2080 | extern int timer_delete (timer_t __timerid) throw (); | |
2081 | ||
2082 | ||
2083 | extern int timer_settime (timer_t __timerid, int __flags, | |
2084 | __const struct itimerspec *__restrict __value, | |
2085 | struct itimerspec *__restrict __ovalue) throw (); | |
2086 | ||
2087 | ||
2088 | extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) | |
2089 | throw (); | |
2090 | ||
2091 | ||
2092 | extern int timer_getoverrun (timer_t __timerid) throw (); | |
2093 | # 431 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/time.h" 3 4 | |
2094 | } | |
2095 | # 22 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 2 3 4 | |
2096 | ||
2097 | ||
2098 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/signal.h" 1 3 4 | |
2099 | # 31 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/signal.h" 3 4 | |
2100 | extern "C" { | |
2101 | ||
2102 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sigset.h" 1 3 4 | |
2103 | # 34 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/signal.h" 2 3 4 | |
2104 | # 399 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/signal.h" 3 4 | |
2105 | } | |
2106 | # 25 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 2 3 4 | |
2107 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/pthreadtypes.h" 1 3 4 | |
2108 | # 26 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 2 3 4 | |
2109 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/initspin.h" 1 3 4 | |
2110 | # 27 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 2 3 4 | |
2111 | ||
2112 | ||
2113 | extern "C" { | |
2114 | # 59 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2115 | enum | |
2116 | { | |
2117 | PTHREAD_CREATE_JOINABLE, | |
2118 | ||
2119 | PTHREAD_CREATE_DETACHED | |
2120 | ||
2121 | }; | |
2122 | ||
2123 | enum | |
2124 | { | |
2125 | PTHREAD_INHERIT_SCHED, | |
2126 | ||
2127 | PTHREAD_EXPLICIT_SCHED | |
2128 | ||
2129 | }; | |
2130 | ||
2131 | enum | |
2132 | { | |
2133 | PTHREAD_SCOPE_SYSTEM, | |
2134 | ||
2135 | PTHREAD_SCOPE_PROCESS | |
2136 | ||
2137 | }; | |
2138 | ||
2139 | enum | |
2140 | { | |
2141 | PTHREAD_MUTEX_ADAPTIVE_NP, | |
2142 | PTHREAD_MUTEX_RECURSIVE_NP, | |
2143 | PTHREAD_MUTEX_ERRORCHECK_NP, | |
2144 | PTHREAD_MUTEX_TIMED_NP | |
2145 | ||
2146 | , | |
2147 | PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_ADAPTIVE_NP, | |
2148 | PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, | |
2149 | PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, | |
2150 | PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL | |
2151 | ||
2152 | ||
2153 | ||
2154 | , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_ADAPTIVE_NP | |
2155 | ||
2156 | }; | |
2157 | ||
2158 | enum | |
2159 | { | |
2160 | PTHREAD_PROCESS_PRIVATE, | |
2161 | ||
2162 | PTHREAD_PROCESS_SHARED | |
2163 | ||
2164 | }; | |
2165 | ||
2166 | ||
2167 | enum | |
2168 | { | |
2169 | PTHREAD_RWLOCK_PREFER_READER_NP, | |
2170 | PTHREAD_RWLOCK_PREFER_WRITER_NP, | |
2171 | PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, | |
2172 | PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_WRITER_NP | |
2173 | }; | |
2174 | # 131 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2175 | struct _pthread_cleanup_buffer | |
2176 | { | |
2177 | void (*__routine) (void *); | |
2178 | void *__arg; | |
2179 | int __canceltype; | |
2180 | struct _pthread_cleanup_buffer *__prev; | |
2181 | }; | |
2182 | ||
2183 | ||
2184 | ||
2185 | enum | |
2186 | { | |
2187 | PTHREAD_CANCEL_ENABLE, | |
2188 | ||
2189 | PTHREAD_CANCEL_DISABLE | |
2190 | ||
2191 | }; | |
2192 | enum | |
2193 | { | |
2194 | PTHREAD_CANCEL_DEFERRED, | |
2195 | ||
2196 | PTHREAD_CANCEL_ASYNCHRONOUS | |
2197 | ||
2198 | }; | |
2199 | # 163 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2200 | extern int pthread_create (pthread_t *__restrict __threadp, | |
2201 | __const pthread_attr_t *__restrict __attr, | |
2202 | void *(*__start_routine) (void *), | |
2203 | void *__restrict __arg) throw (); | |
2204 | ||
2205 | ||
2206 | extern pthread_t pthread_self (void) throw (); | |
2207 | ||
2208 | ||
2209 | extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); | |
2210 | ||
2211 | ||
2212 | extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); | |
2213 | ||
2214 | ||
2215 | ||
2216 | ||
2217 | extern int pthread_join (pthread_t __th, void **__thread_return); | |
2218 | ||
2219 | ||
2220 | ||
2221 | ||
2222 | ||
2223 | extern int pthread_detach (pthread_t __th) throw (); | |
2224 | ||
2225 | ||
2226 | ||
2227 | ||
2228 | ||
2229 | ||
2230 | ||
2231 | extern int pthread_attr_init (pthread_attr_t *__attr) throw (); | |
2232 | ||
2233 | ||
2234 | extern int pthread_attr_destroy (pthread_attr_t *__attr) throw (); | |
2235 | ||
2236 | ||
2237 | extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, | |
2238 | int __detachstate) throw (); | |
2239 | ||
2240 | ||
2241 | extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, | |
2242 | int *__detachstate) throw (); | |
2243 | ||
2244 | ||
2245 | extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, | |
2246 | __const struct sched_param *__restrict | |
2247 | __param) throw (); | |
2248 | ||
2249 | ||
2250 | extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict | |
2251 | __attr, | |
2252 | struct sched_param *__restrict __param) | |
2253 | throw (); | |
2254 | ||
2255 | ||
2256 | extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) | |
2257 | throw (); | |
2258 | ||
2259 | ||
2260 | extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict | |
2261 | __attr, int *__restrict __policy) | |
2262 | throw (); | |
2263 | ||
2264 | ||
2265 | extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, | |
2266 | int __inherit) throw (); | |
2267 | ||
2268 | ||
2269 | extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict | |
2270 | __attr, int *__restrict __inherit) | |
2271 | throw (); | |
2272 | ||
2273 | ||
2274 | extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) | |
2275 | throw (); | |
2276 | ||
2277 | ||
2278 | extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, | |
2279 | int *__restrict __scope) throw (); | |
2280 | ||
2281 | ||
2282 | ||
2283 | extern int pthread_attr_setguardsize (pthread_attr_t *__attr, | |
2284 | size_t __guardsize) throw (); | |
2285 | ||
2286 | ||
2287 | extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict | |
2288 | __attr, size_t *__restrict __guardsize) | |
2289 | throw (); | |
2290 | ||
2291 | ||
2292 | ||
2293 | ||
2294 | ||
2295 | ||
2296 | extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, | |
2297 | void *__stackaddr) throw (); | |
2298 | ||
2299 | ||
2300 | extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict | |
2301 | __attr, void **__restrict __stackaddr) | |
2302 | throw (); | |
2303 | ||
2304 | ||
2305 | ||
2306 | ||
2307 | ||
2308 | extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, | |
2309 | size_t __stacksize) throw (); | |
2310 | ||
2311 | ||
2312 | extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, | |
2313 | void **__restrict __stackaddr, | |
2314 | size_t *__restrict __stacksize) throw (); | |
2315 | ||
2316 | ||
2317 | ||
2318 | ||
2319 | ||
2320 | extern int pthread_attr_setstacksize (pthread_attr_t *__attr, | |
2321 | size_t __stacksize) throw (); | |
2322 | ||
2323 | ||
2324 | extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict | |
2325 | __attr, size_t *__restrict __stacksize) | |
2326 | throw (); | |
2327 | # 306 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2328 | extern int pthread_setschedparam (pthread_t __target_thread, int __policy, | |
2329 | __const struct sched_param *__param) | |
2330 | throw (); | |
2331 | ||
2332 | ||
2333 | extern int pthread_getschedparam (pthread_t __target_thread, | |
2334 | int *__restrict __policy, | |
2335 | struct sched_param *__restrict __param) | |
2336 | throw (); | |
2337 | ||
2338 | ||
2339 | ||
2340 | extern int pthread_getconcurrency (void) throw (); | |
2341 | ||
2342 | ||
2343 | extern int pthread_setconcurrency (int __level) throw (); | |
2344 | ||
2345 | ||
2346 | ||
2347 | ||
2348 | ||
2349 | ||
2350 | extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex, | |
2351 | __const pthread_mutexattr_t *__restrict | |
2352 | __mutex_attr) throw (); | |
2353 | ||
2354 | ||
2355 | extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw (); | |
2356 | ||
2357 | ||
2358 | extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) throw (); | |
2359 | ||
2360 | ||
2361 | extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw (); | |
2362 | ||
2363 | ||
2364 | ||
2365 | extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, | |
2366 | __const struct timespec *__restrict | |
2367 | __abstime) throw (); | |
2368 | ||
2369 | ||
2370 | ||
2371 | extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw (); | |
2372 | ||
2373 | ||
2374 | ||
2375 | ||
2376 | ||
2377 | ||
2378 | extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw (); | |
2379 | ||
2380 | ||
2381 | extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw (); | |
2382 | ||
2383 | ||
2384 | extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * | |
2385 | __restrict __attr, | |
2386 | int *__restrict __pshared) throw (); | |
2387 | ||
2388 | ||
2389 | extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, | |
2390 | int __pshared) throw (); | |
2391 | ||
2392 | ||
2393 | ||
2394 | ||
2395 | ||
2396 | extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) | |
2397 | throw (); | |
2398 | ||
2399 | ||
2400 | extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict | |
2401 | __attr, int *__restrict __kind) throw (); | |
2402 | ||
2403 | ||
2404 | ||
2405 | ||
2406 | ||
2407 | ||
2408 | ||
2409 | extern int pthread_cond_init (pthread_cond_t *__restrict __cond, | |
2410 | __const pthread_condattr_t *__restrict | |
2411 | __cond_attr) throw (); | |
2412 | ||
2413 | ||
2414 | extern int pthread_cond_destroy (pthread_cond_t *__cond) throw (); | |
2415 | ||
2416 | ||
2417 | extern int pthread_cond_signal (pthread_cond_t *__cond) throw (); | |
2418 | ||
2419 | ||
2420 | extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw (); | |
2421 | ||
2422 | ||
2423 | ||
2424 | extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, | |
2425 | pthread_mutex_t *__restrict __mutex); | |
2426 | ||
2427 | ||
2428 | ||
2429 | ||
2430 | ||
2431 | extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, | |
2432 | pthread_mutex_t *__restrict __mutex, | |
2433 | __const struct timespec *__restrict | |
2434 | __abstime); | |
2435 | ||
2436 | ||
2437 | ||
2438 | ||
2439 | extern int pthread_condattr_init (pthread_condattr_t *__attr) throw (); | |
2440 | ||
2441 | ||
2442 | extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw (); | |
2443 | ||
2444 | ||
2445 | extern int pthread_condattr_getpshared (__const pthread_condattr_t * | |
2446 | __restrict __attr, | |
2447 | int *__restrict __pshared) throw (); | |
2448 | ||
2449 | ||
2450 | extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, | |
2451 | int __pshared) throw (); | |
2452 | ||
2453 | ||
2454 | ||
2455 | ||
2456 | ||
2457 | ||
2458 | ||
2459 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, | |
2460 | __const pthread_rwlockattr_t *__restrict | |
2461 | __attr) throw (); | |
2462 | ||
2463 | ||
2464 | extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw (); | |
2465 | ||
2466 | ||
2467 | extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw (); | |
2468 | ||
2469 | ||
2470 | extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw (); | |
2471 | ||
2472 | ||
2473 | ||
2474 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, | |
2475 | __const struct timespec *__restrict | |
2476 | __abstime) throw (); | |
2477 | ||
2478 | ||
2479 | ||
2480 | extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw (); | |
2481 | ||
2482 | ||
2483 | extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw (); | |
2484 | ||
2485 | ||
2486 | ||
2487 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, | |
2488 | __const struct timespec *__restrict | |
2489 | __abstime) throw (); | |
2490 | ||
2491 | ||
2492 | ||
2493 | extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw (); | |
2494 | ||
2495 | ||
2496 | ||
2497 | ||
2498 | ||
2499 | extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw (); | |
2500 | ||
2501 | ||
2502 | extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw (); | |
2503 | ||
2504 | ||
2505 | extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * | |
2506 | __restrict __attr, | |
2507 | int *__restrict __pshared) throw (); | |
2508 | ||
2509 | ||
2510 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, | |
2511 | int __pshared) throw (); | |
2512 | ||
2513 | ||
2514 | extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr, | |
2515 | int *__pref) throw (); | |
2516 | ||
2517 | ||
2518 | extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, | |
2519 | int __pref) throw (); | |
2520 | # 557 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2521 | extern int pthread_key_create (pthread_key_t *__key, | |
2522 | void (*__destr_function) (void *)) throw (); | |
2523 | ||
2524 | ||
2525 | extern int pthread_key_delete (pthread_key_t __key) throw (); | |
2526 | ||
2527 | ||
2528 | extern int pthread_setspecific (pthread_key_t __key, | |
2529 | __const void *__pointer) throw (); | |
2530 | ||
2531 | ||
2532 | extern void *pthread_getspecific (pthread_key_t __key) throw (); | |
2533 | # 580 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2534 | extern int pthread_once (pthread_once_t *__once_control, | |
2535 | void (*__init_routine) (void)); | |
2536 | ||
2537 | ||
2538 | ||
2539 | ||
2540 | ||
2541 | ||
2542 | extern int pthread_setcancelstate (int __state, int *__oldstate); | |
2543 | ||
2544 | ||
2545 | ||
2546 | extern int pthread_setcanceltype (int __type, int *__oldtype); | |
2547 | ||
2548 | ||
2549 | extern int pthread_cancel (pthread_t __cancelthread); | |
2550 | ||
2551 | ||
2552 | ||
2553 | ||
2554 | extern void pthread_testcancel (void); | |
2555 | # 614 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2556 | extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer, | |
2557 | void (*__routine) (void *), | |
2558 | void *__arg) throw (); | |
2559 | ||
2560 | ||
2561 | ||
2562 | ||
2563 | ||
2564 | ||
2565 | ||
2566 | extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, | |
2567 | int __execute) throw (); | |
2568 | # 635 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2569 | extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, | |
2570 | void (*__routine) (void *), | |
2571 | void *__arg) throw (); | |
2572 | extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, | |
2573 | void (*__routine) (void *), | |
2574 | void *__arg) throw (); | |
2575 | # 649 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2576 | extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, | |
2577 | int __execute) throw (); | |
2578 | extern void __pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, | |
2579 | int __execute) throw (); | |
2580 | # 668 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2581 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sigthread.h" 1 3 4 | |
2582 | # 31 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/sigthread.h" 3 4 | |
2583 | extern int pthread_sigmask (int __how, | |
2584 | __const __sigset_t *__restrict __newmask, | |
2585 | __sigset_t *__restrict __oldmask)throw (); | |
2586 | ||
2587 | ||
2588 | extern int pthread_kill (pthread_t __threadid, int __signo) throw (); | |
2589 | # 669 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 2 3 4 | |
2590 | # 684 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/pthread.h" 3 4 | |
2591 | extern int pthread_atfork (void (*__prepare) (void), | |
2592 | void (*__parent) (void), | |
2593 | void (*__child) (void)) throw (); | |
2594 | ||
2595 | ||
2596 | ||
2597 | ||
2598 | extern void pthread_kill_other_threads_np (void) throw (); | |
2599 | ||
2600 | } | |
2601 | # 16 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_mutex.h" 2 3 4 | |
2602 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_pthread.h" 1 3 4 | |
2603 | # 17 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_mutex.h" 2 3 4 | |
2604 | # 120 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 2 3 4 | |
2605 | # 170 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 3 4 | |
2606 | typedef struct { | |
2607 | __off_t __pos; | |
2608 | ||
2609 | ||
2610 | ||
2611 | ||
2612 | ||
2613 | ||
2614 | } __STDIO_fpos_t; | |
2615 | ||
2616 | ||
2617 | typedef struct { | |
2618 | __off64_t __pos; | |
2619 | ||
2620 | ||
2621 | ||
2622 | ||
2623 | ||
2624 | ||
2625 | } __STDIO_fpos64_t; | |
2626 | ||
2627 | ||
2628 | ||
2629 | ||
2630 | typedef __off64_t __offmax_t; | |
2631 | # 233 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 3 4 | |
2632 | struct __STDIO_FILE_STRUCT { | |
2633 | unsigned short __modeflags; | |
2634 | ||
2635 | ||
2636 | ||
2637 | ||
2638 | ||
2639 | ||
2640 | ||
2641 | unsigned char __ungot[2]; | |
2642 | ||
2643 | int __filedes; | |
2644 | ||
2645 | unsigned char *__bufstart; | |
2646 | unsigned char *__bufend; | |
2647 | unsigned char *__bufpos; | |
2648 | unsigned char *__bufread; | |
2649 | ||
2650 | ||
2651 | unsigned char *__bufgetc_u; | |
2652 | ||
2653 | ||
2654 | unsigned char *__bufputc_u; | |
2655 | ||
2656 | ||
2657 | ||
2658 | ||
2659 | ||
2660 | struct __STDIO_FILE_STRUCT *__nextopen; | |
2661 | # 277 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 3 4 | |
2662 | int __user_locking; | |
2663 | pthread_mutex_t __lock; | |
2664 | ||
2665 | ||
2666 | ||
2667 | ||
2668 | ||
2669 | }; | |
2670 | # 384 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 3 4 | |
2671 | extern int __fgetc_unlocked(FILE *__stream); | |
2672 | extern int __fputc_unlocked(int __c, FILE *__stream); | |
2673 | # 404 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 3 4 | |
2674 | extern FILE *__stdin; | |
2675 | # 463 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_stdio.h" 3 4 | |
2676 | extern FILE *__stdout; | |
2677 | # 73 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 2 3 4 | |
2678 | ||
2679 | ||
2680 | ||
2681 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stdarg.h" 1 3 4 | |
2682 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stdarg.h" 3 4 | |
2683 | typedef __builtin_va_list __gnuc_va_list; | |
2684 | # 77 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 2 3 4 | |
2685 | ||
2686 | ||
2687 | ||
2688 | ||
2689 | typedef __STDIO_fpos_t fpos_t; | |
2690 | ||
2691 | ||
2692 | ||
2693 | ||
2694 | ||
2695 | typedef __STDIO_fpos64_t fpos64_t; | |
2696 | # 131 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2697 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/stdio_lim.h" 1 3 4 | |
2698 | # 132 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 2 3 4 | |
2699 | ||
2700 | ||
2701 | ||
2702 | extern FILE *stdin; | |
2703 | extern FILE *stdout; | |
2704 | extern FILE *stderr; | |
2705 | ||
2706 | ||
2707 | ||
2708 | ||
2709 | ||
2710 | ||
2711 | ||
2712 | extern int remove (__const char *__filename) throw (); | |
2713 | ||
2714 | extern int rename (__const char *__old, __const char *__new) throw (); | |
2715 | ||
2716 | ||
2717 | ||
2718 | ||
2719 | ||
2720 | ||
2721 | ||
2722 | ||
2723 | ||
2724 | extern FILE *tmpfile (void); | |
2725 | # 167 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2726 | extern FILE *tmpfile64 (void); | |
2727 | ||
2728 | ||
2729 | ||
2730 | extern char *tmpnam (char *__s) throw (); | |
2731 | ||
2732 | ||
2733 | ||
2734 | ||
2735 | ||
2736 | extern char *tmpnam_r (char *__s) throw (); | |
2737 | # 189 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2738 | extern char *tempnam (__const char *__dir, __const char *__pfx) | |
2739 | throw () __attribute__ ((__malloc__)); | |
2740 | ||
2741 | ||
2742 | ||
2743 | ||
2744 | ||
2745 | ||
2746 | ||
2747 | ||
2748 | extern int fclose (FILE *__stream); | |
2749 | ||
2750 | ||
2751 | ||
2752 | ||
2753 | extern int fflush (FILE *__stream); | |
2754 | ||
2755 | # 214 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2756 | extern int fflush_unlocked (FILE *__stream); | |
2757 | # 224 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2758 | extern int fcloseall (void); | |
2759 | ||
2760 | ||
2761 | ||
2762 | ||
2763 | ||
2764 | ||
2765 | ||
2766 | ||
2767 | ||
2768 | extern FILE *fopen (__const char *__restrict __filename, | |
2769 | __const char *__restrict __modes); | |
2770 | ||
2771 | ||
2772 | ||
2773 | ||
2774 | extern FILE *freopen (__const char *__restrict __filename, | |
2775 | __const char *__restrict __modes, | |
2776 | FILE *__restrict __stream); | |
2777 | # 255 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2778 | ||
2779 | ||
2780 | extern FILE *fopen64 (__const char *__restrict __filename, | |
2781 | __const char *__restrict __modes); | |
2782 | extern FILE *freopen64 (__const char *__restrict __filename, | |
2783 | __const char *__restrict __modes, | |
2784 | FILE *__restrict __stream); | |
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | extern FILE *fdopen (int __fd, __const char *__modes) throw (); | |
2790 | # 289 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2791 | ||
2792 | ||
2793 | ||
2794 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); | |
2795 | ||
2796 | ||
2797 | ||
2798 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, | |
2799 | int __modes, size_t __n) throw (); | |
2800 | ||
2801 | ||
2802 | ||
2803 | ||
2804 | ||
2805 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, | |
2806 | size_t __size) throw (); | |
2807 | ||
2808 | ||
2809 | extern void setlinebuf (FILE *__stream) throw (); | |
2810 | ||
2811 | ||
2812 | ||
2813 | ||
2814 | ||
2815 | ||
2816 | ||
2817 | ||
2818 | extern int fprintf (FILE *__restrict __stream, | |
2819 | __const char *__restrict __format, ...); | |
2820 | ||
2821 | ||
2822 | ||
2823 | ||
2824 | extern int printf (__const char *__restrict __format, ...); | |
2825 | ||
2826 | extern int sprintf (char *__restrict __s, | |
2827 | __const char *__restrict __format, ...) throw (); | |
2828 | ||
2829 | ||
2830 | ||
2831 | ||
2832 | ||
2833 | extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, | |
2834 | __gnuc_va_list __arg); | |
2835 | ||
2836 | ||
2837 | ||
2838 | ||
2839 | extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); | |
2840 | ||
2841 | extern int vsprintf (char *__restrict __s, __const char *__restrict __format, | |
2842 | __gnuc_va_list __arg) throw (); | |
2843 | ||
2844 | ||
2845 | ||
2846 | ||
2847 | ||
2848 | extern int snprintf (char *__restrict __s, size_t __maxlen, | |
2849 | __const char *__restrict __format, ...) | |
2850 | throw () __attribute__ ((__format__ (__printf__, 3, 4))); | |
2851 | ||
2852 | extern int vsnprintf (char *__restrict __s, size_t __maxlen, | |
2853 | __const char *__restrict __format, __gnuc_va_list __arg) | |
2854 | throw () __attribute__ ((__format__ (__printf__, 3, 0))); | |
2855 | ||
2856 | ||
2857 | ||
2858 | ||
2859 | ||
2860 | ||
2861 | extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, | |
2862 | __gnuc_va_list __arg) | |
2863 | throw () __attribute__ ((__format__ (__printf__, 2, 0))); | |
2864 | ||
2865 | ||
2866 | ||
2867 | ||
2868 | ||
2869 | extern int asprintf (char **__restrict __ptr, | |
2870 | __const char *__restrict __fmt, ...) | |
2871 | throw () __attribute__ ((__format__ (__printf__, 2, 3))); | |
2872 | ||
2873 | ||
2874 | ||
2875 | ||
2876 | ||
2877 | ||
2878 | ||
2879 | extern int vdprintf (int __fd, __const char *__restrict __fmt, | |
2880 | __gnuc_va_list __arg) | |
2881 | __attribute__ ((__format__ (__printf__, 2, 0))); | |
2882 | extern int dprintf (int __fd, __const char *__restrict __fmt, ...) | |
2883 | __attribute__ ((__format__ (__printf__, 2, 3))); | |
2884 | ||
2885 | ||
2886 | ||
2887 | ||
2888 | ||
2889 | ||
2890 | ||
2891 | ||
2892 | extern int fscanf (FILE *__restrict __stream, | |
2893 | __const char *__restrict __format, ...); | |
2894 | ||
2895 | ||
2896 | ||
2897 | ||
2898 | extern int scanf (__const char *__restrict __format, ...); | |
2899 | ||
2900 | extern int sscanf (__const char *__restrict __s, | |
2901 | __const char *__restrict __format, ...) throw (); | |
2902 | ||
2903 | ||
2904 | ||
2905 | ||
2906 | ||
2907 | ||
2908 | ||
2909 | ||
2910 | extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, | |
2911 | __gnuc_va_list __arg) | |
2912 | __attribute__ ((__format__ (__scanf__, 2, 0))); | |
2913 | ||
2914 | ||
2915 | ||
2916 | ||
2917 | ||
2918 | extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) | |
2919 | __attribute__ ((__format__ (__scanf__, 1, 0))); | |
2920 | ||
2921 | ||
2922 | extern int vsscanf (__const char *__restrict __s, | |
2923 | __const char *__restrict __format, __gnuc_va_list __arg) | |
2924 | throw () __attribute__ ((__format__ (__scanf__, 2, 0))); | |
2925 | ||
2926 | ||
2927 | ||
2928 | ||
2929 | ||
2930 | ||
2931 | ||
2932 | ||
2933 | ||
2934 | extern int fgetc (FILE *__stream); | |
2935 | extern int getc (FILE *__stream); | |
2936 | ||
2937 | ||
2938 | ||
2939 | ||
2940 | ||
2941 | extern int getchar (void); | |
2942 | ||
2943 | # 451 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2944 | extern int getc_unlocked (FILE *__stream); | |
2945 | extern int getchar_unlocked (void); | |
2946 | # 465 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2947 | extern int fgetc_unlocked (FILE *__stream); | |
2948 | ||
2949 | ||
2950 | ||
2951 | ||
2952 | ||
2953 | ||
2954 | ||
2955 | ||
2956 | ||
2957 | ||
2958 | ||
2959 | extern int fputc (int __c, FILE *__stream); | |
2960 | extern int putc (int __c, FILE *__stream); | |
2961 | ||
2962 | ||
2963 | ||
2964 | ||
2965 | ||
2966 | extern int putchar (int __c); | |
2967 | ||
2968 | # 498 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2969 | extern int fputc_unlocked (int __c, FILE *__stream); | |
2970 | ||
2971 | ||
2972 | ||
2973 | ||
2974 | ||
2975 | ||
2976 | ||
2977 | extern int putc_unlocked (int __c, FILE *__stream); | |
2978 | extern int putchar_unlocked (int __c); | |
2979 | # 517 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
2980 | extern int getw (FILE *__stream); | |
2981 | ||
2982 | ||
2983 | extern int putw (int __w, FILE *__stream); | |
2984 | ||
2985 | ||
2986 | ||
2987 | ||
2988 | ||
2989 | ||
2990 | ||
2991 | ||
2992 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream); | |
2993 | ||
2994 | ||
2995 | ||
2996 | ||
2997 | ||
2998 | ||
2999 | extern char *gets (char *__s); | |
3000 | ||
3001 | # 546 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3002 | extern char *fgets_unlocked (char *__restrict __s, int __n, | |
3003 | FILE *__restrict __stream); | |
3004 | # 567 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3005 | extern __ssize_t getdelim (char **__restrict __lineptr, | |
3006 | size_t *__restrict __n, int __delimiter, | |
3007 | FILE *__restrict __stream); | |
3008 | ||
3009 | ||
3010 | ||
3011 | ||
3012 | ||
3013 | ||
3014 | ||
3015 | extern __ssize_t getline (char **__restrict __lineptr, | |
3016 | size_t *__restrict __n, | |
3017 | FILE *__restrict __stream); | |
3018 | ||
3019 | ||
3020 | ||
3021 | ||
3022 | ||
3023 | ||
3024 | ||
3025 | ||
3026 | extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); | |
3027 | ||
3028 | ||
3029 | ||
3030 | ||
3031 | ||
3032 | extern int puts (__const char *__s); | |
3033 | ||
3034 | ||
3035 | ||
3036 | ||
3037 | ||
3038 | ||
3039 | extern int ungetc (int __c, FILE *__stream); | |
3040 | ||
3041 | ||
3042 | ||
3043 | ||
3044 | ||
3045 | ||
3046 | extern size_t fread (void *__restrict __ptr, size_t __size, | |
3047 | size_t __n, FILE *__restrict __stream); | |
3048 | ||
3049 | ||
3050 | ||
3051 | ||
3052 | extern size_t fwrite (__const void *__restrict __ptr, size_t __size, | |
3053 | size_t __n, FILE *__restrict __s); | |
3054 | ||
3055 | # 625 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3056 | extern int fputs_unlocked (__const char *__restrict __s, | |
3057 | FILE *__restrict __stream); | |
3058 | # 636 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3059 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, | |
3060 | size_t __n, FILE *__restrict __stream); | |
3061 | extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, | |
3062 | size_t __n, FILE *__restrict __stream); | |
3063 | ||
3064 | ||
3065 | ||
3066 | ||
3067 | ||
3068 | ||
3069 | ||
3070 | ||
3071 | extern int fseek (FILE *__stream, long int __off, int __whence); | |
3072 | ||
3073 | ||
3074 | ||
3075 | ||
3076 | extern long int ftell (FILE *__stream); | |
3077 | ||
3078 | ||
3079 | ||
3080 | ||
3081 | extern void rewind (FILE *__stream); | |
3082 | ||
3083 | # 672 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3084 | extern int fseeko (FILE *__stream, __off_t __off, int __whence); | |
3085 | ||
3086 | ||
3087 | ||
3088 | ||
3089 | extern __off_t ftello (FILE *__stream); | |
3090 | # 691 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3091 | ||
3092 | ||
3093 | ||
3094 | ||
3095 | ||
3096 | ||
3097 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); | |
3098 | ||
3099 | ||
3100 | ||
3101 | ||
3102 | extern int fsetpos (FILE *__stream, __const fpos_t *__pos); | |
3103 | # 714 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3104 | ||
3105 | ||
3106 | ||
3107 | extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); | |
3108 | extern __off64_t ftello64 (FILE *__stream); | |
3109 | extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); | |
3110 | extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); | |
3111 | ||
3112 | ||
3113 | ||
3114 | ||
3115 | extern void clearerr (FILE *__stream) throw (); | |
3116 | ||
3117 | extern int feof (FILE *__stream) throw (); | |
3118 | ||
3119 | extern int ferror (FILE *__stream) throw (); | |
3120 | ||
3121 | ||
3122 | ||
3123 | ||
3124 | extern void clearerr_unlocked (FILE *__stream) throw (); | |
3125 | extern int feof_unlocked (FILE *__stream) throw (); | |
3126 | extern int ferror_unlocked (FILE *__stream) throw (); | |
3127 | ||
3128 | ||
3129 | ||
3130 | ||
3131 | ||
3132 | ||
3133 | ||
3134 | ||
3135 | extern void perror (__const char *__s); | |
3136 | ||
3137 | # 760 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3138 | extern int fileno (FILE *__stream) throw (); | |
3139 | ||
3140 | ||
3141 | ||
3142 | ||
3143 | extern int fileno_unlocked (FILE *__stream) throw (); | |
3144 | # 775 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3145 | extern FILE *popen (__const char *__command, __const char *__modes); | |
3146 | ||
3147 | ||
3148 | ||
3149 | ||
3150 | ||
3151 | extern int pclose (FILE *__stream); | |
3152 | ||
3153 | ||
3154 | ||
3155 | ||
3156 | ||
3157 | extern char *ctermid (char *__s) throw (); | |
3158 | ||
3159 | ||
3160 | ||
3161 | ||
3162 | ||
3163 | extern char *cuserid (char *__s); | |
3164 | # 815 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3165 | extern void flockfile (FILE *__stream) throw (); | |
3166 | ||
3167 | ||
3168 | ||
3169 | extern int ftrylockfile (FILE *__stream) throw (); | |
3170 | ||
3171 | ||
3172 | extern void funlockfile (FILE *__stream) throw (); | |
3173 | # 869 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdio.h" 3 4 | |
3174 | } | |
3175 | # 54 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdio" 2 3 | |
3176 | # 98 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdio" 3 | |
3177 | namespace std | |
3178 | { | |
3179 | using ::FILE; | |
3180 | using ::fpos_t; | |
3181 | ||
3182 | using ::clearerr; | |
3183 | using ::fclose; | |
3184 | using ::feof; | |
3185 | using ::ferror; | |
3186 | using ::fflush; | |
3187 | using ::fgetc; | |
3188 | using ::fgetpos; | |
3189 | using ::fgets; | |
3190 | using ::fopen; | |
3191 | using ::fprintf; | |
3192 | using ::fputc; | |
3193 | using ::fputs; | |
3194 | using ::fread; | |
3195 | using ::freopen; | |
3196 | using ::fscanf; | |
3197 | using ::fseek; | |
3198 | using ::fsetpos; | |
3199 | using ::ftell; | |
3200 | using ::fwrite; | |
3201 | using ::getc; | |
3202 | using ::getchar; | |
3203 | using ::gets; | |
3204 | using ::perror; | |
3205 | using ::printf; | |
3206 | using ::putc; | |
3207 | using ::putchar; | |
3208 | using ::puts; | |
3209 | using ::remove; | |
3210 | using ::rename; | |
3211 | using ::rewind; | |
3212 | using ::scanf; | |
3213 | using ::setbuf; | |
3214 | using ::setvbuf; | |
3215 | using ::sprintf; | |
3216 | using ::sscanf; | |
3217 | using ::tmpfile; | |
3218 | using ::tmpnam; | |
3219 | using ::ungetc; | |
3220 | using ::vfprintf; | |
3221 | using ::vprintf; | |
3222 | using ::vsprintf; | |
3223 | } | |
3224 | # 154 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdio" 3 | |
3225 | namespace __gnu_cxx | |
3226 | { | |
3227 | # 169 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cstdio" 3 | |
3228 | using ::snprintf; | |
3229 | using ::vfscanf; | |
3230 | using ::vscanf; | |
3231 | using ::vsnprintf; | |
3232 | using ::vsscanf; | |
3233 | ||
3234 | } | |
3235 | ||
3236 | namespace std | |
3237 | { | |
3238 | using __gnu_cxx::snprintf; | |
3239 | using __gnu_cxx::vfscanf; | |
3240 | using __gnu_cxx::vscanf; | |
3241 | using __gnu_cxx::vsnprintf; | |
3242 | using __gnu_cxx::vsscanf; | |
3243 | } | |
3244 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++locale.h" 2 3 | |
3245 | ||
3246 | ||
3247 | ||
3248 | namespace std | |
3249 | { | |
3250 | typedef int* __c_locale; | |
3251 | ||
3252 | ||
3253 | ||
3254 | ||
3255 | ||
3256 | template<typename _Tv> | |
3257 | int | |
3258 | __convert_from_v(char* __out, | |
3259 | const int __size __attribute__((__unused__)), | |
3260 | const char* __fmt, | |
3261 | _Tv __v, const __c_locale&, int __prec) | |
3262 | { | |
3263 | char* __old = std::setlocale(1, __null); | |
3264 | char* __sav = __null; | |
3265 | if (std::strcmp(__old, "C")) | |
3266 | { | |
3267 | __sav = new char[std::strlen(__old) + 1]; | |
3268 | std::strcpy(__sav, __old); | |
3269 | std::setlocale(1, "C"); | |
3270 | } | |
3271 | ||
3272 | ||
3273 | ||
3274 | ||
3275 | const int __ret = std::sprintf(__out, __fmt, __prec, __v); | |
3276 | ||
3277 | ||
3278 | if (__sav) | |
3279 | { | |
3280 | std::setlocale(1, __sav); | |
3281 | delete [] __sav; | |
3282 | } | |
3283 | return __ret; | |
3284 | } | |
3285 | } | |
3286 | # 46 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 2 3 | |
3287 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++io.h" 1 3 | |
3288 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++io.h" 3 | |
3289 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr.h" 1 3 | |
3290 | # 33 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr.h" 3 | |
3291 | #pragma GCC visibility push(default) | |
3292 | # 114 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr.h" 3 | |
3293 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr-default.h" 1 3 | |
3294 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr-default.h" 3 | |
3295 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 1 3 4 | |
3296 | # 28 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3297 | extern "C" { | |
3298 | # 171 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3299 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/posix_opt.h" 1 3 4 | |
3300 | # 172 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 2 3 4 | |
3301 | ||
3302 | ||
3303 | ||
3304 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/environments.h" 1 3 4 | |
3305 | # 23 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/environments.h" 3 4 | |
3306 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/wordsize.h" 1 3 4 | |
3307 | # 24 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/environments.h" 2 3 4 | |
3308 | # 176 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 2 3 4 | |
3309 | # 195 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3310 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/stddef.h" 1 3 4 | |
3311 | # 196 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 2 3 4 | |
3312 | # 236 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3313 | typedef __intptr_t intptr_t; | |
3314 | ||
3315 | ||
3316 | ||
3317 | ||
3318 | ||
3319 | ||
3320 | typedef __socklen_t socklen_t; | |
3321 | # 256 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3322 | extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); | |
3323 | # 299 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3324 | extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); | |
3325 | # 310 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3326 | extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) | |
3327 | throw (); | |
3328 | ||
3329 | ||
3330 | ||
3331 | ||
3332 | ||
3333 | ||
3334 | extern int close (int __fd); | |
3335 | ||
3336 | ||
3337 | ||
3338 | ||
3339 | ||
3340 | ||
3341 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; | |
3342 | ||
3343 | ||
3344 | ||
3345 | ||
3346 | ||
3347 | extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; | |
3348 | # 341 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3349 | extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, | |
3350 | __off_t __offset) ; | |
3351 | ||
3352 | ||
3353 | ||
3354 | ||
3355 | ||
3356 | ||
3357 | extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, | |
3358 | __off_t __offset) ; | |
3359 | # 369 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3360 | extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, | |
3361 | __off64_t __offset) ; | |
3362 | ||
3363 | ||
3364 | extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, | |
3365 | __off64_t __offset) ; | |
3366 | ||
3367 | ||
3368 | ||
3369 | ||
3370 | ||
3371 | ||
3372 | ||
3373 | extern int pipe (int __pipedes[2]) throw () ; | |
3374 | # 391 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3375 | extern unsigned int alarm (unsigned int __seconds) throw (); | |
3376 | # 403 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3377 | extern unsigned int sleep (unsigned int __seconds); | |
3378 | ||
3379 | ||
3380 | ||
3381 | ||
3382 | ||
3383 | ||
3384 | extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) | |
3385 | throw (); | |
3386 | ||
3387 | ||
3388 | ||
3389 | ||
3390 | ||
3391 | ||
3392 | extern int usleep (__useconds_t __useconds); | |
3393 | # 427 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3394 | extern int pause (void); | |
3395 | ||
3396 | ||
3397 | ||
3398 | extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) | |
3399 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3400 | ||
3401 | ||
3402 | ||
3403 | extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; | |
3404 | ||
3405 | ||
3406 | ||
3407 | ||
3408 | extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) | |
3409 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3410 | # 455 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3411 | extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; | |
3412 | ||
3413 | ||
3414 | ||
3415 | extern int fchdir (int __fd) throw () ; | |
3416 | # 469 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3417 | extern char *getcwd (char *__buf, size_t __size) throw () ; | |
3418 | ||
3419 | ||
3420 | ||
3421 | ||
3422 | ||
3423 | extern char *get_current_dir_name (void) throw (); | |
3424 | # 488 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3425 | extern int dup (int __fd) throw () ; | |
3426 | ||
3427 | ||
3428 | extern int dup2 (int __fd, int __fd2) throw (); | |
3429 | ||
3430 | ||
3431 | extern char **__environ; | |
3432 | ||
3433 | extern char **environ; | |
3434 | ||
3435 | ||
3436 | ||
3437 | ||
3438 | ||
3439 | extern int execve (__const char *__path, char *__const __argv[], | |
3440 | char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1))); | |
3441 | # 514 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
3442 | extern int execv (__const char *__path, char *__const __argv[]) | |
3443 | throw () __attribute__ ((__nonnull__ (1))); | |
3444 | ||
3445 | ||
3446 | ||
3447 | extern int execle (__const char *__path, __const char *__arg, ...) | |
3448 | throw () __attribute__ ((__nonnull__ (1))); | |
3449 | ||
3450 | ||
3451 | ||
3452 | extern int execl (__const char *__path, __const char *__arg, ...) | |
3453 | throw () __attribute__ ((__nonnull__ (1))); | |
3454 | ||
3455 | ||
3456 | ||
3457 | extern int execvp (__const char *__file, char *__const __argv[]) | |
3458 | throw () __attribute__ ((__nonnull__ (1))); | |
3459 | ||
3460 | ||
3461 | ||
3462 | ||
3463 | extern int execlp (__const char *__file, __const char *__arg, ...) | |
3464 | throw () __attribute__ ((__nonnull__ (1))); | |
3465 | ||
3466 | ||
3467 | ||
3468 | ||
3469 | extern int nice (int __inc) throw () ; | |
3470 | ||
3471 | ||
3472 | ||
3473 | ||
3474 | extern void _exit (int __status) __attribute__ ((__noreturn__)); | |
3475 | ||
3476 | ||
3477 | ||
3478 | ||
3479 | ||
3480 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/confname.h" 1 3 4 | |
3481 | # 26 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/confname.h" 3 4 | |
3482 | enum | |
3483 | { | |
3484 | _PC_LINK_MAX, | |
3485 | ||
3486 | _PC_MAX_CANON, | |
3487 | ||
3488 | _PC_MAX_INPUT, | |
3489 | ||
3490 | _PC_NAME_MAX, | |
3491 | ||
3492 | _PC_PATH_MAX, | |
3493 | ||
3494 | _PC_PIPE_BUF, | |
3495 | ||
3496 | _PC_CHOWN_RESTRICTED, | |
3497 | ||
3498 | _PC_NO_TRUNC, | |
3499 | ||
3500 | _PC_VDISABLE, | |
3501 | ||
3502 | _PC_SYNC_IO, | |
3503 | ||
3504 | _PC_ASYNC_IO, | |
3505 | ||
3506 | _PC_PRIO_IO, | |
3507 | ||
3508 | _PC_SOCK_MAXBUF, | |
3509 | ||
3510 | _PC_FILESIZEBITS, | |
3511 | ||
3512 | _PC_REC_INCR_XFER_SIZE, | |
3513 | ||
3514 | _PC_REC_MAX_XFER_SIZE, | |
3515 | ||
3516 | _PC_REC_MIN_XFER_SIZE, | |
3517 | ||
3518 | _PC_REC_XFER_ALIGN, | |
3519 | ||
3520 | _PC_ALLOC_SIZE_MIN, | |
3521 | ||
3522 | _PC_SYMLINK_MAX, | |
3523 | ||
3524 | _PC_2_SYMLINKS | |
3525 | ||
3526 | }; | |
3527 | ||
3528 | ||
3529 | enum | |
3530 | { | |
3531 | _SC_ARG_MAX, | |
3532 | ||
3533 | _SC_CHILD_MAX, | |
3534 | ||
3535 | _SC_CLK_TCK, | |
3536 | ||
3537 | _SC_NGROUPS_MAX, | |
3538 | ||
3539 | _SC_OPEN_MAX, | |
3540 | ||
3541 | _SC_STREAM_MAX, | |
3542 | ||
3543 | _SC_TZNAME_MAX, | |
3544 | ||
3545 | _SC_JOB_CONTROL, | |
3546 | ||
3547 | _SC_SAVED_IDS, | |
3548 | ||
3549 | _SC_REALTIME_SIGNALS, | |
3550 | ||
3551 | _SC_PRIORITY_SCHEDULING, | |
3552 | ||
3553 | _SC_TIMERS, | |
3554 | ||
3555 | _SC_ASYNCHRONOUS_IO, | |
3556 | ||
3557 | _SC_PRIORITIZED_IO, | |
3558 | ||
3559 | _SC_SYNCHRONIZED_IO, | |
3560 | ||
3561 | _SC_FSYNC, | |
3562 | ||
3563 | _SC_MAPPED_FILES, | |
3564 | ||
3565 | _SC_MEMLOCK, | |
3566 | ||
3567 | _SC_MEMLOCK_RANGE, | |
3568 | ||
3569 | _SC_MEMORY_PROTECTION, | |
3570 | ||
3571 | _SC_MESSAGE_PASSING, | |
3572 | ||
3573 | _SC_SEMAPHORES, | |
3574 | ||
3575 | _SC_SHARED_MEMORY_OBJECTS, | |
3576 | ||
3577 | _SC_AIO_LISTIO_MAX, | |
3578 | ||
3579 | _SC_AIO_MAX, | |
3580 | ||
3581 | _SC_AIO_PRIO_DELTA_MAX, | |
3582 | ||
3583 | _SC_DELAYTIMER_MAX, | |
3584 | ||
3585 | _SC_MQ_OPEN_MAX, | |
3586 | ||
3587 | _SC_MQ_PRIO_MAX, | |
3588 | ||
3589 | _SC_VERSION, | |
3590 | ||
3591 | _SC_PAGESIZE, | |
3592 | ||
3593 | ||
3594 | _SC_RTSIG_MAX, | |
3595 | ||
3596 | _SC_SEM_NSEMS_MAX, | |
3597 | ||
3598 | _SC_SEM_VALUE_MAX, | |
3599 | ||
3600 | _SC_SIGQUEUE_MAX, | |
3601 | ||
3602 | _SC_TIMER_MAX, | |
3603 | ||
3604 | ||
3605 | ||
3606 | ||
3607 | _SC_BC_BASE_MAX, | |
3608 | ||
3609 | _SC_BC_DIM_MAX, | |
3610 | ||
3611 | _SC_BC_SCALE_MAX, | |
3612 | ||
3613 | _SC_BC_STRING_MAX, | |
3614 | ||
3615 | _SC_COLL_WEIGHTS_MAX, | |
3616 | ||
3617 | _SC_EQUIV_CLASS_MAX, | |
3618 | ||
3619 | _SC_EXPR_NEST_MAX, | |
3620 | ||
3621 | _SC_LINE_MAX, | |
3622 | ||
3623 | _SC_RE_DUP_MAX, | |
3624 | ||
3625 | _SC_CHARCLASS_NAME_MAX, | |
3626 | ||
3627 | ||
3628 | _SC_2_VERSION, | |
3629 | ||
3630 | _SC_2_C_BIND, | |
3631 | ||
3632 | _SC_2_C_DEV, | |
3633 | ||
3634 | _SC_2_FORT_DEV, | |
3635 | ||
3636 | _SC_2_FORT_RUN, | |
3637 | ||
3638 | _SC_2_SW_DEV, | |
3639 | ||
3640 | _SC_2_LOCALEDEF, | |
3641 | ||
3642 | ||
3643 | _SC_PII, | |
3644 | ||
3645 | _SC_PII_XTI, | |
3646 | ||
3647 | _SC_PII_SOCKET, | |
3648 | ||
3649 | _SC_PII_INTERNET, | |
3650 | ||
3651 | _SC_PII_OSI, | |
3652 | ||
3653 | _SC_POLL, | |
3654 | ||
3655 | _SC_SELECT, | |
3656 | ||
3657 | _SC_UIO_MAXIOV, | |
3658 | ||
3659 | _SC_IOV_MAX = _SC_UIO_MAXIOV, | |
3660 | ||
3661 | _SC_PII_INTERNET_STREAM, | |
3662 | ||
3663 | _SC_PII_INTERNET_DGRAM, | |
3664 | ||
3665 | _SC_PII_OSI_COTS, | |
3666 | ||
3667 | _SC_PII_OSI_CLTS, | |
3668 | ||
3669 | _SC_PII_OSI_M, | |
3670 | ||
3671 | _SC_T_IOV_MAX, | |
3672 | ||
3673 | ||
3674 | ||
3675 | _SC_THREADS, | |
3676 | ||
3677 | _SC_THREAD_SAFE_FUNCTIONS, | |
3678 | ||
3679 | _SC_GETGR_R_SIZE_MAX, | |
3680 | ||
3681 | _SC_GETPW_R_SIZE_MAX, | |
3682 | ||
3683 | _SC_LOGIN_NAME_MAX, | |
3684 | ||
3685 | _SC_TTY_NAME_MAX, | |
3686 | ||
3687 | _SC_THREAD_DESTRUCTOR_ITERATIONS, | |
3688 | ||
3689 | _SC_THREAD_KEYS_MAX, | |
3690 | ||
3691 | _SC_THREAD_STACK_MIN, | |
3692 | ||
3693 | _SC_THREAD_THREADS_MAX, | |
3694 | ||
3695 | _SC_THREAD_ATTR_STACKADDR, | |
3696 | ||
3697 | _SC_THREAD_ATTR_STACKSIZE, | |
3698 | ||
3699 | _SC_THREAD_PRIORITY_SCHEDULING, | |
3700 | ||
3701 | _SC_THREAD_PRIO_INHERIT, | |
3702 | ||
3703 | _SC_THREAD_PRIO_PROTECT, | |
3704 | ||
3705 | _SC_THREAD_PROCESS_SHARED, | |
3706 | ||
3707 | ||
3708 | _SC_NPROCESSORS_CONF, | |
3709 | ||
3710 | _SC_NPROCESSORS_ONLN, | |
3711 | ||
3712 | _SC_PHYS_PAGES, | |
3713 | ||
3714 | _SC_AVPHYS_PAGES, | |
3715 | ||
3716 | _SC_ATEXIT_MAX, | |
3717 | ||
3718 | _SC_PASS_MAX, | |
3719 | ||
3720 | ||
3721 | _SC_XOPEN_VERSION, | |
3722 | ||
3723 | _SC_XOPEN_XCU_VERSION, | |
3724 | ||
3725 | _SC_XOPEN_UNIX, | |
3726 | ||
3727 | _SC_XOPEN_CRYPT, | |
3728 | ||
3729 | _SC_XOPEN_ENH_I18N, | |
3730 | ||
3731 | _SC_XOPEN_SHM, | |
3732 | ||
3733 | ||
3734 | _SC_2_CHAR_TERM, | |
3735 | ||
3736 | _SC_2_C_VERSION, | |
3737 | ||
3738 | _SC_2_UPE, | |
3739 | ||
3740 | ||
3741 | _SC_XOPEN_XPG2, | |
3742 | ||
3743 | _SC_XOPEN_XPG3, | |
3744 | ||
3745 | _SC_XOPEN_XPG4, | |
3746 | ||
3747 | ||
3748 | _SC_CHAR_BIT, | |
3749 | ||
3750 | _SC_CHAR_MAX, | |
3751 | ||
3752 | _SC_CHAR_MIN, | |
3753 | ||
3754 | _SC_INT_MAX, | |
3755 | ||
3756 | _SC_INT_MIN, | |
3757 | ||
3758 | _SC_LONG_BIT, | |
3759 | ||
3760 | _SC_WORD_BIT, | |
3761 | ||
3762 | _SC_MB_LEN_MAX, | |
3763 | ||
3764 | _SC_NZERO, | |
3765 | ||
3766 | _SC_SSIZE_MAX, | |
3767 | ||
3768 | _SC_SCHAR_MAX, | |
3769 | ||
3770 | _SC_SCHAR_MIN, | |
3771 | ||
3772 | _SC_SHRT_MAX, | |
3773 | ||
3774 | _SC_SHRT_MIN, | |
3775 | ||
3776 | _SC_UCHAR_MAX, | |
3777 | ||
3778 | _SC_UINT_MAX, | |
3779 | ||
3780 | _SC_ULONG_MAX, | |
3781 | ||
3782 | _SC_USHRT_MAX, | |
3783 | ||
3784 | ||
3785 | _SC_NL_ARGMAX, | |
3786 | ||
3787 | _SC_NL_LANGMAX, | |
3788 | ||
3789 | _SC_NL_MSGMAX, | |
3790 | ||
3791 | _SC_NL_NMAX, | |
3792 | ||
3793 | _SC_NL_SETMAX, | |
3794 | ||
3795 | _SC_NL_TEXTMAX, | |
3796 | ||
3797 | ||
3798 | _SC_XBS5_ILP32_OFF32, | |
3799 | ||
3800 | _SC_XBS5_ILP32_OFFBIG, | |
3801 | ||
3802 | _SC_XBS5_LP64_OFF64, | |
3803 | ||
3804 | _SC_XBS5_LPBIG_OFFBIG, | |
3805 | ||
3806 | ||
3807 | _SC_XOPEN_LEGACY, | |
3808 | ||
3809 | _SC_XOPEN_REALTIME, | |
3810 | ||
3811 | _SC_XOPEN_REALTIME_THREADS, | |
3812 | ||
3813 | ||
3814 | _SC_ADVISORY_INFO, | |
3815 | ||
3816 | _SC_BARRIERS, | |
3817 | ||
3818 | _SC_BASE, | |
3819 | ||
3820 | _SC_C_LANG_SUPPORT, | |
3821 | ||
3822 | _SC_C_LANG_SUPPORT_R, | |
3823 | ||
3824 | _SC_CLOCK_SELECTION, | |
3825 | ||
3826 | _SC_CPUTIME, | |
3827 | ||
3828 | _SC_THREAD_CPUTIME, | |
3829 | ||
3830 | _SC_DEVICE_IO, | |
3831 | ||
3832 | _SC_DEVICE_SPECIFIC, | |
3833 | ||
3834 | _SC_DEVICE_SPECIFIC_R, | |
3835 | ||
3836 | _SC_FD_MGMT, | |
3837 | ||
3838 | _SC_FIFO, | |
3839 | ||
3840 | _SC_PIPE, | |
3841 | ||
3842 | _SC_FILE_ATTRIBUTES, | |
3843 | ||
3844 | _SC_FILE_LOCKING, | |
3845 | ||
3846 | _SC_FILE_SYSTEM, | |
3847 | ||
3848 | _SC_MONOTONIC_CLOCK, | |
3849 | ||
3850 | _SC_MULTI_PROCESS, | |
3851 | ||
3852 | _SC_SINGLE_PROCESS, | |
3853 | ||
3854 | _SC_NETWORKING, | |
3855 | ||
3856 | _SC_READER_WRITER_LOCKS, | |
3857 | ||
3858 | _SC_SPIN_LOCKS, | |
3859 | ||
3860 | _SC_REGEXP, | |
3861 | ||
3862 | _SC_REGEX_VERSION, | |
3863 | ||
3864 | _SC_SHELL, | |
3865 | ||
3866 | _SC_SIGNALS, | |
3867 | ||
3868 | _SC_SPAWN, | |
3869 | ||
3870 | _SC_SPORADIC_SERVER, | |
3871 | ||
3872 | _SC_THREAD_SPORADIC_SERVER, | |
3873 | ||
3874 | _SC_SYSTEM_DATABASE, | |
3875 | ||
3876 | _SC_SYSTEM_DATABASE_R, | |
3877 | ||
3878 | _SC_TIMEOUTS, | |
3879 | ||
3880 | _SC_TYPED_MEMORY_OBJECTS, | |
3881 | ||
3882 | _SC_USER_GROUPS, | |
3883 | ||
3884 | _SC_USER_GROUPS_R, | |
3885 | ||
3886 | _SC_2_PBS, | |
3887 | ||
3888 | _SC_2_PBS_ACCOUNTING, | |
3889 | ||
3890 | _SC_2_PBS_LOCATE, | |
3891 | ||
3892 | _SC_2_PBS_MESSAGE, | |
3893 | ||
3894 | _SC_2_PBS_TRACK, | |
3895 | ||
3896 | _SC_SYMLOOP_MAX, | |
3897 | ||
3898 | _SC_STREAMS, | |
3899 | ||
3900 | _SC_2_PBS_CHECKPOINT, | |
3901 | ||
3902 | ||
3903 | _SC_V6_ILP32_OFF32, | |
3904 | ||
3905 | _SC_V6_ILP32_OFFBIG, | |
3906 | ||
3907 | _SC_V6_LP64_OFF64, | |
3908 | ||
3909 | _SC_V6_LPBIG_OFFBIG, | |
3910 | ||
3911 | ||
3912 | _SC_HOST_NAME_MAX, | |
3913 | ||
3914 | _SC_TRACE, | |
3915 | ||
3916 | _SC_TRACE_EVENT_FILTER, | |
3917 | ||
3918 | _SC_TRACE_INHERIT, | |
3919 | ||
3920 | _SC_TRACE_LOG, | |
3921 | ||
3922 | ||
3923 | _SC_LEVEL1_ICACHE_SIZE, | |
3924 | ||
3925 | _SC_LEVEL1_ICACHE_ASSOC, | |
3926 | ||
3927 | _SC_LEVEL1_ICACHE_LINESIZE, | |
3928 | ||
3929 | _SC_LEVEL1_DCACHE_SIZE, | |
3930 | ||
3931 | _SC_LEVEL1_DCACHE_ASSOC, | |
3932 | ||
3933 | _SC_LEVEL1_DCACHE_LINESIZE, | |
3934 | ||
3935 | _SC_LEVEL2_CACHE_SIZE, | |
3936 | ||
3937 | _SC_LEVEL2_CACHE_ASSOC, | |
3938 | ||
3939 | _SC_LEVEL2_CACHE_LINESIZE, | |
3940 | ||
3941 | _SC_LEVEL3_CACHE_SIZE, | |
3942 | ||
3943 | _SC_LEVEL3_CACHE_ASSOC, | |
3944 | ||
3945 | _SC_LEVEL3_CACHE_LINESIZE, | |
3946 | ||
3947 | _SC_LEVEL4_CACHE_SIZE, | |
3948 | ||
3949 | _SC_LEVEL4_CACHE_ASSOC, | |
3950 | ||
3951 | _SC_LEVEL4_CACHE_LINESIZE, | |
3952 | ||
3953 | ||
3954 | ||
3955 | _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, | |
3956 | ||
3957 | _SC_RAW_SOCKETS | |
3958 | ||
3959 | }; | |
3960 | ||
3961 | ||
3962 | ||
3963 | ||
3964 | ||
3965 | enum | |
3966 | { | |
3967 | _CS_PATH, | |
3968 | ||
3969 | ||
3970 | _CS_V6_WIDTH_RESTRICTED_ENVS, | |
3971 | ||
3972 | ||
3973 | ||
3974 | ||
3975 | _CS_LFS_CFLAGS = 1000, | |
3976 | ||
3977 | _CS_LFS_LDFLAGS, | |
3978 | ||
3979 | _CS_LFS_LIBS, | |
3980 | ||
3981 | _CS_LFS_LINTFLAGS, | |
3982 | ||
3983 | _CS_LFS64_CFLAGS, | |
3984 | ||
3985 | _CS_LFS64_LDFLAGS, | |
3986 | ||
3987 | _CS_LFS64_LIBS, | |
3988 | ||
3989 | _CS_LFS64_LINTFLAGS, | |
3990 | ||
3991 | ||
3992 | ||
3993 | ||
3994 | _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, | |
3995 | ||
3996 | _CS_XBS5_ILP32_OFF32_LDFLAGS, | |
3997 | ||
3998 | _CS_XBS5_ILP32_OFF32_LIBS, | |
3999 | ||
4000 | _CS_XBS5_ILP32_OFF32_LINTFLAGS, | |
4001 | ||
4002 | _CS_XBS5_ILP32_OFFBIG_CFLAGS, | |
4003 | ||
4004 | _CS_XBS5_ILP32_OFFBIG_LDFLAGS, | |
4005 | ||
4006 | _CS_XBS5_ILP32_OFFBIG_LIBS, | |
4007 | ||
4008 | _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, | |
4009 | ||
4010 | _CS_XBS5_LP64_OFF64_CFLAGS, | |
4011 | ||
4012 | _CS_XBS5_LP64_OFF64_LDFLAGS, | |
4013 | ||
4014 | _CS_XBS5_LP64_OFF64_LIBS, | |
4015 | ||
4016 | _CS_XBS5_LP64_OFF64_LINTFLAGS, | |
4017 | ||
4018 | _CS_XBS5_LPBIG_OFFBIG_CFLAGS, | |
4019 | ||
4020 | _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, | |
4021 | ||
4022 | _CS_XBS5_LPBIG_OFFBIG_LIBS, | |
4023 | ||
4024 | _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, | |
4025 | ||
4026 | ||
4027 | ||
4028 | _CS_POSIX_V6_ILP32_OFF32_CFLAGS, | |
4029 | ||
4030 | _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, | |
4031 | ||
4032 | _CS_POSIX_V6_ILP32_OFF32_LIBS, | |
4033 | ||
4034 | _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, | |
4035 | ||
4036 | _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, | |
4037 | ||
4038 | _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, | |
4039 | ||
4040 | _CS_POSIX_V6_ILP32_OFFBIG_LIBS, | |
4041 | ||
4042 | _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, | |
4043 | ||
4044 | _CS_POSIX_V6_LP64_OFF64_CFLAGS, | |
4045 | ||
4046 | _CS_POSIX_V6_LP64_OFF64_LDFLAGS, | |
4047 | ||
4048 | _CS_POSIX_V6_LP64_OFF64_LIBS, | |
4049 | ||
4050 | _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, | |
4051 | ||
4052 | _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, | |
4053 | ||
4054 | _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, | |
4055 | ||
4056 | _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, | |
4057 | ||
4058 | _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS | |
4059 | ||
4060 | ||
4061 | }; | |
4062 | # 553 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 2 3 4 | |
4063 | ||
4064 | ||
4065 | extern long int pathconf (__const char *__path, int __name) | |
4066 | throw () __attribute__ ((__nonnull__ (1))); | |
4067 | ||
4068 | ||
4069 | extern long int fpathconf (int __fd, int __name) throw (); | |
4070 | ||
4071 | ||
4072 | extern long int sysconf (int __name) throw (); | |
4073 | ||
4074 | ||
4075 | ||
4076 | extern size_t confstr (int __name, char *__buf, size_t __len) throw (); | |
4077 | ||
4078 | ||
4079 | ||
4080 | ||
4081 | extern __pid_t getpid (void) throw (); | |
4082 | ||
4083 | ||
4084 | extern __pid_t getppid (void) throw (); | |
4085 | ||
4086 | ||
4087 | ||
4088 | ||
4089 | extern __pid_t getpgrp (void) throw (); | |
4090 | # 589 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4091 | extern __pid_t __getpgid (__pid_t __pid) throw (); | |
4092 | ||
4093 | extern __pid_t getpgid (__pid_t __pid) throw (); | |
4094 | ||
4095 | ||
4096 | ||
4097 | ||
4098 | ||
4099 | ||
4100 | extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); | |
4101 | # 615 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4102 | extern int setpgrp (void) throw (); | |
4103 | # 632 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4104 | extern __pid_t setsid (void) throw (); | |
4105 | ||
4106 | ||
4107 | ||
4108 | extern __pid_t getsid (__pid_t __pid) throw (); | |
4109 | ||
4110 | ||
4111 | ||
4112 | extern __uid_t getuid (void) throw (); | |
4113 | ||
4114 | ||
4115 | extern __uid_t geteuid (void) throw (); | |
4116 | ||
4117 | ||
4118 | extern __gid_t getgid (void) throw (); | |
4119 | ||
4120 | ||
4121 | extern __gid_t getegid (void) throw (); | |
4122 | ||
4123 | ||
4124 | ||
4125 | ||
4126 | extern int getgroups (int __size, __gid_t __list[]) throw () ; | |
4127 | # 665 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4128 | extern int setuid (__uid_t __uid) throw (); | |
4129 | ||
4130 | ||
4131 | ||
4132 | ||
4133 | extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); | |
4134 | ||
4135 | ||
4136 | ||
4137 | ||
4138 | extern int seteuid (__uid_t __uid) throw (); | |
4139 | ||
4140 | ||
4141 | ||
4142 | ||
4143 | ||
4144 | ||
4145 | extern int setgid (__gid_t __gid) throw (); | |
4146 | ||
4147 | ||
4148 | ||
4149 | ||
4150 | extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); | |
4151 | ||
4152 | ||
4153 | ||
4154 | ||
4155 | extern int setegid (__gid_t __gid) throw (); | |
4156 | ||
4157 | ||
4158 | ||
4159 | ||
4160 | ||
4161 | extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) | |
4162 | throw (); | |
4163 | ||
4164 | ||
4165 | ||
4166 | extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) | |
4167 | throw (); | |
4168 | ||
4169 | ||
4170 | ||
4171 | extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) | |
4172 | throw (); | |
4173 | ||
4174 | ||
4175 | ||
4176 | extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) | |
4177 | throw (); | |
4178 | ||
4179 | ||
4180 | ||
4181 | ||
4182 | ||
4183 | ||
4184 | ||
4185 | extern __pid_t fork (void) throw (); | |
4186 | ||
4187 | ||
4188 | ||
4189 | ||
4190 | ||
4191 | ||
4192 | ||
4193 | extern __pid_t vfork (void) throw (); | |
4194 | ||
4195 | ||
4196 | ||
4197 | ||
4198 | ||
4199 | extern char *ttyname (int __fd) throw (); | |
4200 | ||
4201 | ||
4202 | ||
4203 | extern int ttyname_r (int __fd, char *__buf, size_t __buflen) | |
4204 | throw () __attribute__ ((__nonnull__ (2))) ; | |
4205 | ||
4206 | ||
4207 | ||
4208 | extern int isatty (int __fd) throw (); | |
4209 | # 756 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4210 | extern int link (__const char *__from, __const char *__to) | |
4211 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
4212 | # 769 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4213 | extern int symlink (__const char *__from, __const char *__to) | |
4214 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
4215 | ||
4216 | ||
4217 | ||
4218 | ||
4219 | extern ssize_t readlink (__const char *__restrict __path, | |
4220 | char *__restrict __buf, size_t __len) | |
4221 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
4222 | # 792 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4223 | extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); | |
4224 | # 801 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4225 | extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); | |
4226 | ||
4227 | ||
4228 | ||
4229 | extern __pid_t tcgetpgrp (int __fd) throw (); | |
4230 | ||
4231 | ||
4232 | extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); | |
4233 | ||
4234 | ||
4235 | ||
4236 | ||
4237 | ||
4238 | ||
4239 | extern char *getlogin (void); | |
4240 | ||
4241 | ||
4242 | ||
4243 | ||
4244 | ||
4245 | ||
4246 | ||
4247 | extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); | |
4248 | # 838 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4249 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/getopt.h" 1 3 4 | |
4250 | # 52 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/getopt.h" 3 4 | |
4251 | extern "C" { | |
4252 | # 61 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/getopt.h" 3 4 | |
4253 | extern char *optarg; | |
4254 | # 75 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/getopt.h" 3 4 | |
4255 | extern int optind; | |
4256 | ||
4257 | ||
4258 | ||
4259 | ||
4260 | extern int opterr; | |
4261 | ||
4262 | ||
4263 | ||
4264 | extern int optopt; | |
4265 | # 154 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/getopt.h" 3 4 | |
4266 | extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) | |
4267 | throw (); | |
4268 | # 175 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/getopt.h" 3 4 | |
4269 | } | |
4270 | # 839 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 2 3 4 | |
4271 | ||
4272 | ||
4273 | ||
4274 | ||
4275 | ||
4276 | ||
4277 | ||
4278 | extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); | |
4279 | ||
4280 | ||
4281 | ||
4282 | ||
4283 | ||
4284 | ||
4285 | extern int sethostname (__const char *__name, size_t __len) | |
4286 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4287 | ||
4288 | ||
4289 | ||
4290 | extern int sethostid (long int __id) throw () ; | |
4291 | ||
4292 | ||
4293 | ||
4294 | ||
4295 | ||
4296 | extern int getdomainname (char *__name, size_t __len) | |
4297 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4298 | extern int setdomainname (__const char *__name, size_t __len) | |
4299 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4300 | ||
4301 | ||
4302 | ||
4303 | ||
4304 | ||
4305 | extern int vhangup (void) throw (); | |
4306 | # 894 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4307 | extern int acct (__const char *__name) throw (); | |
4308 | ||
4309 | ||
4310 | ||
4311 | extern char *getusershell (void) throw (); | |
4312 | extern void endusershell (void) throw (); | |
4313 | extern void setusershell (void) throw (); | |
4314 | # 915 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4315 | extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; | |
4316 | ||
4317 | ||
4318 | ||
4319 | extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); | |
4320 | # 928 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4321 | extern int fsync (int __fd); | |
4322 | ||
4323 | ||
4324 | ||
4325 | ||
4326 | ||
4327 | ||
4328 | extern long int gethostid (void); | |
4329 | ||
4330 | ||
4331 | extern void sync (void) throw (); | |
4332 | ||
4333 | ||
4334 | ||
4335 | ||
4336 | extern int getpagesize (void) throw () __attribute__ ((__const__)); | |
4337 | ||
4338 | ||
4339 | ||
4340 | ||
4341 | extern int getdtablesize (void) throw (); | |
4342 | ||
4343 | ||
4344 | ||
4345 | ||
4346 | extern int truncate (__const char *__file, __off_t __length) | |
4347 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4348 | # 965 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4349 | extern int truncate64 (__const char *__file, __off64_t __length) | |
4350 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4351 | # 975 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4352 | extern int ftruncate (int __fd, __off_t __length) throw () ; | |
4353 | # 985 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4354 | extern int ftruncate64 (int __fd, __off64_t __length) throw () ; | |
4355 | # 995 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4356 | extern int brk (void *__addr) throw () ; | |
4357 | ||
4358 | ||
4359 | ||
4360 | ||
4361 | ||
4362 | extern void *sbrk (intptr_t __delta) throw (); | |
4363 | # 1016 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4364 | extern long int syscall (long int __sysno, ...) throw (); | |
4365 | # 1039 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4366 | extern int lockf (int __fd, int __cmd, __off_t __len) ; | |
4367 | # 1049 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4368 | extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; | |
4369 | # 1070 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4370 | extern int fdatasync (int __fildes) throw (); | |
4371 | ||
4372 | ||
4373 | ||
4374 | ||
4375 | ||
4376 | ||
4377 | ||
4378 | extern char *crypt (__const char *__key, __const char *__salt) | |
4379 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
4380 | ||
4381 | ||
4382 | ||
4383 | extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); | |
4384 | ||
4385 | ||
4386 | ||
4387 | ||
4388 | ||
4389 | ||
4390 | extern void swab (__const void *__restrict __from, void *__restrict __to, | |
4391 | ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
4392 | ||
4393 | ||
4394 | ||
4395 | ||
4396 | ||
4397 | ||
4398 | ||
4399 | extern char *ctermid (char *__s) throw (); | |
4400 | # 1108 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/unistd.h" 3 4 | |
4401 | } | |
4402 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr-default.h" 2 3 | |
4403 | ||
4404 | typedef pthread_key_t __gthread_key_t; | |
4405 | typedef pthread_once_t __gthread_once_t; | |
4406 | typedef pthread_mutex_t __gthread_mutex_t; | |
4407 | typedef pthread_mutex_t __gthread_recursive_mutex_t; | |
4408 | # 88 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr-default.h" 3 | |
4409 | extern __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); | |
4410 | extern __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); | |
4411 | extern __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); | |
4412 | extern __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); | |
4413 | extern __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); | |
4414 | extern __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); | |
4415 | extern __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); | |
4416 | extern __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); | |
4417 | extern __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); | |
4418 | ||
4419 | ||
4420 | extern __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); | |
4421 | extern __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); | |
4422 | extern __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); | |
4423 | extern __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); | |
4424 | extern __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); | |
4425 | # 145 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr-default.h" 3 | |
4426 | static inline int | |
4427 | __gthread_active_p (void) | |
4428 | { | |
4429 | static void *const __gthread_active_ptr | |
4430 | = __extension__ (void *) &__gthrw_pthread_cancel; | |
4431 | return __gthread_active_ptr != 0; | |
4432 | } | |
4433 | # 512 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr-default.h" 3 | |
4434 | static inline int | |
4435 | __gthread_once (__gthread_once_t *once, void (*func) (void)) | |
4436 | { | |
4437 | if (__gthread_active_p ()) | |
4438 | return __gthrw_pthread_once (once, func); | |
4439 | else | |
4440 | return -1; | |
4441 | } | |
4442 | ||
4443 | static inline int | |
4444 | __gthread_key_create (__gthread_key_t *key, void (*dtor) (void *)) | |
4445 | { | |
4446 | return __gthrw_pthread_key_create (key, dtor); | |
4447 | } | |
4448 | ||
4449 | static inline int | |
4450 | __gthread_key_delete (__gthread_key_t key) | |
4451 | { | |
4452 | return __gthrw_pthread_key_delete (key); | |
4453 | } | |
4454 | ||
4455 | static inline void * | |
4456 | __gthread_getspecific (__gthread_key_t key) | |
4457 | { | |
4458 | return __gthrw_pthread_getspecific (key); | |
4459 | } | |
4460 | ||
4461 | static inline int | |
4462 | __gthread_setspecific (__gthread_key_t key, const void *ptr) | |
4463 | { | |
4464 | return __gthrw_pthread_setspecific (key, ptr); | |
4465 | } | |
4466 | ||
4467 | static inline int | |
4468 | __gthread_mutex_lock (__gthread_mutex_t *mutex) | |
4469 | { | |
4470 | if (__gthread_active_p ()) | |
4471 | return __gthrw_pthread_mutex_lock (mutex); | |
4472 | else | |
4473 | return 0; | |
4474 | } | |
4475 | ||
4476 | static inline int | |
4477 | __gthread_mutex_trylock (__gthread_mutex_t *mutex) | |
4478 | { | |
4479 | if (__gthread_active_p ()) | |
4480 | return __gthrw_pthread_mutex_trylock (mutex); | |
4481 | else | |
4482 | return 0; | |
4483 | } | |
4484 | ||
4485 | static inline int | |
4486 | __gthread_mutex_unlock (__gthread_mutex_t *mutex) | |
4487 | { | |
4488 | if (__gthread_active_p ()) | |
4489 | return __gthrw_pthread_mutex_unlock (mutex); | |
4490 | else | |
4491 | return 0; | |
4492 | } | |
4493 | # 594 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr-default.h" 3 | |
4494 | static inline int | |
4495 | __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) | |
4496 | { | |
4497 | return __gthread_mutex_lock (mutex); | |
4498 | } | |
4499 | ||
4500 | static inline int | |
4501 | __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex) | |
4502 | { | |
4503 | return __gthread_mutex_trylock (mutex); | |
4504 | } | |
4505 | ||
4506 | static inline int | |
4507 | __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex) | |
4508 | { | |
4509 | return __gthread_mutex_unlock (mutex); | |
4510 | } | |
4511 | # 115 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/gthr.h" 2 3 | |
4512 | ||
4513 | ||
4514 | ||
4515 | ||
4516 | ||
4517 | ||
4518 | ||
4519 | #pragma GCC visibility pop | |
4520 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++io.h" 2 3 | |
4521 | ||
4522 | namespace std | |
4523 | { | |
4524 | typedef __gthread_mutex_t __c_lock; | |
4525 | ||
4526 | ||
4527 | typedef FILE __c_file; | |
4528 | } | |
4529 | # 47 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 2 3 | |
4530 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cctype" 1 3 | |
4531 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cctype" 3 | |
4532 | ||
4533 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cctype" 3 | |
4534 | ||
4535 | ||
4536 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 1 3 4 | |
4537 | # 32 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 3 4 | |
4538 | extern "C" { | |
4539 | # 41 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 3 4 | |
4540 | enum | |
4541 | { | |
4542 | _ISupper = (1 << (0)), | |
4543 | _ISlower = (1 << (1)), | |
4544 | _ISalpha = (1 << (2)), | |
4545 | _ISdigit = (1 << (3)), | |
4546 | _ISxdigit = (1 << (4)), | |
4547 | _ISspace = (1 << (5)), | |
4548 | _ISprint = (1 << (6)), | |
4549 | _ISgraph = (1 << (7)), | |
4550 | _ISblank = (1 << (8)), | |
4551 | _IScntrl = (1 << (9)), | |
4552 | _ISpunct = (1 << (10)), | |
4553 | _ISalnum = (1 << (11)) | |
4554 | }; | |
4555 | ||
4556 | ||
4557 | ||
4558 | ||
4559 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_touplow.h" 1 3 4 | |
4560 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/uClibc_touplow.h" 3 4 | |
4561 | typedef __uint16_t __ctype_mask_t; | |
4562 | ||
4563 | ||
4564 | ||
4565 | typedef __int16_t __ctype_touplow_t; | |
4566 | # 61 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 2 3 4 | |
4567 | # 103 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 3 4 | |
4568 | extern const __ctype_mask_t *__C_ctype_b; | |
4569 | extern const __ctype_touplow_t *__C_ctype_toupper; | |
4570 | extern const __ctype_touplow_t *__C_ctype_tolower; | |
4571 | # 123 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 3 4 | |
4572 | extern const __ctype_mask_t *__ctype_b; | |
4573 | extern const __ctype_touplow_t *__ctype_toupper; | |
4574 | extern const __ctype_touplow_t *__ctype_tolower; | |
4575 | # 148 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 3 4 | |
4576 | ||
4577 | ||
4578 | ||
4579 | ||
4580 | ||
4581 | ||
4582 | extern int isalnum (int) throw (); | |
4583 | extern int isalpha (int) throw (); | |
4584 | extern int iscntrl (int) throw (); | |
4585 | extern int isdigit (int) throw (); | |
4586 | extern int islower (int) throw (); | |
4587 | extern int isgraph (int) throw (); | |
4588 | extern int isprint (int) throw (); | |
4589 | extern int ispunct (int) throw (); | |
4590 | extern int isspace (int) throw (); | |
4591 | extern int isupper (int) throw (); | |
4592 | extern int isxdigit (int) throw (); | |
4593 | ||
4594 | ||
4595 | ||
4596 | extern int tolower (int __c) throw (); | |
4597 | ||
4598 | ||
4599 | extern int toupper (int __c) throw (); | |
4600 | ||
4601 | ||
4602 | ||
4603 | ||
4604 | ||
4605 | ||
4606 | ||
4607 | ||
4608 | extern int isblank (int) throw (); | |
4609 | ||
4610 | ||
4611 | ||
4612 | ||
4613 | ||
4614 | ||
4615 | extern int isctype (int __c, int __mask) throw (); | |
4616 | ||
4617 | ||
4618 | ||
4619 | ||
4620 | ||
4621 | ||
4622 | extern int isascii (int __c) throw (); | |
4623 | ||
4624 | ||
4625 | ||
4626 | extern int toascii (int __c) throw (); | |
4627 | ||
4628 | ||
4629 | ||
4630 | extern int _toupper (int) throw (); | |
4631 | extern int _tolower (int) throw (); | |
4632 | # 375 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/ctype.h" 3 4 | |
4633 | } | |
4634 | # 52 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cctype" 2 3 | |
4635 | # 68 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cctype" 3 | |
4636 | namespace std | |
4637 | { | |
4638 | using ::isalnum; | |
4639 | using ::isalpha; | |
4640 | using ::iscntrl; | |
4641 | using ::isdigit; | |
4642 | using ::isgraph; | |
4643 | using ::islower; | |
4644 | using ::isprint; | |
4645 | using ::ispunct; | |
4646 | using ::isspace; | |
4647 | using ::isupper; | |
4648 | using ::isxdigit; | |
4649 | using ::tolower; | |
4650 | using ::toupper; | |
4651 | } | |
4652 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 2 3 | |
4653 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stringfwd.h" 1 3 | |
4654 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stringfwd.h" 3 | |
4655 | ||
4656 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stringfwd.h" 3 | |
4657 | ||
4658 | ||
4659 | ||
4660 | namespace std | |
4661 | { | |
4662 | template<typename _Alloc> | |
4663 | class allocator; | |
4664 | ||
4665 | template<class _CharT> | |
4666 | struct char_traits; | |
4667 | ||
4668 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
4669 | typename _Alloc = allocator<_CharT> > | |
4670 | class basic_string; | |
4671 | ||
4672 | template<> struct char_traits<char>; | |
4673 | ||
4674 | typedef basic_string<char> string; | |
4675 | ||
4676 | ||
4677 | ||
4678 | ||
4679 | ||
4680 | ||
4681 | } | |
4682 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 2 3 | |
4683 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 1 3 | |
4684 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 3 | |
4685 | ||
4686 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 3 | |
4687 | ||
4688 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwchar" 1 3 | |
4689 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwchar" 3 | |
4690 | ||
4691 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwchar" 3 | |
4692 | ||
4693 | ||
4694 | ||
4695 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ctime" 1 3 | |
4696 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ctime" 3 | |
4697 | ||
4698 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ctime" 3 | |
4699 | # 65 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ctime" 3 | |
4700 | namespace std | |
4701 | { | |
4702 | using ::clock_t; | |
4703 | using ::time_t; | |
4704 | using ::tm; | |
4705 | ||
4706 | using ::clock; | |
4707 | using ::difftime; | |
4708 | using ::mktime; | |
4709 | using ::time; | |
4710 | using ::asctime; | |
4711 | using ::ctime; | |
4712 | using ::gmtime; | |
4713 | using ::localtime; | |
4714 | using ::strftime; | |
4715 | } | |
4716 | # 53 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwchar" 2 3 | |
4717 | # 61 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwchar" 3 | |
4718 | extern "C" | |
4719 | { | |
4720 | typedef struct | |
4721 | { | |
4722 | int __fill[6]; | |
4723 | } mbstate_t; | |
4724 | } | |
4725 | ||
4726 | ||
4727 | namespace std | |
4728 | { | |
4729 | using ::mbstate_t; | |
4730 | } | |
4731 | # 47 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 2 3 | |
4732 | ||
4733 | ||
4734 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdint.h" 1 3 4 | |
4735 | # 30 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdint.h" 3 4 | |
4736 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/bits/wordsize.h" 1 3 4 | |
4737 | # 31 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdint.h" 2 3 4 | |
4738 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdint.h" 3 4 | |
4739 | typedef unsigned char uint8_t; | |
4740 | typedef unsigned short int uint16_t; | |
4741 | ||
4742 | typedef unsigned int uint32_t; | |
4743 | ||
4744 | ||
4745 | ||
4746 | ||
4747 | ||
4748 | __extension__ | |
4749 | typedef unsigned long long int uint64_t; | |
4750 | ||
4751 | ||
4752 | ||
4753 | ||
4754 | ||
4755 | ||
4756 | typedef signed char int_least8_t; | |
4757 | typedef short int int_least16_t; | |
4758 | typedef int int_least32_t; | |
4759 | ||
4760 | ||
4761 | ||
4762 | __extension__ | |
4763 | typedef long long int int_least64_t; | |
4764 | ||
4765 | ||
4766 | ||
4767 | typedef unsigned char uint_least8_t; | |
4768 | typedef unsigned short int uint_least16_t; | |
4769 | typedef unsigned int uint_least32_t; | |
4770 | ||
4771 | ||
4772 | ||
4773 | __extension__ | |
4774 | typedef unsigned long long int uint_least64_t; | |
4775 | ||
4776 | ||
4777 | ||
4778 | ||
4779 | ||
4780 | ||
4781 | typedef signed char int_fast8_t; | |
4782 | ||
4783 | ||
4784 | ||
4785 | ||
4786 | ||
4787 | typedef int int_fast16_t; | |
4788 | typedef int int_fast32_t; | |
4789 | __extension__ | |
4790 | typedef long long int int_fast64_t; | |
4791 | ||
4792 | ||
4793 | ||
4794 | typedef unsigned char uint_fast8_t; | |
4795 | ||
4796 | ||
4797 | ||
4798 | ||
4799 | ||
4800 | typedef unsigned int uint_fast16_t; | |
4801 | typedef unsigned int uint_fast32_t; | |
4802 | __extension__ | |
4803 | typedef unsigned long long int uint_fast64_t; | |
4804 | # 131 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdint.h" 3 4 | |
4805 | typedef unsigned int uintptr_t; | |
4806 | # 140 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/stdint.h" 3 4 | |
4807 | __extension__ | |
4808 | typedef long long int intmax_t; | |
4809 | __extension__ | |
4810 | typedef unsigned long long int uintmax_t; | |
4811 | # 50 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 2 3 | |
4812 | ||
4813 | ||
4814 | namespace std | |
4815 | { | |
4816 | # 72 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 3 | |
4817 | typedef int64_t streamoff; | |
4818 | ||
4819 | ||
4820 | ||
4821 | ||
4822 | ||
4823 | typedef ptrdiff_t streamsize; | |
4824 | ||
4825 | template<typename _StateT> | |
4826 | class fpos; | |
4827 | # 94 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 3 | |
4828 | template<typename _StateT> | |
4829 | class fpos | |
4830 | { | |
4831 | private: | |
4832 | streamoff _M_off; | |
4833 | _StateT _M_state; | |
4834 | ||
4835 | public: | |
4836 | ||
4837 | ||
4838 | ||
4839 | ||
4840 | fpos() | |
4841 | : _M_off(0), _M_state() { } | |
4842 | # 116 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/postypes.h" 3 | |
4843 | fpos(streamoff __off) | |
4844 | : _M_off(__off), _M_state() { } | |
4845 | ||
4846 | ||
4847 | operator streamoff() const { return _M_off; } | |
4848 | ||
4849 | ||
4850 | void | |
4851 | state(_StateT __st) | |
4852 | { _M_state = __st; } | |
4853 | ||
4854 | ||
4855 | _StateT | |
4856 | state() const | |
4857 | { return _M_state; } | |
4858 | ||
4859 | ||
4860 | ||
4861 | ||
4862 | ||
4863 | ||
4864 | bool | |
4865 | operator==(const fpos& __other) const | |
4866 | { return _M_off == __other._M_off; } | |
4867 | ||
4868 | ||
4869 | bool | |
4870 | operator!=(const fpos& __other) const | |
4871 | { return _M_off != __other._M_off; } | |
4872 | ||
4873 | ||
4874 | ||
4875 | ||
4876 | ||
4877 | fpos& | |
4878 | operator+=(streamoff __off) | |
4879 | { | |
4880 | _M_off += __off; | |
4881 | return *this; | |
4882 | } | |
4883 | ||
4884 | ||
4885 | ||
4886 | ||
4887 | ||
4888 | fpos& | |
4889 | operator-=(streamoff __off) | |
4890 | { | |
4891 | _M_off -= __off; | |
4892 | return *this; | |
4893 | } | |
4894 | ||
4895 | ||
4896 | ||
4897 | ||
4898 | ||
4899 | ||
4900 | ||
4901 | fpos | |
4902 | operator+(streamoff __off) const | |
4903 | { | |
4904 | fpos __pos(*this); | |
4905 | __pos += __off; | |
4906 | return __pos; | |
4907 | } | |
4908 | ||
4909 | ||
4910 | ||
4911 | ||
4912 | ||
4913 | ||
4914 | ||
4915 | fpos | |
4916 | operator-(streamoff __off) const | |
4917 | { | |
4918 | fpos __pos(*this); | |
4919 | __pos -= __off; | |
4920 | return __pos; | |
4921 | } | |
4922 | ||
4923 | ||
4924 | ||
4925 | ||
4926 | ||
4927 | ||
4928 | streamoff | |
4929 | operator-(const fpos& __other) const | |
4930 | { return _M_off - __other._M_off; } | |
4931 | }; | |
4932 | ||
4933 | ||
4934 | ||
4935 | ||
4936 | ||
4937 | typedef fpos<mbstate_t> streampos; | |
4938 | ||
4939 | typedef fpos<mbstate_t> wstreampos; | |
4940 | } | |
4941 | # 50 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 2 3 | |
4942 | ||
4943 | ||
4944 | namespace std | |
4945 | { | |
4946 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4947 | class basic_ios; | |
4948 | ||
4949 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4950 | class basic_streambuf; | |
4951 | ||
4952 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4953 | class basic_istream; | |
4954 | ||
4955 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4956 | class basic_ostream; | |
4957 | ||
4958 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4959 | class basic_iostream; | |
4960 | ||
4961 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
4962 | typename _Alloc = allocator<_CharT> > | |
4963 | class basic_stringbuf; | |
4964 | ||
4965 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
4966 | typename _Alloc = allocator<_CharT> > | |
4967 | class basic_istringstream; | |
4968 | ||
4969 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
4970 | typename _Alloc = allocator<_CharT> > | |
4971 | class basic_ostringstream; | |
4972 | ||
4973 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
4974 | typename _Alloc = allocator<_CharT> > | |
4975 | class basic_stringstream; | |
4976 | ||
4977 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4978 | class basic_filebuf; | |
4979 | ||
4980 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4981 | class basic_ifstream; | |
4982 | ||
4983 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4984 | class basic_ofstream; | |
4985 | ||
4986 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4987 | class basic_fstream; | |
4988 | ||
4989 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4990 | class istreambuf_iterator; | |
4991 | ||
4992 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
4993 | class ostreambuf_iterator; | |
4994 | ||
4995 | ||
4996 | ||
4997 | class ios_base; | |
4998 | # 135 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 3 | |
4999 | typedef basic_ios<char> ios; | |
5000 | typedef basic_streambuf<char> streambuf; | |
5001 | typedef basic_istream<char> istream; | |
5002 | typedef basic_ostream<char> ostream; | |
5003 | typedef basic_iostream<char> iostream; | |
5004 | typedef basic_stringbuf<char> stringbuf; | |
5005 | typedef basic_istringstream<char> istringstream; | |
5006 | typedef basic_ostringstream<char> ostringstream; | |
5007 | typedef basic_stringstream<char> stringstream; | |
5008 | typedef basic_filebuf<char> filebuf; | |
5009 | typedef basic_ifstream<char> ifstream; | |
5010 | typedef basic_ofstream<char> ofstream; | |
5011 | typedef basic_fstream<char> fstream; | |
5012 | # 165 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/iosfwd" 3 | |
5013 | } | |
5014 | # 70 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
5015 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_pair.h" 1 3 | |
5016 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_pair.h" 3 | |
5017 | namespace std | |
5018 | { | |
5019 | ||
5020 | template<class _T1, class _T2> | |
5021 | struct pair | |
5022 | { | |
5023 | typedef _T1 first_type; | |
5024 | typedef _T2 second_type; | |
5025 | ||
5026 | _T1 first; | |
5027 | _T2 second; | |
5028 | ||
5029 | ||
5030 | ||
5031 | ||
5032 | ||
5033 | pair() | |
5034 | : first(), second() { } | |
5035 | ||
5036 | ||
5037 | pair(const _T1& __a, const _T2& __b) | |
5038 | : first(__a), second(__b) { } | |
5039 | ||
5040 | ||
5041 | template<class _U1, class _U2> | |
5042 | pair(const pair<_U1, _U2>& __p) | |
5043 | : first(__p.first), second(__p.second) { } | |
5044 | }; | |
5045 | ||
5046 | ||
5047 | template<class _T1, class _T2> | |
5048 | inline bool | |
5049 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
5050 | { return __x.first == __y.first && __x.second == __y.second; } | |
5051 | ||
5052 | ||
5053 | template<class _T1, class _T2> | |
5054 | inline bool | |
5055 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
5056 | { return __x.first < __y.first | |
5057 | || (!(__y.first < __x.first) && __x.second < __y.second); } | |
5058 | ||
5059 | ||
5060 | template<class _T1, class _T2> | |
5061 | inline bool | |
5062 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
5063 | { return !(__x == __y); } | |
5064 | ||
5065 | ||
5066 | template<class _T1, class _T2> | |
5067 | inline bool | |
5068 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
5069 | { return __y < __x; } | |
5070 | ||
5071 | ||
5072 | template<class _T1, class _T2> | |
5073 | inline bool | |
5074 | operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
5075 | { return !(__y < __x); } | |
5076 | ||
5077 | ||
5078 | template<class _T1, class _T2> | |
5079 | inline bool | |
5080 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
5081 | { return !(__x < __y); } | |
5082 | # 142 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_pair.h" 3 | |
5083 | template<class _T1, class _T2> | |
5084 | inline pair<_T1, _T2> | |
5085 | make_pair(_T1 __x, _T2 __y) | |
5086 | { return pair<_T1, _T2>(__x, __y); } | |
5087 | } | |
5088 | # 71 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
5089 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/cpp_type_traits.h" 1 3 | |
5090 | # 41 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/cpp_type_traits.h" 3 | |
5091 | ||
5092 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/cpp_type_traits.h" 3 | |
5093 | # 75 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/cpp_type_traits.h" 3 | |
5094 | namespace __gnu_internal | |
5095 | { | |
5096 | typedef char __one; | |
5097 | typedef char __two[2]; | |
5098 | ||
5099 | template<typename _Tp> | |
5100 | __one __test_type(int _Tp::*); | |
5101 | template<typename _Tp> | |
5102 | __two& __test_type(...); | |
5103 | } | |
5104 | ||
5105 | ||
5106 | namespace __gnu_cxx | |
5107 | { | |
5108 | template<typename _Iterator, typename _Container> | |
5109 | class __normal_iterator; | |
5110 | } | |
5111 | ||
5112 | struct __true_type { }; | |
5113 | struct __false_type { }; | |
5114 | ||
5115 | namespace std | |
5116 | { | |
5117 | template<bool> | |
5118 | struct __truth_type | |
5119 | { typedef __false_type __type; }; | |
5120 | ||
5121 | template<> | |
5122 | struct __truth_type<true> | |
5123 | { typedef __true_type __type; }; | |
5124 | ||
5125 | ||
5126 | ||
5127 | template<class _Sp, class _Tp> | |
5128 | struct __traitor | |
5129 | { | |
5130 | enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; | |
5131 | typedef typename __truth_type<__value>::__type __type; | |
5132 | }; | |
5133 | ||
5134 | ||
5135 | template<typename, typename> | |
5136 | struct __are_same | |
5137 | { | |
5138 | enum { __value = 0 }; | |
5139 | typedef __false_type __type; | |
5140 | }; | |
5141 | ||
5142 | template<typename _Tp> | |
5143 | struct __are_same<_Tp, _Tp> | |
5144 | { | |
5145 | enum { __value = 1 }; | |
5146 | typedef __true_type __type; | |
5147 | }; | |
5148 | ||
5149 | ||
5150 | template<typename, bool> | |
5151 | struct __enable_if | |
5152 | { | |
5153 | }; | |
5154 | ||
5155 | template<typename _Tp> | |
5156 | struct __enable_if<_Tp, true> | |
5157 | { | |
5158 | typedef _Tp __type; | |
5159 | }; | |
5160 | ||
5161 | ||
5162 | template<typename _Tp> | |
5163 | struct __is_void | |
5164 | { | |
5165 | enum { __value = 0 }; | |
5166 | typedef __false_type __type; | |
5167 | }; | |
5168 | ||
5169 | template<> | |
5170 | struct __is_void<void> | |
5171 | { | |
5172 | enum { __value = 1 }; | |
5173 | typedef __true_type __type; | |
5174 | }; | |
5175 | ||
5176 | ||
5177 | ||
5178 | ||
5179 | template<typename _Tp> | |
5180 | struct __is_integer | |
5181 | { | |
5182 | enum { __value = 0 }; | |
5183 | typedef __false_type __type; | |
5184 | }; | |
5185 | ||
5186 | ||
5187 | ||
5188 | ||
5189 | template<> | |
5190 | struct __is_integer<bool> | |
5191 | { | |
5192 | enum { __value = 1 }; | |
5193 | typedef __true_type __type; | |
5194 | }; | |
5195 | ||
5196 | template<> | |
5197 | struct __is_integer<char> | |
5198 | { | |
5199 | enum { __value = 1 }; | |
5200 | typedef __true_type __type; | |
5201 | }; | |
5202 | ||
5203 | template<> | |
5204 | struct __is_integer<signed char> | |
5205 | { | |
5206 | enum { __value = 1 }; | |
5207 | typedef __true_type __type; | |
5208 | }; | |
5209 | ||
5210 | template<> | |
5211 | struct __is_integer<unsigned char> | |
5212 | { | |
5213 | enum { __value = 1 }; | |
5214 | typedef __true_type __type; | |
5215 | }; | |
5216 | # 207 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/cpp_type_traits.h" 3 | |
5217 | template<> | |
5218 | struct __is_integer<short> | |
5219 | { | |
5220 | enum { __value = 1 }; | |
5221 | typedef __true_type __type; | |
5222 | }; | |
5223 | ||
5224 | template<> | |
5225 | struct __is_integer<unsigned short> | |
5226 | { | |
5227 | enum { __value = 1 }; | |
5228 | typedef __true_type __type; | |
5229 | }; | |
5230 | ||
5231 | template<> | |
5232 | struct __is_integer<int> | |
5233 | { | |
5234 | enum { __value = 1 }; | |
5235 | typedef __true_type __type; | |
5236 | }; | |
5237 | ||
5238 | template<> | |
5239 | struct __is_integer<unsigned int> | |
5240 | { | |
5241 | enum { __value = 1 }; | |
5242 | typedef __true_type __type; | |
5243 | }; | |
5244 | ||
5245 | template<> | |
5246 | struct __is_integer<long> | |
5247 | { | |
5248 | enum { __value = 1 }; | |
5249 | typedef __true_type __type; | |
5250 | }; | |
5251 | ||
5252 | template<> | |
5253 | struct __is_integer<unsigned long> | |
5254 | { | |
5255 | enum { __value = 1 }; | |
5256 | typedef __true_type __type; | |
5257 | }; | |
5258 | ||
5259 | template<> | |
5260 | struct __is_integer<long long> | |
5261 | { | |
5262 | enum { __value = 1 }; | |
5263 | typedef __true_type __type; | |
5264 | }; | |
5265 | ||
5266 | template<> | |
5267 | struct __is_integer<unsigned long long> | |
5268 | { | |
5269 | enum { __value = 1 }; | |
5270 | typedef __true_type __type; | |
5271 | }; | |
5272 | ||
5273 | ||
5274 | ||
5275 | ||
5276 | template<typename _Tp> | |
5277 | struct __is_floating | |
5278 | { | |
5279 | enum { __value = 0 }; | |
5280 | typedef __false_type __type; | |
5281 | }; | |
5282 | ||
5283 | ||
5284 | template<> | |
5285 | struct __is_floating<float> | |
5286 | { | |
5287 | enum { __value = 1 }; | |
5288 | typedef __true_type __type; | |
5289 | }; | |
5290 | ||
5291 | template<> | |
5292 | struct __is_floating<double> | |
5293 | { | |
5294 | enum { __value = 1 }; | |
5295 | typedef __true_type __type; | |
5296 | }; | |
5297 | ||
5298 | template<> | |
5299 | struct __is_floating<long double> | |
5300 | { | |
5301 | enum { __value = 1 }; | |
5302 | typedef __true_type __type; | |
5303 | }; | |
5304 | ||
5305 | ||
5306 | ||
5307 | ||
5308 | template<typename _Tp> | |
5309 | struct __is_pointer | |
5310 | { | |
5311 | enum { __value = 0 }; | |
5312 | typedef __false_type __type; | |
5313 | }; | |
5314 | ||
5315 | template<typename _Tp> | |
5316 | struct __is_pointer<_Tp*> | |
5317 | { | |
5318 | enum { __value = 1 }; | |
5319 | typedef __true_type __type; | |
5320 | }; | |
5321 | ||
5322 | ||
5323 | ||
5324 | ||
5325 | template<typename _Tp> | |
5326 | struct __is_normal_iterator | |
5327 | { | |
5328 | enum { __value = 0 }; | |
5329 | typedef __false_type __type; | |
5330 | }; | |
5331 | ||
5332 | template<typename _Iterator, typename _Container> | |
5333 | struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, | |
5334 | _Container> > | |
5335 | { | |
5336 | enum { __value = 1 }; | |
5337 | typedef __true_type __type; | |
5338 | }; | |
5339 | ||
5340 | ||
5341 | ||
5342 | ||
5343 | template<typename _Tp> | |
5344 | struct __is_arithmetic | |
5345 | : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > | |
5346 | { }; | |
5347 | ||
5348 | ||
5349 | ||
5350 | ||
5351 | template<typename _Tp> | |
5352 | struct __is_fundamental | |
5353 | : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > | |
5354 | { }; | |
5355 | ||
5356 | ||
5357 | ||
5358 | ||
5359 | template<typename _Tp> | |
5360 | struct __is_scalar | |
5361 | : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > | |
5362 | { }; | |
5363 | ||
5364 | ||
5365 | ||
5366 | ||
5367 | template<typename _Tp> | |
5368 | struct __is_pod | |
5369 | { | |
5370 | enum | |
5371 | { | |
5372 | __value = (sizeof(__gnu_internal::__test_type<_Tp>(0)) | |
5373 | != sizeof(__gnu_internal::__one)) | |
5374 | }; | |
5375 | }; | |
5376 | ||
5377 | ||
5378 | ||
5379 | ||
5380 | template<typename _Tp> | |
5381 | struct __is_empty | |
5382 | { | |
5383 | private: | |
5384 | template<typename> | |
5385 | struct __first { }; | |
5386 | template<typename _Up> | |
5387 | struct __second | |
5388 | : public _Up { }; | |
5389 | ||
5390 | public: | |
5391 | enum | |
5392 | { | |
5393 | __value = sizeof(__first<_Tp>) == sizeof(__second<_Tp>) | |
5394 | }; | |
5395 | }; | |
5396 | ||
5397 | } | |
5398 | # 72 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
5399 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_types.h" 1 3 | |
5400 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_types.h" 3 | |
5401 | ||
5402 | # 68 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_types.h" 3 | |
5403 | ||
5404 | namespace std | |
5405 | { | |
5406 | # 80 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_types.h" 3 | |
5407 | struct input_iterator_tag {}; | |
5408 | ||
5409 | struct output_iterator_tag {}; | |
5410 | ||
5411 | struct forward_iterator_tag : public input_iterator_tag {}; | |
5412 | ||
5413 | ||
5414 | struct bidirectional_iterator_tag : public forward_iterator_tag {}; | |
5415 | ||
5416 | ||
5417 | struct random_access_iterator_tag : public bidirectional_iterator_tag {}; | |
5418 | # 104 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_types.h" 3 | |
5419 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, | |
5420 | typename _Pointer = _Tp*, typename _Reference = _Tp&> | |
5421 | struct iterator | |
5422 | { | |
5423 | ||
5424 | typedef _Category iterator_category; | |
5425 | ||
5426 | typedef _Tp value_type; | |
5427 | ||
5428 | typedef _Distance difference_type; | |
5429 | ||
5430 | typedef _Pointer pointer; | |
5431 | ||
5432 | typedef _Reference reference; | |
5433 | }; | |
5434 | ||
5435 | ||
5436 | ||
5437 | ||
5438 | ||
5439 | ||
5440 | ||
5441 | template<typename _Iterator> | |
5442 | struct iterator_traits | |
5443 | { | |
5444 | typedef typename _Iterator::iterator_category iterator_category; | |
5445 | typedef typename _Iterator::value_type value_type; | |
5446 | typedef typename _Iterator::difference_type difference_type; | |
5447 | typedef typename _Iterator::pointer pointer; | |
5448 | typedef typename _Iterator::reference reference; | |
5449 | }; | |
5450 | ||
5451 | template<typename _Tp> | |
5452 | struct iterator_traits<_Tp*> | |
5453 | { | |
5454 | typedef random_access_iterator_tag iterator_category; | |
5455 | typedef _Tp value_type; | |
5456 | typedef ptrdiff_t difference_type; | |
5457 | typedef _Tp* pointer; | |
5458 | typedef _Tp& reference; | |
5459 | }; | |
5460 | ||
5461 | template<typename _Tp> | |
5462 | struct iterator_traits<const _Tp*> | |
5463 | { | |
5464 | typedef random_access_iterator_tag iterator_category; | |
5465 | typedef _Tp value_type; | |
5466 | typedef ptrdiff_t difference_type; | |
5467 | typedef const _Tp* pointer; | |
5468 | typedef const _Tp& reference; | |
5469 | }; | |
5470 | ||
5471 | ||
5472 | ||
5473 | ||
5474 | ||
5475 | ||
5476 | ||
5477 | template<typename _Iter> | |
5478 | inline typename iterator_traits<_Iter>::iterator_category | |
5479 | __iterator_category(const _Iter&) | |
5480 | { return typename iterator_traits<_Iter>::iterator_category(); } | |
5481 | ||
5482 | } | |
5483 | # 73 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
5484 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_funcs.h" 1 3 | |
5485 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_funcs.h" 3 | |
5486 | ||
5487 | # 68 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_funcs.h" 3 | |
5488 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/concept_check.h" 1 3 | |
5489 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/concept_check.h" 3 | |
5490 | ||
5491 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/concept_check.h" 3 | |
5492 | # 69 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_funcs.h" 2 3 | |
5493 | ||
5494 | namespace std | |
5495 | { | |
5496 | template<typename _InputIterator> | |
5497 | inline typename iterator_traits<_InputIterator>::difference_type | |
5498 | __distance(_InputIterator __first, _InputIterator __last, | |
5499 | input_iterator_tag) | |
5500 | { | |
5501 | ||
5502 | ||
5503 | ||
5504 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
5505 | while (__first != __last) | |
5506 | { | |
5507 | ++__first; | |
5508 | ++__n; | |
5509 | } | |
5510 | return __n; | |
5511 | } | |
5512 | ||
5513 | template<typename _RandomAccessIterator> | |
5514 | inline typename iterator_traits<_RandomAccessIterator>::difference_type | |
5515 | __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
5516 | random_access_iterator_tag) | |
5517 | { | |
5518 | ||
5519 | ||
5520 | ||
5521 | return __last - __first; | |
5522 | } | |
5523 | # 112 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_funcs.h" 3 | |
5524 | template<typename _InputIterator> | |
5525 | inline typename iterator_traits<_InputIterator>::difference_type | |
5526 | distance(_InputIterator __first, _InputIterator __last) | |
5527 | { | |
5528 | ||
5529 | return std::__distance(__first, __last, | |
5530 | std::__iterator_category(__first)); | |
5531 | } | |
5532 | ||
5533 | template<typename _InputIterator, typename _Distance> | |
5534 | inline void | |
5535 | __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) | |
5536 | { | |
5537 | ||
5538 | ||
5539 | while (__n--) | |
5540 | ++__i; | |
5541 | } | |
5542 | ||
5543 | template<typename _BidirectionalIterator, typename _Distance> | |
5544 | inline void | |
5545 | __advance(_BidirectionalIterator& __i, _Distance __n, | |
5546 | bidirectional_iterator_tag) | |
5547 | { | |
5548 | ||
5549 | ||
5550 | ||
5551 | if (__n > 0) | |
5552 | while (__n--) | |
5553 | ++__i; | |
5554 | else | |
5555 | while (__n++) | |
5556 | --__i; | |
5557 | } | |
5558 | ||
5559 | template<typename _RandomAccessIterator, typename _Distance> | |
5560 | inline void | |
5561 | __advance(_RandomAccessIterator& __i, _Distance __n, | |
5562 | random_access_iterator_tag) | |
5563 | { | |
5564 | ||
5565 | ||
5566 | ||
5567 | __i += __n; | |
5568 | } | |
5569 | # 170 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator_base_funcs.h" 3 | |
5570 | template<typename _InputIterator, typename _Distance> | |
5571 | inline void | |
5572 | advance(_InputIterator& __i, _Distance __n) | |
5573 | { | |
5574 | ||
5575 | std::__advance(__i, __n, std::__iterator_category(__i)); | |
5576 | } | |
5577 | } | |
5578 | # 74 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
5579 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 1 3 | |
5580 | # 70 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5581 | namespace std | |
5582 | { | |
5583 | # 91 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5584 | template<typename _Iterator> | |
5585 | class reverse_iterator | |
5586 | : public iterator<typename iterator_traits<_Iterator>::iterator_category, | |
5587 | typename iterator_traits<_Iterator>::value_type, | |
5588 | typename iterator_traits<_Iterator>::difference_type, | |
5589 | typename iterator_traits<_Iterator>::pointer, | |
5590 | typename iterator_traits<_Iterator>::reference> | |
5591 | { | |
5592 | protected: | |
5593 | _Iterator current; | |
5594 | ||
5595 | public: | |
5596 | typedef _Iterator iterator_type; | |
5597 | typedef typename iterator_traits<_Iterator>::difference_type | |
5598 | difference_type; | |
5599 | typedef typename iterator_traits<_Iterator>::reference reference; | |
5600 | typedef typename iterator_traits<_Iterator>::pointer pointer; | |
5601 | ||
5602 | public: | |
5603 | ||
5604 | ||
5605 | ||
5606 | ||
5607 | ||
5608 | ||
5609 | reverse_iterator() : current() { } | |
5610 | ||
5611 | ||
5612 | ||
5613 | ||
5614 | explicit | |
5615 | reverse_iterator(iterator_type __x) : current(__x) { } | |
5616 | ||
5617 | ||
5618 | ||
5619 | ||
5620 | reverse_iterator(const reverse_iterator& __x) | |
5621 | : current(__x.current) { } | |
5622 | ||
5623 | ||
5624 | ||
5625 | ||
5626 | ||
5627 | template<typename _Iter> | |
5628 | reverse_iterator(const reverse_iterator<_Iter>& __x) | |
5629 | : current(__x.base()) { } | |
5630 | ||
5631 | ||
5632 | ||
5633 | ||
5634 | iterator_type | |
5635 | base() const | |
5636 | { return current; } | |
5637 | ||
5638 | ||
5639 | ||
5640 | ||
5641 | ||
5642 | ||
5643 | reference | |
5644 | operator*() const | |
5645 | { | |
5646 | _Iterator __tmp = current; | |
5647 | return *--__tmp; | |
5648 | } | |
5649 | ||
5650 | ||
5651 | ||
5652 | ||
5653 | ||
5654 | ||
5655 | pointer | |
5656 | operator->() const | |
5657 | { return &(operator*()); } | |
5658 | ||
5659 | ||
5660 | ||
5661 | ||
5662 | ||
5663 | ||
5664 | reverse_iterator& | |
5665 | operator++() | |
5666 | { | |
5667 | --current; | |
5668 | return *this; | |
5669 | } | |
5670 | ||
5671 | ||
5672 | ||
5673 | ||
5674 | ||
5675 | ||
5676 | reverse_iterator | |
5677 | operator++(int) | |
5678 | { | |
5679 | reverse_iterator __tmp = *this; | |
5680 | --current; | |
5681 | return __tmp; | |
5682 | } | |
5683 | ||
5684 | ||
5685 | ||
5686 | ||
5687 | ||
5688 | ||
5689 | reverse_iterator& | |
5690 | operator--() | |
5691 | { | |
5692 | ++current; | |
5693 | return *this; | |
5694 | } | |
5695 | ||
5696 | ||
5697 | ||
5698 | ||
5699 | ||
5700 | ||
5701 | reverse_iterator | |
5702 | operator--(int) | |
5703 | { | |
5704 | reverse_iterator __tmp = *this; | |
5705 | ++current; | |
5706 | return __tmp; | |
5707 | } | |
5708 | ||
5709 | ||
5710 | ||
5711 | ||
5712 | ||
5713 | ||
5714 | reverse_iterator | |
5715 | operator+(difference_type __n) const | |
5716 | { return reverse_iterator(current - __n); } | |
5717 | ||
5718 | ||
5719 | ||
5720 | ||
5721 | ||
5722 | ||
5723 | reverse_iterator& | |
5724 | operator+=(difference_type __n) | |
5725 | { | |
5726 | current -= __n; | |
5727 | return *this; | |
5728 | } | |
5729 | ||
5730 | ||
5731 | ||
5732 | ||
5733 | ||
5734 | ||
5735 | reverse_iterator | |
5736 | operator-(difference_type __n) const | |
5737 | { return reverse_iterator(current + __n); } | |
5738 | ||
5739 | ||
5740 | ||
5741 | ||
5742 | ||
5743 | ||
5744 | reverse_iterator& | |
5745 | operator-=(difference_type __n) | |
5746 | { | |
5747 | current += __n; | |
5748 | return *this; | |
5749 | } | |
5750 | ||
5751 | ||
5752 | ||
5753 | ||
5754 | ||
5755 | ||
5756 | reference | |
5757 | operator[](difference_type __n) const | |
5758 | { return *(*this + __n); } | |
5759 | }; | |
5760 | # 278 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5761 | template<typename _Iterator> | |
5762 | inline bool | |
5763 | operator==(const reverse_iterator<_Iterator>& __x, | |
5764 | const reverse_iterator<_Iterator>& __y) | |
5765 | { return __x.base() == __y.base(); } | |
5766 | ||
5767 | template<typename _Iterator> | |
5768 | inline bool | |
5769 | operator<(const reverse_iterator<_Iterator>& __x, | |
5770 | const reverse_iterator<_Iterator>& __y) | |
5771 | { return __y.base() < __x.base(); } | |
5772 | ||
5773 | template<typename _Iterator> | |
5774 | inline bool | |
5775 | operator!=(const reverse_iterator<_Iterator>& __x, | |
5776 | const reverse_iterator<_Iterator>& __y) | |
5777 | { return !(__x == __y); } | |
5778 | ||
5779 | template<typename _Iterator> | |
5780 | inline bool | |
5781 | operator>(const reverse_iterator<_Iterator>& __x, | |
5782 | const reverse_iterator<_Iterator>& __y) | |
5783 | { return __y < __x; } | |
5784 | ||
5785 | template<typename _Iterator> | |
5786 | inline bool | |
5787 | operator<=(const reverse_iterator<_Iterator>& __x, | |
5788 | const reverse_iterator<_Iterator>& __y) | |
5789 | { return !(__y < __x); } | |
5790 | ||
5791 | template<typename _Iterator> | |
5792 | inline bool | |
5793 | operator>=(const reverse_iterator<_Iterator>& __x, | |
5794 | const reverse_iterator<_Iterator>& __y) | |
5795 | { return !(__x < __y); } | |
5796 | ||
5797 | template<typename _Iterator> | |
5798 | inline typename reverse_iterator<_Iterator>::difference_type | |
5799 | operator-(const reverse_iterator<_Iterator>& __x, | |
5800 | const reverse_iterator<_Iterator>& __y) | |
5801 | { return __y.base() - __x.base(); } | |
5802 | ||
5803 | template<typename _Iterator> | |
5804 | inline reverse_iterator<_Iterator> | |
5805 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | |
5806 | const reverse_iterator<_Iterator>& __x) | |
5807 | { return reverse_iterator<_Iterator>(__x.base() - __n); } | |
5808 | ||
5809 | ||
5810 | ||
5811 | template<typename _IteratorL, typename _IteratorR> | |
5812 | inline bool | |
5813 | operator==(const reverse_iterator<_IteratorL>& __x, | |
5814 | const reverse_iterator<_IteratorR>& __y) | |
5815 | { return __x.base() == __y.base(); } | |
5816 | ||
5817 | template<typename _IteratorL, typename _IteratorR> | |
5818 | inline bool | |
5819 | operator<(const reverse_iterator<_IteratorL>& __x, | |
5820 | const reverse_iterator<_IteratorR>& __y) | |
5821 | { return __y.base() < __x.base(); } | |
5822 | ||
5823 | template<typename _IteratorL, typename _IteratorR> | |
5824 | inline bool | |
5825 | operator!=(const reverse_iterator<_IteratorL>& __x, | |
5826 | const reverse_iterator<_IteratorR>& __y) | |
5827 | { return !(__x == __y); } | |
5828 | ||
5829 | template<typename _IteratorL, typename _IteratorR> | |
5830 | inline bool | |
5831 | operator>(const reverse_iterator<_IteratorL>& __x, | |
5832 | const reverse_iterator<_IteratorR>& __y) | |
5833 | { return __y < __x; } | |
5834 | ||
5835 | template<typename _IteratorL, typename _IteratorR> | |
5836 | inline bool | |
5837 | operator<=(const reverse_iterator<_IteratorL>& __x, | |
5838 | const reverse_iterator<_IteratorR>& __y) | |
5839 | { return !(__y < __x); } | |
5840 | ||
5841 | template<typename _IteratorL, typename _IteratorR> | |
5842 | inline bool | |
5843 | operator>=(const reverse_iterator<_IteratorL>& __x, | |
5844 | const reverse_iterator<_IteratorR>& __y) | |
5845 | { return !(__x < __y); } | |
5846 | ||
5847 | template<typename _IteratorL, typename _IteratorR> | |
5848 | inline typename reverse_iterator<_IteratorL>::difference_type | |
5849 | operator-(const reverse_iterator<_IteratorL>& __x, | |
5850 | const reverse_iterator<_IteratorR>& __y) | |
5851 | { return __y.base() - __x.base(); } | |
5852 | # 382 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5853 | template<typename _Container> | |
5854 | class back_insert_iterator | |
5855 | : public iterator<output_iterator_tag, void, void, void, void> | |
5856 | { | |
5857 | protected: | |
5858 | _Container* container; | |
5859 | ||
5860 | public: | |
5861 | ||
5862 | typedef _Container container_type; | |
5863 | ||
5864 | ||
5865 | explicit | |
5866 | back_insert_iterator(_Container& __x) : container(&__x) { } | |
5867 | # 408 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5868 | back_insert_iterator& | |
5869 | operator=(typename _Container::const_reference __value) | |
5870 | { | |
5871 | container->push_back(__value); | |
5872 | return *this; | |
5873 | } | |
5874 | ||
5875 | ||
5876 | back_insert_iterator& | |
5877 | operator*() | |
5878 | { return *this; } | |
5879 | ||
5880 | ||
5881 | back_insert_iterator& | |
5882 | operator++() | |
5883 | { return *this; } | |
5884 | ||
5885 | ||
5886 | back_insert_iterator | |
5887 | operator++(int) | |
5888 | { return *this; } | |
5889 | }; | |
5890 | # 442 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5891 | template<typename _Container> | |
5892 | inline back_insert_iterator<_Container> | |
5893 | back_inserter(_Container& __x) | |
5894 | { return back_insert_iterator<_Container>(__x); } | |
5895 | # 457 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5896 | template<typename _Container> | |
5897 | class front_insert_iterator | |
5898 | : public iterator<output_iterator_tag, void, void, void, void> | |
5899 | { | |
5900 | protected: | |
5901 | _Container* container; | |
5902 | ||
5903 | public: | |
5904 | ||
5905 | typedef _Container container_type; | |
5906 | ||
5907 | ||
5908 | explicit front_insert_iterator(_Container& __x) : container(&__x) { } | |
5909 | # 482 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5910 | front_insert_iterator& | |
5911 | operator=(typename _Container::const_reference __value) | |
5912 | { | |
5913 | container->push_front(__value); | |
5914 | return *this; | |
5915 | } | |
5916 | ||
5917 | ||
5918 | front_insert_iterator& | |
5919 | operator*() | |
5920 | { return *this; } | |
5921 | ||
5922 | ||
5923 | front_insert_iterator& | |
5924 | operator++() | |
5925 | { return *this; } | |
5926 | ||
5927 | ||
5928 | front_insert_iterator | |
5929 | operator++(int) | |
5930 | { return *this; } | |
5931 | }; | |
5932 | # 516 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5933 | template<typename _Container> | |
5934 | inline front_insert_iterator<_Container> | |
5935 | front_inserter(_Container& __x) | |
5936 | { return front_insert_iterator<_Container>(__x); } | |
5937 | # 535 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5938 | template<typename _Container> | |
5939 | class insert_iterator | |
5940 | : public iterator<output_iterator_tag, void, void, void, void> | |
5941 | { | |
5942 | protected: | |
5943 | _Container* container; | |
5944 | typename _Container::iterator iter; | |
5945 | ||
5946 | public: | |
5947 | ||
5948 | typedef _Container container_type; | |
5949 | ||
5950 | ||
5951 | ||
5952 | ||
5953 | ||
5954 | insert_iterator(_Container& __x, typename _Container::iterator __i) | |
5955 | : container(&__x), iter(__i) {} | |
5956 | # 577 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5957 | insert_iterator& | |
5958 | operator=(const typename _Container::const_reference __value) | |
5959 | { | |
5960 | iter = container->insert(iter, __value); | |
5961 | ++iter; | |
5962 | return *this; | |
5963 | } | |
5964 | ||
5965 | ||
5966 | insert_iterator& | |
5967 | operator*() | |
5968 | { return *this; } | |
5969 | ||
5970 | ||
5971 | insert_iterator& | |
5972 | operator++() | |
5973 | { return *this; } | |
5974 | ||
5975 | ||
5976 | insert_iterator& | |
5977 | operator++(int) | |
5978 | { return *this; } | |
5979 | }; | |
5980 | # 612 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
5981 | template<typename _Container, typename _Iterator> | |
5982 | inline insert_iterator<_Container> | |
5983 | inserter(_Container& __x, _Iterator __i) | |
5984 | { | |
5985 | return insert_iterator<_Container>(__x, | |
5986 | typename _Container::iterator(__i)); | |
5987 | } | |
5988 | } | |
5989 | ||
5990 | namespace __gnu_cxx | |
5991 | { | |
5992 | ||
5993 | ||
5994 | ||
5995 | ||
5996 | ||
5997 | ||
5998 | ||
5999 | using std::iterator_traits; | |
6000 | using std::iterator; | |
6001 | template<typename _Iterator, typename _Container> | |
6002 | class __normal_iterator | |
6003 | { | |
6004 | protected: | |
6005 | _Iterator _M_current; | |
6006 | ||
6007 | public: | |
6008 | typedef typename iterator_traits<_Iterator>::iterator_category | |
6009 | iterator_category; | |
6010 | typedef typename iterator_traits<_Iterator>::value_type value_type; | |
6011 | typedef typename iterator_traits<_Iterator>::difference_type | |
6012 | difference_type; | |
6013 | typedef typename iterator_traits<_Iterator>::reference reference; | |
6014 | typedef typename iterator_traits<_Iterator>::pointer pointer; | |
6015 | ||
6016 | __normal_iterator() : _M_current(_Iterator()) { } | |
6017 | ||
6018 | explicit | |
6019 | __normal_iterator(const _Iterator& __i) : _M_current(__i) { } | |
6020 | ||
6021 | ||
6022 | template<typename _Iter> | |
6023 | __normal_iterator(const __normal_iterator<_Iter, | |
6024 | typename std::__enable_if<_Container, | |
6025 | (std::__are_same<_Iter, | |
6026 | typename _Container::pointer>::__value) | |
6027 | >::__type>& __i) | |
6028 | : _M_current(__i.base()) { } | |
6029 | ||
6030 | ||
6031 | reference | |
6032 | operator*() const | |
6033 | { return *_M_current; } | |
6034 | ||
6035 | pointer | |
6036 | operator->() const | |
6037 | { return _M_current; } | |
6038 | ||
6039 | __normal_iterator& | |
6040 | operator++() | |
6041 | { | |
6042 | ++_M_current; | |
6043 | return *this; | |
6044 | } | |
6045 | ||
6046 | __normal_iterator | |
6047 | operator++(int) | |
6048 | { return __normal_iterator(_M_current++); } | |
6049 | ||
6050 | ||
6051 | __normal_iterator& | |
6052 | operator--() | |
6053 | { | |
6054 | --_M_current; | |
6055 | return *this; | |
6056 | } | |
6057 | ||
6058 | __normal_iterator | |
6059 | operator--(int) | |
6060 | { return __normal_iterator(_M_current--); } | |
6061 | ||
6062 | ||
6063 | reference | |
6064 | operator[](const difference_type& __n) const | |
6065 | { return _M_current[__n]; } | |
6066 | ||
6067 | __normal_iterator& | |
6068 | operator+=(const difference_type& __n) | |
6069 | { _M_current += __n; return *this; } | |
6070 | ||
6071 | __normal_iterator | |
6072 | operator+(const difference_type& __n) const | |
6073 | { return __normal_iterator(_M_current + __n); } | |
6074 | ||
6075 | __normal_iterator& | |
6076 | operator-=(const difference_type& __n) | |
6077 | { _M_current -= __n; return *this; } | |
6078 | ||
6079 | __normal_iterator | |
6080 | operator-(const difference_type& __n) const | |
6081 | { return __normal_iterator(_M_current - __n); } | |
6082 | ||
6083 | const _Iterator& | |
6084 | base() const | |
6085 | { return _M_current; } | |
6086 | }; | |
6087 | # 728 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_iterator.h" 3 | |
6088 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
6089 | inline bool | |
6090 | operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
6091 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
6092 | { return __lhs.base() == __rhs.base(); } | |
6093 | ||
6094 | template<typename _Iterator, typename _Container> | |
6095 | inline bool | |
6096 | operator==(const __normal_iterator<_Iterator, _Container>& __lhs, | |
6097 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
6098 | { return __lhs.base() == __rhs.base(); } | |
6099 | ||
6100 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
6101 | inline bool | |
6102 | operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
6103 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
6104 | { return __lhs.base() != __rhs.base(); } | |
6105 | ||
6106 | template<typename _Iterator, typename _Container> | |
6107 | inline bool | |
6108 | operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
6109 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
6110 | { return __lhs.base() != __rhs.base(); } | |
6111 | ||
6112 | ||
6113 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
6114 | inline bool | |
6115 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
6116 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
6117 | { return __lhs.base() < __rhs.base(); } | |
6118 | ||
6119 | template<typename _Iterator, typename _Container> | |
6120 | inline bool | |
6121 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs, | |
6122 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
6123 | { return __lhs.base() < __rhs.base(); } | |
6124 | ||
6125 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
6126 | inline bool | |
6127 | operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
6128 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
6129 | { return __lhs.base() > __rhs.base(); } | |
6130 | ||
6131 | template<typename _Iterator, typename _Container> | |
6132 | inline bool | |
6133 | operator>(const __normal_iterator<_Iterator, _Container>& __lhs, | |
6134 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
6135 | { return __lhs.base() > __rhs.base(); } | |
6136 | ||
6137 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
6138 | inline bool | |
6139 | operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
6140 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
6141 | { return __lhs.base() <= __rhs.base(); } | |
6142 | ||
6143 | template<typename _Iterator, typename _Container> | |
6144 | inline bool | |
6145 | operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
6146 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
6147 | { return __lhs.base() <= __rhs.base(); } | |
6148 | ||
6149 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
6150 | inline bool | |
6151 | operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
6152 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
6153 | { return __lhs.base() >= __rhs.base(); } | |
6154 | ||
6155 | template<typename _Iterator, typename _Container> | |
6156 | inline bool | |
6157 | operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
6158 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
6159 | { return __lhs.base() >= __rhs.base(); } | |
6160 | ||
6161 | ||
6162 | ||
6163 | ||
6164 | ||
6165 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
6166 | inline typename __normal_iterator<_IteratorL, _Container>::difference_type | |
6167 | operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
6168 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
6169 | { return __lhs.base() - __rhs.base(); } | |
6170 | ||
6171 | template<typename _Iterator, typename _Container> | |
6172 | inline __normal_iterator<_Iterator, _Container> | |
6173 | operator+(typename __normal_iterator<_Iterator, _Container>::difference_type | |
6174 | __n, const __normal_iterator<_Iterator, _Container>& __i) | |
6175 | { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } | |
6176 | } | |
6177 | # 75 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
6178 | ||
6179 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/debug/debug.h" 1 3 | |
6180 | # 77 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 2 3 | |
6181 | ||
6182 | namespace std | |
6183 | { | |
6184 | # 90 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6185 | template<typename _Tp> | |
6186 | inline void | |
6187 | swap(_Tp& __a, _Tp& __b) | |
6188 | { | |
6189 | ||
6190 | ||
6191 | ||
6192 | _Tp __tmp = __a; | |
6193 | __a = __b; | |
6194 | __b = __tmp; | |
6195 | } | |
6196 | ||
6197 | ||
6198 | ||
6199 | ||
6200 | template<bool _BoolType> | |
6201 | struct __iter_swap | |
6202 | { | |
6203 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
6204 | static void | |
6205 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
6206 | { | |
6207 | typedef typename iterator_traits<_ForwardIterator1>::value_type | |
6208 | _ValueType1; | |
6209 | _ValueType1 __tmp = *__a; | |
6210 | *__a = *__b; | |
6211 | *__b = __tmp; | |
6212 | } | |
6213 | }; | |
6214 | ||
6215 | template<> | |
6216 | struct __iter_swap<true> | |
6217 | { | |
6218 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
6219 | static void | |
6220 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
6221 | { | |
6222 | swap(*__a, *__b); | |
6223 | } | |
6224 | }; | |
6225 | # 140 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6226 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
6227 | inline void | |
6228 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
6229 | { | |
6230 | typedef typename iterator_traits<_ForwardIterator1>::value_type | |
6231 | _ValueType1; | |
6232 | typedef typename iterator_traits<_ForwardIterator2>::value_type | |
6233 | _ValueType2; | |
6234 | ||
6235 | ||
6236 | ||
6237 | ||
6238 | ||
6239 | ||
6240 | ||
6241 | ||
6242 | ||
6243 | ||
6244 | ||
6245 | typedef typename iterator_traits<_ForwardIterator1>::reference | |
6246 | _ReferenceType1; | |
6247 | typedef typename iterator_traits<_ForwardIterator2>::reference | |
6248 | _ReferenceType2; | |
6249 | std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && | |
6250 | __are_same<_ValueType1 &, _ReferenceType1>::__value && | |
6251 | __are_same<_ValueType2 &, _ReferenceType2>::__value>:: | |
6252 | iter_swap(__a, __b); | |
6253 | } | |
6254 | # 182 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6255 | template<typename _Tp> | |
6256 | inline const _Tp& | |
6257 | min(const _Tp& __a, const _Tp& __b) | |
6258 | { | |
6259 | ||
6260 | ||
6261 | ||
6262 | if (__b < __a) | |
6263 | return __b; | |
6264 | return __a; | |
6265 | } | |
6266 | # 204 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6267 | template<typename _Tp> | |
6268 | inline const _Tp& | |
6269 | max(const _Tp& __a, const _Tp& __b) | |
6270 | { | |
6271 | ||
6272 | ||
6273 | ||
6274 | if (__a < __b) | |
6275 | return __b; | |
6276 | return __a; | |
6277 | } | |
6278 | # 226 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6279 | template<typename _Tp, typename _Compare> | |
6280 | inline const _Tp& | |
6281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | |
6282 | { | |
6283 | ||
6284 | if (__comp(__b, __a)) | |
6285 | return __b; | |
6286 | return __a; | |
6287 | } | |
6288 | # 246 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6289 | template<typename _Tp, typename _Compare> | |
6290 | inline const _Tp& | |
6291 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | |
6292 | { | |
6293 | ||
6294 | if (__comp(__a, __b)) | |
6295 | return __b; | |
6296 | return __a; | |
6297 | } | |
6298 | ||
6299 | ||
6300 | ||
6301 | ||
6302 | ||
6303 | ||
6304 | ||
6305 | template<bool, typename> | |
6306 | struct __copy | |
6307 | { | |
6308 | template<typename _II, typename _OI> | |
6309 | static _OI | |
6310 | copy(_II __first, _II __last, _OI __result) | |
6311 | { | |
6312 | for (; __first != __last; ++__result, ++__first) | |
6313 | *__result = *__first; | |
6314 | return __result; | |
6315 | } | |
6316 | }; | |
6317 | ||
6318 | template<bool _BoolType> | |
6319 | struct __copy<_BoolType, random_access_iterator_tag> | |
6320 | { | |
6321 | template<typename _II, typename _OI> | |
6322 | static _OI | |
6323 | copy(_II __first, _II __last, _OI __result) | |
6324 | { | |
6325 | typedef typename iterator_traits<_II>::difference_type _Distance; | |
6326 | for(_Distance __n = __last - __first; __n > 0; --__n) | |
6327 | { | |
6328 | *__result = *__first; | |
6329 | ++__first; | |
6330 | ++__result; | |
6331 | } | |
6332 | return __result; | |
6333 | } | |
6334 | }; | |
6335 | ||
6336 | template<> | |
6337 | struct __copy<true, random_access_iterator_tag> | |
6338 | { | |
6339 | template<typename _Tp> | |
6340 | static _Tp* | |
6341 | copy(const _Tp* __first, const _Tp* __last, _Tp* __result) | |
6342 | { | |
6343 | std::memmove(__result, __first, sizeof(_Tp) * (__last - __first)); | |
6344 | return __result + (__last - __first); | |
6345 | } | |
6346 | }; | |
6347 | ||
6348 | template<typename _II, typename _OI> | |
6349 | inline _OI | |
6350 | __copy_aux(_II __first, _II __last, _OI __result) | |
6351 | { | |
6352 | typedef typename iterator_traits<_II>::value_type _ValueTypeI; | |
6353 | typedef typename iterator_traits<_OI>::value_type _ValueTypeO; | |
6354 | typedef typename iterator_traits<_II>::iterator_category _Category; | |
6355 | const bool __simple = (__is_scalar<_ValueTypeI>::__value | |
6356 | && __is_pointer<_II>::__value | |
6357 | && __is_pointer<_OI>::__value | |
6358 | && __are_same<_ValueTypeI, _ValueTypeO>::__value); | |
6359 | ||
6360 | return std::__copy<__simple, _Category>::copy(__first, __last, __result); | |
6361 | } | |
6362 | ||
6363 | template<bool, bool> | |
6364 | struct __copy_normal | |
6365 | { | |
6366 | template<typename _II, typename _OI> | |
6367 | static _OI | |
6368 | copy_n(_II __first, _II __last, _OI __result) | |
6369 | { return std::__copy_aux(__first, __last, __result); } | |
6370 | }; | |
6371 | ||
6372 | template<> | |
6373 | struct __copy_normal<true, false> | |
6374 | { | |
6375 | template<typename _II, typename _OI> | |
6376 | static _OI | |
6377 | copy_n(_II __first, _II __last, _OI __result) | |
6378 | { return std::__copy_aux(__first.base(), __last.base(), __result); } | |
6379 | }; | |
6380 | ||
6381 | template<> | |
6382 | struct __copy_normal<false, true> | |
6383 | { | |
6384 | template<typename _II, typename _OI> | |
6385 | static _OI | |
6386 | copy_n(_II __first, _II __last, _OI __result) | |
6387 | { return _OI(std::__copy_aux(__first, __last, __result.base())); } | |
6388 | }; | |
6389 | ||
6390 | template<> | |
6391 | struct __copy_normal<true, true> | |
6392 | { | |
6393 | template<typename _II, typename _OI> | |
6394 | static _OI | |
6395 | copy_n(_II __first, _II __last, _OI __result) | |
6396 | { return _OI(std::__copy_aux(__first.base(), __last.base(), | |
6397 | __result.base())); } | |
6398 | }; | |
6399 | # 373 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6400 | template<typename _InputIterator, typename _OutputIterator> | |
6401 | inline _OutputIterator | |
6402 | copy(_InputIterator __first, _InputIterator __last, | |
6403 | _OutputIterator __result) | |
6404 | { | |
6405 | ||
6406 | ||
6407 | ||
6408 | ||
6409 | ; | |
6410 | ||
6411 | const bool __in = __is_normal_iterator<_InputIterator>::__value; | |
6412 | const bool __out = __is_normal_iterator<_OutputIterator>::__value; | |
6413 | return std::__copy_normal<__in, __out>::copy_n(__first, __last, | |
6414 | __result); | |
6415 | } | |
6416 | ||
6417 | template<bool, typename> | |
6418 | struct __copy_backward | |
6419 | { | |
6420 | template<typename _BI1, typename _BI2> | |
6421 | static _BI2 | |
6422 | copy_b(_BI1 __first, _BI1 __last, _BI2 __result) | |
6423 | { | |
6424 | while (__first != __last) | |
6425 | *--__result = *--__last; | |
6426 | return __result; | |
6427 | } | |
6428 | }; | |
6429 | ||
6430 | template<bool _BoolType> | |
6431 | struct __copy_backward<_BoolType, random_access_iterator_tag> | |
6432 | { | |
6433 | template<typename _BI1, typename _BI2> | |
6434 | static _BI2 | |
6435 | copy_b(_BI1 __first, _BI1 __last, _BI2 __result) | |
6436 | { | |
6437 | typename iterator_traits<_BI1>::difference_type __n; | |
6438 | for (__n = __last - __first; __n > 0; --__n) | |
6439 | *--__result = *--__last; | |
6440 | return __result; | |
6441 | } | |
6442 | }; | |
6443 | ||
6444 | template<> | |
6445 | struct __copy_backward<true, random_access_iterator_tag> | |
6446 | { | |
6447 | template<typename _Tp> | |
6448 | static _Tp* | |
6449 | copy_b(const _Tp* __first, const _Tp* __last, _Tp* __result) | |
6450 | { | |
6451 | const ptrdiff_t _Num = __last - __first; | |
6452 | std::memmove(__result - _Num, __first, sizeof(_Tp) * _Num); | |
6453 | return __result - _Num; | |
6454 | } | |
6455 | }; | |
6456 | ||
6457 | template<typename _BI1, typename _BI2> | |
6458 | inline _BI2 | |
6459 | __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result) | |
6460 | { | |
6461 | typedef typename iterator_traits<_BI1>::value_type _ValueType1; | |
6462 | typedef typename iterator_traits<_BI2>::value_type _ValueType2; | |
6463 | typedef typename iterator_traits<_BI1>::iterator_category _Category; | |
6464 | const bool __simple = (__is_scalar<_ValueType1>::__value | |
6465 | && __is_pointer<_BI1>::__value | |
6466 | && __is_pointer<_BI2>::__value | |
6467 | && __are_same<_ValueType1, _ValueType2>::__value); | |
6468 | ||
6469 | return std::__copy_backward<__simple, _Category>::copy_b(__first, __last, | |
6470 | __result); | |
6471 | } | |
6472 | ||
6473 | template<bool, bool> | |
6474 | struct __copy_backward_normal | |
6475 | { | |
6476 | template<typename _BI1, typename _BI2> | |
6477 | static _BI2 | |
6478 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
6479 | { return std::__copy_backward_aux(__first, __last, __result); } | |
6480 | }; | |
6481 | ||
6482 | template<> | |
6483 | struct __copy_backward_normal<true, false> | |
6484 | { | |
6485 | template<typename _BI1, typename _BI2> | |
6486 | static _BI2 | |
6487 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
6488 | { return std::__copy_backward_aux(__first.base(), __last.base(), | |
6489 | __result); } | |
6490 | }; | |
6491 | ||
6492 | template<> | |
6493 | struct __copy_backward_normal<false, true> | |
6494 | { | |
6495 | template<typename _BI1, typename _BI2> | |
6496 | static _BI2 | |
6497 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
6498 | { return _BI2(std::__copy_backward_aux(__first, __last, | |
6499 | __result.base())); } | |
6500 | }; | |
6501 | ||
6502 | template<> | |
6503 | struct __copy_backward_normal<true, true> | |
6504 | { | |
6505 | template<typename _BI1, typename _BI2> | |
6506 | static _BI2 | |
6507 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
6508 | { return _BI2(std::__copy_backward_aux(__first.base(), __last.base(), | |
6509 | __result.base())); } | |
6510 | }; | |
6511 | # 502 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6512 | template <typename _BI1, typename _BI2> | |
6513 | inline _BI2 | |
6514 | copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) | |
6515 | { | |
6516 | ||
6517 | ||
6518 | ||
6519 | ||
6520 | ||
6521 | ||
6522 | ; | |
6523 | ||
6524 | const bool __bi1 = __is_normal_iterator<_BI1>::__value; | |
6525 | const bool __bi2 = __is_normal_iterator<_BI2>::__value; | |
6526 | return std::__copy_backward_normal<__bi1, __bi2>::copy_b_n(__first, __last, | |
6527 | __result); | |
6528 | } | |
6529 | ||
6530 | template<bool> | |
6531 | struct __fill | |
6532 | { | |
6533 | template<typename _ForwardIterator, typename _Tp> | |
6534 | static void | |
6535 | fill(_ForwardIterator __first, _ForwardIterator __last, | |
6536 | const _Tp& __value) | |
6537 | { | |
6538 | for (; __first != __last; ++__first) | |
6539 | *__first = __value; | |
6540 | } | |
6541 | }; | |
6542 | ||
6543 | template<> | |
6544 | struct __fill<true> | |
6545 | { | |
6546 | template<typename _ForwardIterator, typename _Tp> | |
6547 | static void | |
6548 | fill(_ForwardIterator __first, _ForwardIterator __last, | |
6549 | const _Tp& __value) | |
6550 | { | |
6551 | const _Tp __tmp = __value; | |
6552 | for (; __first != __last; ++__first) | |
6553 | *__first = __tmp; | |
6554 | } | |
6555 | }; | |
6556 | # 558 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6557 | template<typename _ForwardIterator, typename _Tp> | |
6558 | void | |
6559 | fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) | |
6560 | { | |
6561 | ||
6562 | ||
6563 | ||
6564 | ; | |
6565 | ||
6566 | const bool __scalar = __is_scalar<_Tp>::__value; | |
6567 | std::__fill<__scalar>::fill(__first, __last, __value); | |
6568 | } | |
6569 | ||
6570 | ||
6571 | inline void | |
6572 | fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c) | |
6573 | { | |
6574 | ; | |
6575 | const unsigned char __tmp = __c; | |
6576 | std::memset(__first, __tmp, __last - __first); | |
6577 | } | |
6578 | ||
6579 | inline void | |
6580 | fill(signed char* __first, signed char* __last, const signed char& __c) | |
6581 | { | |
6582 | ; | |
6583 | const signed char __tmp = __c; | |
6584 | std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first); | |
6585 | } | |
6586 | ||
6587 | inline void | |
6588 | fill(char* __first, char* __last, const char& __c) | |
6589 | { | |
6590 | ; | |
6591 | const char __tmp = __c; | |
6592 | std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first); | |
6593 | } | |
6594 | ||
6595 | template<bool> | |
6596 | struct __fill_n | |
6597 | { | |
6598 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
6599 | static _OutputIterator | |
6600 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
6601 | { | |
6602 | for (; __n > 0; --__n, ++__first) | |
6603 | *__first = __value; | |
6604 | return __first; | |
6605 | } | |
6606 | }; | |
6607 | ||
6608 | template<> | |
6609 | struct __fill_n<true> | |
6610 | { | |
6611 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
6612 | static _OutputIterator | |
6613 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
6614 | { | |
6615 | const _Tp __tmp = __value; | |
6616 | for (; __n > 0; --__n, ++__first) | |
6617 | *__first = __tmp; | |
6618 | return __first; | |
6619 | } | |
6620 | }; | |
6621 | # 634 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6622 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
6623 | _OutputIterator | |
6624 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
6625 | { | |
6626 | ||
6627 | ||
6628 | ||
6629 | const bool __scalar = __is_scalar<_Tp>::__value; | |
6630 | return std::__fill_n<__scalar>::fill_n(__first, __n, __value); | |
6631 | } | |
6632 | ||
6633 | template<typename _Size> | |
6634 | inline unsigned char* | |
6635 | fill_n(unsigned char* __first, _Size __n, const unsigned char& __c) | |
6636 | { | |
6637 | std::fill(__first, __first + __n, __c); | |
6638 | return __first + __n; | |
6639 | } | |
6640 | ||
6641 | template<typename _Size> | |
6642 | inline signed char* | |
6643 | fill_n(char* __first, _Size __n, const signed char& __c) | |
6644 | { | |
6645 | std::fill(__first, __first + __n, __c); | |
6646 | return __first + __n; | |
6647 | } | |
6648 | ||
6649 | template<typename _Size> | |
6650 | inline char* | |
6651 | fill_n(char* __first, _Size __n, const char& __c) | |
6652 | { | |
6653 | std::fill(__first, __first + __n, __c); | |
6654 | return __first + __n; | |
6655 | } | |
6656 | # 681 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6657 | template<typename _InputIterator1, typename _InputIterator2> | |
6658 | pair<_InputIterator1, _InputIterator2> | |
6659 | mismatch(_InputIterator1 __first1, _InputIterator1 __last1, | |
6660 | _InputIterator2 __first2) | |
6661 | { | |
6662 | ||
6663 | ||
6664 | ||
6665 | ||
6666 | ||
6667 | ||
6668 | ; | |
6669 | ||
6670 | while (__first1 != __last1 && *__first1 == *__first2) | |
6671 | { | |
6672 | ++__first1; | |
6673 | ++__first2; | |
6674 | } | |
6675 | return pair<_InputIterator1, _InputIterator2>(__first1, __first2); | |
6676 | } | |
6677 | # 716 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6678 | template<typename _InputIterator1, typename _InputIterator2, | |
6679 | typename _BinaryPredicate> | |
6680 | pair<_InputIterator1, _InputIterator2> | |
6681 | mismatch(_InputIterator1 __first1, _InputIterator1 __last1, | |
6682 | _InputIterator2 __first2, _BinaryPredicate __binary_pred) | |
6683 | { | |
6684 | ||
6685 | ||
6686 | ||
6687 | ; | |
6688 | ||
6689 | while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) | |
6690 | { | |
6691 | ++__first1; | |
6692 | ++__first2; | |
6693 | } | |
6694 | return pair<_InputIterator1, _InputIterator2>(__first1, __first2); | |
6695 | } | |
6696 | # 746 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6697 | template<typename _InputIterator1, typename _InputIterator2> | |
6698 | inline bool | |
6699 | equal(_InputIterator1 __first1, _InputIterator1 __last1, | |
6700 | _InputIterator2 __first2) | |
6701 | { | |
6702 | ||
6703 | ||
6704 | ||
6705 | ||
6706 | ||
6707 | ||
6708 | ; | |
6709 | ||
6710 | for (; __first1 != __last1; ++__first1, ++__first2) | |
6711 | if (!(*__first1 == *__first2)) | |
6712 | return false; | |
6713 | return true; | |
6714 | } | |
6715 | # 778 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6716 | template<typename _InputIterator1, typename _InputIterator2, | |
6717 | typename _BinaryPredicate> | |
6718 | inline bool | |
6719 | equal(_InputIterator1 __first1, _InputIterator1 __last1, | |
6720 | _InputIterator2 __first2, | |
6721 | _BinaryPredicate __binary_pred) | |
6722 | { | |
6723 | ||
6724 | ||
6725 | ||
6726 | ; | |
6727 | ||
6728 | for (; __first1 != __last1; ++__first1, ++__first2) | |
6729 | if (!__binary_pred(*__first1, *__first2)) | |
6730 | return false; | |
6731 | return true; | |
6732 | } | |
6733 | # 810 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6734 | template<typename _InputIterator1, typename _InputIterator2> | |
6735 | bool | |
6736 | lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, | |
6737 | _InputIterator2 __first2, _InputIterator2 __last2) | |
6738 | { | |
6739 | ||
6740 | ||
6741 | ||
6742 | ||
6743 | ||
6744 | ||
6745 | ||
6746 | ||
6747 | ||
6748 | ; | |
6749 | ; | |
6750 | ||
6751 | for (; __first1 != __last1 && __first2 != __last2; | |
6752 | ++__first1, ++__first2) | |
6753 | { | |
6754 | if (*__first1 < *__first2) | |
6755 | return true; | |
6756 | if (*__first2 < *__first1) | |
6757 | return false; | |
6758 | } | |
6759 | return __first1 == __last1 && __first2 != __last2; | |
6760 | } | |
6761 | # 850 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algobase.h" 3 | |
6762 | template<typename _InputIterator1, typename _InputIterator2, | |
6763 | typename _Compare> | |
6764 | bool | |
6765 | lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, | |
6766 | _InputIterator2 __first2, _InputIterator2 __last2, | |
6767 | _Compare __comp) | |
6768 | { | |
6769 | ||
6770 | ||
6771 | ||
6772 | ; | |
6773 | ; | |
6774 | ||
6775 | for (; __first1 != __last1 && __first2 != __last2; | |
6776 | ++__first1, ++__first2) | |
6777 | { | |
6778 | if (__comp(*__first1, *__first2)) | |
6779 | return true; | |
6780 | if (__comp(*__first2, *__first1)) | |
6781 | return false; | |
6782 | } | |
6783 | return __first1 == __last1 && __first2 != __last2; | |
6784 | } | |
6785 | ||
6786 | inline bool | |
6787 | lexicographical_compare(const unsigned char* __first1, | |
6788 | const unsigned char* __last1, | |
6789 | const unsigned char* __first2, | |
6790 | const unsigned char* __last2) | |
6791 | { | |
6792 | ; | |
6793 | ; | |
6794 | ||
6795 | const size_t __len1 = __last1 - __first1; | |
6796 | const size_t __len2 = __last2 - __first2; | |
6797 | const int __result = std::memcmp(__first1, __first2, | |
6798 | std::min(__len1, __len2)); | |
6799 | return __result != 0 ? __result < 0 : __len1 < __len2; | |
6800 | } | |
6801 | ||
6802 | inline bool | |
6803 | lexicographical_compare(const char* __first1, const char* __last1, | |
6804 | const char* __first2, const char* __last2) | |
6805 | { | |
6806 | ; | |
6807 | ; | |
6808 | ||
6809 | ||
6810 | return std::lexicographical_compare((const signed char*) __first1, | |
6811 | (const signed char*) __last1, | |
6812 | (const signed char*) __first2, | |
6813 | (const signed char*) __last2); | |
6814 | ||
6815 | ||
6816 | ||
6817 | ||
6818 | ||
6819 | ||
6820 | } | |
6821 | ||
6822 | } | |
6823 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
6824 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/allocator.h" 1 3 | |
6825 | # 52 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/allocator.h" 3 | |
6826 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++allocator.h" 1 3 | |
6827 | # 34 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++allocator.h" 3 | |
6828 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ext/new_allocator.h" 1 3 | |
6829 | # 37 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ext/new_allocator.h" 3 | |
6830 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/new" 1 3 | |
6831 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/new" 3 | |
6832 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/exception" 1 3 | |
6833 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/exception" 3 | |
6834 | #pragma GCC visibility push(default) | |
6835 | ||
6836 | extern "C++" { | |
6837 | ||
6838 | namespace std | |
6839 | { | |
6840 | # 54 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/exception" 3 | |
6841 | class exception | |
6842 | { | |
6843 | public: | |
6844 | exception() throw() { } | |
6845 | virtual ~exception() throw(); | |
6846 | ||
6847 | ||
6848 | virtual const char* what() const throw(); | |
6849 | }; | |
6850 | ||
6851 | ||
6852 | ||
6853 | class bad_exception : public exception | |
6854 | { | |
6855 | public: | |
6856 | bad_exception() throw() { } | |
6857 | ||
6858 | ||
6859 | virtual ~bad_exception() throw(); | |
6860 | }; | |
6861 | ||
6862 | ||
6863 | typedef void (*terminate_handler) (); | |
6864 | ||
6865 | typedef void (*unexpected_handler) (); | |
6866 | ||
6867 | ||
6868 | terminate_handler set_terminate(terminate_handler) throw(); | |
6869 | ||
6870 | ||
6871 | void terminate() __attribute__ ((__noreturn__)); | |
6872 | ||
6873 | ||
6874 | unexpected_handler set_unexpected(unexpected_handler) throw(); | |
6875 | ||
6876 | ||
6877 | void unexpected() __attribute__ ((__noreturn__)); | |
6878 | # 102 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/exception" 3 | |
6879 | bool uncaught_exception() throw(); | |
6880 | } | |
6881 | ||
6882 | namespace __gnu_cxx | |
6883 | { | |
6884 | # 117 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/exception" 3 | |
6885 | void __verbose_terminate_handler (); | |
6886 | } | |
6887 | ||
6888 | } | |
6889 | ||
6890 | #pragma GCC visibility pop | |
6891 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/new" 2 3 | |
6892 | ||
6893 | #pragma GCC visibility push(default) | |
6894 | ||
6895 | extern "C++" { | |
6896 | ||
6897 | namespace std | |
6898 | { | |
6899 | ||
6900 | ||
6901 | ||
6902 | ||
6903 | ||
6904 | class bad_alloc : public exception | |
6905 | { | |
6906 | public: | |
6907 | bad_alloc() throw() { } | |
6908 | ||
6909 | ||
6910 | virtual ~bad_alloc() throw(); | |
6911 | }; | |
6912 | ||
6913 | struct nothrow_t { }; | |
6914 | extern const nothrow_t nothrow; | |
6915 | ||
6916 | ||
6917 | typedef void (*new_handler)(); | |
6918 | ||
6919 | new_handler set_new_handler(new_handler) throw(); | |
6920 | } | |
6921 | # 84 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/new" 3 | |
6922 | void* operator new(std::size_t) throw (std::bad_alloc); | |
6923 | void* operator new[](std::size_t) throw (std::bad_alloc); | |
6924 | void operator delete(void*) throw(); | |
6925 | void operator delete[](void*) throw(); | |
6926 | void* operator new(std::size_t, const std::nothrow_t&) throw(); | |
6927 | void* operator new[](std::size_t, const std::nothrow_t&) throw(); | |
6928 | void operator delete(void*, const std::nothrow_t&) throw(); | |
6929 | void operator delete[](void*, const std::nothrow_t&) throw(); | |
6930 | ||
6931 | ||
6932 | inline void* operator new(std::size_t, void* __p) throw() { return __p; } | |
6933 | inline void* operator new[](std::size_t, void* __p) throw() { return __p; } | |
6934 | ||
6935 | ||
6936 | inline void operator delete (void*, void*) throw() { } | |
6937 | inline void operator delete[](void*, void*) throw() { } | |
6938 | ||
6939 | } | |
6940 | ||
6941 | #pragma GCC visibility pop | |
6942 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ext/new_allocator.h" 2 3 | |
6943 | ||
6944 | ||
6945 | namespace __gnu_cxx | |
6946 | { | |
6947 | ||
6948 | ||
6949 | ||
6950 | ||
6951 | ||
6952 | ||
6953 | ||
6954 | template<typename _Tp> | |
6955 | class new_allocator | |
6956 | { | |
6957 | public: | |
6958 | typedef size_t size_type; | |
6959 | typedef ptrdiff_t difference_type; | |
6960 | typedef _Tp* pointer; | |
6961 | typedef const _Tp* const_pointer; | |
6962 | typedef _Tp& reference; | |
6963 | typedef const _Tp& const_reference; | |
6964 | typedef _Tp value_type; | |
6965 | ||
6966 | template<typename _Tp1> | |
6967 | struct rebind | |
6968 | { typedef new_allocator<_Tp1> other; }; | |
6969 | ||
6970 | new_allocator() throw() { } | |
6971 | ||
6972 | new_allocator(const new_allocator&) throw() { } | |
6973 | ||
6974 | template<typename _Tp1> | |
6975 | new_allocator(const new_allocator<_Tp1>&) throw() { } | |
6976 | ||
6977 | ~new_allocator() throw() { } | |
6978 | ||
6979 | pointer | |
6980 | address(reference __x) const { return &__x; } | |
6981 | ||
6982 | const_pointer | |
6983 | address(const_reference __x) const { return &__x; } | |
6984 | ||
6985 | ||
6986 | ||
6987 | pointer | |
6988 | allocate(size_type __n, const void* = 0) | |
6989 | { | |
6990 | if (__builtin_expect(__n > this->max_size(), false)) | |
6991 | std::__throw_bad_alloc(); | |
6992 | ||
6993 | return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); | |
6994 | } | |
6995 | ||
6996 | ||
6997 | void | |
6998 | deallocate(pointer __p, size_type) | |
6999 | { ::operator delete(__p); } | |
7000 | ||
7001 | size_type | |
7002 | max_size() const throw() | |
7003 | { return size_t(-1) / sizeof(_Tp); } | |
7004 | ||
7005 | ||
7006 | ||
7007 | void | |
7008 | construct(pointer __p, const _Tp& __val) | |
7009 | { ::new(__p) _Tp(__val); } | |
7010 | ||
7011 | void | |
7012 | destroy(pointer __p) { __p->~_Tp(); } | |
7013 | }; | |
7014 | ||
7015 | template<typename _Tp> | |
7016 | inline bool | |
7017 | operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) | |
7018 | { return true; } | |
7019 | ||
7020 | template<typename _Tp> | |
7021 | inline bool | |
7022 | operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) | |
7023 | { return false; } | |
7024 | } | |
7025 | # 35 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/c++allocator.h" 2 3 | |
7026 | # 53 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/allocator.h" 2 3 | |
7027 | ||
7028 | namespace std | |
7029 | { | |
7030 | template<typename _Tp> | |
7031 | class allocator; | |
7032 | ||
7033 | ||
7034 | template<> | |
7035 | class allocator<void> | |
7036 | { | |
7037 | public: | |
7038 | typedef size_t size_type; | |
7039 | typedef ptrdiff_t difference_type; | |
7040 | typedef void* pointer; | |
7041 | typedef const void* const_pointer; | |
7042 | typedef void value_type; | |
7043 | ||
7044 | template<typename _Tp1> | |
7045 | struct rebind | |
7046 | { typedef allocator<_Tp1> other; }; | |
7047 | }; | |
7048 | ||
7049 | ||
7050 | ||
7051 | ||
7052 | ||
7053 | ||
7054 | ||
7055 | template<typename _Tp> | |
7056 | class allocator: public __gnu_cxx::new_allocator<_Tp> | |
7057 | { | |
7058 | public: | |
7059 | typedef size_t size_type; | |
7060 | typedef ptrdiff_t difference_type; | |
7061 | typedef _Tp* pointer; | |
7062 | typedef const _Tp* const_pointer; | |
7063 | typedef _Tp& reference; | |
7064 | typedef const _Tp& const_reference; | |
7065 | typedef _Tp value_type; | |
7066 | ||
7067 | template<typename _Tp1> | |
7068 | struct rebind | |
7069 | { typedef allocator<_Tp1> other; }; | |
7070 | ||
7071 | allocator() throw() { } | |
7072 | ||
7073 | allocator(const allocator& __a) throw() | |
7074 | : __gnu_cxx::new_allocator<_Tp>(__a) { } | |
7075 | ||
7076 | template<typename _Tp1> | |
7077 | allocator(const allocator<_Tp1>&) throw() { } | |
7078 | ||
7079 | ~allocator() throw() { } | |
7080 | ||
7081 | ||
7082 | }; | |
7083 | ||
7084 | template<typename _T1, typename _T2> | |
7085 | inline bool | |
7086 | operator==(const allocator<_T1>&, const allocator<_T2>&) | |
7087 | { return true; } | |
7088 | ||
7089 | template<typename _T1, typename _T2> | |
7090 | inline bool | |
7091 | operator!=(const allocator<_T1>&, const allocator<_T2>&) | |
7092 | { return false; } | |
7093 | ||
7094 | ||
7095 | ||
7096 | ||
7097 | ||
7098 | extern template class allocator<char>; | |
7099 | extern template class allocator<wchar_t>; | |
7100 | ||
7101 | ||
7102 | ||
7103 | ||
7104 | } | |
7105 | # 68 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
7106 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_construct.h" 1 3 | |
7107 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_construct.h" 3 | |
7108 | namespace std | |
7109 | { | |
7110 | ||
7111 | ||
7112 | ||
7113 | ||
7114 | ||
7115 | ||
7116 | template<typename _T1, typename _T2> | |
7117 | inline void | |
7118 | _Construct(_T1* __p, const _T2& __value) | |
7119 | { | |
7120 | ||
7121 | ||
7122 | ::new(static_cast<void*>(__p)) _T1(__value); | |
7123 | } | |
7124 | ||
7125 | ||
7126 | ||
7127 | ||
7128 | ||
7129 | ||
7130 | ||
7131 | template<typename _T1> | |
7132 | inline void | |
7133 | _Construct(_T1* __p) | |
7134 | { | |
7135 | ||
7136 | ||
7137 | ::new(static_cast<void*>(__p)) _T1(); | |
7138 | } | |
7139 | ||
7140 | ||
7141 | ||
7142 | ||
7143 | ||
7144 | ||
7145 | template<typename _Tp> | |
7146 | inline void | |
7147 | _Destroy(_Tp* __pointer) | |
7148 | { __pointer->~_Tp(); } | |
7149 | # 116 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_construct.h" 3 | |
7150 | template<typename _ForwardIterator> | |
7151 | inline void | |
7152 | __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, | |
7153 | __false_type) | |
7154 | { | |
7155 | for (; __first != __last; ++__first) | |
7156 | std::_Destroy(&*__first); | |
7157 | } | |
7158 | # 134 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_construct.h" 3 | |
7159 | template<typename _ForwardIterator> | |
7160 | inline void | |
7161 | __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) | |
7162 | { } | |
7163 | # 146 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_construct.h" 3 | |
7164 | template<typename _ForwardIterator> | |
7165 | inline void | |
7166 | _Destroy(_ForwardIterator __first, _ForwardIterator __last) | |
7167 | { | |
7168 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
7169 | _Value_type; | |
7170 | typedef typename std::__is_scalar<_Value_type>::__type | |
7171 | _Has_trivial_destructor; | |
7172 | ||
7173 | std::__destroy_aux(__first, __last, _Has_trivial_destructor()); | |
7174 | } | |
7175 | # 166 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_construct.h" 3 | |
7176 | template <typename _Tp> class allocator; | |
7177 | ||
7178 | template<typename _ForwardIterator, typename _Allocator> | |
7179 | void | |
7180 | _Destroy(_ForwardIterator __first, _ForwardIterator __last, | |
7181 | _Allocator __alloc) | |
7182 | { | |
7183 | for (; __first != __last; ++__first) | |
7184 | __alloc.destroy(&*__first); | |
7185 | } | |
7186 | ||
7187 | template<typename _ForwardIterator, typename _Tp> | |
7188 | inline void | |
7189 | _Destroy(_ForwardIterator __first, _ForwardIterator __last, | |
7190 | allocator<_Tp>) | |
7191 | { | |
7192 | _Destroy(__first, __last); | |
7193 | } | |
7194 | ||
7195 | ||
7196 | } | |
7197 | # 69 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
7198 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_uninitialized.h" 1 3 | |
7199 | # 66 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_uninitialized.h" 3 | |
7200 | namespace std | |
7201 | { | |
7202 | ||
7203 | template<typename _InputIterator, typename _ForwardIterator> | |
7204 | inline _ForwardIterator | |
7205 | __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, | |
7206 | _ForwardIterator __result, | |
7207 | __true_type) | |
7208 | { return std::copy(__first, __last, __result); } | |
7209 | ||
7210 | template<typename _InputIterator, typename _ForwardIterator> | |
7211 | inline _ForwardIterator | |
7212 | __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, | |
7213 | _ForwardIterator __result, | |
7214 | __false_type) | |
7215 | { | |
7216 | _ForwardIterator __cur = __result; | |
7217 | try | |
7218 | { | |
7219 | for (; __first != __last; ++__first, ++__cur) | |
7220 | std::_Construct(&*__cur, *__first); | |
7221 | return __cur; | |
7222 | } | |
7223 | catch(...) | |
7224 | { | |
7225 | std::_Destroy(__result, __cur); | |
7226 | throw; | |
7227 | } | |
7228 | } | |
7229 | # 105 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_uninitialized.h" 3 | |
7230 | template<typename _InputIterator, typename _ForwardIterator> | |
7231 | inline _ForwardIterator | |
7232 | uninitialized_copy(_InputIterator __first, _InputIterator __last, | |
7233 | _ForwardIterator __result) | |
7234 | { | |
7235 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
7236 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
7237 | return std::__uninitialized_copy_aux(__first, __last, __result, | |
7238 | _Is_POD()); | |
7239 | } | |
7240 | ||
7241 | inline char* | |
7242 | uninitialized_copy(const char* __first, const char* __last, char* __result) | |
7243 | { | |
7244 | std::memmove(__result, __first, __last - __first); | |
7245 | return __result + (__last - __first); | |
7246 | } | |
7247 | ||
7248 | inline wchar_t* | |
7249 | uninitialized_copy(const wchar_t* __first, const wchar_t* __last, | |
7250 | wchar_t* __result) | |
7251 | { | |
7252 | std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); | |
7253 | return __result + (__last - __first); | |
7254 | } | |
7255 | ||
7256 | ||
7257 | ||
7258 | template<typename _ForwardIterator, typename _Tp> | |
7259 | inline void | |
7260 | __uninitialized_fill_aux(_ForwardIterator __first, | |
7261 | _ForwardIterator __last, | |
7262 | const _Tp& __x, __true_type) | |
7263 | { std::fill(__first, __last, __x); } | |
7264 | ||
7265 | template<typename _ForwardIterator, typename _Tp> | |
7266 | void | |
7267 | __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, | |
7268 | const _Tp& __x, __false_type) | |
7269 | { | |
7270 | _ForwardIterator __cur = __first; | |
7271 | try | |
7272 | { | |
7273 | for (; __cur != __last; ++__cur) | |
7274 | std::_Construct(&*__cur, __x); | |
7275 | } | |
7276 | catch(...) | |
7277 | { | |
7278 | std::_Destroy(__first, __cur); | |
7279 | throw; | |
7280 | } | |
7281 | } | |
7282 | # 167 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_uninitialized.h" 3 | |
7283 | template<typename _ForwardIterator, typename _Tp> | |
7284 | inline void | |
7285 | uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, | |
7286 | const _Tp& __x) | |
7287 | { | |
7288 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
7289 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
7290 | std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD()); | |
7291 | } | |
7292 | ||
7293 | ||
7294 | ||
7295 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
7296 | inline void | |
7297 | __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, | |
7298 | const _Tp& __x, __true_type) | |
7299 | { std::fill_n(__first, __n, __x); } | |
7300 | ||
7301 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
7302 | void | |
7303 | __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, | |
7304 | const _Tp& __x, __false_type) | |
7305 | { | |
7306 | _ForwardIterator __cur = __first; | |
7307 | try | |
7308 | { | |
7309 | for (; __n > 0; --__n, ++__cur) | |
7310 | std::_Construct(&*__cur, __x); | |
7311 | } | |
7312 | catch(...) | |
7313 | { | |
7314 | std::_Destroy(__first, __cur); | |
7315 | throw; | |
7316 | } | |
7317 | } | |
7318 | # 212 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_uninitialized.h" 3 | |
7319 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
7320 | inline void | |
7321 | uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) | |
7322 | { | |
7323 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
7324 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
7325 | std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); | |
7326 | } | |
7327 | ||
7328 | ||
7329 | ||
7330 | ||
7331 | ||
7332 | ||
7333 | ||
7334 | template<typename _InputIterator, typename _ForwardIterator, | |
7335 | typename _Allocator> | |
7336 | _ForwardIterator | |
7337 | __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, | |
7338 | _ForwardIterator __result, | |
7339 | _Allocator __alloc) | |
7340 | { | |
7341 | _ForwardIterator __cur = __result; | |
7342 | try | |
7343 | { | |
7344 | for (; __first != __last; ++__first, ++__cur) | |
7345 | __alloc.construct(&*__cur, *__first); | |
7346 | return __cur; | |
7347 | } | |
7348 | catch(...) | |
7349 | { | |
7350 | std::_Destroy(__result, __cur, __alloc); | |
7351 | throw; | |
7352 | } | |
7353 | } | |
7354 | ||
7355 | template<typename _InputIterator, typename _ForwardIterator, typename _Tp> | |
7356 | inline _ForwardIterator | |
7357 | __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, | |
7358 | _ForwardIterator __result, | |
7359 | allocator<_Tp>) | |
7360 | { | |
7361 | return std::uninitialized_copy(__first, __last, __result); | |
7362 | } | |
7363 | ||
7364 | template<typename _ForwardIterator, typename _Tp, typename _Allocator> | |
7365 | void | |
7366 | __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, | |
7367 | const _Tp& __x, _Allocator __alloc) | |
7368 | { | |
7369 | _ForwardIterator __cur = __first; | |
7370 | try | |
7371 | { | |
7372 | for (; __cur != __last; ++__cur) | |
7373 | __alloc.construct(&*__cur, __x); | |
7374 | } | |
7375 | catch(...) | |
7376 | { | |
7377 | std::_Destroy(__first, __cur, __alloc); | |
7378 | throw; | |
7379 | } | |
7380 | } | |
7381 | ||
7382 | template<typename _ForwardIterator, typename _Tp, typename _Tp2> | |
7383 | inline void | |
7384 | __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, | |
7385 | const _Tp& __x, allocator<_Tp2>) | |
7386 | { | |
7387 | std::uninitialized_fill(__first, __last, __x); | |
7388 | } | |
7389 | ||
7390 | template<typename _ForwardIterator, typename _Size, typename _Tp, | |
7391 | typename _Allocator> | |
7392 | void | |
7393 | __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, | |
7394 | const _Tp& __x, | |
7395 | _Allocator __alloc) | |
7396 | { | |
7397 | _ForwardIterator __cur = __first; | |
7398 | try | |
7399 | { | |
7400 | for (; __n > 0; --__n, ++__cur) | |
7401 | __alloc.construct(&*__cur, __x); | |
7402 | } | |
7403 | catch(...) | |
7404 | { | |
7405 | std::_Destroy(__first, __cur, __alloc); | |
7406 | throw; | |
7407 | } | |
7408 | } | |
7409 | ||
7410 | template<typename _ForwardIterator, typename _Size, typename _Tp, | |
7411 | typename _Tp2> | |
7412 | void | |
7413 | __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, | |
7414 | const _Tp& __x, | |
7415 | allocator<_Tp2>) | |
7416 | { | |
7417 | std::uninitialized_fill_n(__first, __n, __x); | |
7418 | } | |
7419 | # 323 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_uninitialized.h" 3 | |
7420 | template<typename _InputIterator1, typename _InputIterator2, | |
7421 | typename _ForwardIterator, typename _Allocator> | |
7422 | inline _ForwardIterator | |
7423 | __uninitialized_copy_copy(_InputIterator1 __first1, | |
7424 | _InputIterator1 __last1, | |
7425 | _InputIterator2 __first2, | |
7426 | _InputIterator2 __last2, | |
7427 | _ForwardIterator __result, | |
7428 | _Allocator __alloc) | |
7429 | { | |
7430 | _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, | |
7431 | __result, | |
7432 | __alloc); | |
7433 | try | |
7434 | { | |
7435 | return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); | |
7436 | } | |
7437 | catch(...) | |
7438 | { | |
7439 | std::_Destroy(__result, __mid, __alloc); | |
7440 | throw; | |
7441 | } | |
7442 | } | |
7443 | ||
7444 | ||
7445 | ||
7446 | ||
7447 | template<typename _ForwardIterator, typename _Tp, typename _InputIterator, | |
7448 | typename _Allocator> | |
7449 | inline _ForwardIterator | |
7450 | __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid, | |
7451 | const _Tp& __x, _InputIterator __first, | |
7452 | _InputIterator __last, | |
7453 | _Allocator __alloc) | |
7454 | { | |
7455 | std::__uninitialized_fill_a(__result, __mid, __x, __alloc); | |
7456 | try | |
7457 | { | |
7458 | return std::__uninitialized_copy_a(__first, __last, __mid, __alloc); | |
7459 | } | |
7460 | catch(...) | |
7461 | { | |
7462 | std::_Destroy(__result, __mid, __alloc); | |
7463 | throw; | |
7464 | } | |
7465 | } | |
7466 | ||
7467 | ||
7468 | ||
7469 | ||
7470 | template<typename _InputIterator, typename _ForwardIterator, typename _Tp, | |
7471 | typename _Allocator> | |
7472 | inline void | |
7473 | __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1, | |
7474 | _ForwardIterator __first2, | |
7475 | _ForwardIterator __last2, const _Tp& __x, | |
7476 | _Allocator __alloc) | |
7477 | { | |
7478 | _ForwardIterator __mid2 = std::__uninitialized_copy_a(__first1, __last1, | |
7479 | __first2, | |
7480 | __alloc); | |
7481 | try | |
7482 | { | |
7483 | std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); | |
7484 | } | |
7485 | catch(...) | |
7486 | { | |
7487 | std::_Destroy(__first2, __mid2, __alloc); | |
7488 | throw; | |
7489 | } | |
7490 | } | |
7491 | ||
7492 | } | |
7493 | # 70 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
7494 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 1 3 | |
7495 | # 68 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7496 | namespace std | |
7497 | { | |
7498 | ||
7499 | ||
7500 | ||
7501 | ||
7502 | ||
7503 | template<typename _Tp, typename _Alloc> | |
7504 | struct _Vector_base | |
7505 | { | |
7506 | typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; | |
7507 | ||
7508 | struct _Vector_impl | |
7509 | : public _Tp_alloc_type | |
7510 | { | |
7511 | _Tp* _M_start; | |
7512 | _Tp* _M_finish; | |
7513 | _Tp* _M_end_of_storage; | |
7514 | _Vector_impl(_Tp_alloc_type const& __a) | |
7515 | : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) | |
7516 | { } | |
7517 | }; | |
7518 | ||
7519 | public: | |
7520 | typedef _Alloc allocator_type; | |
7521 | ||
7522 | _Tp_alloc_type& | |
7523 | _M_get_Tp_allocator() | |
7524 | { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } | |
7525 | ||
7526 | const _Tp_alloc_type& | |
7527 | _M_get_Tp_allocator() const | |
7528 | { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); } | |
7529 | ||
7530 | allocator_type | |
7531 | get_allocator() const | |
7532 | { return _M_get_Tp_allocator(); } | |
7533 | ||
7534 | _Vector_base(const allocator_type& __a) | |
7535 | : _M_impl(__a) | |
7536 | { } | |
7537 | ||
7538 | _Vector_base(size_t __n, const allocator_type& __a) | |
7539 | : _M_impl(__a) | |
7540 | { | |
7541 | this->_M_impl._M_start = this->_M_allocate(__n); | |
7542 | this->_M_impl._M_finish = this->_M_impl._M_start; | |
7543 | this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; | |
7544 | } | |
7545 | ||
7546 | ~_Vector_base() | |
7547 | { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage | |
7548 | - this->_M_impl._M_start); } | |
7549 | ||
7550 | public: | |
7551 | _Vector_impl _M_impl; | |
7552 | ||
7553 | _Tp* | |
7554 | _M_allocate(size_t __n) | |
7555 | { return _M_impl.allocate(__n); } | |
7556 | ||
7557 | void | |
7558 | _M_deallocate(_Tp* __p, size_t __n) | |
7559 | { | |
7560 | if (__p) | |
7561 | _M_impl.deallocate(__p, __n); | |
7562 | } | |
7563 | }; | |
7564 | # 157 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7565 | template<typename _Tp, typename _Alloc = std::allocator<_Tp> > | |
7566 | class vector : protected _Vector_base<_Tp, _Alloc> | |
7567 | { | |
7568 | ||
7569 | typedef typename _Alloc::value_type _Alloc_value_type; | |
7570 | ||
7571 | ||
7572 | ||
7573 | typedef _Vector_base<_Tp, _Alloc> _Base; | |
7574 | typedef vector<_Tp, _Alloc> vector_type; | |
7575 | typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; | |
7576 | ||
7577 | public: | |
7578 | typedef _Tp value_type; | |
7579 | typedef typename _Tp_alloc_type::pointer pointer; | |
7580 | typedef typename _Tp_alloc_type::const_pointer const_pointer; | |
7581 | typedef typename _Tp_alloc_type::reference reference; | |
7582 | typedef typename _Tp_alloc_type::const_reference const_reference; | |
7583 | typedef __gnu_cxx::__normal_iterator<pointer, vector_type> iterator; | |
7584 | typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type> | |
7585 | const_iterator; | |
7586 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | |
7587 | typedef std::reverse_iterator<iterator> reverse_iterator; | |
7588 | typedef size_t size_type; | |
7589 | typedef ptrdiff_t difference_type; | |
7590 | typedef _Alloc allocator_type; | |
7591 | ||
7592 | protected: | |
7593 | ||
7594 | ||
7595 | ||
7596 | ||
7597 | ||
7598 | using _Base::_M_allocate; | |
7599 | using _Base::_M_deallocate; | |
7600 | using _Base::_M_impl; | |
7601 | using _Base::_M_get_Tp_allocator; | |
7602 | ||
7603 | public: | |
7604 | ||
7605 | ||
7606 | ||
7607 | ||
7608 | ||
7609 | explicit | |
7610 | vector(const allocator_type& __a = allocator_type()) | |
7611 | : _Base(__a) | |
7612 | { } | |
7613 | # 213 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7614 | explicit | |
7615 | vector(size_type __n, const value_type& __value = value_type(), | |
7616 | const allocator_type& __a = allocator_type()) | |
7617 | : _Base(__n, __a) | |
7618 | { | |
7619 | std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, | |
7620 | _M_get_Tp_allocator()); | |
7621 | this->_M_impl._M_finish = this->_M_impl._M_start + __n; | |
7622 | } | |
7623 | # 232 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7624 | vector(const vector& __x) | |
7625 | : _Base(__x.size(), __x.get_allocator()) | |
7626 | { this->_M_impl._M_finish = | |
7627 | std::__uninitialized_copy_a(__x.begin(), __x.end(), | |
7628 | this->_M_impl._M_start, | |
7629 | _M_get_Tp_allocator()); | |
7630 | } | |
7631 | # 255 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7632 | template<typename _InputIterator> | |
7633 | vector(_InputIterator __first, _InputIterator __last, | |
7634 | const allocator_type& __a = allocator_type()) | |
7635 | : _Base(__a) | |
7636 | { | |
7637 | ||
7638 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
7639 | _M_initialize_dispatch(__first, __last, _Integral()); | |
7640 | } | |
7641 | ||
7642 | ||
7643 | ||
7644 | ||
7645 | ||
7646 | ||
7647 | ||
7648 | ~vector() | |
7649 | { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | |
7650 | _M_get_Tp_allocator()); | |
7651 | } | |
7652 | # 284 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7653 | vector& | |
7654 | operator=(const vector& __x); | |
7655 | # 297 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7656 | void | |
7657 | assign(size_type __n, const value_type& __val) | |
7658 | { _M_fill_assign(__n, __val); } | |
7659 | # 313 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7660 | template<typename _InputIterator> | |
7661 | void | |
7662 | assign(_InputIterator __first, _InputIterator __last) | |
7663 | { | |
7664 | ||
7665 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
7666 | _M_assign_dispatch(__first, __last, _Integral()); | |
7667 | } | |
7668 | ||
7669 | ||
7670 | using _Base::get_allocator; | |
7671 | ||
7672 | ||
7673 | ||
7674 | ||
7675 | ||
7676 | ||
7677 | ||
7678 | iterator | |
7679 | begin() | |
7680 | { return iterator (this->_M_impl._M_start); } | |
7681 | ||
7682 | ||
7683 | ||
7684 | ||
7685 | ||
7686 | ||
7687 | const_iterator | |
7688 | begin() const | |
7689 | { return const_iterator (this->_M_impl._M_start); } | |
7690 | ||
7691 | ||
7692 | ||
7693 | ||
7694 | ||
7695 | ||
7696 | iterator | |
7697 | end() | |
7698 | { return iterator (this->_M_impl._M_finish); } | |
7699 | ||
7700 | ||
7701 | ||
7702 | ||
7703 | ||
7704 | ||
7705 | const_iterator | |
7706 | end() const | |
7707 | { return const_iterator (this->_M_impl._M_finish); } | |
7708 | ||
7709 | ||
7710 | ||
7711 | ||
7712 | ||
7713 | ||
7714 | reverse_iterator | |
7715 | rbegin() | |
7716 | { return reverse_iterator(end()); } | |
7717 | ||
7718 | ||
7719 | ||
7720 | ||
7721 | ||
7722 | ||
7723 | const_reverse_iterator | |
7724 | rbegin() const | |
7725 | { return const_reverse_iterator(end()); } | |
7726 | ||
7727 | ||
7728 | ||
7729 | ||
7730 | ||
7731 | ||
7732 | reverse_iterator | |
7733 | rend() | |
7734 | { return reverse_iterator(begin()); } | |
7735 | ||
7736 | ||
7737 | ||
7738 | ||
7739 | ||
7740 | ||
7741 | const_reverse_iterator | |
7742 | rend() const | |
7743 | { return const_reverse_iterator(begin()); } | |
7744 | ||
7745 | ||
7746 | ||
7747 | size_type | |
7748 | size() const | |
7749 | { return size_type(end() - begin()); } | |
7750 | ||
7751 | ||
7752 | size_type | |
7753 | max_size() const | |
7754 | { return size_type(-1) / sizeof(value_type); } | |
7755 | # 420 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7756 | void | |
7757 | resize(size_type __new_size, value_type __x = value_type()) | |
7758 | { | |
7759 | if (__new_size < size()) | |
7760 | erase(begin() + __new_size, end()); | |
7761 | else | |
7762 | insert(end(), __new_size - size(), __x); | |
7763 | } | |
7764 | ||
7765 | ||
7766 | ||
7767 | ||
7768 | ||
7769 | size_type | |
7770 | capacity() const | |
7771 | { return size_type(const_iterator(this->_M_impl._M_end_of_storage) | |
7772 | - begin()); } | |
7773 | ||
7774 | ||
7775 | ||
7776 | ||
7777 | ||
7778 | bool | |
7779 | empty() const | |
7780 | { return begin() == end(); } | |
7781 | # 463 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7782 | void | |
7783 | reserve(size_type __n); | |
7784 | # 478 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7785 | reference | |
7786 | operator[](size_type __n) | |
7787 | { return *(begin() + __n); } | |
7788 | # 493 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7789 | const_reference | |
7790 | operator[](size_type __n) const | |
7791 | { return *(begin() + __n); } | |
7792 | ||
7793 | protected: | |
7794 | ||
7795 | void | |
7796 | _M_range_check(size_type __n) const | |
7797 | { | |
7798 | if (__n >= this->size()) | |
7799 | __throw_out_of_range(("vector::_M_range_check")); | |
7800 | } | |
7801 | ||
7802 | public: | |
7803 | # 518 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7804 | reference | |
7805 | at(size_type __n) | |
7806 | { | |
7807 | _M_range_check(__n); | |
7808 | return (*this)[__n]; | |
7809 | } | |
7810 | # 536 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7811 | const_reference | |
7812 | at(size_type __n) const | |
7813 | { | |
7814 | _M_range_check(__n); | |
7815 | return (*this)[__n]; | |
7816 | } | |
7817 | ||
7818 | ||
7819 | ||
7820 | ||
7821 | ||
7822 | reference | |
7823 | front() | |
7824 | { return *begin(); } | |
7825 | ||
7826 | ||
7827 | ||
7828 | ||
7829 | ||
7830 | const_reference | |
7831 | front() const | |
7832 | { return *begin(); } | |
7833 | ||
7834 | ||
7835 | ||
7836 | ||
7837 | ||
7838 | reference | |
7839 | back() | |
7840 | { return *(end() - 1); } | |
7841 | ||
7842 | ||
7843 | ||
7844 | ||
7845 | ||
7846 | const_reference | |
7847 | back() const | |
7848 | { return *(end() - 1); } | |
7849 | # 582 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7850 | pointer | |
7851 | data() | |
7852 | { return pointer(this->_M_impl._M_start); } | |
7853 | ||
7854 | const_pointer | |
7855 | data() const | |
7856 | { return const_pointer(this->_M_impl._M_start); } | |
7857 | # 601 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7858 | void | |
7859 | push_back(const value_type& __x) | |
7860 | { | |
7861 | if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) | |
7862 | { | |
7863 | this->_M_impl.construct(this->_M_impl._M_finish, __x); | |
7864 | ++this->_M_impl._M_finish; | |
7865 | } | |
7866 | else | |
7867 | _M_insert_aux(end(), __x); | |
7868 | } | |
7869 | # 622 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7870 | void | |
7871 | pop_back() | |
7872 | { | |
7873 | --this->_M_impl._M_finish; | |
7874 | this->_M_impl.destroy(this->_M_impl._M_finish); | |
7875 | } | |
7876 | # 640 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7877 | iterator | |
7878 | insert(iterator __position, const value_type& __x); | |
7879 | # 656 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7880 | void | |
7881 | insert(iterator __position, size_type __n, const value_type& __x) | |
7882 | { _M_fill_insert(__position, __n, __x); } | |
7883 | # 674 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7884 | template<typename _InputIterator> | |
7885 | void | |
7886 | insert(iterator __position, _InputIterator __first, | |
7887 | _InputIterator __last) | |
7888 | { | |
7889 | ||
7890 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
7891 | _M_insert_dispatch(__position, __first, __last, _Integral()); | |
7892 | } | |
7893 | # 699 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7894 | iterator | |
7895 | erase(iterator __position); | |
7896 | # 720 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7897 | iterator | |
7898 | erase(iterator __first, iterator __last); | |
7899 | # 732 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
7900 | void | |
7901 | swap(vector& __x) | |
7902 | { | |
7903 | std::swap(this->_M_impl._M_start, __x._M_impl._M_start); | |
7904 | std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); | |
7905 | std::swap(this->_M_impl._M_end_of_storage, | |
7906 | __x._M_impl._M_end_of_storage); | |
7907 | } | |
7908 | ||
7909 | ||
7910 | ||
7911 | ||
7912 | ||
7913 | ||
7914 | ||
7915 | void | |
7916 | clear() | |
7917 | { | |
7918 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | |
7919 | _M_get_Tp_allocator()); | |
7920 | this->_M_impl._M_finish = this->_M_impl._M_start; | |
7921 | } | |
7922 | ||
7923 | protected: | |
7924 | ||
7925 | ||
7926 | ||
7927 | ||
7928 | ||
7929 | ||
7930 | template<typename _ForwardIterator> | |
7931 | pointer | |
7932 | _M_allocate_and_copy(size_type __n, | |
7933 | _ForwardIterator __first, _ForwardIterator __last) | |
7934 | { | |
7935 | pointer __result = this->_M_allocate(__n); | |
7936 | try | |
7937 | { | |
7938 | std::__uninitialized_copy_a(__first, __last, __result, | |
7939 | _M_get_Tp_allocator()); | |
7940 | return __result; | |
7941 | } | |
7942 | catch(...) | |
7943 | { | |
7944 | _M_deallocate(__result, __n); | |
7945 | throw; | |
7946 | } | |
7947 | } | |
7948 | ||
7949 | ||
7950 | ||
7951 | ||
7952 | ||
7953 | template<typename _Integer> | |
7954 | void | |
7955 | _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) | |
7956 | { | |
7957 | this->_M_impl._M_start = _M_allocate(__n); | |
7958 | this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; | |
7959 | std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, | |
7960 | _M_get_Tp_allocator()); | |
7961 | this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; | |
7962 | } | |
7963 | ||
7964 | ||
7965 | template<typename _InputIterator> | |
7966 | void | |
7967 | _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, | |
7968 | __false_type) | |
7969 | { | |
7970 | typedef typename std::iterator_traits<_InputIterator>:: | |
7971 | iterator_category _IterCategory; | |
7972 | _M_range_initialize(__first, __last, _IterCategory()); | |
7973 | } | |
7974 | ||
7975 | ||
7976 | template<typename _InputIterator> | |
7977 | void | |
7978 | _M_range_initialize(_InputIterator __first, | |
7979 | _InputIterator __last, std::input_iterator_tag) | |
7980 | { | |
7981 | for (; __first != __last; ++__first) | |
7982 | push_back(*__first); | |
7983 | } | |
7984 | ||
7985 | ||
7986 | template<typename _ForwardIterator> | |
7987 | void | |
7988 | _M_range_initialize(_ForwardIterator __first, | |
7989 | _ForwardIterator __last, std::forward_iterator_tag) | |
7990 | { | |
7991 | const size_type __n = std::distance(__first, __last); | |
7992 | this->_M_impl._M_start = this->_M_allocate(__n); | |
7993 | this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; | |
7994 | this->_M_impl._M_finish = | |
7995 | std::__uninitialized_copy_a(__first, __last, | |
7996 | this->_M_impl._M_start, | |
7997 | _M_get_Tp_allocator()); | |
7998 | } | |
7999 | ||
8000 | ||
8001 | ||
8002 | ||
8003 | ||
8004 | ||
8005 | template<typename _Integer> | |
8006 | void | |
8007 | _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) | |
8008 | { | |
8009 | _M_fill_assign(static_cast<size_type>(__n), | |
8010 | static_cast<value_type>(__val)); | |
8011 | } | |
8012 | ||
8013 | ||
8014 | template<typename _InputIterator> | |
8015 | void | |
8016 | _M_assign_dispatch(_InputIterator __first, _InputIterator __last, | |
8017 | __false_type) | |
8018 | { | |
8019 | typedef typename std::iterator_traits<_InputIterator>:: | |
8020 | iterator_category _IterCategory; | |
8021 | _M_assign_aux(__first, __last, _IterCategory()); | |
8022 | } | |
8023 | ||
8024 | ||
8025 | template<typename _InputIterator> | |
8026 | void | |
8027 | _M_assign_aux(_InputIterator __first, _InputIterator __last, | |
8028 | std::input_iterator_tag); | |
8029 | ||
8030 | ||
8031 | template<typename _ForwardIterator> | |
8032 | void | |
8033 | _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, | |
8034 | std::forward_iterator_tag); | |
8035 | ||
8036 | ||
8037 | ||
8038 | void | |
8039 | _M_fill_assign(size_type __n, const value_type& __val); | |
8040 | ||
8041 | ||
8042 | ||
8043 | ||
8044 | ||
8045 | template<typename _Integer> | |
8046 | void | |
8047 | _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, | |
8048 | __true_type) | |
8049 | { | |
8050 | _M_fill_insert(__pos, static_cast<size_type>(__n), | |
8051 | static_cast<value_type>(__val)); | |
8052 | } | |
8053 | ||
8054 | ||
8055 | template<typename _InputIterator> | |
8056 | void | |
8057 | _M_insert_dispatch(iterator __pos, _InputIterator __first, | |
8058 | _InputIterator __last, __false_type) | |
8059 | { | |
8060 | typedef typename std::iterator_traits<_InputIterator>:: | |
8061 | iterator_category _IterCategory; | |
8062 | _M_range_insert(__pos, __first, __last, _IterCategory()); | |
8063 | } | |
8064 | ||
8065 | ||
8066 | template<typename _InputIterator> | |
8067 | void | |
8068 | _M_range_insert(iterator __pos, _InputIterator __first, | |
8069 | _InputIterator __last, std::input_iterator_tag); | |
8070 | ||
8071 | ||
8072 | template<typename _ForwardIterator> | |
8073 | void | |
8074 | _M_range_insert(iterator __pos, _ForwardIterator __first, | |
8075 | _ForwardIterator __last, std::forward_iterator_tag); | |
8076 | ||
8077 | ||
8078 | ||
8079 | void | |
8080 | _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); | |
8081 | ||
8082 | ||
8083 | void | |
8084 | _M_insert_aux(iterator __position, const value_type& __x); | |
8085 | }; | |
8086 | # 930 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
8087 | template<typename _Tp, typename _Alloc> | |
8088 | inline bool | |
8089 | operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | |
8090 | { return (__x.size() == __y.size() | |
8091 | && std::equal(__x.begin(), __x.end(), __y.begin())); } | |
8092 | # 947 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_vector.h" 3 | |
8093 | template<typename _Tp, typename _Alloc> | |
8094 | inline bool | |
8095 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | |
8096 | { return std::lexicographical_compare(__x.begin(), __x.end(), | |
8097 | __y.begin(), __y.end()); } | |
8098 | ||
8099 | ||
8100 | template<typename _Tp, typename _Alloc> | |
8101 | inline bool | |
8102 | operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | |
8103 | { return !(__x == __y); } | |
8104 | ||
8105 | ||
8106 | template<typename _Tp, typename _Alloc> | |
8107 | inline bool | |
8108 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | |
8109 | { return __y < __x; } | |
8110 | ||
8111 | ||
8112 | template<typename _Tp, typename _Alloc> | |
8113 | inline bool | |
8114 | operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | |
8115 | { return !(__y < __x); } | |
8116 | ||
8117 | ||
8118 | template<typename _Tp, typename _Alloc> | |
8119 | inline bool | |
8120 | operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | |
8121 | { return !(__x < __y); } | |
8122 | ||
8123 | ||
8124 | template<typename _Tp, typename _Alloc> | |
8125 | inline void | |
8126 | swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) | |
8127 | { __x.swap(__y); } | |
8128 | } | |
8129 | # 71 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
8130 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_bvector.h" 1 3 | |
8131 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_bvector.h" 3 | |
8132 | namespace std | |
8133 | { | |
8134 | typedef unsigned long _Bit_type; | |
8135 | enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; | |
8136 | ||
8137 | struct _Bit_reference | |
8138 | { | |
8139 | _Bit_type * _M_p; | |
8140 | _Bit_type _M_mask; | |
8141 | ||
8142 | _Bit_reference(_Bit_type * __x, _Bit_type __y) | |
8143 | : _M_p(__x), _M_mask(__y) { } | |
8144 | ||
8145 | _Bit_reference() : _M_p(0), _M_mask(0) { } | |
8146 | ||
8147 | operator bool() const | |
8148 | { return !!(*_M_p & _M_mask); } | |
8149 | ||
8150 | _Bit_reference& | |
8151 | operator=(bool __x) | |
8152 | { | |
8153 | if (__x) | |
8154 | *_M_p |= _M_mask; | |
8155 | else | |
8156 | *_M_p &= ~_M_mask; | |
8157 | return *this; | |
8158 | } | |
8159 | ||
8160 | _Bit_reference& | |
8161 | operator=(const _Bit_reference& __x) | |
8162 | { return *this = bool(__x); } | |
8163 | ||
8164 | bool | |
8165 | operator==(const _Bit_reference& __x) const | |
8166 | { return bool(*this) == bool(__x); } | |
8167 | ||
8168 | bool | |
8169 | operator<(const _Bit_reference& __x) const | |
8170 | { return !bool(*this) && bool(__x); } | |
8171 | ||
8172 | void | |
8173 | flip() | |
8174 | { *_M_p ^= _M_mask; } | |
8175 | }; | |
8176 | ||
8177 | struct _Bit_iterator_base | |
8178 | : public std::iterator<std::random_access_iterator_tag, bool> | |
8179 | { | |
8180 | _Bit_type * _M_p; | |
8181 | unsigned int _M_offset; | |
8182 | ||
8183 | _Bit_iterator_base(_Bit_type * __x, unsigned int __y) | |
8184 | : _M_p(__x), _M_offset(__y) { } | |
8185 | ||
8186 | void | |
8187 | _M_bump_up() | |
8188 | { | |
8189 | if (_M_offset++ == int(_S_word_bit) - 1) | |
8190 | { | |
8191 | _M_offset = 0; | |
8192 | ++_M_p; | |
8193 | } | |
8194 | } | |
8195 | ||
8196 | void | |
8197 | _M_bump_down() | |
8198 | { | |
8199 | if (_M_offset-- == 0) | |
8200 | { | |
8201 | _M_offset = int(_S_word_bit) - 1; | |
8202 | --_M_p; | |
8203 | } | |
8204 | } | |
8205 | ||
8206 | void | |
8207 | _M_incr(ptrdiff_t __i) | |
8208 | { | |
8209 | difference_type __n = __i + _M_offset; | |
8210 | _M_p += __n / int(_S_word_bit); | |
8211 | __n = __n % int(_S_word_bit); | |
8212 | if (__n < 0) | |
8213 | { | |
8214 | _M_offset = static_cast<unsigned int>(__n + int(_S_word_bit)); | |
8215 | --_M_p; | |
8216 | } | |
8217 | else | |
8218 | _M_offset = static_cast<unsigned int>(__n); | |
8219 | } | |
8220 | ||
8221 | bool | |
8222 | operator==(const _Bit_iterator_base& __i) const | |
8223 | { return _M_p == __i._M_p && _M_offset == __i._M_offset; } | |
8224 | ||
8225 | bool | |
8226 | operator<(const _Bit_iterator_base& __i) const | |
8227 | { | |
8228 | return _M_p < __i._M_p | |
8229 | || (_M_p == __i._M_p && _M_offset < __i._M_offset); | |
8230 | } | |
8231 | ||
8232 | bool | |
8233 | operator!=(const _Bit_iterator_base& __i) const | |
8234 | { return !(*this == __i); } | |
8235 | ||
8236 | bool | |
8237 | operator>(const _Bit_iterator_base& __i) const | |
8238 | { return __i < *this; } | |
8239 | ||
8240 | bool | |
8241 | operator<=(const _Bit_iterator_base& __i) const | |
8242 | { return !(__i < *this); } | |
8243 | ||
8244 | bool | |
8245 | operator>=(const _Bit_iterator_base& __i) const | |
8246 | { return !(*this < __i); } | |
8247 | }; | |
8248 | ||
8249 | inline ptrdiff_t | |
8250 | operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) | |
8251 | { | |
8252 | return (int(_S_word_bit) * (__x._M_p - __y._M_p) | |
8253 | + __x._M_offset - __y._M_offset); | |
8254 | } | |
8255 | ||
8256 | struct _Bit_iterator : public _Bit_iterator_base | |
8257 | { | |
8258 | typedef _Bit_reference reference; | |
8259 | typedef _Bit_reference* pointer; | |
8260 | typedef _Bit_iterator iterator; | |
8261 | ||
8262 | _Bit_iterator() : _Bit_iterator_base(0, 0) { } | |
8263 | ||
8264 | _Bit_iterator(_Bit_type * __x, unsigned int __y) | |
8265 | : _Bit_iterator_base(__x, __y) { } | |
8266 | ||
8267 | reference | |
8268 | operator*() const | |
8269 | { return reference(_M_p, 1UL << _M_offset); } | |
8270 | ||
8271 | iterator& | |
8272 | operator++() | |
8273 | { | |
8274 | _M_bump_up(); | |
8275 | return *this; | |
8276 | } | |
8277 | ||
8278 | iterator | |
8279 | operator++(int) | |
8280 | { | |
8281 | iterator __tmp = *this; | |
8282 | _M_bump_up(); | |
8283 | return __tmp; | |
8284 | } | |
8285 | ||
8286 | iterator& | |
8287 | operator--() | |
8288 | { | |
8289 | _M_bump_down(); | |
8290 | return *this; | |
8291 | } | |
8292 | ||
8293 | iterator | |
8294 | operator--(int) | |
8295 | { | |
8296 | iterator __tmp = *this; | |
8297 | _M_bump_down(); | |
8298 | return __tmp; | |
8299 | } | |
8300 | ||
8301 | iterator& | |
8302 | operator+=(difference_type __i) | |
8303 | { | |
8304 | _M_incr(__i); | |
8305 | return *this; | |
8306 | } | |
8307 | ||
8308 | iterator& | |
8309 | operator-=(difference_type __i) | |
8310 | { | |
8311 | *this += -__i; | |
8312 | return *this; | |
8313 | } | |
8314 | ||
8315 | iterator | |
8316 | operator+(difference_type __i) const | |
8317 | { | |
8318 | iterator __tmp = *this; | |
8319 | return __tmp += __i; | |
8320 | } | |
8321 | ||
8322 | iterator | |
8323 | operator-(difference_type __i) const | |
8324 | { | |
8325 | iterator __tmp = *this; | |
8326 | return __tmp -= __i; | |
8327 | } | |
8328 | ||
8329 | reference | |
8330 | operator[](difference_type __i) const | |
8331 | { return *(*this + __i); } | |
8332 | }; | |
8333 | ||
8334 | inline _Bit_iterator | |
8335 | operator+(ptrdiff_t __n, const _Bit_iterator& __x) | |
8336 | { return __x + __n; } | |
8337 | ||
8338 | struct _Bit_const_iterator : public _Bit_iterator_base | |
8339 | { | |
8340 | typedef bool reference; | |
8341 | typedef bool const_reference; | |
8342 | typedef const bool* pointer; | |
8343 | typedef _Bit_const_iterator const_iterator; | |
8344 | ||
8345 | _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } | |
8346 | ||
8347 | _Bit_const_iterator(_Bit_type * __x, unsigned int __y) | |
8348 | : _Bit_iterator_base(__x, __y) { } | |
8349 | ||
8350 | _Bit_const_iterator(const _Bit_iterator& __x) | |
8351 | : _Bit_iterator_base(__x._M_p, __x._M_offset) { } | |
8352 | ||
8353 | const_reference | |
8354 | operator*() const | |
8355 | { return _Bit_reference(_M_p, 1UL << _M_offset); } | |
8356 | ||
8357 | const_iterator& | |
8358 | operator++() | |
8359 | { | |
8360 | _M_bump_up(); | |
8361 | return *this; | |
8362 | } | |
8363 | ||
8364 | const_iterator | |
8365 | operator++(int) | |
8366 | { | |
8367 | const_iterator __tmp = *this; | |
8368 | _M_bump_up(); | |
8369 | return __tmp; | |
8370 | } | |
8371 | ||
8372 | const_iterator& | |
8373 | operator--() | |
8374 | { | |
8375 | _M_bump_down(); | |
8376 | return *this; | |
8377 | } | |
8378 | ||
8379 | const_iterator | |
8380 | operator--(int) | |
8381 | { | |
8382 | const_iterator __tmp = *this; | |
8383 | _M_bump_down(); | |
8384 | return __tmp; | |
8385 | } | |
8386 | ||
8387 | const_iterator& | |
8388 | operator+=(difference_type __i) | |
8389 | { | |
8390 | _M_incr(__i); | |
8391 | return *this; | |
8392 | } | |
8393 | ||
8394 | const_iterator& | |
8395 | operator-=(difference_type __i) | |
8396 | { | |
8397 | *this += -__i; | |
8398 | return *this; | |
8399 | } | |
8400 | ||
8401 | const_iterator | |
8402 | operator+(difference_type __i) const | |
8403 | { | |
8404 | const_iterator __tmp = *this; | |
8405 | return __tmp += __i; | |
8406 | } | |
8407 | ||
8408 | const_iterator | |
8409 | operator-(difference_type __i) const | |
8410 | { | |
8411 | const_iterator __tmp = *this; | |
8412 | return __tmp -= __i; | |
8413 | } | |
8414 | ||
8415 | const_reference | |
8416 | operator[](difference_type __i) const | |
8417 | { return *(*this + __i); } | |
8418 | }; | |
8419 | ||
8420 | inline _Bit_const_iterator | |
8421 | operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) | |
8422 | { return __x + __n; } | |
8423 | ||
8424 | template<class _Alloc> | |
8425 | class _Bvector_base | |
8426 | { | |
8427 | typedef typename _Alloc::template rebind<_Bit_type>::other | |
8428 | _Bit_alloc_type; | |
8429 | ||
8430 | struct _Bvector_impl : public _Bit_alloc_type | |
8431 | { | |
8432 | _Bit_iterator _M_start; | |
8433 | _Bit_iterator _M_finish; | |
8434 | _Bit_type* _M_end_of_storage; | |
8435 | _Bvector_impl(const _Bit_alloc_type& __a) | |
8436 | : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) | |
8437 | { } | |
8438 | }; | |
8439 | ||
8440 | public: | |
8441 | typedef _Alloc allocator_type; | |
8442 | ||
8443 | allocator_type | |
8444 | get_allocator() const | |
8445 | { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); } | |
8446 | ||
8447 | _Bvector_base(const allocator_type& __a) : _M_impl(__a) { } | |
8448 | ||
8449 | ~_Bvector_base() | |
8450 | { this->_M_deallocate(); } | |
8451 | ||
8452 | protected: | |
8453 | _Bvector_impl _M_impl; | |
8454 | ||
8455 | _Bit_type* | |
8456 | _M_allocate(size_t __n) | |
8457 | { return _M_impl.allocate((__n + int(_S_word_bit) - 1) | |
8458 | / int(_S_word_bit)); } | |
8459 | ||
8460 | void | |
8461 | _M_deallocate() | |
8462 | { | |
8463 | if (_M_impl._M_start._M_p) | |
8464 | _M_impl.deallocate(_M_impl._M_start._M_p, | |
8465 | _M_impl._M_end_of_storage - _M_impl._M_start._M_p); | |
8466 | } | |
8467 | }; | |
8468 | } | |
8469 | ||
8470 | ||
8471 | ||
8472 | ||
8473 | namespace std | |
8474 | { | |
8475 | # 425 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_bvector.h" 3 | |
8476 | template<typename _Alloc> | |
8477 | class vector<bool, _Alloc> : public _Bvector_base<_Alloc> | |
8478 | { | |
8479 | public: | |
8480 | typedef bool value_type; | |
8481 | typedef size_t size_type; | |
8482 | typedef ptrdiff_t difference_type; | |
8483 | typedef _Bit_reference reference; | |
8484 | typedef bool const_reference; | |
8485 | typedef _Bit_reference* pointer; | |
8486 | typedef const bool* const_pointer; | |
8487 | ||
8488 | typedef _Bit_iterator iterator; | |
8489 | typedef _Bit_const_iterator const_iterator; | |
8490 | ||
8491 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | |
8492 | typedef std::reverse_iterator<iterator> reverse_iterator; | |
8493 | ||
8494 | typedef typename _Bvector_base<_Alloc>::allocator_type allocator_type; | |
8495 | ||
8496 | allocator_type get_allocator() const | |
8497 | { return _Bvector_base<_Alloc>::get_allocator(); } | |
8498 | ||
8499 | protected: | |
8500 | using _Bvector_base<_Alloc>::_M_allocate; | |
8501 | using _Bvector_base<_Alloc>::_M_deallocate; | |
8502 | ||
8503 | protected: | |
8504 | void | |
8505 | _M_initialize(size_type __n) | |
8506 | { | |
8507 | _Bit_type* __q = this->_M_allocate(__n); | |
8508 | this->_M_impl._M_end_of_storage = (__q | |
8509 | + ((__n + int(_S_word_bit) - 1) | |
8510 | / int(_S_word_bit))); | |
8511 | this->_M_impl._M_start = iterator(__q, 0); | |
8512 | this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); | |
8513 | } | |
8514 | ||
8515 | void | |
8516 | _M_insert_aux(iterator __position, bool __x) | |
8517 | { | |
8518 | if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) | |
8519 | { | |
8520 | std::copy_backward(__position, this->_M_impl._M_finish, | |
8521 | this->_M_impl._M_finish + 1); | |
8522 | *__position = __x; | |
8523 | ++this->_M_impl._M_finish; | |
8524 | } | |
8525 | else | |
8526 | { | |
8527 | const size_type __len = size() ? 2 * size() | |
8528 | : static_cast<size_type>(_S_word_bit); | |
8529 | _Bit_type * __q = this->_M_allocate(__len); | |
8530 | iterator __i = std::copy(begin(), __position, iterator(__q, 0)); | |
8531 | *__i++ = __x; | |
8532 | this->_M_impl._M_finish = std::copy(__position, end(), __i); | |
8533 | this->_M_deallocate(); | |
8534 | this->_M_impl._M_end_of_storage = (__q + ((__len | |
8535 | + int(_S_word_bit) - 1) | |
8536 | / int(_S_word_bit))); | |
8537 | this->_M_impl._M_start = iterator(__q, 0); | |
8538 | } | |
8539 | } | |
8540 | ||
8541 | template<class _InputIterator> | |
8542 | void | |
8543 | _M_initialize_range(_InputIterator __first, _InputIterator __last, | |
8544 | std::input_iterator_tag) | |
8545 | { | |
8546 | this->_M_impl._M_start = iterator(); | |
8547 | this->_M_impl._M_finish = iterator(); | |
8548 | this->_M_impl._M_end_of_storage = 0; | |
8549 | for (; __first != __last; ++__first) | |
8550 | push_back(*__first); | |
8551 | } | |
8552 | ||
8553 | template<class _ForwardIterator> | |
8554 | void | |
8555 | _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, | |
8556 | std::forward_iterator_tag) | |
8557 | { | |
8558 | const size_type __n = std::distance(__first, __last); | |
8559 | _M_initialize(__n); | |
8560 | std::copy(__first, __last, this->_M_impl._M_start); | |
8561 | } | |
8562 | ||
8563 | template<class _InputIterator> | |
8564 | void | |
8565 | _M_insert_range(iterator __pos, _InputIterator __first, | |
8566 | _InputIterator __last, std::input_iterator_tag) | |
8567 | { | |
8568 | for (; __first != __last; ++__first) | |
8569 | { | |
8570 | __pos = insert(__pos, *__first); | |
8571 | ++__pos; | |
8572 | } | |
8573 | } | |
8574 | ||
8575 | template<class _ForwardIterator> | |
8576 | void | |
8577 | _M_insert_range(iterator __position, _ForwardIterator __first, | |
8578 | _ForwardIterator __last, std::forward_iterator_tag) | |
8579 | { | |
8580 | if (__first != __last) | |
8581 | { | |
8582 | size_type __n = std::distance(__first, __last); | |
8583 | if (capacity() - size() >= __n) | |
8584 | { | |
8585 | std::copy_backward(__position, end(), | |
8586 | this->_M_impl._M_finish | |
8587 | + difference_type(__n)); | |
8588 | std::copy(__first, __last, __position); | |
8589 | this->_M_impl._M_finish += difference_type(__n); | |
8590 | } | |
8591 | else | |
8592 | { | |
8593 | const size_type __len = size() + std::max(size(), __n); | |
8594 | _Bit_type * __q = this->_M_allocate(__len); | |
8595 | iterator __i = std::copy(begin(), __position, | |
8596 | iterator(__q, 0)); | |
8597 | __i = std::copy(__first, __last, __i); | |
8598 | this->_M_impl._M_finish = std::copy(__position, end(), __i); | |
8599 | this->_M_deallocate(); | |
8600 | this->_M_impl._M_end_of_storage = (__q | |
8601 | + ((__len | |
8602 | + int(_S_word_bit) - 1) | |
8603 | / int(_S_word_bit))); | |
8604 | this->_M_impl._M_start = iterator(__q, 0); | |
8605 | } | |
8606 | } | |
8607 | } | |
8608 | ||
8609 | public: | |
8610 | iterator | |
8611 | begin() | |
8612 | { return this->_M_impl._M_start; } | |
8613 | ||
8614 | const_iterator | |
8615 | begin() const | |
8616 | { return this->_M_impl._M_start; } | |
8617 | ||
8618 | iterator | |
8619 | end() | |
8620 | { return this->_M_impl._M_finish; } | |
8621 | ||
8622 | const_iterator | |
8623 | end() const | |
8624 | { return this->_M_impl._M_finish; } | |
8625 | ||
8626 | reverse_iterator | |
8627 | rbegin() | |
8628 | { return reverse_iterator(end()); } | |
8629 | ||
8630 | const_reverse_iterator | |
8631 | rbegin() const | |
8632 | { return const_reverse_iterator(end()); } | |
8633 | ||
8634 | reverse_iterator | |
8635 | rend() | |
8636 | { return reverse_iterator(begin()); } | |
8637 | ||
8638 | const_reverse_iterator | |
8639 | rend() const | |
8640 | { return const_reverse_iterator(begin()); } | |
8641 | ||
8642 | size_type | |
8643 | size() const | |
8644 | { return size_type(end() - begin()); } | |
8645 | ||
8646 | size_type | |
8647 | max_size() const | |
8648 | { return size_type(-1); } | |
8649 | ||
8650 | size_type | |
8651 | capacity() const | |
8652 | { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) | |
8653 | - begin()); } | |
8654 | bool | |
8655 | empty() const | |
8656 | { return begin() == end(); } | |
8657 | ||
8658 | reference | |
8659 | operator[](size_type __n) | |
8660 | { return *(begin() + difference_type(__n)); } | |
8661 | ||
8662 | const_reference | |
8663 | operator[](size_type __n) const | |
8664 | { return *(begin() + difference_type(__n)); } | |
8665 | ||
8666 | void | |
8667 | _M_range_check(size_type __n) const | |
8668 | { | |
8669 | if (__n >= this->size()) | |
8670 | __throw_out_of_range(("vector<bool>::_M_range_check")); | |
8671 | } | |
8672 | ||
8673 | reference | |
8674 | at(size_type __n) | |
8675 | { _M_range_check(__n); return (*this)[__n]; } | |
8676 | ||
8677 | const_reference | |
8678 | at(size_type __n) const | |
8679 | { _M_range_check(__n); return (*this)[__n]; } | |
8680 | ||
8681 | explicit | |
8682 | vector(const allocator_type& __a = allocator_type()) | |
8683 | : _Bvector_base<_Alloc>(__a) { } | |
8684 | ||
8685 | vector(size_type __n, bool __value, | |
8686 | const allocator_type& __a = allocator_type()) | |
8687 | : _Bvector_base<_Alloc>(__a) | |
8688 | { | |
8689 | _M_initialize(__n); | |
8690 | std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, | |
8691 | __value ? ~0 : 0); | |
8692 | } | |
8693 | ||
8694 | explicit | |
8695 | vector(size_type __n) | |
8696 | : _Bvector_base<_Alloc>(allocator_type()) | |
8697 | { | |
8698 | _M_initialize(__n); | |
8699 | std::fill(this->_M_impl._M_start._M_p, | |
8700 | this->_M_impl._M_end_of_storage, 0); | |
8701 | } | |
8702 | ||
8703 | vector(const vector& __x) | |
8704 | : _Bvector_base<_Alloc>(__x.get_allocator()) | |
8705 | { | |
8706 | _M_initialize(__x.size()); | |
8707 | std::copy(__x.begin(), __x.end(), this->_M_impl._M_start); | |
8708 | } | |
8709 | ||
8710 | ||
8711 | template<class _Integer> | |
8712 | void | |
8713 | _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) | |
8714 | { | |
8715 | _M_initialize(__n); | |
8716 | std::fill(this->_M_impl._M_start._M_p, | |
8717 | this->_M_impl._M_end_of_storage, __x ? ~0 : 0); | |
8718 | } | |
8719 | ||
8720 | template<class _InputIterator> | |
8721 | void | |
8722 | _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, | |
8723 | __false_type) | |
8724 | { _M_initialize_range(__first, __last, | |
8725 | std::__iterator_category(__first)); } | |
8726 | ||
8727 | template<class _InputIterator> | |
8728 | vector(_InputIterator __first, _InputIterator __last, | |
8729 | const allocator_type& __a = allocator_type()) | |
8730 | : _Bvector_base<_Alloc>(__a) | |
8731 | { | |
8732 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
8733 | _M_initialize_dispatch(__first, __last, _Integral()); | |
8734 | } | |
8735 | ||
8736 | ~vector() { } | |
8737 | ||
8738 | vector& | |
8739 | operator=(const vector& __x) | |
8740 | { | |
8741 | if (&__x == this) | |
8742 | return *this; | |
8743 | if (__x.size() > capacity()) | |
8744 | { | |
8745 | this->_M_deallocate(); | |
8746 | _M_initialize(__x.size()); | |
8747 | } | |
8748 | std::copy(__x.begin(), __x.end(), begin()); | |
8749 | this->_M_impl._M_finish = begin() + difference_type(__x.size()); | |
8750 | return *this; | |
8751 | } | |
8752 | ||
8753 | ||
8754 | ||
8755 | ||
8756 | ||
8757 | ||
8758 | void | |
8759 | _M_fill_assign(size_t __n, bool __x) | |
8760 | { | |
8761 | if (__n > size()) | |
8762 | { | |
8763 | std::fill(this->_M_impl._M_start._M_p, | |
8764 | this->_M_impl._M_end_of_storage, __x ? ~0 : 0); | |
8765 | insert(end(), __n - size(), __x); | |
8766 | } | |
8767 | else | |
8768 | { | |
8769 | erase(begin() + __n, end()); | |
8770 | std::fill(this->_M_impl._M_start._M_p, | |
8771 | this->_M_impl._M_end_of_storage, __x ? ~0 : 0); | |
8772 | } | |
8773 | } | |
8774 | ||
8775 | void | |
8776 | assign(size_t __n, bool __x) | |
8777 | { _M_fill_assign(__n, __x); } | |
8778 | ||
8779 | template<class _InputIterator> | |
8780 | void | |
8781 | assign(_InputIterator __first, _InputIterator __last) | |
8782 | { | |
8783 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
8784 | _M_assign_dispatch(__first, __last, _Integral()); | |
8785 | } | |
8786 | ||
8787 | template<class _Integer> | |
8788 | void | |
8789 | _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) | |
8790 | { _M_fill_assign((size_t) __n, (bool) __val); } | |
8791 | ||
8792 | template<class _InputIterator> | |
8793 | void | |
8794 | _M_assign_dispatch(_InputIterator __first, _InputIterator __last, | |
8795 | __false_type) | |
8796 | { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } | |
8797 | ||
8798 | template<class _InputIterator> | |
8799 | void | |
8800 | _M_assign_aux(_InputIterator __first, _InputIterator __last, | |
8801 | std::input_iterator_tag) | |
8802 | { | |
8803 | iterator __cur = begin(); | |
8804 | for (; __first != __last && __cur != end(); ++__cur, ++__first) | |
8805 | *__cur = *__first; | |
8806 | if (__first == __last) | |
8807 | erase(__cur, end()); | |
8808 | else | |
8809 | insert(end(), __first, __last); | |
8810 | } | |
8811 | ||
8812 | template<class _ForwardIterator> | |
8813 | void | |
8814 | _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, | |
8815 | std::forward_iterator_tag) | |
8816 | { | |
8817 | const size_type __len = std::distance(__first, __last); | |
8818 | if (__len < size()) | |
8819 | erase(std::copy(__first, __last, begin()), end()); | |
8820 | else | |
8821 | { | |
8822 | _ForwardIterator __mid = __first; | |
8823 | std::advance(__mid, size()); | |
8824 | std::copy(__first, __mid, begin()); | |
8825 | insert(end(), __mid, __last); | |
8826 | } | |
8827 | } | |
8828 | ||
8829 | void | |
8830 | reserve(size_type __n) | |
8831 | { | |
8832 | if (__n > this->max_size()) | |
8833 | __throw_length_error(("vector::reserve")); | |
8834 | if (this->capacity() < __n) | |
8835 | { | |
8836 | _Bit_type* __q = this->_M_allocate(__n); | |
8837 | this->_M_impl._M_finish = std::copy(begin(), end(), | |
8838 | iterator(__q, 0)); | |
8839 | this->_M_deallocate(); | |
8840 | this->_M_impl._M_start = iterator(__q, 0); | |
8841 | this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) | |
8842 | / int(_S_word_bit)); | |
8843 | } | |
8844 | } | |
8845 | ||
8846 | reference | |
8847 | front() | |
8848 | { return *begin(); } | |
8849 | ||
8850 | const_reference | |
8851 | front() const | |
8852 | { return *begin(); } | |
8853 | ||
8854 | reference | |
8855 | back() | |
8856 | { return *(end() - 1); } | |
8857 | ||
8858 | const_reference | |
8859 | back() const | |
8860 | { return *(end() - 1); } | |
8861 | ||
8862 | ||
8863 | ||
8864 | ||
8865 | ||
8866 | ||
8867 | void | |
8868 | data() { } | |
8869 | ||
8870 | void | |
8871 | push_back(bool __x) | |
8872 | { | |
8873 | if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) | |
8874 | *this->_M_impl._M_finish++ = __x; | |
8875 | else | |
8876 | _M_insert_aux(end(), __x); | |
8877 | } | |
8878 | ||
8879 | void | |
8880 | swap(vector<bool, _Alloc>& __x) | |
8881 | { | |
8882 | std::swap(this->_M_impl._M_start, __x._M_impl._M_start); | |
8883 | std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); | |
8884 | std::swap(this->_M_impl._M_end_of_storage, | |
8885 | __x._M_impl._M_end_of_storage); | |
8886 | } | |
8887 | ||
8888 | ||
8889 | static void | |
8890 | swap(reference __x, reference __y) | |
8891 | { | |
8892 | bool __tmp = __x; | |
8893 | __x = __y; | |
8894 | __y = __tmp; | |
8895 | } | |
8896 | ||
8897 | iterator | |
8898 | insert(iterator __position, bool __x = bool()) | |
8899 | { | |
8900 | const difference_type __n = __position - begin(); | |
8901 | if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage | |
8902 | && __position == end()) | |
8903 | *this->_M_impl._M_finish++ = __x; | |
8904 | else | |
8905 | _M_insert_aux(__position, __x); | |
8906 | return begin() + __n; | |
8907 | } | |
8908 | ||
8909 | ||
8910 | ||
8911 | template<class _Integer> | |
8912 | void | |
8913 | _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, | |
8914 | __true_type) | |
8915 | { _M_fill_insert(__pos, __n, __x); } | |
8916 | ||
8917 | template<class _InputIterator> | |
8918 | void | |
8919 | _M_insert_dispatch(iterator __pos, | |
8920 | _InputIterator __first, _InputIterator __last, | |
8921 | __false_type) | |
8922 | { _M_insert_range(__pos, __first, __last, | |
8923 | std::__iterator_category(__first)); } | |
8924 | ||
8925 | template<class _InputIterator> | |
8926 | void | |
8927 | insert(iterator __position, | |
8928 | _InputIterator __first, _InputIterator __last) | |
8929 | { | |
8930 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
8931 | _M_insert_dispatch(__position, __first, __last, _Integral()); | |
8932 | } | |
8933 | ||
8934 | void | |
8935 | _M_fill_insert(iterator __position, size_type __n, bool __x) | |
8936 | { | |
8937 | if (__n == 0) | |
8938 | return; | |
8939 | if (capacity() - size() >= __n) | |
8940 | { | |
8941 | std::copy_backward(__position, end(), | |
8942 | this->_M_impl._M_finish + difference_type(__n)); | |
8943 | std::fill(__position, __position + difference_type(__n), __x); | |
8944 | this->_M_impl._M_finish += difference_type(__n); | |
8945 | } | |
8946 | else | |
8947 | { | |
8948 | const size_type __len = size() + std::max(size(), __n); | |
8949 | _Bit_type * __q = this->_M_allocate(__len); | |
8950 | iterator __i = std::copy(begin(), __position, iterator(__q, 0)); | |
8951 | std::fill_n(__i, __n, __x); | |
8952 | this->_M_impl._M_finish = std::copy(__position, end(), | |
8953 | __i + difference_type(__n)); | |
8954 | this->_M_deallocate(); | |
8955 | this->_M_impl._M_end_of_storage = (__q + ((__len | |
8956 | + int(_S_word_bit) - 1) | |
8957 | / int(_S_word_bit))); | |
8958 | this->_M_impl._M_start = iterator(__q, 0); | |
8959 | } | |
8960 | } | |
8961 | ||
8962 | void | |
8963 | insert(iterator __position, size_type __n, bool __x) | |
8964 | { _M_fill_insert(__position, __n, __x); } | |
8965 | ||
8966 | void | |
8967 | pop_back() | |
8968 | { --this->_M_impl._M_finish; } | |
8969 | ||
8970 | iterator | |
8971 | erase(iterator __position) | |
8972 | { | |
8973 | if (__position + 1 != end()) | |
8974 | std::copy(__position + 1, end(), __position); | |
8975 | --this->_M_impl._M_finish; | |
8976 | return __position; | |
8977 | } | |
8978 | ||
8979 | iterator | |
8980 | erase(iterator __first, iterator __last) | |
8981 | { | |
8982 | this->_M_impl._M_finish = std::copy(__last, end(), __first); | |
8983 | return __first; | |
8984 | } | |
8985 | ||
8986 | void | |
8987 | resize(size_type __new_size, bool __x = bool()) | |
8988 | { | |
8989 | if (__new_size < size()) | |
8990 | erase(begin() + difference_type(__new_size), end()); | |
8991 | else | |
8992 | insert(end(), __new_size - size(), __x); | |
8993 | } | |
8994 | ||
8995 | void | |
8996 | flip() | |
8997 | { | |
8998 | for (_Bit_type * __p = this->_M_impl._M_start._M_p; | |
8999 | __p != this->_M_impl._M_end_of_storage; ++__p) | |
9000 | *__p = ~*__p; | |
9001 | } | |
9002 | ||
9003 | void | |
9004 | clear() | |
9005 | { erase(begin(), end()); } | |
9006 | }; | |
9007 | } | |
9008 | # 72 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
9009 | ||
9010 | ||
9011 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/vector.tcc" 1 3 | |
9012 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/vector.tcc" 3 | |
9013 | namespace std | |
9014 | { | |
9015 | template<typename _Tp, typename _Alloc> | |
9016 | void | |
9017 | vector<_Tp, _Alloc>:: | |
9018 | reserve(size_type __n) | |
9019 | { | |
9020 | if (__n > this->max_size()) | |
9021 | __throw_length_error(("vector::reserve")); | |
9022 | if (this->capacity() < __n) | |
9023 | { | |
9024 | const size_type __old_size = size(); | |
9025 | pointer __tmp = _M_allocate_and_copy(__n, | |
9026 | this->_M_impl._M_start, | |
9027 | this->_M_impl._M_finish); | |
9028 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | |
9029 | _M_get_Tp_allocator()); | |
9030 | _M_deallocate(this->_M_impl._M_start, | |
9031 | this->_M_impl._M_end_of_storage | |
9032 | - this->_M_impl._M_start); | |
9033 | this->_M_impl._M_start = __tmp; | |
9034 | this->_M_impl._M_finish = __tmp + __old_size; | |
9035 | this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; | |
9036 | } | |
9037 | } | |
9038 | ||
9039 | template<typename _Tp, typename _Alloc> | |
9040 | typename vector<_Tp, _Alloc>::iterator | |
9041 | vector<_Tp, _Alloc>:: | |
9042 | insert(iterator __position, const value_type& __x) | |
9043 | { | |
9044 | const size_type __n = __position - begin(); | |
9045 | if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage | |
9046 | && __position == end()) | |
9047 | { | |
9048 | this->_M_impl.construct(this->_M_impl._M_finish, __x); | |
9049 | ++this->_M_impl._M_finish; | |
9050 | } | |
9051 | else | |
9052 | _M_insert_aux(__position, __x); | |
9053 | return begin() + __n; | |
9054 | } | |
9055 | ||
9056 | template<typename _Tp, typename _Alloc> | |
9057 | typename vector<_Tp, _Alloc>::iterator | |
9058 | vector<_Tp, _Alloc>:: | |
9059 | erase(iterator __position) | |
9060 | { | |
9061 | if (__position + 1 != end()) | |
9062 | std::copy(__position + 1, end(), __position); | |
9063 | --this->_M_impl._M_finish; | |
9064 | this->_M_impl.destroy(this->_M_impl._M_finish); | |
9065 | return __position; | |
9066 | } | |
9067 | ||
9068 | template<typename _Tp, typename _Alloc> | |
9069 | typename vector<_Tp, _Alloc>::iterator | |
9070 | vector<_Tp, _Alloc>:: | |
9071 | erase(iterator __first, iterator __last) | |
9072 | { | |
9073 | iterator __i(std::copy(__last, end(), __first)); | |
9074 | std::_Destroy(__i, end(), _M_get_Tp_allocator()); | |
9075 | this->_M_impl._M_finish = this->_M_impl._M_finish - (__last - __first); | |
9076 | return __first; | |
9077 | } | |
9078 | ||
9079 | template<typename _Tp, typename _Alloc> | |
9080 | vector<_Tp, _Alloc>& | |
9081 | vector<_Tp, _Alloc>:: | |
9082 | operator=(const vector<_Tp, _Alloc>& __x) | |
9083 | { | |
9084 | if (&__x != this) | |
9085 | { | |
9086 | const size_type __xlen = __x.size(); | |
9087 | if (__xlen > capacity()) | |
9088 | { | |
9089 | pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), | |
9090 | __x.end()); | |
9091 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | |
9092 | _M_get_Tp_allocator()); | |
9093 | _M_deallocate(this->_M_impl._M_start, | |
9094 | this->_M_impl._M_end_of_storage | |
9095 | - this->_M_impl._M_start); | |
9096 | this->_M_impl._M_start = __tmp; | |
9097 | this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; | |
9098 | } | |
9099 | else if (size() >= __xlen) | |
9100 | { | |
9101 | iterator __i(std::copy(__x.begin(), __x.end(), begin())); | |
9102 | std::_Destroy(__i, end(), _M_get_Tp_allocator()); | |
9103 | } | |
9104 | else | |
9105 | { | |
9106 | std::copy(__x.begin(), __x.begin() + size(), | |
9107 | this->_M_impl._M_start); | |
9108 | std::__uninitialized_copy_a(__x.begin() + size(), | |
9109 | __x.end(), this->_M_impl._M_finish, | |
9110 | _M_get_Tp_allocator()); | |
9111 | } | |
9112 | this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; | |
9113 | } | |
9114 | return *this; | |
9115 | } | |
9116 | ||
9117 | template<typename _Tp, typename _Alloc> | |
9118 | void | |
9119 | vector<_Tp, _Alloc>:: | |
9120 | _M_fill_assign(size_t __n, const value_type& __val) | |
9121 | { | |
9122 | if (__n > capacity()) | |
9123 | { | |
9124 | vector __tmp(__n, __val, _M_get_Tp_allocator()); | |
9125 | __tmp.swap(*this); | |
9126 | } | |
9127 | else if (__n > size()) | |
9128 | { | |
9129 | std::fill(begin(), end(), __val); | |
9130 | std::__uninitialized_fill_n_a(this->_M_impl._M_finish, | |
9131 | __n - size(), __val, | |
9132 | _M_get_Tp_allocator()); | |
9133 | this->_M_impl._M_finish += __n - size(); | |
9134 | } | |
9135 | else | |
9136 | erase(std::fill_n(begin(), __n, __val), end()); | |
9137 | } | |
9138 | ||
9139 | template<typename _Tp, typename _Alloc> | |
9140 | template<typename _InputIterator> | |
9141 | void | |
9142 | vector<_Tp, _Alloc>:: | |
9143 | _M_assign_aux(_InputIterator __first, _InputIterator __last, | |
9144 | std::input_iterator_tag) | |
9145 | { | |
9146 | iterator __cur(begin()); | |
9147 | for (; __first != __last && __cur != end(); ++__cur, ++__first) | |
9148 | *__cur = *__first; | |
9149 | if (__first == __last) | |
9150 | erase(__cur, end()); | |
9151 | else | |
9152 | insert(end(), __first, __last); | |
9153 | } | |
9154 | ||
9155 | template<typename _Tp, typename _Alloc> | |
9156 | template<typename _ForwardIterator> | |
9157 | void | |
9158 | vector<_Tp, _Alloc>:: | |
9159 | _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, | |
9160 | std::forward_iterator_tag) | |
9161 | { | |
9162 | const size_type __len = std::distance(__first, __last); | |
9163 | ||
9164 | if (__len > capacity()) | |
9165 | { | |
9166 | pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); | |
9167 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | |
9168 | _M_get_Tp_allocator()); | |
9169 | _M_deallocate(this->_M_impl._M_start, | |
9170 | this->_M_impl._M_end_of_storage | |
9171 | - this->_M_impl._M_start); | |
9172 | this->_M_impl._M_start = __tmp; | |
9173 | this->_M_impl._M_finish = this->_M_impl._M_start + __len; | |
9174 | this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; | |
9175 | } | |
9176 | else if (size() >= __len) | |
9177 | { | |
9178 | iterator __new_finish(std::copy(__first, __last, | |
9179 | this->_M_impl._M_start)); | |
9180 | std::_Destroy(__new_finish, end(), _M_get_Tp_allocator()); | |
9181 | this->_M_impl._M_finish = __new_finish.base(); | |
9182 | } | |
9183 | else | |
9184 | { | |
9185 | _ForwardIterator __mid = __first; | |
9186 | std::advance(__mid, size()); | |
9187 | std::copy(__first, __mid, this->_M_impl._M_start); | |
9188 | this->_M_impl._M_finish = | |
9189 | std::__uninitialized_copy_a(__mid, __last, | |
9190 | this->_M_impl._M_finish, | |
9191 | _M_get_Tp_allocator()); | |
9192 | } | |
9193 | } | |
9194 | ||
9195 | template<typename _Tp, typename _Alloc> | |
9196 | void | |
9197 | vector<_Tp, _Alloc>:: | |
9198 | _M_insert_aux(iterator __position, const _Tp& __x) | |
9199 | { | |
9200 | if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) | |
9201 | { | |
9202 | this->_M_impl.construct(this->_M_impl._M_finish, | |
9203 | *(this->_M_impl._M_finish - 1)); | |
9204 | ++this->_M_impl._M_finish; | |
9205 | _Tp __x_copy = __x; | |
9206 | std::copy_backward(__position, | |
9207 | iterator(this->_M_impl._M_finish-2), | |
9208 | iterator(this->_M_impl._M_finish-1)); | |
9209 | *__position = __x_copy; | |
9210 | } | |
9211 | else | |
9212 | { | |
9213 | const size_type __old_size = size(); | |
9214 | if (__old_size == this->max_size()) | |
9215 | __throw_length_error(("vector::_M_insert_aux")); | |
9216 | ||
9217 | ||
9218 | ||
9219 | ||
9220 | size_type __len = __old_size != 0 ? 2 * __old_size : 1; | |
9221 | if (__len < __old_size) | |
9222 | __len = this->max_size(); | |
9223 | ||
9224 | iterator __new_start(this->_M_allocate(__len)); | |
9225 | iterator __new_finish(__new_start); | |
9226 | try | |
9227 | { | |
9228 | __new_finish = | |
9229 | std::__uninitialized_copy_a(iterator(this->_M_impl._M_start), | |
9230 | __position, | |
9231 | __new_start, | |
9232 | _M_get_Tp_allocator()); | |
9233 | this->_M_impl.construct(__new_finish.base(), __x); | |
9234 | ++__new_finish; | |
9235 | __new_finish = | |
9236 | std::__uninitialized_copy_a(__position, | |
9237 | iterator(this->_M_impl._M_finish), | |
9238 | __new_finish, | |
9239 | _M_get_Tp_allocator()); | |
9240 | } | |
9241 | catch(...) | |
9242 | { | |
9243 | std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); | |
9244 | _M_deallocate(__new_start.base(),__len); | |
9245 | throw; | |
9246 | } | |
9247 | std::_Destroy(begin(), end(), _M_get_Tp_allocator()); | |
9248 | _M_deallocate(this->_M_impl._M_start, | |
9249 | this->_M_impl._M_end_of_storage | |
9250 | - this->_M_impl._M_start); | |
9251 | this->_M_impl._M_start = __new_start.base(); | |
9252 | this->_M_impl._M_finish = __new_finish.base(); | |
9253 | this->_M_impl._M_end_of_storage = __new_start.base() + __len; | |
9254 | } | |
9255 | } | |
9256 | ||
9257 | template<typename _Tp, typename _Alloc> | |
9258 | void | |
9259 | vector<_Tp, _Alloc>:: | |
9260 | _M_fill_insert(iterator __position, size_type __n, const value_type& __x) | |
9261 | { | |
9262 | if (__n != 0) | |
9263 | { | |
9264 | if (size_type(this->_M_impl._M_end_of_storage | |
9265 | - this->_M_impl._M_finish) >= __n) | |
9266 | { | |
9267 | value_type __x_copy = __x; | |
9268 | const size_type __elems_after = end() - __position; | |
9269 | iterator __old_finish(this->_M_impl._M_finish); | |
9270 | if (__elems_after > __n) | |
9271 | { | |
9272 | std::__uninitialized_copy_a(this->_M_impl._M_finish - __n, | |
9273 | this->_M_impl._M_finish, | |
9274 | this->_M_impl._M_finish, | |
9275 | _M_get_Tp_allocator()); | |
9276 | this->_M_impl._M_finish += __n; | |
9277 | std::copy_backward(__position, __old_finish - __n, | |
9278 | __old_finish); | |
9279 | std::fill(__position, __position + __n, __x_copy); | |
9280 | } | |
9281 | else | |
9282 | { | |
9283 | std::__uninitialized_fill_n_a(this->_M_impl._M_finish, | |
9284 | __n - __elems_after, | |
9285 | __x_copy, | |
9286 | _M_get_Tp_allocator()); | |
9287 | this->_M_impl._M_finish += __n - __elems_after; | |
9288 | std::__uninitialized_copy_a(__position, __old_finish, | |
9289 | this->_M_impl._M_finish, | |
9290 | _M_get_Tp_allocator()); | |
9291 | this->_M_impl._M_finish += __elems_after; | |
9292 | std::fill(__position, __old_finish, __x_copy); | |
9293 | } | |
9294 | } | |
9295 | else | |
9296 | { | |
9297 | const size_type __old_size = size(); | |
9298 | if (this->max_size() - __old_size < __n) | |
9299 | __throw_length_error(("vector::_M_fill_insert")); | |
9300 | ||
9301 | ||
9302 | size_type __len = __old_size + std::max(__old_size, __n); | |
9303 | if (__len < __old_size) | |
9304 | __len = this->max_size(); | |
9305 | ||
9306 | iterator __new_start(this->_M_allocate(__len)); | |
9307 | iterator __new_finish(__new_start); | |
9308 | try | |
9309 | { | |
9310 | __new_finish = | |
9311 | std::__uninitialized_copy_a(begin(), __position, | |
9312 | __new_start, | |
9313 | _M_get_Tp_allocator()); | |
9314 | std::__uninitialized_fill_n_a(__new_finish, __n, __x, | |
9315 | _M_get_Tp_allocator()); | |
9316 | __new_finish += __n; | |
9317 | __new_finish = | |
9318 | std::__uninitialized_copy_a(__position, end(), __new_finish, | |
9319 | _M_get_Tp_allocator()); | |
9320 | } | |
9321 | catch(...) | |
9322 | { | |
9323 | std::_Destroy(__new_start, __new_finish, | |
9324 | _M_get_Tp_allocator()); | |
9325 | _M_deallocate(__new_start.base(), __len); | |
9326 | throw; | |
9327 | } | |
9328 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | |
9329 | _M_get_Tp_allocator()); | |
9330 | _M_deallocate(this->_M_impl._M_start, | |
9331 | this->_M_impl._M_end_of_storage | |
9332 | - this->_M_impl._M_start); | |
9333 | this->_M_impl._M_start = __new_start.base(); | |
9334 | this->_M_impl._M_finish = __new_finish.base(); | |
9335 | this->_M_impl._M_end_of_storage = __new_start.base() + __len; | |
9336 | } | |
9337 | } | |
9338 | } | |
9339 | ||
9340 | template<typename _Tp, typename _Alloc> template<typename _InputIterator> | |
9341 | void | |
9342 | vector<_Tp, _Alloc>:: | |
9343 | _M_range_insert(iterator __pos, _InputIterator __first, | |
9344 | _InputIterator __last, std::input_iterator_tag) | |
9345 | { | |
9346 | for (; __first != __last; ++__first) | |
9347 | { | |
9348 | __pos = insert(__pos, *__first); | |
9349 | ++__pos; | |
9350 | } | |
9351 | } | |
9352 | ||
9353 | template<typename _Tp, typename _Alloc> | |
9354 | template<typename _ForwardIterator> | |
9355 | void | |
9356 | vector<_Tp, _Alloc>:: | |
9357 | _M_range_insert(iterator __position, _ForwardIterator __first, | |
9358 | _ForwardIterator __last, std::forward_iterator_tag) | |
9359 | { | |
9360 | if (__first != __last) | |
9361 | { | |
9362 | const size_type __n = std::distance(__first, __last); | |
9363 | if (size_type(this->_M_impl._M_end_of_storage | |
9364 | - this->_M_impl._M_finish) >= __n) | |
9365 | { | |
9366 | const size_type __elems_after = end() - __position; | |
9367 | iterator __old_finish(this->_M_impl._M_finish); | |
9368 | if (__elems_after > __n) | |
9369 | { | |
9370 | std::__uninitialized_copy_a(this->_M_impl._M_finish - __n, | |
9371 | this->_M_impl._M_finish, | |
9372 | this->_M_impl._M_finish, | |
9373 | _M_get_Tp_allocator()); | |
9374 | this->_M_impl._M_finish += __n; | |
9375 | std::copy_backward(__position, __old_finish - __n, | |
9376 | __old_finish); | |
9377 | std::copy(__first, __last, __position); | |
9378 | } | |
9379 | else | |
9380 | { | |
9381 | _ForwardIterator __mid = __first; | |
9382 | std::advance(__mid, __elems_after); | |
9383 | std::__uninitialized_copy_a(__mid, __last, | |
9384 | this->_M_impl._M_finish, | |
9385 | _M_get_Tp_allocator()); | |
9386 | this->_M_impl._M_finish += __n - __elems_after; | |
9387 | std::__uninitialized_copy_a(__position, __old_finish, | |
9388 | this->_M_impl._M_finish, | |
9389 | _M_get_Tp_allocator()); | |
9390 | this->_M_impl._M_finish += __elems_after; | |
9391 | std::copy(__first, __mid, __position); | |
9392 | } | |
9393 | } | |
9394 | else | |
9395 | { | |
9396 | const size_type __old_size = size(); | |
9397 | if (this->max_size() - __old_size < __n) | |
9398 | __throw_length_error(("vector::_M_range_insert")); | |
9399 | ||
9400 | ||
9401 | size_type __len = __old_size + std::max(__old_size, __n); | |
9402 | if (__len < __old_size) | |
9403 | __len = this->max_size(); | |
9404 | ||
9405 | iterator __new_start(this->_M_allocate(__len)); | |
9406 | iterator __new_finish(__new_start); | |
9407 | try | |
9408 | { | |
9409 | __new_finish = | |
9410 | std::__uninitialized_copy_a(iterator(this->_M_impl._M_start), | |
9411 | __position, | |
9412 | __new_start, | |
9413 | _M_get_Tp_allocator()); | |
9414 | __new_finish = | |
9415 | std::__uninitialized_copy_a(__first, __last, __new_finish, | |
9416 | _M_get_Tp_allocator()); | |
9417 | __new_finish = | |
9418 | std::__uninitialized_copy_a(__position, | |
9419 | iterator(this->_M_impl._M_finish), | |
9420 | __new_finish, | |
9421 | _M_get_Tp_allocator()); | |
9422 | } | |
9423 | catch(...) | |
9424 | { | |
9425 | std::_Destroy(__new_start,__new_finish, | |
9426 | _M_get_Tp_allocator()); | |
9427 | _M_deallocate(__new_start.base(), __len); | |
9428 | throw; | |
9429 | } | |
9430 | std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, | |
9431 | _M_get_Tp_allocator()); | |
9432 | _M_deallocate(this->_M_impl._M_start, | |
9433 | this->_M_impl._M_end_of_storage | |
9434 | - this->_M_impl._M_start); | |
9435 | this->_M_impl._M_start = __new_start.base(); | |
9436 | this->_M_impl._M_finish = __new_finish.base(); | |
9437 | this->_M_impl._M_end_of_storage = __new_start.base() + __len; | |
9438 | } | |
9439 | } | |
9440 | } | |
9441 | } | |
9442 | # 75 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/vector" 2 3 | |
9443 | # 18 "./boost/format.hpp" 2 | |
9444 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 1 3 | |
9445 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 3 | |
9446 | ||
9447 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 3 | |
9448 | ||
9449 | ||
9450 | ||
9451 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/char_traits.h" 1 3 | |
9452 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/char_traits.h" 3 | |
9453 | ||
9454 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/char_traits.h" 3 | |
9455 | ||
9456 | ||
9457 | ||
9458 | ||
9459 | ||
9460 | namespace __gnu_cxx | |
9461 | { | |
9462 | # 61 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/char_traits.h" 3 | |
9463 | template <class _CharT> | |
9464 | struct _Char_types | |
9465 | { | |
9466 | typedef unsigned long int_type; | |
9467 | typedef std::streampos pos_type; | |
9468 | typedef std::streamoff off_type; | |
9469 | typedef std::mbstate_t state_type; | |
9470 | }; | |
9471 | # 86 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/char_traits.h" 3 | |
9472 | template<typename _CharT> | |
9473 | struct char_traits | |
9474 | { | |
9475 | typedef _CharT char_type; | |
9476 | typedef typename _Char_types<_CharT>::int_type int_type; | |
9477 | typedef typename _Char_types<_CharT>::pos_type pos_type; | |
9478 | typedef typename _Char_types<_CharT>::off_type off_type; | |
9479 | typedef typename _Char_types<_CharT>::state_type state_type; | |
9480 | ||
9481 | static void | |
9482 | assign(char_type& __c1, const char_type& __c2) | |
9483 | { __c1 = __c2; } | |
9484 | ||
9485 | static bool | |
9486 | eq(const char_type& __c1, const char_type& __c2) | |
9487 | { return __c1 == __c2; } | |
9488 | ||
9489 | static bool | |
9490 | lt(const char_type& __c1, const char_type& __c2) | |
9491 | { return __c1 < __c2; } | |
9492 | ||
9493 | static int | |
9494 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | |
9495 | ||
9496 | static std::size_t | |
9497 | length(const char_type* __s); | |
9498 | ||
9499 | static const char_type* | |
9500 | find(const char_type* __s, std::size_t __n, const char_type& __a); | |
9501 | ||
9502 | static char_type* | |
9503 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | |
9504 | ||
9505 | static char_type* | |
9506 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | |
9507 | ||
9508 | static char_type* | |
9509 | assign(char_type* __s, std::size_t __n, char_type __a); | |
9510 | ||
9511 | static char_type | |
9512 | to_char_type(const int_type& __c) | |
9513 | { return static_cast<char_type>(__c); } | |
9514 | ||
9515 | static int_type | |
9516 | to_int_type(const char_type& __c) | |
9517 | { return static_cast<int_type>(__c); } | |
9518 | ||
9519 | static bool | |
9520 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
9521 | { return __c1 == __c2; } | |
9522 | ||
9523 | static int_type | |
9524 | eof() | |
9525 | { return static_cast<int_type>((-1)); } | |
9526 | ||
9527 | static int_type | |
9528 | not_eof(const int_type& __c) | |
9529 | { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } | |
9530 | }; | |
9531 | ||
9532 | template<typename _CharT> | |
9533 | int | |
9534 | char_traits<_CharT>:: | |
9535 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | |
9536 | { | |
9537 | for (size_t __i = 0; __i < __n; ++__i) | |
9538 | if (lt(__s1[__i], __s2[__i])) | |
9539 | return -1; | |
9540 | else if (lt(__s2[__i], __s1[__i])) | |
9541 | return 1; | |
9542 | return 0; | |
9543 | } | |
9544 | ||
9545 | template<typename _CharT> | |
9546 | std::size_t | |
9547 | char_traits<_CharT>:: | |
9548 | length(const char_type* __p) | |
9549 | { | |
9550 | std::size_t __i = 0; | |
9551 | while (!eq(__p[__i], char_type())) | |
9552 | ++__i; | |
9553 | return __i; | |
9554 | } | |
9555 | ||
9556 | template<typename _CharT> | |
9557 | const typename char_traits<_CharT>::char_type* | |
9558 | char_traits<_CharT>:: | |
9559 | find(const char_type* __s, std::size_t __n, const char_type& __a) | |
9560 | { | |
9561 | for (std::size_t __i = 0; __i < __n; ++__i) | |
9562 | if (eq(__s[__i], __a)) | |
9563 | return __s + __i; | |
9564 | return 0; | |
9565 | } | |
9566 | ||
9567 | template<typename _CharT> | |
9568 | typename char_traits<_CharT>::char_type* | |
9569 | char_traits<_CharT>:: | |
9570 | move(char_type* __s1, const char_type* __s2, std::size_t __n) | |
9571 | { | |
9572 | return static_cast<_CharT*>(std::memmove(__s1, __s2, | |
9573 | __n * sizeof(char_type))); | |
9574 | } | |
9575 | ||
9576 | template<typename _CharT> | |
9577 | typename char_traits<_CharT>::char_type* | |
9578 | char_traits<_CharT>:: | |
9579 | copy(char_type* __s1, const char_type* __s2, std::size_t __n) | |
9580 | { | |
9581 | std::copy(__s2, __s2 + __n, __s1); | |
9582 | return __s1; | |
9583 | } | |
9584 | ||
9585 | template<typename _CharT> | |
9586 | typename char_traits<_CharT>::char_type* | |
9587 | char_traits<_CharT>:: | |
9588 | assign(char_type* __s, std::size_t __n, char_type __a) | |
9589 | { | |
9590 | std::fill_n(__s, __n, __a); | |
9591 | return __s; | |
9592 | } | |
9593 | } | |
9594 | ||
9595 | namespace std | |
9596 | { | |
9597 | # 224 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/char_traits.h" 3 | |
9598 | template<class _CharT> | |
9599 | struct char_traits : public __gnu_cxx::char_traits<_CharT> | |
9600 | { }; | |
9601 | ||
9602 | ||
9603 | ||
9604 | template<> | |
9605 | struct char_traits<char> | |
9606 | { | |
9607 | typedef char char_type; | |
9608 | typedef int int_type; | |
9609 | typedef streampos pos_type; | |
9610 | typedef streamoff off_type; | |
9611 | typedef mbstate_t state_type; | |
9612 | ||
9613 | static void | |
9614 | assign(char_type& __c1, const char_type& __c2) | |
9615 | { __c1 = __c2; } | |
9616 | ||
9617 | static bool | |
9618 | eq(const char_type& __c1, const char_type& __c2) | |
9619 | { return __c1 == __c2; } | |
9620 | ||
9621 | static bool | |
9622 | lt(const char_type& __c1, const char_type& __c2) | |
9623 | { return __c1 < __c2; } | |
9624 | ||
9625 | static int | |
9626 | compare(const char_type* __s1, const char_type* __s2, size_t __n) | |
9627 | { return memcmp(__s1, __s2, __n); } | |
9628 | ||
9629 | static size_t | |
9630 | length(const char_type* __s) | |
9631 | { return strlen(__s); } | |
9632 | ||
9633 | static const char_type* | |
9634 | find(const char_type* __s, size_t __n, const char_type& __a) | |
9635 | { return static_cast<const char_type*>(memchr(__s, __a, __n)); } | |
9636 | ||
9637 | static char_type* | |
9638 | move(char_type* __s1, const char_type* __s2, size_t __n) | |
9639 | { return static_cast<char_type*>(memmove(__s1, __s2, __n)); } | |
9640 | ||
9641 | static char_type* | |
9642 | copy(char_type* __s1, const char_type* __s2, size_t __n) | |
9643 | { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); } | |
9644 | ||
9645 | static char_type* | |
9646 | assign(char_type* __s, size_t __n, char_type __a) | |
9647 | { return static_cast<char_type*>(memset(__s, __a, __n)); } | |
9648 | ||
9649 | static char_type | |
9650 | to_char_type(const int_type& __c) | |
9651 | { return static_cast<char_type>(__c); } | |
9652 | ||
9653 | ||
9654 | ||
9655 | static int_type | |
9656 | to_int_type(const char_type& __c) | |
9657 | { return static_cast<int_type>(static_cast<unsigned char>(__c)); } | |
9658 | ||
9659 | static bool | |
9660 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
9661 | { return __c1 == __c2; } | |
9662 | ||
9663 | static int_type | |
9664 | eof() { return static_cast<int_type>((-1)); } | |
9665 | ||
9666 | static int_type | |
9667 | not_eof(const int_type& __c) | |
9668 | { return (__c == eof()) ? 0 : __c; } | |
9669 | }; | |
9670 | # 364 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/char_traits.h" 3 | |
9671 | } | |
9672 | # 47 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 2 3 | |
9673 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 1 3 | |
9674 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
9675 | ||
9676 | # 52 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
9677 | ||
9678 | ||
9679 | ||
9680 | ||
9681 | ||
9682 | ||
9683 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_raw_storage_iter.h" 1 3 | |
9684 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_raw_storage_iter.h" 3 | |
9685 | namespace std | |
9686 | { | |
9687 | ||
9688 | ||
9689 | ||
9690 | ||
9691 | template <class _ForwardIterator, class _Tp> | |
9692 | class raw_storage_iterator | |
9693 | : public iterator<output_iterator_tag, void, void, void, void> | |
9694 | { | |
9695 | protected: | |
9696 | _ForwardIterator _M_iter; | |
9697 | ||
9698 | public: | |
9699 | explicit | |
9700 | raw_storage_iterator(_ForwardIterator __x) | |
9701 | : _M_iter(__x) {} | |
9702 | ||
9703 | raw_storage_iterator& | |
9704 | operator*() { return *this; } | |
9705 | ||
9706 | raw_storage_iterator& | |
9707 | operator=(const _Tp& __element) | |
9708 | { | |
9709 | std::_Construct(&*_M_iter, __element); | |
9710 | return *this; | |
9711 | } | |
9712 | ||
9713 | raw_storage_iterator<_ForwardIterator, _Tp>& | |
9714 | operator++() | |
9715 | { | |
9716 | ++_M_iter; | |
9717 | return *this; | |
9718 | } | |
9719 | ||
9720 | raw_storage_iterator<_ForwardIterator, _Tp> | |
9721 | operator++(int) | |
9722 | { | |
9723 | raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; | |
9724 | ++_M_iter; | |
9725 | return __tmp; | |
9726 | } | |
9727 | }; | |
9728 | } | |
9729 | # 59 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 2 3 | |
9730 | ||
9731 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/limits" 1 3 | |
9732 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/limits" 3 | |
9733 | ||
9734 | # 46 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/limits" 3 | |
9735 | # 149 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/limits" 3 | |
9736 | namespace std | |
9737 | { | |
9738 | ||
9739 | ||
9740 | ||
9741 | ||
9742 | ||
9743 | enum float_round_style | |
9744 | { | |
9745 | round_indeterminate = -1, | |
9746 | round_toward_zero = 0, | |
9747 | round_to_nearest = 1, | |
9748 | round_toward_infinity = 2, | |
9749 | round_toward_neg_infinity = 3 | |
9750 | }; | |
9751 | ||
9752 | ||
9753 | ||
9754 | ||
9755 | ||
9756 | ||
9757 | ||
9758 | enum float_denorm_style | |
9759 | { | |
9760 | ||
9761 | denorm_indeterminate = -1, | |
9762 | ||
9763 | denorm_absent = 0, | |
9764 | ||
9765 | denorm_present = 1 | |
9766 | }; | |
9767 | # 191 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/limits" 3 | |
9768 | struct __numeric_limits_base | |
9769 | { | |
9770 | ||
9771 | ||
9772 | static const bool is_specialized = false; | |
9773 | ||
9774 | ||
9775 | ||
9776 | ||
9777 | static const int digits = 0; | |
9778 | ||
9779 | static const int digits10 = 0; | |
9780 | ||
9781 | static const bool is_signed = false; | |
9782 | ||
9783 | ||
9784 | ||
9785 | ||
9786 | ||
9787 | static const bool is_integer = false; | |
9788 | ||
9789 | ||
9790 | ||
9791 | ||
9792 | static const bool is_exact = false; | |
9793 | ||
9794 | ||
9795 | static const int radix = 0; | |
9796 | ||
9797 | ||
9798 | ||
9799 | static const int min_exponent = 0; | |
9800 | ||
9801 | ||
9802 | static const int min_exponent10 = 0; | |
9803 | ||
9804 | ||
9805 | ||
9806 | static const int max_exponent = 0; | |
9807 | ||
9808 | ||
9809 | static const int max_exponent10 = 0; | |
9810 | ||
9811 | ||
9812 | static const bool has_infinity = false; | |
9813 | ||
9814 | ||
9815 | static const bool has_quiet_NaN = false; | |
9816 | ||
9817 | ||
9818 | static const bool has_signaling_NaN = false; | |
9819 | ||
9820 | static const float_denorm_style has_denorm = denorm_absent; | |
9821 | ||
9822 | ||
9823 | static const bool has_denorm_loss = false; | |
9824 | ||
9825 | ||
9826 | ||
9827 | static const bool is_iec559 = false; | |
9828 | ||
9829 | ||
9830 | ||
9831 | static const bool is_bounded = false; | |
9832 | ||
9833 | ||
9834 | ||
9835 | ||
9836 | static const bool is_modulo = false; | |
9837 | ||
9838 | ||
9839 | static const bool traps = false; | |
9840 | ||
9841 | static const bool tinyness_before = false; | |
9842 | ||
9843 | ||
9844 | ||
9845 | static const float_round_style round_style = round_toward_zero; | |
9846 | }; | |
9847 | # 284 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/limits" 3 | |
9848 | template<typename _Tp> | |
9849 | struct numeric_limits : public __numeric_limits_base | |
9850 | { | |
9851 | ||
9852 | ||
9853 | static _Tp min() throw() { return static_cast<_Tp>(0); } | |
9854 | ||
9855 | static _Tp max() throw() { return static_cast<_Tp>(0); } | |
9856 | ||
9857 | ||
9858 | static _Tp epsilon() throw() { return static_cast<_Tp>(0); } | |
9859 | ||
9860 | static _Tp round_error() throw() { return static_cast<_Tp>(0); } | |
9861 | ||
9862 | static _Tp infinity() throw() { return static_cast<_Tp>(0); } | |
9863 | ||
9864 | static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } | |
9865 | ||
9866 | ||
9867 | static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } | |
9868 | ||
9869 | ||
9870 | ||
9871 | static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } | |
9872 | }; | |
9873 | ||
9874 | ||
9875 | ||
9876 | ||
9877 | ||
9878 | template<> | |
9879 | struct numeric_limits<bool> | |
9880 | { | |
9881 | static const bool is_specialized = true; | |
9882 | ||
9883 | static bool min() throw() | |
9884 | { return false; } | |
9885 | static bool max() throw() | |
9886 | { return true; } | |
9887 | ||
9888 | static const int digits = 1; | |
9889 | static const int digits10 = 0; | |
9890 | static const bool is_signed = false; | |
9891 | static const bool is_integer = true; | |
9892 | static const bool is_exact = true; | |
9893 | static const int radix = 2; | |
9894 | static bool epsilon() throw() | |
9895 | { return false; } | |
9896 | static bool round_error() throw() | |
9897 | { return false; } | |
9898 | ||
9899 | static const int min_exponent = 0; | |
9900 | static const int min_exponent10 = 0; | |
9901 | static const int max_exponent = 0; | |
9902 | static const int max_exponent10 = 0; | |
9903 | ||
9904 | static const bool has_infinity = false; | |
9905 | static const bool has_quiet_NaN = false; | |
9906 | static const bool has_signaling_NaN = false; | |
9907 | static const float_denorm_style has_denorm = denorm_absent; | |
9908 | static const bool has_denorm_loss = false; | |
9909 | ||
9910 | static bool infinity() throw() | |
9911 | { return false; } | |
9912 | static bool quiet_NaN() throw() | |
9913 | { return false; } | |
9914 | static bool signaling_NaN() throw() | |
9915 | { return false; } | |
9916 | static bool denorm_min() throw() | |
9917 | { return false; } | |
9918 | ||
9919 | static const bool is_iec559 = false; | |
9920 | static const bool is_bounded = true; | |
9921 | static const bool is_modulo = false; | |
9922 | ||
9923 | ||
9924 | ||
9925 | ||
9926 | static const bool traps = true; | |
9927 | static const bool tinyness_before = false; | |
9928 | static const float_round_style round_style = round_toward_zero; | |
9929 | }; | |
9930 | ||
9931 | ||
9932 | template<> | |
9933 | struct numeric_limits<char> | |
9934 | { | |
9935 | static const bool is_specialized = true; | |
9936 | ||
9937 | static char min() throw() | |
9938 | { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } | |
9939 | static char max() throw() | |
9940 | { return (((char)(-1) < 0) ? ((char)1 << (sizeof(char) * 8 - ((char)(-1) < 0))) - 1 : ~(char)0); } | |
9941 | ||
9942 | static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); | |
9943 | static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); | |
9944 | static const bool is_signed = ((char)(-1) < 0); | |
9945 | static const bool is_integer = true; | |
9946 | static const bool is_exact = true; | |
9947 | static const int radix = 2; | |
9948 | static char epsilon() throw() | |
9949 | { return 0; } | |
9950 | static char round_error() throw() | |
9951 | { return 0; } | |
9952 | ||
9953 | static const int min_exponent = 0; | |
9954 | static const int min_exponent10 = 0; | |
9955 | static const int max_exponent = 0; | |
9956 | static const int max_exponent10 = 0; | |
9957 | ||
9958 | static const bool has_infinity = false; | |
9959 | static const bool has_quiet_NaN = false; | |
9960 | static const bool has_signaling_NaN = false; | |
9961 | static const float_denorm_style has_denorm = denorm_absent; | |
9962 | static const bool has_denorm_loss = false; | |
9963 | ||
9964 | static char infinity() throw() | |
9965 | { return char(); } | |
9966 | static char quiet_NaN() throw() | |
9967 | { return char(); } | |
9968 | static char signaling_NaN() throw() | |
9969 | { return char(); } | |
9970 | static char denorm_min() throw() | |
9971 | { return static_cast<char>(0); } | |
9972 | ||
9973 | static const bool is_iec559 = false; | |
9974 | static const bool is_bounded = true; | |
9975 | static const bool is_modulo = true; | |
9976 | ||
9977 | static const bool traps = true; | |
9978 | static const bool tinyness_before = false; | |
9979 | static const float_round_style round_style = round_toward_zero; | |
9980 | }; | |
9981 | ||
9982 | ||
9983 | template<> | |
9984 | struct numeric_limits<signed char> | |
9985 | { | |
9986 | static const bool is_specialized = true; | |
9987 | ||
9988 | static signed char min() throw() | |
9989 | { return -127 - 1; } | |
9990 | static signed char max() throw() | |
9991 | { return 127; } | |
9992 | ||
9993 | static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); | |
9994 | static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); | |
9995 | static const bool is_signed = true; | |
9996 | static const bool is_integer = true; | |
9997 | static const bool is_exact = true; | |
9998 | static const int radix = 2; | |
9999 | static signed char epsilon() throw() | |
10000 | { return 0; } | |
10001 | static signed char round_error() throw() | |
10002 | { return 0; } | |
10003 | ||
10004 | static const int min_exponent = 0; | |
10005 | static const int min_exponent10 = 0; | |
10006 | static const int max_exponent = 0; | |
10007 | static const int max_exponent10 = 0; | |
10008 | ||
10009 | static const bool has_infinity = false; | |
10010 | static const bool has_quiet_NaN = false; | |
10011 | static const bool has_signaling_NaN = false; | |
10012 | static const float_denorm_style has_denorm = denorm_absent; | |
10013 | static const bool has_denorm_loss = false; | |
10014 | ||
10015 | static signed char infinity() throw() | |
10016 | { return static_cast<signed char>(0); } | |
10017 | static signed char quiet_NaN() throw() | |
10018 | { return static_cast<signed char>(0); } | |
10019 | static signed char signaling_NaN() throw() | |
10020 | { return static_cast<signed char>(0); } | |
10021 | static signed char denorm_min() throw() | |
10022 | { return static_cast<signed char>(0); } | |
10023 | ||
10024 | static const bool is_iec559 = false; | |
10025 | static const bool is_bounded = true; | |
10026 | static const bool is_modulo = true; | |
10027 | ||
10028 | static const bool traps = true; | |
10029 | static const bool tinyness_before = false; | |
10030 | static const float_round_style round_style = round_toward_zero; | |
10031 | }; | |
10032 | ||
10033 | ||
10034 | template<> | |
10035 | struct numeric_limits<unsigned char> | |
10036 | { | |
10037 | static const bool is_specialized = true; | |
10038 | ||
10039 | static unsigned char min() throw() | |
10040 | { return 0; } | |
10041 | static unsigned char max() throw() | |
10042 | { return 127 * 2U + 1; } | |
10043 | ||
10044 | static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); | |
10045 | static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); | |
10046 | static const bool is_signed = false; | |
10047 | static const bool is_integer = true; | |
10048 | static const bool is_exact = true; | |
10049 | static const int radix = 2; | |
10050 | static unsigned char epsilon() throw() | |
10051 | { return 0; } | |
10052 | static unsigned char round_error() throw() | |
10053 | { return 0; } | |
10054 | ||
10055 | static const int min_exponent = 0; | |
10056 | static const int min_exponent10 = 0; | |
10057 | static const int max_exponent = 0; | |
10058 | static const int max_exponent10 = 0; | |
10059 | ||
10060 | static const bool has_infinity = false; | |
10061 | static const bool has_quiet_NaN = false; | |
10062 | static const bool has_signaling_NaN = false; | |
10063 | static const float_denorm_style has_denorm = denorm_absent; | |
10064 | static const bool has_denorm_loss = false; | |
10065 | ||
10066 | static unsigned char infinity() throw() | |
10067 | { return static_cast<unsigned char>(0); } | |
10068 | static unsigned char quiet_NaN() throw() | |
10069 | { return static_cast<unsigned char>(0); } | |
10070 | static unsigned char signaling_NaN() throw() | |
10071 | { return static_cast<unsigned char>(0); } | |
10072 | static unsigned char denorm_min() throw() | |
10073 | { return static_cast<unsigned char>(0); } | |
10074 | ||
10075 | static const bool is_iec559 = false; | |
10076 | static const bool is_bounded = true; | |
10077 | static const bool is_modulo = true; | |
10078 | ||
10079 | static const bool traps = true; | |
10080 | static const bool tinyness_before = false; | |
10081 | static const float_round_style round_style = round_toward_zero; | |
10082 | }; | |
10083 | ||
10084 | ||
10085 | template<> | |
10086 | struct numeric_limits<wchar_t> | |
10087 | { | |
10088 | static const bool is_specialized = true; | |
10089 | ||
10090 | static wchar_t min() throw() | |
10091 | { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } | |
10092 | static wchar_t max() throw() | |
10093 | { return (((wchar_t)(-1) < 0) ? ((wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0))) - 1 : ~(wchar_t)0); } | |
10094 | ||
10095 | static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); | |
10096 | static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); | |
10097 | static const bool is_signed = ((wchar_t)(-1) < 0); | |
10098 | static const bool is_integer = true; | |
10099 | static const bool is_exact = true; | |
10100 | static const int radix = 2; | |
10101 | static wchar_t epsilon() throw() | |
10102 | { return 0; } | |
10103 | static wchar_t round_error() throw() | |
10104 | { return 0; } | |
10105 | ||
10106 | static const int min_exponent = 0; | |
10107 | static const int min_exponent10 = 0; | |
10108 | static const int max_exponent = 0; | |
10109 | static const int max_exponent10 = 0; | |
10110 | ||
10111 | static const bool has_infinity = false; | |
10112 | static const bool has_quiet_NaN = false; | |
10113 | static const bool has_signaling_NaN = false; | |
10114 | static const float_denorm_style has_denorm = denorm_absent; | |
10115 | static const bool has_denorm_loss = false; | |
10116 | ||
10117 | static wchar_t infinity() throw() | |
10118 | { return wchar_t(); } | |
10119 | static wchar_t quiet_NaN() throw() | |
10120 | { return wchar_t(); } | |
10121 | static wchar_t signaling_NaN() throw() | |
10122 | { return wchar_t(); } | |
10123 | static wchar_t denorm_min() throw() | |
10124 | { return wchar_t(); } | |
10125 | ||
10126 | static const bool is_iec559 = false; | |
10127 | static const bool is_bounded = true; | |
10128 | static const bool is_modulo = true; | |
10129 | ||
10130 | static const bool traps = true; | |
10131 | static const bool tinyness_before = false; | |
10132 | static const float_round_style round_style = round_toward_zero; | |
10133 | }; | |
10134 | ||
10135 | ||
10136 | template<> | |
10137 | struct numeric_limits<short> | |
10138 | { | |
10139 | static const bool is_specialized = true; | |
10140 | ||
10141 | static short min() throw() | |
10142 | { return -32767 - 1; } | |
10143 | static short max() throw() | |
10144 | { return 32767; } | |
10145 | ||
10146 | static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); | |
10147 | static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); | |
10148 | static const bool is_signed = true; | |
10149 | static const bool is_integer = true; | |
10150 | static const bool is_exact = true; | |
10151 | static const int radix = 2; | |
10152 | static short epsilon() throw() | |
10153 | { return 0; } | |
10154 | static short round_error() throw() | |
10155 | { return 0; } | |
10156 | ||
10157 | static const int min_exponent = 0; | |
10158 | static const int min_exponent10 = 0; | |
10159 | static const int max_exponent = 0; | |
10160 | static const int max_exponent10 = 0; | |
10161 | ||
10162 | static const bool has_infinity = false; | |
10163 | static const bool has_quiet_NaN = false; | |
10164 | static const bool has_signaling_NaN = false; | |
10165 | static const float_denorm_style has_denorm = denorm_absent; | |
10166 | static const bool has_denorm_loss = false; | |
10167 | ||
10168 | static short infinity() throw() | |
10169 | { return short(); } | |
10170 | static short quiet_NaN() throw() | |
10171 | { return short(); } | |
10172 | static short signaling_NaN() throw() | |
10173 | { return short(); } | |
10174 | static short denorm_min() throw() | |
10175 | { return short(); } | |
10176 | ||
10177 | static const bool is_iec559 = false; | |
10178 | static const bool is_bounded = true; | |
10179 | static const bool is_modulo = true; | |
10180 | ||
10181 | static const bool traps = true; | |
10182 | static const bool tinyness_before = false; | |
10183 | static const float_round_style round_style = round_toward_zero; | |
10184 | }; | |
10185 | ||
10186 | ||
10187 | template<> | |
10188 | struct numeric_limits<unsigned short> | |
10189 | { | |
10190 | static const bool is_specialized = true; | |
10191 | ||
10192 | static unsigned short min() throw() | |
10193 | { return 0; } | |
10194 | static unsigned short max() throw() | |
10195 | { return 32767 * 2U + 1; } | |
10196 | ||
10197 | static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); | |
10198 | static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); | |
10199 | static const bool is_signed = false; | |
10200 | static const bool is_integer = true; | |
10201 | static const bool is_exact = true; | |
10202 | static const int radix = 2; | |
10203 | static unsigned short epsilon() throw() | |
10204 | { return 0; } | |
10205 | static unsigned short round_error() throw() | |
10206 | { return 0; } | |
10207 | ||
10208 | static const int min_exponent = 0; | |
10209 | static const int min_exponent10 = 0; | |
10210 | static const int max_exponent = 0; | |
10211 | static const int max_exponent10 = 0; | |
10212 | ||
10213 | static const bool has_infinity = false; | |
10214 | static const bool has_quiet_NaN = false; | |
10215 | static const bool has_signaling_NaN = false; | |
10216 | static const float_denorm_style has_denorm = denorm_absent; | |
10217 | static const bool has_denorm_loss = false; | |
10218 | ||
10219 | static unsigned short infinity() throw() | |
10220 | { return static_cast<unsigned short>(0); } | |
10221 | static unsigned short quiet_NaN() throw() | |
10222 | { return static_cast<unsigned short>(0); } | |
10223 | static unsigned short signaling_NaN() throw() | |
10224 | { return static_cast<unsigned short>(0); } | |
10225 | static unsigned short denorm_min() throw() | |
10226 | { return static_cast<unsigned short>(0); } | |
10227 | ||
10228 | static const bool is_iec559 = false; | |
10229 | static const bool is_bounded = true; | |
10230 | static const bool is_modulo = true; | |
10231 | ||
10232 | static const bool traps = true; | |
10233 | static const bool tinyness_before = false; | |
10234 | static const float_round_style round_style = round_toward_zero; | |
10235 | }; | |
10236 | ||
10237 | ||
10238 | template<> | |
10239 | struct numeric_limits<int> | |
10240 | { | |
10241 | static const bool is_specialized = true; | |
10242 | ||
10243 | static int min() throw() | |
10244 | { return -2147483647 - 1; } | |
10245 | static int max() throw() | |
10246 | { return 2147483647; } | |
10247 | ||
10248 | static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); | |
10249 | static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); | |
10250 | static const bool is_signed = true; | |
10251 | static const bool is_integer = true; | |
10252 | static const bool is_exact = true; | |
10253 | static const int radix = 2; | |
10254 | static int epsilon() throw() | |
10255 | { return 0; } | |
10256 | static int round_error() throw() | |
10257 | { return 0; } | |
10258 | ||
10259 | static const int min_exponent = 0; | |
10260 | static const int min_exponent10 = 0; | |
10261 | static const int max_exponent = 0; | |
10262 | static const int max_exponent10 = 0; | |
10263 | ||
10264 | static const bool has_infinity = false; | |
10265 | static const bool has_quiet_NaN = false; | |
10266 | static const bool has_signaling_NaN = false; | |
10267 | static const float_denorm_style has_denorm = denorm_absent; | |
10268 | static const bool has_denorm_loss = false; | |
10269 | ||
10270 | static int infinity() throw() | |
10271 | { return static_cast<int>(0); } | |
10272 | static int quiet_NaN() throw() | |
10273 | { return static_cast<int>(0); } | |
10274 | static int signaling_NaN() throw() | |
10275 | { return static_cast<int>(0); } | |
10276 | static int denorm_min() throw() | |
10277 | { return static_cast<int>(0); } | |
10278 | ||
10279 | static const bool is_iec559 = false; | |
10280 | static const bool is_bounded = true; | |
10281 | static const bool is_modulo = true; | |
10282 | ||
10283 | static const bool traps = true; | |
10284 | static const bool tinyness_before = false; | |
10285 | static const float_round_style round_style = round_toward_zero; | |
10286 | }; | |
10287 | ||
10288 | ||
10289 | template<> | |
10290 | struct numeric_limits<unsigned int> | |
10291 | { | |
10292 | static const bool is_specialized = true; | |
10293 | ||
10294 | static unsigned int min() throw() | |
10295 | { return 0; } | |
10296 | static unsigned int max() throw() | |
10297 | { return 2147483647 * 2U + 1; } | |
10298 | ||
10299 | static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); | |
10300 | static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); | |
10301 | static const bool is_signed = false; | |
10302 | static const bool is_integer = true; | |
10303 | static const bool is_exact = true; | |
10304 | static const int radix = 2; | |
10305 | static unsigned int epsilon() throw() | |
10306 | { return 0; } | |
10307 | static unsigned int round_error() throw() | |
10308 | { return 0; } | |
10309 | ||
10310 | static const int min_exponent = 0; | |
10311 | static const int min_exponent10 = 0; | |
10312 | static const int max_exponent = 0; | |
10313 | static const int max_exponent10 = 0; | |
10314 | ||
10315 | static const bool has_infinity = false; | |
10316 | static const bool has_quiet_NaN = false; | |
10317 | static const bool has_signaling_NaN = false; | |
10318 | static const float_denorm_style has_denorm = denorm_absent; | |
10319 | static const bool has_denorm_loss = false; | |
10320 | ||
10321 | static unsigned int infinity() throw() | |
10322 | { return static_cast<unsigned int>(0); } | |
10323 | static unsigned int quiet_NaN() throw() | |
10324 | { return static_cast<unsigned int>(0); } | |
10325 | static unsigned int signaling_NaN() throw() | |
10326 | { return static_cast<unsigned int>(0); } | |
10327 | static unsigned int denorm_min() throw() | |
10328 | { return static_cast<unsigned int>(0); } | |
10329 | ||
10330 | static const bool is_iec559 = false; | |
10331 | static const bool is_bounded = true; | |
10332 | static const bool is_modulo = true; | |
10333 | ||
10334 | static const bool traps = true; | |
10335 | static const bool tinyness_before = false; | |
10336 | static const float_round_style round_style = round_toward_zero; | |
10337 | }; | |
10338 | ||
10339 | ||
10340 | template<> | |
10341 | struct numeric_limits<long> | |
10342 | { | |
10343 | static const bool is_specialized = true; | |
10344 | ||
10345 | static long min() throw() | |
10346 | { return -2147483647L - 1; } | |
10347 | static long max() throw() | |
10348 | { return 2147483647L; } | |
10349 | ||
10350 | static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); | |
10351 | static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); | |
10352 | static const bool is_signed = true; | |
10353 | static const bool is_integer = true; | |
10354 | static const bool is_exact = true; | |
10355 | static const int radix = 2; | |
10356 | static long epsilon() throw() | |
10357 | { return 0; } | |
10358 | static long round_error() throw() | |
10359 | { return 0; } | |
10360 | ||
10361 | static const int min_exponent = 0; | |
10362 | static const int min_exponent10 = 0; | |
10363 | static const int max_exponent = 0; | |
10364 | static const int max_exponent10 = 0; | |
10365 | ||
10366 | static const bool has_infinity = false; | |
10367 | static const bool has_quiet_NaN = false; | |
10368 | static const bool has_signaling_NaN = false; | |
10369 | static const float_denorm_style has_denorm = denorm_absent; | |
10370 | static const bool has_denorm_loss = false; | |
10371 | ||
10372 | static long infinity() throw() | |
10373 | { return static_cast<long>(0); } | |
10374 | static long quiet_NaN() throw() | |
10375 | { return static_cast<long>(0); } | |
10376 | static long signaling_NaN() throw() | |
10377 | { return static_cast<long>(0); } | |
10378 | static long denorm_min() throw() | |
10379 | { return static_cast<long>(0); } | |
10380 | ||
10381 | static const bool is_iec559 = false; | |
10382 | static const bool is_bounded = true; | |
10383 | static const bool is_modulo = true; | |
10384 | ||
10385 | static const bool traps = true; | |
10386 | static const bool tinyness_before = false; | |
10387 | static const float_round_style round_style = round_toward_zero; | |
10388 | }; | |
10389 | ||
10390 | ||
10391 | template<> | |
10392 | struct numeric_limits<unsigned long> | |
10393 | { | |
10394 | static const bool is_specialized = true; | |
10395 | ||
10396 | static unsigned long min() throw() | |
10397 | { return 0; } | |
10398 | static unsigned long max() throw() | |
10399 | { return 2147483647L * 2UL + 1; } | |
10400 | ||
10401 | static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); | |
10402 | static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); | |
10403 | static const bool is_signed = false; | |
10404 | static const bool is_integer = true; | |
10405 | static const bool is_exact = true; | |
10406 | static const int radix = 2; | |
10407 | static unsigned long epsilon() throw() | |
10408 | { return 0; } | |
10409 | static unsigned long round_error() throw() | |
10410 | { return 0; } | |
10411 | ||
10412 | static const int min_exponent = 0; | |
10413 | static const int min_exponent10 = 0; | |
10414 | static const int max_exponent = 0; | |
10415 | static const int max_exponent10 = 0; | |
10416 | ||
10417 | static const bool has_infinity = false; | |
10418 | static const bool has_quiet_NaN = false; | |
10419 | static const bool has_signaling_NaN = false; | |
10420 | static const float_denorm_style has_denorm = denorm_absent; | |
10421 | static const bool has_denorm_loss = false; | |
10422 | ||
10423 | static unsigned long infinity() throw() | |
10424 | { return static_cast<unsigned long>(0); } | |
10425 | static unsigned long quiet_NaN() throw() | |
10426 | { return static_cast<unsigned long>(0); } | |
10427 | static unsigned long signaling_NaN() throw() | |
10428 | { return static_cast<unsigned long>(0); } | |
10429 | static unsigned long denorm_min() throw() | |
10430 | { return static_cast<unsigned long>(0); } | |
10431 | ||
10432 | static const bool is_iec559 = false; | |
10433 | static const bool is_bounded = true; | |
10434 | static const bool is_modulo = true; | |
10435 | ||
10436 | static const bool traps = true; | |
10437 | static const bool tinyness_before = false; | |
10438 | static const float_round_style round_style = round_toward_zero; | |
10439 | }; | |
10440 | ||
10441 | ||
10442 | template<> | |
10443 | struct numeric_limits<long long> | |
10444 | { | |
10445 | static const bool is_specialized = true; | |
10446 | ||
10447 | static long long min() throw() | |
10448 | { return -9223372036854775807LL - 1; } | |
10449 | static long long max() throw() | |
10450 | { return 9223372036854775807LL; } | |
10451 | ||
10452 | static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); | |
10453 | static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); | |
10454 | static const bool is_signed = true; | |
10455 | static const bool is_integer = true; | |
10456 | static const bool is_exact = true; | |
10457 | static const int radix = 2; | |
10458 | static long long epsilon() throw() | |
10459 | { return 0; } | |
10460 | static long long round_error() throw() | |
10461 | { return 0; } | |
10462 | ||
10463 | static const int min_exponent = 0; | |
10464 | static const int min_exponent10 = 0; | |
10465 | static const int max_exponent = 0; | |
10466 | static const int max_exponent10 = 0; | |
10467 | ||
10468 | static const bool has_infinity = false; | |
10469 | static const bool has_quiet_NaN = false; | |
10470 | static const bool has_signaling_NaN = false; | |
10471 | static const float_denorm_style has_denorm = denorm_absent; | |
10472 | static const bool has_denorm_loss = false; | |
10473 | ||
10474 | static long long infinity() throw() | |
10475 | { return static_cast<long long>(0); } | |
10476 | static long long quiet_NaN() throw() | |
10477 | { return static_cast<long long>(0); } | |
10478 | static long long signaling_NaN() throw() | |
10479 | { return static_cast<long long>(0); } | |
10480 | static long long denorm_min() throw() | |
10481 | { return static_cast<long long>(0); } | |
10482 | ||
10483 | static const bool is_iec559 = false; | |
10484 | static const bool is_bounded = true; | |
10485 | static const bool is_modulo = true; | |
10486 | ||
10487 | static const bool traps = true; | |
10488 | static const bool tinyness_before = false; | |
10489 | static const float_round_style round_style = round_toward_zero; | |
10490 | }; | |
10491 | ||
10492 | ||
10493 | template<> | |
10494 | struct numeric_limits<unsigned long long> | |
10495 | { | |
10496 | static const bool is_specialized = true; | |
10497 | ||
10498 | static unsigned long long min() throw() | |
10499 | { return 0; } | |
10500 | static unsigned long long max() throw() | |
10501 | { return 9223372036854775807LL * 2ULL + 1; } | |
10502 | ||
10503 | static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); | |
10504 | static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); | |
10505 | static const bool is_signed = false; | |
10506 | static const bool is_integer = true; | |
10507 | static const bool is_exact = true; | |
10508 | static const int radix = 2; | |
10509 | static unsigned long long epsilon() throw() | |
10510 | { return 0; } | |
10511 | static unsigned long long round_error() throw() | |
10512 | { return 0; } | |
10513 | ||
10514 | static const int min_exponent = 0; | |
10515 | static const int min_exponent10 = 0; | |
10516 | static const int max_exponent = 0; | |
10517 | static const int max_exponent10 = 0; | |
10518 | ||
10519 | static const bool has_infinity = false; | |
10520 | static const bool has_quiet_NaN = false; | |
10521 | static const bool has_signaling_NaN = false; | |
10522 | static const float_denorm_style has_denorm = denorm_absent; | |
10523 | static const bool has_denorm_loss = false; | |
10524 | ||
10525 | static unsigned long long infinity() throw() | |
10526 | { return static_cast<unsigned long long>(0); } | |
10527 | static unsigned long long quiet_NaN() throw() | |
10528 | { return static_cast<unsigned long long>(0); } | |
10529 | static unsigned long long signaling_NaN() throw() | |
10530 | { return static_cast<unsigned long long>(0); } | |
10531 | static unsigned long long denorm_min() throw() | |
10532 | { return static_cast<unsigned long long>(0); } | |
10533 | ||
10534 | static const bool is_iec559 = false; | |
10535 | static const bool is_bounded = true; | |
10536 | static const bool is_modulo = true; | |
10537 | ||
10538 | static const bool traps = true; | |
10539 | static const bool tinyness_before = false; | |
10540 | static const float_round_style round_style = round_toward_zero; | |
10541 | }; | |
10542 | ||
10543 | ||
10544 | template<> | |
10545 | struct numeric_limits<float> | |
10546 | { | |
10547 | static const bool is_specialized = true; | |
10548 | ||
10549 | static float min() throw() | |
10550 | { return 1.17549435e-38F; } | |
10551 | static float max() throw() | |
10552 | { return 3.40282347e+38F; } | |
10553 | ||
10554 | static const int digits = 24; | |
10555 | static const int digits10 = 6; | |
10556 | static const bool is_signed = true; | |
10557 | static const bool is_integer = false; | |
10558 | static const bool is_exact = false; | |
10559 | static const int radix = 2; | |
10560 | static float epsilon() throw() | |
10561 | { return 1.19209290e-7F; } | |
10562 | static float round_error() throw() | |
10563 | { return 0.5F; } | |
10564 | ||
10565 | static const int min_exponent = (-125); | |
10566 | static const int min_exponent10 = (-37); | |
10567 | static const int max_exponent = 128; | |
10568 | static const int max_exponent10 = 38; | |
10569 | ||
10570 | static const bool has_infinity = 1; | |
10571 | static const bool has_quiet_NaN = 1; | |
10572 | static const bool has_signaling_NaN = has_quiet_NaN; | |
10573 | static const float_denorm_style has_denorm | |
10574 | = bool(1.40129846e-45F) ? denorm_present : denorm_absent; | |
10575 | static const bool has_denorm_loss = false; | |
10576 | ||
10577 | static float infinity() throw() | |
10578 | { return __builtin_huge_valf (); } | |
10579 | static float quiet_NaN() throw() | |
10580 | { return __builtin_nanf (""); } | |
10581 | static float signaling_NaN() throw() | |
10582 | { return __builtin_nansf (""); } | |
10583 | static float denorm_min() throw() | |
10584 | { return 1.40129846e-45F; } | |
10585 | ||
10586 | static const bool is_iec559 | |
10587 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
10588 | static const bool is_bounded = true; | |
10589 | static const bool is_modulo = false; | |
10590 | ||
10591 | static const bool traps = false; | |
10592 | static const bool tinyness_before = false; | |
10593 | static const float_round_style round_style = round_to_nearest; | |
10594 | }; | |
10595 | ||
10596 | ||
10597 | ||
10598 | ||
10599 | ||
10600 | ||
10601 | template<> | |
10602 | struct numeric_limits<double> | |
10603 | { | |
10604 | static const bool is_specialized = true; | |
10605 | ||
10606 | static double min() throw() | |
10607 | { return 2.2250738585072014e-308; } | |
10608 | static double max() throw() | |
10609 | { return 1.7976931348623157e+308; } | |
10610 | ||
10611 | static const int digits = 53; | |
10612 | static const int digits10 = 15; | |
10613 | static const bool is_signed = true; | |
10614 | static const bool is_integer = false; | |
10615 | static const bool is_exact = false; | |
10616 | static const int radix = 2; | |
10617 | static double epsilon() throw() | |
10618 | { return 2.2204460492503131e-16; } | |
10619 | static double round_error() throw() | |
10620 | { return 0.5; } | |
10621 | ||
10622 | static const int min_exponent = (-1021); | |
10623 | static const int min_exponent10 = (-307); | |
10624 | static const int max_exponent = 1024; | |
10625 | static const int max_exponent10 = 308; | |
10626 | ||
10627 | static const bool has_infinity = 1; | |
10628 | static const bool has_quiet_NaN = 1; | |
10629 | static const bool has_signaling_NaN = has_quiet_NaN; | |
10630 | static const float_denorm_style has_denorm | |
10631 | = bool(4.9406564584124654e-324) ? denorm_present : denorm_absent; | |
10632 | static const bool has_denorm_loss = false; | |
10633 | ||
10634 | static double infinity() throw() | |
10635 | { return __builtin_huge_val(); } | |
10636 | static double quiet_NaN() throw() | |
10637 | { return __builtin_nan (""); } | |
10638 | static double signaling_NaN() throw() | |
10639 | { return __builtin_nans (""); } | |
10640 | static double denorm_min() throw() | |
10641 | { return 4.9406564584124654e-324; } | |
10642 | ||
10643 | static const bool is_iec559 | |
10644 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
10645 | static const bool is_bounded = true; | |
10646 | static const bool is_modulo = false; | |
10647 | ||
10648 | static const bool traps = false; | |
10649 | static const bool tinyness_before = false; | |
10650 | static const float_round_style round_style = round_to_nearest; | |
10651 | }; | |
10652 | ||
10653 | ||
10654 | ||
10655 | ||
10656 | ||
10657 | ||
10658 | template<> | |
10659 | struct numeric_limits<long double> | |
10660 | { | |
10661 | static const bool is_specialized = true; | |
10662 | ||
10663 | static long double min() throw() | |
10664 | { return 2.2250738585072014e-308L; } | |
10665 | static long double max() throw() | |
10666 | { return 1.7976931348623157e+308L; } | |
10667 | ||
10668 | static const int digits = 53; | |
10669 | static const int digits10 = 15; | |
10670 | static const bool is_signed = true; | |
10671 | static const bool is_integer = false; | |
10672 | static const bool is_exact = false; | |
10673 | static const int radix = 2; | |
10674 | static long double epsilon() throw() | |
10675 | { return 2.2204460492503131e-16L; } | |
10676 | static long double round_error() throw() | |
10677 | { return 0.5L; } | |
10678 | ||
10679 | static const int min_exponent = (-1021); | |
10680 | static const int min_exponent10 = (-307); | |
10681 | static const int max_exponent = 1024; | |
10682 | static const int max_exponent10 = 308; | |
10683 | ||
10684 | static const bool has_infinity = 1; | |
10685 | static const bool has_quiet_NaN = 1; | |
10686 | static const bool has_signaling_NaN = has_quiet_NaN; | |
10687 | static const float_denorm_style has_denorm | |
10688 | = bool(4.9406564584124654e-324L) ? denorm_present : denorm_absent; | |
10689 | static const bool has_denorm_loss | |
10690 | = false; | |
10691 | ||
10692 | static long double infinity() throw() | |
10693 | { return __builtin_huge_vall (); } | |
10694 | static long double quiet_NaN() throw() | |
10695 | { return __builtin_nanl (""); } | |
10696 | static long double signaling_NaN() throw() | |
10697 | { return __builtin_nansl (""); } | |
10698 | static long double denorm_min() throw() | |
10699 | { return 4.9406564584124654e-324L; } | |
10700 | ||
10701 | static const bool is_iec559 | |
10702 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
10703 | static const bool is_bounded = true; | |
10704 | static const bool is_modulo = false; | |
10705 | ||
10706 | static const bool traps = false; | |
10707 | static const bool tinyness_before = false; | |
10708 | static const float_round_style round_style = round_to_nearest; | |
10709 | }; | |
10710 | ||
10711 | ||
10712 | ||
10713 | ||
10714 | ||
10715 | } | |
10716 | # 61 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 2 3 | |
10717 | ||
10718 | namespace std | |
10719 | { | |
10720 | # 72 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10721 | template<typename _Tp> | |
10722 | pair<_Tp*, ptrdiff_t> | |
10723 | __get_temporary_buffer(ptrdiff_t __len, _Tp*) | |
10724 | { | |
10725 | const ptrdiff_t __max = numeric_limits<ptrdiff_t>::max() / sizeof(_Tp); | |
10726 | if (__len > __max) | |
10727 | __len = __max; | |
10728 | ||
10729 | while (__len > 0) | |
10730 | { | |
10731 | _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), | |
10732 | nothrow)); | |
10733 | if (__tmp != 0) | |
10734 | return pair<_Tp*, ptrdiff_t>(__tmp, __len); | |
10735 | __len /= 2; | |
10736 | } | |
10737 | return pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); | |
10738 | } | |
10739 | # 108 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10740 | template<typename _Tp> | |
10741 | inline pair<_Tp*, ptrdiff_t> | |
10742 | get_temporary_buffer(ptrdiff_t __len) | |
10743 | { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); } | |
10744 | # 120 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10745 | template<typename _Tp> | |
10746 | void | |
10747 | return_temporary_buffer(_Tp* __p) | |
10748 | { ::operator delete(__p, nothrow); } | |
10749 | # 132 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10750 | template<typename _Tp1> | |
10751 | struct auto_ptr_ref | |
10752 | { | |
10753 | _Tp1* _M_ptr; | |
10754 | ||
10755 | explicit | |
10756 | auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } | |
10757 | }; | |
10758 | # 173 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10759 | template<typename _Tp> | |
10760 | class auto_ptr | |
10761 | { | |
10762 | private: | |
10763 | _Tp* _M_ptr; | |
10764 | ||
10765 | public: | |
10766 | ||
10767 | typedef _Tp element_type; | |
10768 | ||
10769 | ||
10770 | ||
10771 | ||
10772 | ||
10773 | ||
10774 | ||
10775 | explicit | |
10776 | auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } | |
10777 | # 199 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10778 | auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } | |
10779 | # 211 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10780 | template<typename _Tp1> | |
10781 | auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } | |
10782 | # 222 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10783 | auto_ptr& | |
10784 | operator=(auto_ptr& __a) throw() | |
10785 | { | |
10786 | reset(__a.release()); | |
10787 | return *this; | |
10788 | } | |
10789 | # 239 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10790 | template<typename _Tp1> | |
10791 | auto_ptr& | |
10792 | operator=(auto_ptr<_Tp1>& __a) throw() | |
10793 | { | |
10794 | reset(__a.release()); | |
10795 | return *this; | |
10796 | } | |
10797 | # 259 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10798 | ~auto_ptr() { delete _M_ptr; } | |
10799 | # 269 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10800 | element_type& | |
10801 | operator*() const throw() | |
10802 | { | |
10803 | ; | |
10804 | return *_M_ptr; | |
10805 | } | |
10806 | ||
10807 | ||
10808 | ||
10809 | ||
10810 | ||
10811 | ||
10812 | ||
10813 | element_type* | |
10814 | operator->() const throw() | |
10815 | { | |
10816 | ; | |
10817 | return _M_ptr; | |
10818 | } | |
10819 | # 299 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10820 | element_type* | |
10821 | get() const throw() { return _M_ptr; } | |
10822 | # 313 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10823 | element_type* | |
10824 | release() throw() | |
10825 | { | |
10826 | element_type* __tmp = _M_ptr; | |
10827 | _M_ptr = 0; | |
10828 | return __tmp; | |
10829 | } | |
10830 | # 328 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10831 | void | |
10832 | reset(element_type* __p = 0) throw() | |
10833 | { | |
10834 | if (__p != _M_ptr) | |
10835 | { | |
10836 | delete _M_ptr; | |
10837 | _M_ptr = __p; | |
10838 | } | |
10839 | } | |
10840 | # 349 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/memory" 3 | |
10841 | auto_ptr(auto_ptr_ref<element_type> __ref) throw() | |
10842 | : _M_ptr(__ref._M_ptr) { } | |
10843 | ||
10844 | auto_ptr& | |
10845 | operator=(auto_ptr_ref<element_type> __ref) throw() | |
10846 | { | |
10847 | if (__ref._M_ptr != this->get()) | |
10848 | { | |
10849 | delete _M_ptr; | |
10850 | _M_ptr = __ref._M_ptr; | |
10851 | } | |
10852 | return *this; | |
10853 | } | |
10854 | ||
10855 | template<typename _Tp1> | |
10856 | operator auto_ptr_ref<_Tp1>() throw() | |
10857 | { return auto_ptr_ref<_Tp1>(this->release()); } | |
10858 | ||
10859 | template<typename _Tp1> | |
10860 | operator auto_ptr<_Tp1>() throw() | |
10861 | { return auto_ptr<_Tp1>(this->release()); } | |
10862 | }; | |
10863 | } | |
10864 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 2 3 | |
10865 | ||
10866 | ||
10867 | ||
10868 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 1 3 | |
10869 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
10870 | namespace std | |
10871 | { | |
10872 | # 101 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
10873 | template <class _Arg, class _Result> | |
10874 | struct unary_function | |
10875 | { | |
10876 | typedef _Arg argument_type; | |
10877 | ||
10878 | ||
10879 | typedef _Result result_type; | |
10880 | }; | |
10881 | ||
10882 | ||
10883 | ||
10884 | ||
10885 | template <class _Arg1, class _Arg2, class _Result> | |
10886 | struct binary_function | |
10887 | { | |
10888 | typedef _Arg1 first_argument_type; | |
10889 | ||
10890 | ||
10891 | typedef _Arg2 second_argument_type; | |
10892 | typedef _Result result_type; | |
10893 | }; | |
10894 | # 133 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
10895 | template <class _Tp> | |
10896 | struct plus : public binary_function<_Tp, _Tp, _Tp> | |
10897 | { | |
10898 | _Tp | |
10899 | operator()(const _Tp& __x, const _Tp& __y) const | |
10900 | { return __x + __y; } | |
10901 | }; | |
10902 | ||
10903 | ||
10904 | template <class _Tp> | |
10905 | struct minus : public binary_function<_Tp, _Tp, _Tp> | |
10906 | { | |
10907 | _Tp | |
10908 | operator()(const _Tp& __x, const _Tp& __y) const | |
10909 | { return __x - __y; } | |
10910 | }; | |
10911 | ||
10912 | ||
10913 | template <class _Tp> | |
10914 | struct multiplies : public binary_function<_Tp, _Tp, _Tp> | |
10915 | { | |
10916 | _Tp | |
10917 | operator()(const _Tp& __x, const _Tp& __y) const | |
10918 | { return __x * __y; } | |
10919 | }; | |
10920 | ||
10921 | ||
10922 | template <class _Tp> | |
10923 | struct divides : public binary_function<_Tp, _Tp, _Tp> | |
10924 | { | |
10925 | _Tp | |
10926 | operator()(const _Tp& __x, const _Tp& __y) const | |
10927 | { return __x / __y; } | |
10928 | }; | |
10929 | ||
10930 | ||
10931 | template <class _Tp> | |
10932 | struct modulus : public binary_function<_Tp, _Tp, _Tp> | |
10933 | { | |
10934 | _Tp | |
10935 | operator()(const _Tp& __x, const _Tp& __y) const | |
10936 | { return __x % __y; } | |
10937 | }; | |
10938 | ||
10939 | ||
10940 | template <class _Tp> | |
10941 | struct negate : public unary_function<_Tp, _Tp> | |
10942 | { | |
10943 | _Tp | |
10944 | operator()(const _Tp& __x) const | |
10945 | { return -__x; } | |
10946 | }; | |
10947 | # 195 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
10948 | template <class _Tp> | |
10949 | struct equal_to : public binary_function<_Tp, _Tp, bool> | |
10950 | { | |
10951 | bool | |
10952 | operator()(const _Tp& __x, const _Tp& __y) const | |
10953 | { return __x == __y; } | |
10954 | }; | |
10955 | ||
10956 | ||
10957 | template <class _Tp> | |
10958 | struct not_equal_to : public binary_function<_Tp, _Tp, bool> | |
10959 | { | |
10960 | bool | |
10961 | operator()(const _Tp& __x, const _Tp& __y) const | |
10962 | { return __x != __y; } | |
10963 | }; | |
10964 | ||
10965 | ||
10966 | template <class _Tp> | |
10967 | struct greater : public binary_function<_Tp, _Tp, bool> | |
10968 | { | |
10969 | bool | |
10970 | operator()(const _Tp& __x, const _Tp& __y) const | |
10971 | { return __x > __y; } | |
10972 | }; | |
10973 | ||
10974 | ||
10975 | template <class _Tp> | |
10976 | struct less : public binary_function<_Tp, _Tp, bool> | |
10977 | { | |
10978 | bool | |
10979 | operator()(const _Tp& __x, const _Tp& __y) const | |
10980 | { return __x < __y; } | |
10981 | }; | |
10982 | ||
10983 | ||
10984 | template <class _Tp> | |
10985 | struct greater_equal : public binary_function<_Tp, _Tp, bool> | |
10986 | { | |
10987 | bool | |
10988 | operator()(const _Tp& __x, const _Tp& __y) const | |
10989 | { return __x >= __y; } | |
10990 | }; | |
10991 | ||
10992 | ||
10993 | template <class _Tp> | |
10994 | struct less_equal : public binary_function<_Tp, _Tp, bool> | |
10995 | { | |
10996 | bool | |
10997 | operator()(const _Tp& __x, const _Tp& __y) const | |
10998 | { return __x <= __y; } | |
10999 | }; | |
11000 | # 256 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
11001 | template <class _Tp> | |
11002 | struct logical_and : public binary_function<_Tp, _Tp, bool> | |
11003 | { | |
11004 | bool | |
11005 | operator()(const _Tp& __x, const _Tp& __y) const | |
11006 | { return __x && __y; } | |
11007 | }; | |
11008 | ||
11009 | ||
11010 | template <class _Tp> | |
11011 | struct logical_or : public binary_function<_Tp, _Tp, bool> | |
11012 | { | |
11013 | bool | |
11014 | operator()(const _Tp& __x, const _Tp& __y) const | |
11015 | { return __x || __y; } | |
11016 | }; | |
11017 | ||
11018 | ||
11019 | template <class _Tp> | |
11020 | struct logical_not : public unary_function<_Tp, bool> | |
11021 | { | |
11022 | bool | |
11023 | operator()(const _Tp& __x) const | |
11024 | { return !__x; } | |
11025 | }; | |
11026 | # 311 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
11027 | template <class _Predicate> | |
11028 | class unary_negate | |
11029 | : public unary_function<typename _Predicate::argument_type, bool> | |
11030 | { | |
11031 | protected: | |
11032 | _Predicate _M_pred; | |
11033 | public: | |
11034 | explicit | |
11035 | unary_negate(const _Predicate& __x) : _M_pred(__x) {} | |
11036 | ||
11037 | bool | |
11038 | operator()(const typename _Predicate::argument_type& __x) const | |
11039 | { return !_M_pred(__x); } | |
11040 | }; | |
11041 | ||
11042 | ||
11043 | template <class _Predicate> | |
11044 | inline unary_negate<_Predicate> | |
11045 | not1(const _Predicate& __pred) | |
11046 | { return unary_negate<_Predicate>(__pred); } | |
11047 | ||
11048 | ||
11049 | template <class _Predicate> | |
11050 | class binary_negate | |
11051 | : public binary_function<typename _Predicate::first_argument_type, | |
11052 | typename _Predicate::second_argument_type, | |
11053 | bool> | |
11054 | { | |
11055 | protected: | |
11056 | _Predicate _M_pred; | |
11057 | public: | |
11058 | explicit | |
11059 | binary_negate(const _Predicate& __x) | |
11060 | : _M_pred(__x) { } | |
11061 | ||
11062 | bool | |
11063 | operator()(const typename _Predicate::first_argument_type& __x, | |
11064 | const typename _Predicate::second_argument_type& __y) const | |
11065 | { return !_M_pred(__x, __y); } | |
11066 | }; | |
11067 | ||
11068 | ||
11069 | template <class _Predicate> | |
11070 | inline binary_negate<_Predicate> | |
11071 | not2(const _Predicate& __pred) | |
11072 | { return binary_negate<_Predicate>(__pred); } | |
11073 | # 391 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
11074 | template <class _Operation> | |
11075 | class binder1st | |
11076 | : public unary_function<typename _Operation::second_argument_type, | |
11077 | typename _Operation::result_type> | |
11078 | { | |
11079 | protected: | |
11080 | _Operation op; | |
11081 | typename _Operation::first_argument_type value; | |
11082 | public: | |
11083 | binder1st(const _Operation& __x, | |
11084 | const typename _Operation::first_argument_type& __y) | |
11085 | : op(__x), value(__y) {} | |
11086 | ||
11087 | typename _Operation::result_type | |
11088 | operator()(const typename _Operation::second_argument_type& __x) const | |
11089 | { return op(value, __x); } | |
11090 | ||
11091 | ||
11092 | ||
11093 | typename _Operation::result_type | |
11094 | operator()(typename _Operation::second_argument_type& __x) const | |
11095 | { return op(value, __x); } | |
11096 | }; | |
11097 | ||
11098 | ||
11099 | template <class _Operation, class _Tp> | |
11100 | inline binder1st<_Operation> | |
11101 | bind1st(const _Operation& __fn, const _Tp& __x) | |
11102 | { | |
11103 | typedef typename _Operation::first_argument_type _Arg1_type; | |
11104 | return binder1st<_Operation>(__fn, _Arg1_type(__x)); | |
11105 | } | |
11106 | ||
11107 | ||
11108 | template <class _Operation> | |
11109 | class binder2nd | |
11110 | : public unary_function<typename _Operation::first_argument_type, | |
11111 | typename _Operation::result_type> | |
11112 | { | |
11113 | protected: | |
11114 | _Operation op; | |
11115 | typename _Operation::second_argument_type value; | |
11116 | public: | |
11117 | binder2nd(const _Operation& __x, | |
11118 | const typename _Operation::second_argument_type& __y) | |
11119 | : op(__x), value(__y) {} | |
11120 | ||
11121 | typename _Operation::result_type | |
11122 | operator()(const typename _Operation::first_argument_type& __x) const | |
11123 | { return op(__x, value); } | |
11124 | ||
11125 | ||
11126 | ||
11127 | typename _Operation::result_type | |
11128 | operator()(typename _Operation::first_argument_type& __x) const | |
11129 | { return op(__x, value); } | |
11130 | }; | |
11131 | ||
11132 | ||
11133 | template <class _Operation, class _Tp> | |
11134 | inline binder2nd<_Operation> | |
11135 | bind2nd(const _Operation& __fn, const _Tp& __x) | |
11136 | { | |
11137 | typedef typename _Operation::second_argument_type _Arg2_type; | |
11138 | return binder2nd<_Operation>(__fn, _Arg2_type(__x)); | |
11139 | } | |
11140 | # 480 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
11141 | template <class _Arg, class _Result> | |
11142 | class pointer_to_unary_function : public unary_function<_Arg, _Result> | |
11143 | { | |
11144 | protected: | |
11145 | _Result (*_M_ptr)(_Arg); | |
11146 | public: | |
11147 | pointer_to_unary_function() {} | |
11148 | ||
11149 | explicit | |
11150 | pointer_to_unary_function(_Result (*__x)(_Arg)) | |
11151 | : _M_ptr(__x) {} | |
11152 | ||
11153 | _Result | |
11154 | operator()(_Arg __x) const | |
11155 | { return _M_ptr(__x); } | |
11156 | }; | |
11157 | ||
11158 | ||
11159 | template <class _Arg, class _Result> | |
11160 | inline pointer_to_unary_function<_Arg, _Result> | |
11161 | ptr_fun(_Result (*__x)(_Arg)) | |
11162 | { return pointer_to_unary_function<_Arg, _Result>(__x); } | |
11163 | ||
11164 | ||
11165 | template <class _Arg1, class _Arg2, class _Result> | |
11166 | class pointer_to_binary_function | |
11167 | : public binary_function<_Arg1, _Arg2, _Result> | |
11168 | { | |
11169 | protected: | |
11170 | _Result (*_M_ptr)(_Arg1, _Arg2); | |
11171 | public: | |
11172 | pointer_to_binary_function() {} | |
11173 | ||
11174 | explicit | |
11175 | pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) | |
11176 | : _M_ptr(__x) {} | |
11177 | ||
11178 | _Result | |
11179 | operator()(_Arg1 __x, _Arg2 __y) const | |
11180 | { return _M_ptr(__x, __y); } | |
11181 | }; | |
11182 | ||
11183 | ||
11184 | template <class _Arg1, class _Arg2, class _Result> | |
11185 | inline pointer_to_binary_function<_Arg1, _Arg2, _Result> | |
11186 | ptr_fun(_Result (*__x)(_Arg1, _Arg2)) | |
11187 | { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } | |
11188 | ||
11189 | ||
11190 | template <class _Tp> | |
11191 | struct _Identity : public unary_function<_Tp,_Tp> | |
11192 | { | |
11193 | _Tp& | |
11194 | operator()(_Tp& __x) const | |
11195 | { return __x; } | |
11196 | ||
11197 | const _Tp& | |
11198 | operator()(const _Tp& __x) const | |
11199 | { return __x; } | |
11200 | }; | |
11201 | ||
11202 | template <class _Pair> | |
11203 | struct _Select1st : public unary_function<_Pair, | |
11204 | typename _Pair::first_type> | |
11205 | { | |
11206 | typename _Pair::first_type& | |
11207 | operator()(_Pair& __x) const | |
11208 | { return __x.first; } | |
11209 | ||
11210 | const typename _Pair::first_type& | |
11211 | operator()(const _Pair& __x) const | |
11212 | { return __x.first; } | |
11213 | }; | |
11214 | ||
11215 | template <class _Pair> | |
11216 | struct _Select2nd : public unary_function<_Pair, | |
11217 | typename _Pair::second_type> | |
11218 | { | |
11219 | typename _Pair::second_type& | |
11220 | operator()(_Pair& __x) const | |
11221 | { return __x.second; } | |
11222 | ||
11223 | const typename _Pair::second_type& | |
11224 | operator()(const _Pair& __x) const | |
11225 | { return __x.second; } | |
11226 | }; | |
11227 | # 582 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_function.h" 3 | |
11228 | template <class _Ret, class _Tp> | |
11229 | class mem_fun_t : public unary_function<_Tp*, _Ret> | |
11230 | { | |
11231 | public: | |
11232 | explicit | |
11233 | mem_fun_t(_Ret (_Tp::*__pf)()) | |
11234 | : _M_f(__pf) {} | |
11235 | ||
11236 | _Ret | |
11237 | operator()(_Tp* __p) const | |
11238 | { return (__p->*_M_f)(); } | |
11239 | private: | |
11240 | _Ret (_Tp::*_M_f)(); | |
11241 | }; | |
11242 | ||
11243 | ||
11244 | template <class _Ret, class _Tp> | |
11245 | class const_mem_fun_t : public unary_function<const _Tp*, _Ret> | |
11246 | { | |
11247 | public: | |
11248 | explicit | |
11249 | const_mem_fun_t(_Ret (_Tp::*__pf)() const) | |
11250 | : _M_f(__pf) {} | |
11251 | ||
11252 | _Ret | |
11253 | operator()(const _Tp* __p) const | |
11254 | { return (__p->*_M_f)(); } | |
11255 | private: | |
11256 | _Ret (_Tp::*_M_f)() const; | |
11257 | }; | |
11258 | ||
11259 | ||
11260 | template <class _Ret, class _Tp> | |
11261 | class mem_fun_ref_t : public unary_function<_Tp, _Ret> | |
11262 | { | |
11263 | public: | |
11264 | explicit | |
11265 | mem_fun_ref_t(_Ret (_Tp::*__pf)()) | |
11266 | : _M_f(__pf) {} | |
11267 | ||
11268 | _Ret | |
11269 | operator()(_Tp& __r) const | |
11270 | { return (__r.*_M_f)(); } | |
11271 | private: | |
11272 | _Ret (_Tp::*_M_f)(); | |
11273 | }; | |
11274 | ||
11275 | ||
11276 | template <class _Ret, class _Tp> | |
11277 | class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> | |
11278 | { | |
11279 | public: | |
11280 | explicit | |
11281 | const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) | |
11282 | : _M_f(__pf) {} | |
11283 | ||
11284 | _Ret | |
11285 | operator()(const _Tp& __r) const | |
11286 | { return (__r.*_M_f)(); } | |
11287 | private: | |
11288 | _Ret (_Tp::*_M_f)() const; | |
11289 | }; | |
11290 | ||
11291 | ||
11292 | template <class _Ret, class _Tp, class _Arg> | |
11293 | class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> | |
11294 | { | |
11295 | public: | |
11296 | explicit | |
11297 | mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) | |
11298 | : _M_f(__pf) {} | |
11299 | ||
11300 | _Ret | |
11301 | operator()(_Tp* __p, _Arg __x) const | |
11302 | { return (__p->*_M_f)(__x); } | |
11303 | private: | |
11304 | _Ret (_Tp::*_M_f)(_Arg); | |
11305 | }; | |
11306 | ||
11307 | ||
11308 | template <class _Ret, class _Tp, class _Arg> | |
11309 | class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret> | |
11310 | { | |
11311 | public: | |
11312 | explicit | |
11313 | const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) | |
11314 | : _M_f(__pf) {} | |
11315 | ||
11316 | _Ret | |
11317 | operator()(const _Tp* __p, _Arg __x) const | |
11318 | { return (__p->*_M_f)(__x); } | |
11319 | private: | |
11320 | _Ret (_Tp::*_M_f)(_Arg) const; | |
11321 | }; | |
11322 | ||
11323 | ||
11324 | template <class _Ret, class _Tp, class _Arg> | |
11325 | class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> | |
11326 | { | |
11327 | public: | |
11328 | explicit | |
11329 | mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) | |
11330 | : _M_f(__pf) {} | |
11331 | ||
11332 | _Ret | |
11333 | operator()(_Tp& __r, _Arg __x) const | |
11334 | { return (__r.*_M_f)(__x); } | |
11335 | private: | |
11336 | _Ret (_Tp::*_M_f)(_Arg); | |
11337 | }; | |
11338 | ||
11339 | ||
11340 | template <class _Ret, class _Tp, class _Arg> | |
11341 | class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> | |
11342 | { | |
11343 | public: | |
11344 | explicit | |
11345 | const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) | |
11346 | : _M_f(__pf) {} | |
11347 | ||
11348 | _Ret | |
11349 | operator()(const _Tp& __r, _Arg __x) const | |
11350 | { return (__r.*_M_f)(__x); } | |
11351 | private: | |
11352 | _Ret (_Tp::*_M_f)(_Arg) const; | |
11353 | }; | |
11354 | ||
11355 | ||
11356 | ||
11357 | template <class _Ret, class _Tp> | |
11358 | inline mem_fun_t<_Ret, _Tp> | |
11359 | mem_fun(_Ret (_Tp::*__f)()) | |
11360 | { return mem_fun_t<_Ret, _Tp>(__f); } | |
11361 | ||
11362 | template <class _Ret, class _Tp> | |
11363 | inline const_mem_fun_t<_Ret, _Tp> | |
11364 | mem_fun(_Ret (_Tp::*__f)() const) | |
11365 | { return const_mem_fun_t<_Ret, _Tp>(__f); } | |
11366 | ||
11367 | template <class _Ret, class _Tp> | |
11368 | inline mem_fun_ref_t<_Ret, _Tp> | |
11369 | mem_fun_ref(_Ret (_Tp::*__f)()) | |
11370 | { return mem_fun_ref_t<_Ret, _Tp>(__f); } | |
11371 | ||
11372 | template <class _Ret, class _Tp> | |
11373 | inline const_mem_fun_ref_t<_Ret, _Tp> | |
11374 | mem_fun_ref(_Ret (_Tp::*__f)() const) | |
11375 | { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } | |
11376 | ||
11377 | template <class _Ret, class _Tp, class _Arg> | |
11378 | inline mem_fun1_t<_Ret, _Tp, _Arg> | |
11379 | mem_fun(_Ret (_Tp::*__f)(_Arg)) | |
11380 | { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } | |
11381 | ||
11382 | template <class _Ret, class _Tp, class _Arg> | |
11383 | inline const_mem_fun1_t<_Ret, _Tp, _Arg> | |
11384 | mem_fun(_Ret (_Tp::*__f)(_Arg) const) | |
11385 | { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } | |
11386 | ||
11387 | template <class _Ret, class _Tp, class _Arg> | |
11388 | inline mem_fun1_ref_t<_Ret, _Tp, _Arg> | |
11389 | mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) | |
11390 | { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } | |
11391 | ||
11392 | template <class _Ret, class _Tp, class _Arg> | |
11393 | inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> | |
11394 | mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) | |
11395 | { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } | |
11396 | ||
11397 | ||
11398 | ||
11399 | } | |
11400 | # 52 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 2 3 | |
11401 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 1 3 | |
11402 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11403 | ||
11404 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11405 | ||
11406 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/atomicity.h" 1 3 | |
11407 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/atomicity.h" 3 | |
11408 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/atomic_word.h" 1 3 | |
11409 | # 33 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/atomic_word.h" 3 | |
11410 | typedef int _Atomic_word; | |
11411 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/atomicity.h" 2 3 | |
11412 | ||
11413 | namespace __gnu_cxx | |
11414 | { | |
11415 | _Atomic_word | |
11416 | __attribute__ ((__unused__)) | |
11417 | __exchange_and_add(volatile _Atomic_word* __mem, int __val); | |
11418 | ||
11419 | void | |
11420 | __attribute__ ((__unused__)) | |
11421 | __atomic_add(volatile _Atomic_word* __mem, int __val); | |
11422 | } | |
11423 | # 46 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 2 3 | |
11424 | ||
11425 | ||
11426 | namespace std | |
11427 | { | |
11428 | # 109 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11429 | template<typename _CharT, typename _Traits, typename _Alloc> | |
11430 | class basic_string | |
11431 | { | |
11432 | typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; | |
11433 | ||
11434 | ||
11435 | public: | |
11436 | typedef _Traits traits_type; | |
11437 | typedef typename _Traits::char_type value_type; | |
11438 | typedef _Alloc allocator_type; | |
11439 | typedef typename _CharT_alloc_type::size_type size_type; | |
11440 | typedef typename _CharT_alloc_type::difference_type difference_type; | |
11441 | typedef typename _CharT_alloc_type::reference reference; | |
11442 | typedef typename _CharT_alloc_type::const_reference const_reference; | |
11443 | typedef typename _CharT_alloc_type::pointer pointer; | |
11444 | typedef typename _CharT_alloc_type::const_pointer const_pointer; | |
11445 | typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; | |
11446 | typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> | |
11447 | const_iterator; | |
11448 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | |
11449 | typedef std::reverse_iterator<iterator> reverse_iterator; | |
11450 | ||
11451 | private: | |
11452 | # 146 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11453 | struct _Rep_base | |
11454 | { | |
11455 | size_type _M_length; | |
11456 | size_type _M_capacity; | |
11457 | _Atomic_word _M_refcount; | |
11458 | }; | |
11459 | ||
11460 | struct _Rep : _Rep_base | |
11461 | { | |
11462 | ||
11463 | typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc; | |
11464 | # 171 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11465 | static const size_type _S_max_size; | |
11466 | static const _CharT _S_terminal; | |
11467 | ||
11468 | ||
11469 | ||
11470 | static size_type _S_empty_rep_storage[]; | |
11471 | ||
11472 | static _Rep& | |
11473 | _S_empty_rep() | |
11474 | { | |
11475 | void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage); | |
11476 | return *reinterpret_cast<_Rep*>(__p); | |
11477 | } | |
11478 | ||
11479 | bool | |
11480 | _M_is_leaked() const | |
11481 | { return this->_M_refcount < 0; } | |
11482 | ||
11483 | bool | |
11484 | _M_is_shared() const | |
11485 | { return this->_M_refcount > 0; } | |
11486 | ||
11487 | void | |
11488 | _M_set_leaked() | |
11489 | { this->_M_refcount = -1; } | |
11490 | ||
11491 | void | |
11492 | _M_set_sharable() | |
11493 | { this->_M_refcount = 0; } | |
11494 | ||
11495 | void | |
11496 | _M_set_length_and_sharable(size_type __n) | |
11497 | { | |
11498 | this->_M_set_sharable(); | |
11499 | this->_M_length = __n; | |
11500 | traits_type::assign(this->_M_refdata()[__n], _S_terminal); | |
11501 | ||
11502 | ||
11503 | } | |
11504 | ||
11505 | _CharT* | |
11506 | _M_refdata() throw() | |
11507 | { return reinterpret_cast<_CharT*>(this + 1); } | |
11508 | ||
11509 | _CharT* | |
11510 | _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) | |
11511 | { | |
11512 | return (!_M_is_leaked() && __alloc1 == __alloc2) | |
11513 | ? _M_refcopy() : _M_clone(__alloc1); | |
11514 | } | |
11515 | ||
11516 | ||
11517 | static _Rep* | |
11518 | _S_create(size_type, size_type, const _Alloc&); | |
11519 | ||
11520 | void | |
11521 | _M_dispose(const _Alloc& __a) | |
11522 | { | |
11523 | ||
11524 | if (__builtin_expect(this != &_S_empty_rep(), false)) | |
11525 | ||
11526 | if (__gnu_cxx::__exchange_and_add(&this->_M_refcount, -1) <= 0) | |
11527 | _M_destroy(__a); | |
11528 | } | |
11529 | ||
11530 | void | |
11531 | _M_destroy(const _Alloc&) throw(); | |
11532 | ||
11533 | _CharT* | |
11534 | _M_refcopy() throw() | |
11535 | { | |
11536 | ||
11537 | if (__builtin_expect(this != &_S_empty_rep(), false)) | |
11538 | ||
11539 | __gnu_cxx::__atomic_add(&this->_M_refcount, 1); | |
11540 | return _M_refdata(); | |
11541 | } | |
11542 | ||
11543 | _CharT* | |
11544 | _M_clone(const _Alloc&, size_type __res = 0); | |
11545 | }; | |
11546 | ||
11547 | ||
11548 | struct _Alloc_hider : _Alloc | |
11549 | { | |
11550 | _Alloc_hider(_CharT* __dat, const _Alloc& __a) | |
11551 | : _Alloc(__a), _M_p(__dat) { } | |
11552 | ||
11553 | _CharT* _M_p; | |
11554 | }; | |
11555 | ||
11556 | public: | |
11557 | ||
11558 | ||
11559 | ||
11560 | ||
11561 | static const size_type npos = static_cast<size_type>(-1); | |
11562 | ||
11563 | private: | |
11564 | ||
11565 | mutable _Alloc_hider _M_dataplus; | |
11566 | ||
11567 | _CharT* | |
11568 | _M_data() const | |
11569 | { return _M_dataplus._M_p; } | |
11570 | ||
11571 | _CharT* | |
11572 | _M_data(_CharT* __p) | |
11573 | { return (_M_dataplus._M_p = __p); } | |
11574 | ||
11575 | _Rep* | |
11576 | _M_rep() const | |
11577 | { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } | |
11578 | ||
11579 | ||
11580 | ||
11581 | iterator | |
11582 | _M_ibegin() const | |
11583 | { return iterator(_M_data()); } | |
11584 | ||
11585 | iterator | |
11586 | _M_iend() const | |
11587 | { return iterator(_M_data() + this->size()); } | |
11588 | ||
11589 | void | |
11590 | _M_leak() | |
11591 | { | |
11592 | if (!_M_rep()->_M_is_leaked()) | |
11593 | _M_leak_hard(); | |
11594 | } | |
11595 | ||
11596 | size_type | |
11597 | _M_check(size_type __pos, const char* __s) const | |
11598 | { | |
11599 | if (__pos > this->size()) | |
11600 | __throw_out_of_range((__s)); | |
11601 | return __pos; | |
11602 | } | |
11603 | ||
11604 | void | |
11605 | _M_check_length(size_type __n1, size_type __n2, const char* __s) const | |
11606 | { | |
11607 | if (this->max_size() - (this->size() - __n1) < __n2) | |
11608 | __throw_length_error((__s)); | |
11609 | } | |
11610 | ||
11611 | ||
11612 | size_type | |
11613 | _M_limit(size_type __pos, size_type __off) const | |
11614 | { | |
11615 | const bool __testoff = __off < this->size() - __pos; | |
11616 | return __testoff ? __off : this->size() - __pos; | |
11617 | } | |
11618 | ||
11619 | ||
11620 | bool | |
11621 | _M_disjunct(const _CharT* __s) const | |
11622 | { | |
11623 | return (less<const _CharT*>()(__s, _M_data()) | |
11624 | || less<const _CharT*>()(_M_data() + this->size(), __s)); | |
11625 | } | |
11626 | ||
11627 | ||
11628 | ||
11629 | static void | |
11630 | _M_copy(_CharT* __d, const _CharT* __s, size_type __n) | |
11631 | { | |
11632 | if (__n == 1) | |
11633 | traits_type::assign(*__d, *__s); | |
11634 | else | |
11635 | traits_type::copy(__d, __s, __n); | |
11636 | } | |
11637 | ||
11638 | static void | |
11639 | _M_move(_CharT* __d, const _CharT* __s, size_type __n) | |
11640 | { | |
11641 | if (__n == 1) | |
11642 | traits_type::assign(*__d, *__s); | |
11643 | else | |
11644 | traits_type::move(__d, __s, __n); | |
11645 | } | |
11646 | ||
11647 | static void | |
11648 | _M_assign(_CharT* __d, size_type __n, _CharT __c) | |
11649 | { | |
11650 | if (__n == 1) | |
11651 | traits_type::assign(*__d, __c); | |
11652 | else | |
11653 | traits_type::assign(__d, __n, __c); | |
11654 | } | |
11655 | ||
11656 | ||
11657 | ||
11658 | template<class _Iterator> | |
11659 | static void | |
11660 | _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) | |
11661 | { | |
11662 | for (; __k1 != __k2; ++__k1, ++__p) | |
11663 | traits_type::assign(*__p, *__k1); | |
11664 | } | |
11665 | ||
11666 | static void | |
11667 | _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) | |
11668 | { _S_copy_chars(__p, __k1.base(), __k2.base()); } | |
11669 | ||
11670 | static void | |
11671 | _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) | |
11672 | { _S_copy_chars(__p, __k1.base(), __k2.base()); } | |
11673 | ||
11674 | static void | |
11675 | _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) | |
11676 | { _M_copy(__p, __k1, __k2 - __k1); } | |
11677 | ||
11678 | static void | |
11679 | _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) | |
11680 | { _M_copy(__p, __k1, __k2 - __k1); } | |
11681 | ||
11682 | void | |
11683 | _M_mutate(size_type __pos, size_type __len1, size_type __len2); | |
11684 | ||
11685 | void | |
11686 | _M_leak_hard(); | |
11687 | ||
11688 | static _Rep& | |
11689 | _S_empty_rep() | |
11690 | { return _Rep::_S_empty_rep(); } | |
11691 | ||
11692 | public: | |
11693 | ||
11694 | ||
11695 | ||
11696 | ||
11697 | ||
11698 | ||
11699 | ||
11700 | inline | |
11701 | basic_string(); | |
11702 | ||
11703 | ||
11704 | ||
11705 | ||
11706 | explicit | |
11707 | basic_string(const _Alloc& __a); | |
11708 | ||
11709 | ||
11710 | ||
11711 | ||
11712 | ||
11713 | ||
11714 | basic_string(const basic_string& __str); | |
11715 | ||
11716 | ||
11717 | ||
11718 | ||
11719 | ||
11720 | ||
11721 | basic_string(const basic_string& __str, size_type __pos, | |
11722 | size_type __n = npos); | |
11723 | ||
11724 | ||
11725 | ||
11726 | ||
11727 | ||
11728 | ||
11729 | ||
11730 | basic_string(const basic_string& __str, size_type __pos, | |
11731 | size_type __n, const _Alloc& __a); | |
11732 | # 448 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11733 | basic_string(const _CharT* __s, size_type __n, | |
11734 | const _Alloc& __a = _Alloc()); | |
11735 | ||
11736 | ||
11737 | ||
11738 | ||
11739 | ||
11740 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); | |
11741 | ||
11742 | ||
11743 | ||
11744 | ||
11745 | ||
11746 | ||
11747 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); | |
11748 | ||
11749 | ||
11750 | ||
11751 | ||
11752 | ||
11753 | ||
11754 | ||
11755 | template<class _InputIterator> | |
11756 | basic_string(_InputIterator __beg, _InputIterator __end, | |
11757 | const _Alloc& __a = _Alloc()); | |
11758 | ||
11759 | ||
11760 | ||
11761 | ||
11762 | ~basic_string() | |
11763 | { _M_rep()->_M_dispose(this->get_allocator()); } | |
11764 | ||
11765 | ||
11766 | ||
11767 | ||
11768 | ||
11769 | basic_string& | |
11770 | operator=(const basic_string& __str) | |
11771 | { return this->assign(__str); } | |
11772 | ||
11773 | ||
11774 | ||
11775 | ||
11776 | ||
11777 | basic_string& | |
11778 | operator=(const _CharT* __s) | |
11779 | { return this->assign(__s); } | |
11780 | # 503 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11781 | basic_string& | |
11782 | operator=(_CharT __c) | |
11783 | { | |
11784 | this->assign(1, __c); | |
11785 | return *this; | |
11786 | } | |
11787 | ||
11788 | ||
11789 | ||
11790 | ||
11791 | ||
11792 | ||
11793 | iterator | |
11794 | begin() | |
11795 | { | |
11796 | _M_leak(); | |
11797 | return iterator(_M_data()); | |
11798 | } | |
11799 | ||
11800 | ||
11801 | ||
11802 | ||
11803 | ||
11804 | const_iterator | |
11805 | begin() const | |
11806 | { return const_iterator(_M_data()); } | |
11807 | ||
11808 | ||
11809 | ||
11810 | ||
11811 | ||
11812 | iterator | |
11813 | end() | |
11814 | { | |
11815 | _M_leak(); | |
11816 | return iterator(_M_data() + this->size()); | |
11817 | } | |
11818 | ||
11819 | ||
11820 | ||
11821 | ||
11822 | ||
11823 | const_iterator | |
11824 | end() const | |
11825 | { return const_iterator(_M_data() + this->size()); } | |
11826 | ||
11827 | ||
11828 | ||
11829 | ||
11830 | ||
11831 | ||
11832 | reverse_iterator | |
11833 | rbegin() | |
11834 | { return reverse_iterator(this->end()); } | |
11835 | ||
11836 | ||
11837 | ||
11838 | ||
11839 | ||
11840 | ||
11841 | const_reverse_iterator | |
11842 | rbegin() const | |
11843 | { return const_reverse_iterator(this->end()); } | |
11844 | ||
11845 | ||
11846 | ||
11847 | ||
11848 | ||
11849 | ||
11850 | reverse_iterator | |
11851 | rend() | |
11852 | { return reverse_iterator(this->begin()); } | |
11853 | ||
11854 | ||
11855 | ||
11856 | ||
11857 | ||
11858 | ||
11859 | const_reverse_iterator | |
11860 | rend() const | |
11861 | { return const_reverse_iterator(this->begin()); } | |
11862 | ||
11863 | public: | |
11864 | ||
11865 | ||
11866 | ||
11867 | size_type | |
11868 | size() const | |
11869 | { return _M_rep()->_M_length; } | |
11870 | ||
11871 | ||
11872 | ||
11873 | size_type | |
11874 | length() const | |
11875 | { return _M_rep()->_M_length; } | |
11876 | ||
11877 | ||
11878 | size_type | |
11879 | max_size() const | |
11880 | { return _Rep::_S_max_size; } | |
11881 | # 614 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11882 | void | |
11883 | resize(size_type __n, _CharT __c); | |
11884 | # 627 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11885 | void | |
11886 | resize(size_type __n) | |
11887 | { this->resize(__n, _CharT()); } | |
11888 | ||
11889 | ||
11890 | ||
11891 | ||
11892 | ||
11893 | size_type | |
11894 | capacity() const | |
11895 | { return _M_rep()->_M_capacity; } | |
11896 | # 656 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11897 | void | |
11898 | reserve(size_type __res_arg = 0); | |
11899 | ||
11900 | ||
11901 | ||
11902 | ||
11903 | void | |
11904 | clear() | |
11905 | { _M_mutate(0, this->size(), 0); } | |
11906 | ||
11907 | ||
11908 | ||
11909 | ||
11910 | bool | |
11911 | empty() const | |
11912 | { return this->size() == 0; } | |
11913 | # 684 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11914 | const_reference | |
11915 | operator[] (size_type __pos) const | |
11916 | { | |
11917 | ; | |
11918 | return _M_data()[__pos]; | |
11919 | } | |
11920 | # 701 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11921 | reference | |
11922 | operator[](size_type __pos) | |
11923 | { | |
11924 | ||
11925 | ; | |
11926 | ||
11927 | ; | |
11928 | _M_leak(); | |
11929 | return _M_data()[__pos]; | |
11930 | } | |
11931 | # 722 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11932 | const_reference | |
11933 | at(size_type __n) const | |
11934 | { | |
11935 | if (__n >= this->size()) | |
11936 | __throw_out_of_range(("basic_string::at")); | |
11937 | return _M_data()[__n]; | |
11938 | } | |
11939 | # 741 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11940 | reference | |
11941 | at(size_type __n) | |
11942 | { | |
11943 | if (__n >= size()) | |
11944 | __throw_out_of_range(("basic_string::at")); | |
11945 | _M_leak(); | |
11946 | return _M_data()[__n]; | |
11947 | } | |
11948 | ||
11949 | ||
11950 | ||
11951 | ||
11952 | ||
11953 | ||
11954 | ||
11955 | basic_string& | |
11956 | operator+=(const basic_string& __str) | |
11957 | { return this->append(__str); } | |
11958 | ||
11959 | ||
11960 | ||
11961 | ||
11962 | ||
11963 | ||
11964 | basic_string& | |
11965 | operator+=(const _CharT* __s) | |
11966 | { return this->append(__s); } | |
11967 | ||
11968 | ||
11969 | ||
11970 | ||
11971 | ||
11972 | ||
11973 | basic_string& | |
11974 | operator+=(_CharT __c) | |
11975 | { | |
11976 | this->push_back(__c); | |
11977 | return *this; | |
11978 | } | |
11979 | ||
11980 | ||
11981 | ||
11982 | ||
11983 | ||
11984 | ||
11985 | basic_string& | |
11986 | append(const basic_string& __str); | |
11987 | # 801 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
11988 | basic_string& | |
11989 | append(const basic_string& __str, size_type __pos, size_type __n); | |
11990 | ||
11991 | ||
11992 | ||
11993 | ||
11994 | ||
11995 | ||
11996 | ||
11997 | basic_string& | |
11998 | append(const _CharT* __s, size_type __n); | |
11999 | ||
12000 | ||
12001 | ||
12002 | ||
12003 | ||
12004 | ||
12005 | basic_string& | |
12006 | append(const _CharT* __s) | |
12007 | { | |
12008 | ; | |
12009 | return this->append(__s, traits_type::length(__s)); | |
12010 | } | |
12011 | # 833 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12012 | basic_string& | |
12013 | append(size_type __n, _CharT __c); | |
12014 | # 844 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12015 | template<class _InputIterator> | |
12016 | basic_string& | |
12017 | append(_InputIterator __first, _InputIterator __last) | |
12018 | { return this->replace(_M_iend(), _M_iend(), __first, __last); } | |
12019 | ||
12020 | ||
12021 | ||
12022 | ||
12023 | ||
12024 | void | |
12025 | push_back(_CharT __c) | |
12026 | { | |
12027 | const size_type __len = 1 + this->size(); | |
12028 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
12029 | this->reserve(__len); | |
12030 | traits_type::assign(_M_data()[this->size()], __c); | |
12031 | _M_rep()->_M_set_length_and_sharable(__len); | |
12032 | } | |
12033 | ||
12034 | ||
12035 | ||
12036 | ||
12037 | ||
12038 | ||
12039 | basic_string& | |
12040 | assign(const basic_string& __str); | |
12041 | # 883 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12042 | basic_string& | |
12043 | assign(const basic_string& __str, size_type __pos, size_type __n) | |
12044 | { return this->assign(__str._M_data() | |
12045 | + __str._M_check(__pos, "basic_string::assign"), | |
12046 | __str._M_limit(__pos, __n)); } | |
12047 | # 899 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12048 | basic_string& | |
12049 | assign(const _CharT* __s, size_type __n); | |
12050 | # 911 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12051 | basic_string& | |
12052 | assign(const _CharT* __s) | |
12053 | { | |
12054 | ; | |
12055 | return this->assign(__s, traits_type::length(__s)); | |
12056 | } | |
12057 | # 927 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12058 | basic_string& | |
12059 | assign(size_type __n, _CharT __c) | |
12060 | { return _M_replace_aux(size_type(0), this->size(), __n, __c); } | |
12061 | # 939 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12062 | template<class _InputIterator> | |
12063 | basic_string& | |
12064 | assign(_InputIterator __first, _InputIterator __last) | |
12065 | { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } | |
12066 | # 956 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12067 | void | |
12068 | insert(iterator __p, size_type __n, _CharT __c) | |
12069 | { this->replace(__p, __p, __n, __c); } | |
12070 | # 971 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12071 | template<class _InputIterator> | |
12072 | void | |
12073 | insert(iterator __p, _InputIterator __beg, _InputIterator __end) | |
12074 | { this->replace(__p, __p, __beg, __end); } | |
12075 | # 987 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12076 | basic_string& | |
12077 | insert(size_type __pos1, const basic_string& __str) | |
12078 | { return this->insert(__pos1, __str, size_type(0), __str.size()); } | |
12079 | # 1009 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12080 | basic_string& | |
12081 | insert(size_type __pos1, const basic_string& __str, | |
12082 | size_type __pos2, size_type __n) | |
12083 | { return this->insert(__pos1, __str._M_data() | |
12084 | + __str._M_check(__pos2, "basic_string::insert"), | |
12085 | __str._M_limit(__pos2, __n)); } | |
12086 | # 1032 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12087 | basic_string& | |
12088 | insert(size_type __pos, const _CharT* __s, size_type __n); | |
12089 | # 1050 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12090 | basic_string& | |
12091 | insert(size_type __pos, const _CharT* __s) | |
12092 | { | |
12093 | ; | |
12094 | return this->insert(__pos, __s, traits_type::length(__s)); | |
12095 | } | |
12096 | # 1073 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12097 | basic_string& | |
12098 | insert(size_type __pos, size_type __n, _CharT __c) | |
12099 | { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), | |
12100 | size_type(0), __n, __c); } | |
12101 | # 1090 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12102 | iterator | |
12103 | insert(iterator __p, _CharT __c) | |
12104 | { | |
12105 | ; | |
12106 | const size_type __pos = __p - _M_ibegin(); | |
12107 | _M_replace_aux(__pos, size_type(0), size_type(1), __c); | |
12108 | _M_rep()->_M_set_leaked(); | |
12109 | return this->_M_ibegin() + __pos; | |
12110 | } | |
12111 | # 1114 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12112 | basic_string& | |
12113 | erase(size_type __pos = 0, size_type __n = npos) | |
12114 | { | |
12115 | _M_mutate(_M_check(__pos, "basic_string::erase"), | |
12116 | _M_limit(__pos, __n), size_type(0)); | |
12117 | return *this; | |
12118 | } | |
12119 | # 1130 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12120 | iterator | |
12121 | erase(iterator __position) | |
12122 | { | |
12123 | ; | |
12124 | ||
12125 | const size_type __pos = __position - _M_ibegin(); | |
12126 | _M_mutate(__pos, size_type(1), size_type(0)); | |
12127 | _M_rep()->_M_set_leaked(); | |
12128 | return _M_ibegin() + __pos; | |
12129 | } | |
12130 | # 1150 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12131 | iterator | |
12132 | erase(iterator __first, iterator __last) | |
12133 | { | |
12134 | ; | |
12135 | ||
12136 | const size_type __pos = __first - _M_ibegin(); | |
12137 | _M_mutate(__pos, __last - __first, size_type(0)); | |
12138 | _M_rep()->_M_set_leaked(); | |
12139 | return _M_ibegin() + __pos; | |
12140 | } | |
12141 | # 1177 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12142 | basic_string& | |
12143 | replace(size_type __pos, size_type __n, const basic_string& __str) | |
12144 | { return this->replace(__pos, __n, __str._M_data(), __str.size()); } | |
12145 | # 1199 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12146 | basic_string& | |
12147 | replace(size_type __pos1, size_type __n1, const basic_string& __str, | |
12148 | size_type __pos2, size_type __n2) | |
12149 | { return this->replace(__pos1, __n1, __str._M_data() | |
12150 | + __str._M_check(__pos2, "basic_string::replace"), | |
12151 | __str._M_limit(__pos2, __n2)); } | |
12152 | # 1223 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12153 | basic_string& | |
12154 | replace(size_type __pos, size_type __n1, const _CharT* __s, | |
12155 | size_type __n2); | |
12156 | # 1242 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12157 | basic_string& | |
12158 | replace(size_type __pos, size_type __n1, const _CharT* __s) | |
12159 | { | |
12160 | ; | |
12161 | return this->replace(__pos, __n1, __s, traits_type::length(__s)); | |
12162 | } | |
12163 | # 1265 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12164 | basic_string& | |
12165 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) | |
12166 | { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), | |
12167 | _M_limit(__pos, __n1), __n2, __c); } | |
12168 | # 1283 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12169 | basic_string& | |
12170 | replace(iterator __i1, iterator __i2, const basic_string& __str) | |
12171 | { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } | |
12172 | # 1301 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12173 | basic_string& | |
12174 | replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) | |
12175 | { | |
12176 | ; | |
12177 | ||
12178 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); | |
12179 | } | |
12180 | # 1322 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12181 | basic_string& | |
12182 | replace(iterator __i1, iterator __i2, const _CharT* __s) | |
12183 | { | |
12184 | ; | |
12185 | return this->replace(__i1, __i2, __s, traits_type::length(__s)); | |
12186 | } | |
12187 | # 1343 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12188 | basic_string& | |
12189 | replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) | |
12190 | { | |
12191 | ; | |
12192 | ||
12193 | return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); | |
12194 | } | |
12195 | # 1365 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12196 | template<class _InputIterator> | |
12197 | basic_string& | |
12198 | replace(iterator __i1, iterator __i2, | |
12199 | _InputIterator __k1, _InputIterator __k2) | |
12200 | { | |
12201 | ; | |
12202 | ||
12203 | ; | |
12204 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
12205 | return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); | |
12206 | } | |
12207 | ||
12208 | ||
12209 | ||
12210 | basic_string& | |
12211 | replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) | |
12212 | { | |
12213 | ; | |
12214 | ||
12215 | ; | |
12216 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
12217 | __k1, __k2 - __k1); | |
12218 | } | |
12219 | ||
12220 | basic_string& | |
12221 | replace(iterator __i1, iterator __i2, | |
12222 | const _CharT* __k1, const _CharT* __k2) | |
12223 | { | |
12224 | ; | |
12225 | ||
12226 | ; | |
12227 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
12228 | __k1, __k2 - __k1); | |
12229 | } | |
12230 | ||
12231 | basic_string& | |
12232 | replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) | |
12233 | { | |
12234 | ; | |
12235 | ||
12236 | ; | |
12237 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
12238 | __k1.base(), __k2 - __k1); | |
12239 | } | |
12240 | ||
12241 | basic_string& | |
12242 | replace(iterator __i1, iterator __i2, | |
12243 | const_iterator __k1, const_iterator __k2) | |
12244 | { | |
12245 | ; | |
12246 | ||
12247 | ; | |
12248 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
12249 | __k1.base(), __k2 - __k1); | |
12250 | } | |
12251 | ||
12252 | private: | |
12253 | template<class _Integer> | |
12254 | basic_string& | |
12255 | _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, | |
12256 | _Integer __val, __true_type) | |
12257 | { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } | |
12258 | ||
12259 | template<class _InputIterator> | |
12260 | basic_string& | |
12261 | _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, | |
12262 | _InputIterator __k2, __false_type); | |
12263 | ||
12264 | basic_string& | |
12265 | _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, | |
12266 | _CharT __c); | |
12267 | ||
12268 | basic_string& | |
12269 | _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, | |
12270 | size_type __n2); | |
12271 | ||
12272 | ||
12273 | ||
12274 | template<class _InIterator> | |
12275 | static _CharT* | |
12276 | _S_construct_aux(_InIterator __beg, _InIterator __end, | |
12277 | const _Alloc& __a, __false_type) | |
12278 | { | |
12279 | typedef typename iterator_traits<_InIterator>::iterator_category _Tag; | |
12280 | return _S_construct(__beg, __end, __a, _Tag()); | |
12281 | } | |
12282 | ||
12283 | template<class _InIterator> | |
12284 | static _CharT* | |
12285 | _S_construct_aux(_InIterator __beg, _InIterator __end, | |
12286 | const _Alloc& __a, __true_type) | |
12287 | { return _S_construct(static_cast<size_type>(__beg), | |
12288 | static_cast<value_type>(__end), __a); } | |
12289 | ||
12290 | template<class _InIterator> | |
12291 | static _CharT* | |
12292 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) | |
12293 | { | |
12294 | typedef typename std::__is_integer<_InIterator>::__type _Integral; | |
12295 | return _S_construct_aux(__beg, __end, __a, _Integral()); | |
12296 | } | |
12297 | ||
12298 | ||
12299 | template<class _InIterator> | |
12300 | static _CharT* | |
12301 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
12302 | input_iterator_tag); | |
12303 | ||
12304 | ||
12305 | ||
12306 | template<class _FwdIterator> | |
12307 | static _CharT* | |
12308 | _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, | |
12309 | forward_iterator_tag); | |
12310 | ||
12311 | static _CharT* | |
12312 | _S_construct(size_type __req, _CharT __c, const _Alloc& __a); | |
12313 | ||
12314 | public: | |
12315 | # 1496 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12316 | size_type | |
12317 | copy(_CharT* __s, size_type __n, size_type __pos = 0) const; | |
12318 | # 1506 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12319 | void | |
12320 | swap(basic_string& __s); | |
12321 | # 1516 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12322 | const _CharT* | |
12323 | c_str() const | |
12324 | { return _M_data(); } | |
12325 | ||
12326 | ||
12327 | ||
12328 | ||
12329 | ||
12330 | ||
12331 | ||
12332 | const _CharT* | |
12333 | data() const | |
12334 | { return _M_data(); } | |
12335 | ||
12336 | ||
12337 | ||
12338 | ||
12339 | allocator_type | |
12340 | get_allocator() const | |
12341 | { return _M_dataplus; } | |
12342 | # 1548 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12343 | size_type | |
12344 | find(const _CharT* __s, size_type __pos, size_type __n) const; | |
12345 | # 1561 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12346 | size_type | |
12347 | find(const basic_string& __str, size_type __pos = 0) const | |
12348 | { return this->find(__str.data(), __pos, __str.size()); } | |
12349 | # 1575 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12350 | size_type | |
12351 | find(const _CharT* __s, size_type __pos = 0) const | |
12352 | { | |
12353 | ; | |
12354 | return this->find(__s, __pos, traits_type::length(__s)); | |
12355 | } | |
12356 | # 1592 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12357 | size_type | |
12358 | find(_CharT __c, size_type __pos = 0) const; | |
12359 | # 1605 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12360 | size_type | |
12361 | rfind(const basic_string& __str, size_type __pos = npos) const | |
12362 | { return this->rfind(__str.data(), __pos, __str.size()); } | |
12363 | # 1620 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12364 | size_type | |
12365 | rfind(const _CharT* __s, size_type __pos, size_type __n) const; | |
12366 | # 1633 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12367 | size_type | |
12368 | rfind(const _CharT* __s, size_type __pos = npos) const | |
12369 | { | |
12370 | ; | |
12371 | return this->rfind(__s, __pos, traits_type::length(__s)); | |
12372 | } | |
12373 | # 1650 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12374 | size_type | |
12375 | rfind(_CharT __c, size_type __pos = npos) const; | |
12376 | # 1663 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12377 | size_type | |
12378 | find_first_of(const basic_string& __str, size_type __pos = 0) const | |
12379 | { return this->find_first_of(__str.data(), __pos, __str.size()); } | |
12380 | # 1678 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12381 | size_type | |
12382 | find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; | |
12383 | # 1691 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12384 | size_type | |
12385 | find_first_of(const _CharT* __s, size_type __pos = 0) const | |
12386 | { | |
12387 | ; | |
12388 | return this->find_first_of(__s, __pos, traits_type::length(__s)); | |
12389 | } | |
12390 | # 1710 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12391 | size_type | |
12392 | find_first_of(_CharT __c, size_type __pos = 0) const | |
12393 | { return this->find(__c, __pos); } | |
12394 | # 1724 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12395 | size_type | |
12396 | find_last_of(const basic_string& __str, size_type __pos = npos) const | |
12397 | { return this->find_last_of(__str.data(), __pos, __str.size()); } | |
12398 | # 1739 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12399 | size_type | |
12400 | find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; | |
12401 | # 1752 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12402 | size_type | |
12403 | find_last_of(const _CharT* __s, size_type __pos = npos) const | |
12404 | { | |
12405 | ; | |
12406 | return this->find_last_of(__s, __pos, traits_type::length(__s)); | |
12407 | } | |
12408 | # 1771 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12409 | size_type | |
12410 | find_last_of(_CharT __c, size_type __pos = npos) const | |
12411 | { return this->rfind(__c, __pos); } | |
12412 | # 1785 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12413 | size_type | |
12414 | find_first_not_of(const basic_string& __str, size_type __pos = 0) const | |
12415 | { return this->find_first_not_of(__str.data(), __pos, __str.size()); } | |
12416 | # 1800 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12417 | size_type | |
12418 | find_first_not_of(const _CharT* __s, size_type __pos, | |
12419 | size_type __n) const; | |
12420 | # 1814 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12421 | size_type | |
12422 | find_first_not_of(const _CharT* __s, size_type __pos = 0) const | |
12423 | { | |
12424 | ; | |
12425 | return this->find_first_not_of(__s, __pos, traits_type::length(__s)); | |
12426 | } | |
12427 | # 1831 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12428 | size_type | |
12429 | find_first_not_of(_CharT __c, size_type __pos = 0) const; | |
12430 | # 1844 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12431 | size_type | |
12432 | find_last_not_of(const basic_string& __str, size_type __pos = npos) const | |
12433 | { return this->find_last_not_of(__str.data(), __pos, __str.size()); } | |
12434 | # 1860 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12435 | size_type | |
12436 | find_last_not_of(const _CharT* __s, size_type __pos, | |
12437 | size_type __n) const; | |
12438 | # 1873 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12439 | size_type | |
12440 | find_last_not_of(const _CharT* __s, size_type __pos = npos) const | |
12441 | { | |
12442 | ; | |
12443 | return this->find_last_not_of(__s, __pos, traits_type::length(__s)); | |
12444 | } | |
12445 | # 1890 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12446 | size_type | |
12447 | find_last_not_of(_CharT __c, size_type __pos = npos) const; | |
12448 | # 1905 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12449 | basic_string | |
12450 | substr(size_type __pos = 0, size_type __n = npos) const | |
12451 | { return basic_string(*this, | |
12452 | _M_check(__pos, "basic_string::substr"), __n); } | |
12453 | # 1923 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12454 | int | |
12455 | compare(const basic_string& __str) const | |
12456 | { | |
12457 | const size_type __size = this->size(); | |
12458 | const size_type __osize = __str.size(); | |
12459 | const size_type __len = std::min(__size, __osize); | |
12460 | ||
12461 | int __r = traits_type::compare(_M_data(), __str.data(), __len); | |
12462 | if (!__r) | |
12463 | __r = __size - __osize; | |
12464 | return __r; | |
12465 | } | |
12466 | # 1953 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12467 | int | |
12468 | compare(size_type __pos, size_type __n, const basic_string& __str) const; | |
12469 | # 1977 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12470 | int | |
12471 | compare(size_type __pos1, size_type __n1, const basic_string& __str, | |
12472 | size_type __pos2, size_type __n2) const; | |
12473 | # 1995 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12474 | int | |
12475 | compare(const _CharT* __s) const; | |
12476 | # 2018 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12477 | int | |
12478 | compare(size_type __pos, size_type __n1, const _CharT* __s) const; | |
12479 | # 2043 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12480 | int | |
12481 | compare(size_type __pos, size_type __n1, const _CharT* __s, | |
12482 | size_type __n2) const; | |
12483 | }; | |
12484 | ||
12485 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12486 | inline basic_string<_CharT, _Traits, _Alloc>:: | |
12487 | basic_string() | |
12488 | ||
12489 | : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } | |
12490 | # 2064 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12491 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12492 | basic_string<_CharT, _Traits, _Alloc> | |
12493 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12494 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12495 | { | |
12496 | basic_string<_CharT, _Traits, _Alloc> __str(__lhs); | |
12497 | __str.append(__rhs); | |
12498 | return __str; | |
12499 | } | |
12500 | ||
12501 | ||
12502 | ||
12503 | ||
12504 | ||
12505 | ||
12506 | ||
12507 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12508 | basic_string<_CharT,_Traits,_Alloc> | |
12509 | operator+(const _CharT* __lhs, | |
12510 | const basic_string<_CharT,_Traits,_Alloc>& __rhs); | |
12511 | ||
12512 | ||
12513 | ||
12514 | ||
12515 | ||
12516 | ||
12517 | ||
12518 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12519 | basic_string<_CharT,_Traits,_Alloc> | |
12520 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); | |
12521 | ||
12522 | ||
12523 | ||
12524 | ||
12525 | ||
12526 | ||
12527 | ||
12528 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12529 | inline basic_string<_CharT, _Traits, _Alloc> | |
12530 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12531 | const _CharT* __rhs) | |
12532 | { | |
12533 | basic_string<_CharT, _Traits, _Alloc> __str(__lhs); | |
12534 | __str.append(__rhs); | |
12535 | return __str; | |
12536 | } | |
12537 | ||
12538 | ||
12539 | ||
12540 | ||
12541 | ||
12542 | ||
12543 | ||
12544 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12545 | inline basic_string<_CharT, _Traits, _Alloc> | |
12546 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) | |
12547 | { | |
12548 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
12549 | typedef typename __string_type::size_type __size_type; | |
12550 | __string_type __str(__lhs); | |
12551 | __str.append(__size_type(1), __rhs); | |
12552 | return __str; | |
12553 | } | |
12554 | # 2135 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12555 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12556 | inline bool | |
12557 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12558 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12559 | { return __lhs.compare(__rhs) == 0; } | |
12560 | ||
12561 | ||
12562 | ||
12563 | ||
12564 | ||
12565 | ||
12566 | ||
12567 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12568 | inline bool | |
12569 | operator==(const _CharT* __lhs, | |
12570 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12571 | { return __rhs.compare(__lhs) == 0; } | |
12572 | ||
12573 | ||
12574 | ||
12575 | ||
12576 | ||
12577 | ||
12578 | ||
12579 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12580 | inline bool | |
12581 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12582 | const _CharT* __rhs) | |
12583 | { return __lhs.compare(__rhs) == 0; } | |
12584 | # 2172 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12585 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12586 | inline bool | |
12587 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12588 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12589 | { return __rhs.compare(__lhs) != 0; } | |
12590 | ||
12591 | ||
12592 | ||
12593 | ||
12594 | ||
12595 | ||
12596 | ||
12597 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12598 | inline bool | |
12599 | operator!=(const _CharT* __lhs, | |
12600 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12601 | { return __rhs.compare(__lhs) != 0; } | |
12602 | ||
12603 | ||
12604 | ||
12605 | ||
12606 | ||
12607 | ||
12608 | ||
12609 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12610 | inline bool | |
12611 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12612 | const _CharT* __rhs) | |
12613 | { return __lhs.compare(__rhs) != 0; } | |
12614 | # 2209 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12615 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12616 | inline bool | |
12617 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12618 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12619 | { return __lhs.compare(__rhs) < 0; } | |
12620 | ||
12621 | ||
12622 | ||
12623 | ||
12624 | ||
12625 | ||
12626 | ||
12627 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12628 | inline bool | |
12629 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12630 | const _CharT* __rhs) | |
12631 | { return __lhs.compare(__rhs) < 0; } | |
12632 | ||
12633 | ||
12634 | ||
12635 | ||
12636 | ||
12637 | ||
12638 | ||
12639 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12640 | inline bool | |
12641 | operator<(const _CharT* __lhs, | |
12642 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12643 | { return __rhs.compare(__lhs) > 0; } | |
12644 | # 2246 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12645 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12646 | inline bool | |
12647 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12648 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12649 | { return __lhs.compare(__rhs) > 0; } | |
12650 | ||
12651 | ||
12652 | ||
12653 | ||
12654 | ||
12655 | ||
12656 | ||
12657 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12658 | inline bool | |
12659 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12660 | const _CharT* __rhs) | |
12661 | { return __lhs.compare(__rhs) > 0; } | |
12662 | ||
12663 | ||
12664 | ||
12665 | ||
12666 | ||
12667 | ||
12668 | ||
12669 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12670 | inline bool | |
12671 | operator>(const _CharT* __lhs, | |
12672 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12673 | { return __rhs.compare(__lhs) < 0; } | |
12674 | # 2283 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12675 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12676 | inline bool | |
12677 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12678 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12679 | { return __lhs.compare(__rhs) <= 0; } | |
12680 | ||
12681 | ||
12682 | ||
12683 | ||
12684 | ||
12685 | ||
12686 | ||
12687 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12688 | inline bool | |
12689 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12690 | const _CharT* __rhs) | |
12691 | { return __lhs.compare(__rhs) <= 0; } | |
12692 | ||
12693 | ||
12694 | ||
12695 | ||
12696 | ||
12697 | ||
12698 | ||
12699 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12700 | inline bool | |
12701 | operator<=(const _CharT* __lhs, | |
12702 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12703 | { return __rhs.compare(__lhs) >= 0; } | |
12704 | # 2320 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12705 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12706 | inline bool | |
12707 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12708 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12709 | { return __lhs.compare(__rhs) >= 0; } | |
12710 | ||
12711 | ||
12712 | ||
12713 | ||
12714 | ||
12715 | ||
12716 | ||
12717 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12718 | inline bool | |
12719 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12720 | const _CharT* __rhs) | |
12721 | { return __lhs.compare(__rhs) >= 0; } | |
12722 | ||
12723 | ||
12724 | ||
12725 | ||
12726 | ||
12727 | ||
12728 | ||
12729 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12730 | inline bool | |
12731 | operator>=(const _CharT* __lhs, | |
12732 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12733 | { return __rhs.compare(__lhs) <= 0; } | |
12734 | # 2357 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12735 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12736 | inline void | |
12737 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
12738 | basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
12739 | { __lhs.swap(__rhs); } | |
12740 | # 2374 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12741 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12742 | basic_istream<_CharT, _Traits>& | |
12743 | operator>>(basic_istream<_CharT, _Traits>& __is, | |
12744 | basic_string<_CharT, _Traits, _Alloc>& __str); | |
12745 | ||
12746 | template<> | |
12747 | basic_istream<char>& | |
12748 | operator>>(basic_istream<char>& __is, basic_string<char>& __str); | |
12749 | # 2392 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12750 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12751 | basic_ostream<_CharT, _Traits>& | |
12752 | operator<<(basic_ostream<_CharT, _Traits>& __os, | |
12753 | const basic_string<_CharT, _Traits, _Alloc>& __str); | |
12754 | # 2410 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12755 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12756 | basic_istream<_CharT, _Traits>& | |
12757 | getline(basic_istream<_CharT, _Traits>& __is, | |
12758 | basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); | |
12759 | # 2427 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.h" 3 | |
12760 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12761 | inline basic_istream<_CharT, _Traits>& | |
12762 | getline(basic_istream<_CharT, _Traits>& __is, | |
12763 | basic_string<_CharT, _Traits, _Alloc>& __str); | |
12764 | ||
12765 | template<> | |
12766 | basic_istream<char>& | |
12767 | getline(basic_istream<char>& __in, basic_string<char>& __str, | |
12768 | char __delim); | |
12769 | ||
12770 | ||
12771 | ||
12772 | ||
12773 | ||
12774 | ||
12775 | ||
12776 | } | |
12777 | # 53 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 2 3 | |
12778 | ||
12779 | ||
12780 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/algorithm" 1 3 | |
12781 | # 63 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/algorithm" 3 | |
12782 | ||
12783 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/algorithm" 3 | |
12784 | ||
12785 | ||
12786 | ||
12787 | ||
12788 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 1 3 | |
12789 | # 65 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
12790 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 1 3 | |
12791 | # 65 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
12792 | namespace std | |
12793 | { | |
12794 | ||
12795 | ||
12796 | ||
12797 | template<typename _RandomAccessIterator, typename _Distance> | |
12798 | bool | |
12799 | __is_heap(_RandomAccessIterator __first, _Distance __n) | |
12800 | { | |
12801 | _Distance __parent = 0; | |
12802 | for (_Distance __child = 1; __child < __n; ++__child) | |
12803 | { | |
12804 | if (__first[__parent] < __first[__child]) | |
12805 | return false; | |
12806 | if ((__child & 1) == 0) | |
12807 | ++__parent; | |
12808 | } | |
12809 | return true; | |
12810 | } | |
12811 | ||
12812 | template<typename _RandomAccessIterator, typename _Distance, | |
12813 | typename _StrictWeakOrdering> | |
12814 | bool | |
12815 | __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp, | |
12816 | _Distance __n) | |
12817 | { | |
12818 | _Distance __parent = 0; | |
12819 | for (_Distance __child = 1; __child < __n; ++__child) | |
12820 | { | |
12821 | if (__comp(__first[__parent], __first[__child])) | |
12822 | return false; | |
12823 | if ((__child & 1) == 0) | |
12824 | ++__parent; | |
12825 | } | |
12826 | return true; | |
12827 | } | |
12828 | ||
12829 | template<typename _RandomAccessIterator> | |
12830 | bool | |
12831 | __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
12832 | { return std::__is_heap(__first, std::distance(__first, __last)); } | |
12833 | ||
12834 | template<typename _RandomAccessIterator, typename _StrictWeakOrdering> | |
12835 | bool | |
12836 | __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
12837 | _StrictWeakOrdering __comp) | |
12838 | { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } | |
12839 | ||
12840 | ||
12841 | ||
12842 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp> | |
12843 | void | |
12844 | __push_heap(_RandomAccessIterator __first, | |
12845 | _Distance __holeIndex, _Distance __topIndex, _Tp __value) | |
12846 | { | |
12847 | _Distance __parent = (__holeIndex - 1) / 2; | |
12848 | while (__holeIndex > __topIndex && *(__first + __parent) < __value) | |
12849 | { | |
12850 | *(__first + __holeIndex) = *(__first + __parent); | |
12851 | __holeIndex = __parent; | |
12852 | __parent = (__holeIndex - 1) / 2; | |
12853 | } | |
12854 | *(__first + __holeIndex) = __value; | |
12855 | } | |
12856 | # 139 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
12857 | template<typename _RandomAccessIterator> | |
12858 | inline void | |
12859 | push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
12860 | { | |
12861 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
12862 | _ValueType; | |
12863 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
12864 | _DistanceType; | |
12865 | ||
12866 | ||
12867 | ||
12868 | ||
12869 | ||
12870 | ; | |
12871 | ||
12872 | ||
12873 | std::__push_heap(__first, _DistanceType((__last - __first) - 1), | |
12874 | _DistanceType(0), _ValueType(*(__last - 1))); | |
12875 | } | |
12876 | ||
12877 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp, | |
12878 | typename _Compare> | |
12879 | void | |
12880 | __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
12881 | _Distance __topIndex, _Tp __value, _Compare __comp) | |
12882 | { | |
12883 | _Distance __parent = (__holeIndex - 1) / 2; | |
12884 | while (__holeIndex > __topIndex | |
12885 | && __comp(*(__first + __parent), __value)) | |
12886 | { | |
12887 | *(__first + __holeIndex) = *(__first + __parent); | |
12888 | __holeIndex = __parent; | |
12889 | __parent = (__holeIndex - 1) / 2; | |
12890 | } | |
12891 | *(__first + __holeIndex) = __value; | |
12892 | } | |
12893 | # 187 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
12894 | template<typename _RandomAccessIterator, typename _Compare> | |
12895 | inline void | |
12896 | push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
12897 | _Compare __comp) | |
12898 | { | |
12899 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
12900 | _ValueType; | |
12901 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
12902 | _DistanceType; | |
12903 | ||
12904 | ||
12905 | ||
12906 | ||
12907 | ; | |
12908 | ; | |
12909 | ||
12910 | std::__push_heap(__first, _DistanceType((__last - __first) - 1), | |
12911 | _DistanceType(0), _ValueType(*(__last - 1)), __comp); | |
12912 | } | |
12913 | ||
12914 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp> | |
12915 | void | |
12916 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
12917 | _Distance __len, _Tp __value) | |
12918 | { | |
12919 | const _Distance __topIndex = __holeIndex; | |
12920 | _Distance __secondChild = 2 * __holeIndex + 2; | |
12921 | while (__secondChild < __len) | |
12922 | { | |
12923 | if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) | |
12924 | __secondChild--; | |
12925 | *(__first + __holeIndex) = *(__first + __secondChild); | |
12926 | __holeIndex = __secondChild; | |
12927 | __secondChild = 2 * (__secondChild + 1); | |
12928 | } | |
12929 | if (__secondChild == __len) | |
12930 | { | |
12931 | *(__first + __holeIndex) = *(__first + (__secondChild - 1)); | |
12932 | __holeIndex = __secondChild - 1; | |
12933 | } | |
12934 | std::__push_heap(__first, __holeIndex, __topIndex, __value); | |
12935 | } | |
12936 | ||
12937 | template<typename _RandomAccessIterator, typename _Tp> | |
12938 | inline void | |
12939 | __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
12940 | _RandomAccessIterator __result, _Tp __value) | |
12941 | { | |
12942 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
12943 | _Distance; | |
12944 | *__result = *__first; | |
12945 | std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), | |
12946 | __value); | |
12947 | } | |
12948 | # 251 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
12949 | template<typename _RandomAccessIterator> | |
12950 | inline void | |
12951 | pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
12952 | { | |
12953 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
12954 | _ValueType; | |
12955 | ||
12956 | ||
12957 | ||
12958 | ||
12959 | ||
12960 | ; | |
12961 | ; | |
12962 | ||
12963 | std::__pop_heap(__first, __last - 1, __last - 1, | |
12964 | _ValueType(*(__last - 1))); | |
12965 | } | |
12966 | ||
12967 | template<typename _RandomAccessIterator, typename _Distance, | |
12968 | typename _Tp, typename _Compare> | |
12969 | void | |
12970 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
12971 | _Distance __len, _Tp __value, _Compare __comp) | |
12972 | { | |
12973 | const _Distance __topIndex = __holeIndex; | |
12974 | _Distance __secondChild = 2 * __holeIndex + 2; | |
12975 | while (__secondChild < __len) | |
12976 | { | |
12977 | if (__comp(*(__first + __secondChild), | |
12978 | *(__first + (__secondChild - 1)))) | |
12979 | __secondChild--; | |
12980 | *(__first + __holeIndex) = *(__first + __secondChild); | |
12981 | __holeIndex = __secondChild; | |
12982 | __secondChild = 2 * (__secondChild + 1); | |
12983 | } | |
12984 | if (__secondChild == __len) | |
12985 | { | |
12986 | *(__first + __holeIndex) = *(__first + (__secondChild - 1)); | |
12987 | __holeIndex = __secondChild - 1; | |
12988 | } | |
12989 | std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp); | |
12990 | } | |
12991 | ||
12992 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
12993 | inline void | |
12994 | __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
12995 | _RandomAccessIterator __result, _Tp __value, _Compare __comp) | |
12996 | { | |
12997 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
12998 | _Distance; | |
12999 | *__result = *__first; | |
13000 | std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), | |
13001 | __value, __comp); | |
13002 | } | |
13003 | # 317 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
13004 | template<typename _RandomAccessIterator, typename _Compare> | |
13005 | inline void | |
13006 | pop_heap(_RandomAccessIterator __first, | |
13007 | _RandomAccessIterator __last, _Compare __comp) | |
13008 | { | |
13009 | ||
13010 | ||
13011 | ||
13012 | ; | |
13013 | ; | |
13014 | ||
13015 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
13016 | _ValueType; | |
13017 | std::__pop_heap(__first, __last - 1, __last - 1, | |
13018 | _ValueType(*(__last - 1)), __comp); | |
13019 | } | |
13020 | # 342 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
13021 | template<typename _RandomAccessIterator> | |
13022 | void | |
13023 | make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
13024 | { | |
13025 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
13026 | _ValueType; | |
13027 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
13028 | _DistanceType; | |
13029 | ||
13030 | ||
13031 | ||
13032 | ||
13033 | ||
13034 | ; | |
13035 | ||
13036 | if (__last - __first < 2) | |
13037 | return; | |
13038 | ||
13039 | const _DistanceType __len = __last - __first; | |
13040 | _DistanceType __parent = (__len - 2) / 2; | |
13041 | while (true) | |
13042 | { | |
13043 | std::__adjust_heap(__first, __parent, __len, | |
13044 | _ValueType(*(__first + __parent))); | |
13045 | if (__parent == 0) | |
13046 | return; | |
13047 | __parent--; | |
13048 | } | |
13049 | } | |
13050 | # 382 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
13051 | template<typename _RandomAccessIterator, typename _Compare> | |
13052 | inline void | |
13053 | make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
13054 | _Compare __comp) | |
13055 | { | |
13056 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
13057 | _ValueType; | |
13058 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
13059 | _DistanceType; | |
13060 | ||
13061 | ||
13062 | ||
13063 | ||
13064 | ; | |
13065 | ||
13066 | if (__last - __first < 2) | |
13067 | return; | |
13068 | ||
13069 | const _DistanceType __len = __last - __first; | |
13070 | _DistanceType __parent = (__len - 2) / 2; | |
13071 | while (true) | |
13072 | { | |
13073 | std::__adjust_heap(__first, __parent, __len, | |
13074 | _ValueType(*(__first + __parent)), __comp); | |
13075 | if (__parent == 0) | |
13076 | return; | |
13077 | __parent--; | |
13078 | } | |
13079 | } | |
13080 | # 420 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
13081 | template<typename _RandomAccessIterator> | |
13082 | void | |
13083 | sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
13084 | { | |
13085 | ||
13086 | ||
13087 | ||
13088 | ||
13089 | ||
13090 | ; | |
13091 | ||
13092 | ||
13093 | while (__last - __first > 1) | |
13094 | std::pop_heap(__first, __last--); | |
13095 | } | |
13096 | # 446 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_heap.h" 3 | |
13097 | template<typename _RandomAccessIterator, typename _Compare> | |
13098 | void | |
13099 | sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
13100 | _Compare __comp) | |
13101 | { | |
13102 | ||
13103 | ||
13104 | ||
13105 | ; | |
13106 | ; | |
13107 | ||
13108 | while (__last - __first > 1) | |
13109 | std::pop_heap(__first, __last--, __comp); | |
13110 | } | |
13111 | ||
13112 | } | |
13113 | # 66 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 2 3 | |
13114 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_tempbuf.h" 1 3 | |
13115 | # 66 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_tempbuf.h" 3 | |
13116 | namespace std | |
13117 | { | |
13118 | ||
13119 | ||
13120 | ||
13121 | ||
13122 | ||
13123 | ||
13124 | ||
13125 | template<typename _ForwardIterator, typename _Tp> | |
13126 | class _Temporary_buffer | |
13127 | { | |
13128 | ||
13129 | ||
13130 | ||
13131 | public: | |
13132 | typedef _Tp value_type; | |
13133 | typedef value_type* pointer; | |
13134 | typedef pointer iterator; | |
13135 | typedef ptrdiff_t size_type; | |
13136 | ||
13137 | protected: | |
13138 | size_type _M_original_len; | |
13139 | size_type _M_len; | |
13140 | pointer _M_buffer; | |
13141 | ||
13142 | void | |
13143 | _M_initialize_buffer(const _Tp&, __true_type) { } | |
13144 | ||
13145 | void | |
13146 | _M_initialize_buffer(const _Tp& val, __false_type) | |
13147 | { std::uninitialized_fill_n(_M_buffer, _M_len, val); } | |
13148 | ||
13149 | public: | |
13150 | ||
13151 | size_type | |
13152 | size() const | |
13153 | { return _M_len; } | |
13154 | ||
13155 | ||
13156 | size_type | |
13157 | requested_size() const | |
13158 | { return _M_original_len; } | |
13159 | ||
13160 | ||
13161 | iterator | |
13162 | begin() | |
13163 | { return _M_buffer; } | |
13164 | ||
13165 | ||
13166 | iterator | |
13167 | end() | |
13168 | { return _M_buffer + _M_len; } | |
13169 | ||
13170 | ||
13171 | ||
13172 | ||
13173 | ||
13174 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); | |
13175 | ||
13176 | ~_Temporary_buffer() | |
13177 | { | |
13178 | std::_Destroy(_M_buffer, _M_buffer + _M_len); | |
13179 | std::return_temporary_buffer(_M_buffer); | |
13180 | } | |
13181 | ||
13182 | private: | |
13183 | ||
13184 | _Temporary_buffer(const _Temporary_buffer&); | |
13185 | ||
13186 | void | |
13187 | operator=(const _Temporary_buffer&); | |
13188 | }; | |
13189 | ||
13190 | ||
13191 | template<typename _ForwardIterator, typename _Tp> | |
13192 | _Temporary_buffer<_ForwardIterator, _Tp>:: | |
13193 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) | |
13194 | : _M_original_len(std::distance(__first, __last)), | |
13195 | _M_len(0), _M_buffer(0) | |
13196 | { | |
13197 | ||
13198 | typedef typename std::__is_scalar<_Tp>::__type _Trivial; | |
13199 | ||
13200 | try | |
13201 | { | |
13202 | pair<pointer, size_type> __p(get_temporary_buffer< | |
13203 | value_type>(_M_original_len)); | |
13204 | _M_buffer = __p.first; | |
13205 | _M_len = __p.second; | |
13206 | if (_M_len > 0) | |
13207 | _M_initialize_buffer(*__first, _Trivial()); | |
13208 | } | |
13209 | catch(...) | |
13210 | { | |
13211 | std::return_temporary_buffer(_M_buffer); | |
13212 | _M_buffer = 0; | |
13213 | _M_len = 0; | |
13214 | throw; | |
13215 | } | |
13216 | } | |
13217 | } | |
13218 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 2 3 | |
13219 | ||
13220 | ||
13221 | ||
13222 | ||
13223 | namespace std | |
13224 | { | |
13225 | # 85 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13226 | template<typename _Tp> | |
13227 | inline const _Tp& | |
13228 | __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) | |
13229 | { | |
13230 | ||
13231 | ||
13232 | if (__a < __b) | |
13233 | if (__b < __c) | |
13234 | return __b; | |
13235 | else if (__a < __c) | |
13236 | return __c; | |
13237 | else | |
13238 | return __a; | |
13239 | else if (__a < __c) | |
13240 | return __a; | |
13241 | else if (__b < __c) | |
13242 | return __c; | |
13243 | else | |
13244 | return __b; | |
13245 | } | |
13246 | # 119 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13247 | template<typename _Tp, typename _Compare> | |
13248 | inline const _Tp& | |
13249 | __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) | |
13250 | { | |
13251 | ||
13252 | ||
13253 | if (__comp(__a, __b)) | |
13254 | if (__comp(__b, __c)) | |
13255 | return __b; | |
13256 | else if (__comp(__a, __c)) | |
13257 | return __c; | |
13258 | else | |
13259 | return __a; | |
13260 | else if (__comp(__a, __c)) | |
13261 | return __a; | |
13262 | else if (__comp(__b, __c)) | |
13263 | return __c; | |
13264 | else | |
13265 | return __b; | |
13266 | } | |
13267 | # 151 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13268 | template<typename _InputIterator, typename _Function> | |
13269 | _Function | |
13270 | for_each(_InputIterator __first, _InputIterator __last, _Function __f) | |
13271 | { | |
13272 | ||
13273 | ||
13274 | ; | |
13275 | for ( ; __first != __last; ++__first) | |
13276 | __f(*__first); | |
13277 | return __f; | |
13278 | } | |
13279 | ||
13280 | ||
13281 | ||
13282 | ||
13283 | ||
13284 | ||
13285 | template<typename _InputIterator, typename _Tp> | |
13286 | inline _InputIterator | |
13287 | __find(_InputIterator __first, _InputIterator __last, | |
13288 | const _Tp& __val, input_iterator_tag) | |
13289 | { | |
13290 | while (__first != __last && !(*__first == __val)) | |
13291 | ++__first; | |
13292 | return __first; | |
13293 | } | |
13294 | ||
13295 | ||
13296 | ||
13297 | ||
13298 | ||
13299 | ||
13300 | template<typename _InputIterator, typename _Predicate> | |
13301 | inline _InputIterator | |
13302 | __find_if(_InputIterator __first, _InputIterator __last, | |
13303 | _Predicate __pred, input_iterator_tag) | |
13304 | { | |
13305 | while (__first != __last && !__pred(*__first)) | |
13306 | ++__first; | |
13307 | return __first; | |
13308 | } | |
13309 | ||
13310 | ||
13311 | ||
13312 | ||
13313 | ||
13314 | ||
13315 | template<typename _RandomAccessIterator, typename _Tp> | |
13316 | _RandomAccessIterator | |
13317 | __find(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
13318 | const _Tp& __val, random_access_iterator_tag) | |
13319 | { | |
13320 | typename iterator_traits<_RandomAccessIterator>::difference_type | |
13321 | __trip_count = (__last - __first) >> 2; | |
13322 | ||
13323 | for ( ; __trip_count > 0 ; --__trip_count) | |
13324 | { | |
13325 | if (*__first == __val) | |
13326 | return __first; | |
13327 | ++__first; | |
13328 | ||
13329 | if (*__first == __val) | |
13330 | return __first; | |
13331 | ++__first; | |
13332 | ||
13333 | if (*__first == __val) | |
13334 | return __first; | |
13335 | ++__first; | |
13336 | ||
13337 | if (*__first == __val) | |
13338 | return __first; | |
13339 | ++__first; | |
13340 | } | |
13341 | ||
13342 | switch (__last - __first) | |
13343 | { | |
13344 | case 3: | |
13345 | if (*__first == __val) | |
13346 | return __first; | |
13347 | ++__first; | |
13348 | case 2: | |
13349 | if (*__first == __val) | |
13350 | return __first; | |
13351 | ++__first; | |
13352 | case 1: | |
13353 | if (*__first == __val) | |
13354 | return __first; | |
13355 | ++__first; | |
13356 | case 0: | |
13357 | default: | |
13358 | return __last; | |
13359 | } | |
13360 | } | |
13361 | ||
13362 | ||
13363 | ||
13364 | ||
13365 | ||
13366 | ||
13367 | template<typename _RandomAccessIterator, typename _Predicate> | |
13368 | _RandomAccessIterator | |
13369 | __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
13370 | _Predicate __pred, random_access_iterator_tag) | |
13371 | { | |
13372 | typename iterator_traits<_RandomAccessIterator>::difference_type | |
13373 | __trip_count = (__last - __first) >> 2; | |
13374 | ||
13375 | for ( ; __trip_count > 0 ; --__trip_count) | |
13376 | { | |
13377 | if (__pred(*__first)) | |
13378 | return __first; | |
13379 | ++__first; | |
13380 | ||
13381 | if (__pred(*__first)) | |
13382 | return __first; | |
13383 | ++__first; | |
13384 | ||
13385 | if (__pred(*__first)) | |
13386 | return __first; | |
13387 | ++__first; | |
13388 | ||
13389 | if (__pred(*__first)) | |
13390 | return __first; | |
13391 | ++__first; | |
13392 | } | |
13393 | ||
13394 | switch (__last - __first) | |
13395 | { | |
13396 | case 3: | |
13397 | if (__pred(*__first)) | |
13398 | return __first; | |
13399 | ++__first; | |
13400 | case 2: | |
13401 | if (__pred(*__first)) | |
13402 | return __first; | |
13403 | ++__first; | |
13404 | case 1: | |
13405 | if (__pred(*__first)) | |
13406 | return __first; | |
13407 | ++__first; | |
13408 | case 0: | |
13409 | default: | |
13410 | return __last; | |
13411 | } | |
13412 | } | |
13413 | # 305 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13414 | template<typename _InputIterator, typename _Tp> | |
13415 | inline _InputIterator | |
13416 | find(_InputIterator __first, _InputIterator __last, | |
13417 | const _Tp& __val) | |
13418 | { | |
13419 | ||
13420 | ||
13421 | ||
13422 | ||
13423 | ; | |
13424 | return std::__find(__first, __last, __val, | |
13425 | std::__iterator_category(__first)); | |
13426 | } | |
13427 | # 327 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13428 | template<typename _InputIterator, typename _Predicate> | |
13429 | inline _InputIterator | |
13430 | find_if(_InputIterator __first, _InputIterator __last, | |
13431 | _Predicate __pred) | |
13432 | { | |
13433 | ||
13434 | ||
13435 | ||
13436 | ||
13437 | ; | |
13438 | return std::__find_if(__first, __last, __pred, | |
13439 | std::__iterator_category(__first)); | |
13440 | } | |
13441 | # 349 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13442 | template<typename _ForwardIterator> | |
13443 | _ForwardIterator | |
13444 | adjacent_find(_ForwardIterator __first, _ForwardIterator __last) | |
13445 | { | |
13446 | ||
13447 | ||
13448 | ||
13449 | ||
13450 | ; | |
13451 | if (__first == __last) | |
13452 | return __last; | |
13453 | _ForwardIterator __next = __first; | |
13454 | while(++__next != __last) | |
13455 | { | |
13456 | if (*__first == *__next) | |
13457 | return __first; | |
13458 | __first = __next; | |
13459 | } | |
13460 | return __last; | |
13461 | } | |
13462 | # 380 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13463 | template<typename _ForwardIterator, typename _BinaryPredicate> | |
13464 | _ForwardIterator | |
13465 | adjacent_find(_ForwardIterator __first, _ForwardIterator __last, | |
13466 | _BinaryPredicate __binary_pred) | |
13467 | { | |
13468 | ||
13469 | ||
13470 | ||
13471 | ||
13472 | ||
13473 | ; | |
13474 | if (__first == __last) | |
13475 | return __last; | |
13476 | _ForwardIterator __next = __first; | |
13477 | while(++__next != __last) | |
13478 | { | |
13479 | if (__binary_pred(*__first, *__next)) | |
13480 | return __first; | |
13481 | __first = __next; | |
13482 | } | |
13483 | return __last; | |
13484 | } | |
13485 | # 411 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13486 | template<typename _InputIterator, typename _Tp> | |
13487 | typename iterator_traits<_InputIterator>::difference_type | |
13488 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value) | |
13489 | { | |
13490 | ||
13491 | ||
13492 | ||
13493 | ||
13494 | ; | |
13495 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
13496 | for ( ; __first != __last; ++__first) | |
13497 | if (*__first == __value) | |
13498 | ++__n; | |
13499 | return __n; | |
13500 | } | |
13501 | # 435 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13502 | template<typename _InputIterator, typename _Predicate> | |
13503 | typename iterator_traits<_InputIterator>::difference_type | |
13504 | count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) | |
13505 | { | |
13506 | ||
13507 | ||
13508 | ||
13509 | ||
13510 | ; | |
13511 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
13512 | for ( ; __first != __last; ++__first) | |
13513 | if (__pred(*__first)) | |
13514 | ++__n; | |
13515 | return __n; | |
13516 | } | |
13517 | # 474 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13518 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
13519 | _ForwardIterator1 | |
13520 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
13521 | _ForwardIterator2 __first2, _ForwardIterator2 __last2) | |
13522 | { | |
13523 | ||
13524 | ||
13525 | ||
13526 | ||
13527 | ||
13528 | ||
13529 | ; | |
13530 | ; | |
13531 | ||
13532 | if (__first1 == __last1 || __first2 == __last2) | |
13533 | return __first1; | |
13534 | ||
13535 | ||
13536 | _ForwardIterator2 __tmp(__first2); | |
13537 | ++__tmp; | |
13538 | if (__tmp == __last2) | |
13539 | return std::find(__first1, __last1, *__first2); | |
13540 | ||
13541 | ||
13542 | _ForwardIterator2 __p1, __p; | |
13543 | __p1 = __first2; ++__p1; | |
13544 | _ForwardIterator1 __current = __first1; | |
13545 | ||
13546 | while (__first1 != __last1) | |
13547 | { | |
13548 | __first1 = std::find(__first1, __last1, *__first2); | |
13549 | if (__first1 == __last1) | |
13550 | return __last1; | |
13551 | ||
13552 | __p = __p1; | |
13553 | __current = __first1; | |
13554 | if (++__current == __last1) | |
13555 | return __last1; | |
13556 | ||
13557 | while (*__current == *__p) | |
13558 | { | |
13559 | if (++__p == __last2) | |
13560 | return __first1; | |
13561 | if (++__current == __last1) | |
13562 | return __last1; | |
13563 | } | |
13564 | ++__first1; | |
13565 | } | |
13566 | return __first1; | |
13567 | } | |
13568 | # 545 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13569 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
13570 | typename _BinaryPredicate> | |
13571 | _ForwardIterator1 | |
13572 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
13573 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
13574 | _BinaryPredicate __predicate) | |
13575 | { | |
13576 | ||
13577 | ||
13578 | ||
13579 | ||
13580 | ||
13581 | ||
13582 | ; | |
13583 | ; | |
13584 | ||
13585 | ||
13586 | if (__first1 == __last1 || __first2 == __last2) | |
13587 | return __first1; | |
13588 | ||
13589 | ||
13590 | _ForwardIterator2 __tmp(__first2); | |
13591 | ++__tmp; | |
13592 | if (__tmp == __last2) | |
13593 | { | |
13594 | while (__first1 != __last1 && !__predicate(*__first1, *__first2)) | |
13595 | ++__first1; | |
13596 | return __first1; | |
13597 | } | |
13598 | ||
13599 | ||
13600 | _ForwardIterator2 __p1, __p; | |
13601 | __p1 = __first2; ++__p1; | |
13602 | _ForwardIterator1 __current = __first1; | |
13603 | ||
13604 | while (__first1 != __last1) | |
13605 | { | |
13606 | while (__first1 != __last1) | |
13607 | { | |
13608 | if (__predicate(*__first1, *__first2)) | |
13609 | break; | |
13610 | ++__first1; | |
13611 | } | |
13612 | while (__first1 != __last1 && !__predicate(*__first1, *__first2)) | |
13613 | ++__first1; | |
13614 | if (__first1 == __last1) | |
13615 | return __last1; | |
13616 | ||
13617 | __p = __p1; | |
13618 | __current = __first1; | |
13619 | if (++__current == __last1) | |
13620 | return __last1; | |
13621 | ||
13622 | while (__predicate(*__current, *__p)) | |
13623 | { | |
13624 | if (++__p == __last2) | |
13625 | return __first1; | |
13626 | if (++__current == __last1) | |
13627 | return __last1; | |
13628 | } | |
13629 | ++__first1; | |
13630 | } | |
13631 | return __first1; | |
13632 | } | |
13633 | # 617 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13634 | template<typename _ForwardIterator, typename _Integer, typename _Tp> | |
13635 | _ForwardIterator | |
13636 | __search_n(_ForwardIterator __first, _ForwardIterator __last, | |
13637 | _Integer __count, const _Tp& __val, | |
13638 | std::forward_iterator_tag) | |
13639 | { | |
13640 | __first = std::find(__first, __last, __val); | |
13641 | while (__first != __last) | |
13642 | { | |
13643 | typename iterator_traits<_ForwardIterator>::difference_type | |
13644 | __n = __count; | |
13645 | _ForwardIterator __i = __first; | |
13646 | ++__i; | |
13647 | while (__i != __last && __n != 1 && *__i == __val) | |
13648 | { | |
13649 | ++__i; | |
13650 | --__n; | |
13651 | } | |
13652 | if (__n == 1) | |
13653 | return __first; | |
13654 | if (__i == __last) | |
13655 | return __last; | |
13656 | __first = std::find(++__i, __last, __val); | |
13657 | } | |
13658 | return __last; | |
13659 | } | |
13660 | # 651 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13661 | template<typename _RandomAccessIter, typename _Integer, typename _Tp> | |
13662 | _RandomAccessIter | |
13663 | __search_n(_RandomAccessIter __first, _RandomAccessIter __last, | |
13664 | _Integer __count, const _Tp& __val, | |
13665 | std::random_access_iterator_tag) | |
13666 | { | |
13667 | ||
13668 | typedef typename std::iterator_traits<_RandomAccessIter>::difference_type | |
13669 | _DistanceType; | |
13670 | ||
13671 | _DistanceType __tailSize = __last - __first; | |
13672 | const _DistanceType __pattSize = __count; | |
13673 | ||
13674 | if (__tailSize < __pattSize) | |
13675 | return __last; | |
13676 | ||
13677 | const _DistanceType __skipOffset = __pattSize - 1; | |
13678 | _RandomAccessIter __lookAhead = __first + __skipOffset; | |
13679 | __tailSize -= __pattSize; | |
13680 | ||
13681 | while (1) | |
13682 | { | |
13683 | ||
13684 | ||
13685 | while (!(*__lookAhead == __val)) | |
13686 | { | |
13687 | if (__tailSize < __pattSize) | |
13688 | return __last; | |
13689 | __lookAhead += __pattSize; | |
13690 | __tailSize -= __pattSize; | |
13691 | } | |
13692 | _DistanceType __remainder = __skipOffset; | |
13693 | for (_RandomAccessIter __backTrack = __lookAhead - 1; | |
13694 | *__backTrack == __val; --__backTrack) | |
13695 | { | |
13696 | if (--__remainder == 0) | |
13697 | return (__lookAhead - __skipOffset); | |
13698 | } | |
13699 | if (__remainder > __tailSize) | |
13700 | return __last; | |
13701 | __lookAhead += __remainder; | |
13702 | __tailSize -= __remainder; | |
13703 | } | |
13704 | } | |
13705 | # 709 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13706 | template<typename _ForwardIterator, typename _Integer, typename _Tp> | |
13707 | _ForwardIterator | |
13708 | search_n(_ForwardIterator __first, _ForwardIterator __last, | |
13709 | _Integer __count, const _Tp& __val) | |
13710 | { | |
13711 | ||
13712 | ||
13713 | ||
13714 | ||
13715 | ; | |
13716 | ||
13717 | if (__count <= 0) | |
13718 | return __first; | |
13719 | if (__count == 1) | |
13720 | return std::find(__first, __last, __val); | |
13721 | return std::__search_n(__first, __last, __count, __val, | |
13722 | std::__iterator_category(__first)); | |
13723 | } | |
13724 | # 736 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13725 | template<typename _ForwardIterator, typename _Integer, typename _Tp, | |
13726 | typename _BinaryPredicate> | |
13727 | _ForwardIterator | |
13728 | __search_n(_ForwardIterator __first, _ForwardIterator __last, | |
13729 | _Integer __count, const _Tp& __val, | |
13730 | _BinaryPredicate __binary_pred, std::forward_iterator_tag) | |
13731 | { | |
13732 | while (__first != __last && !__binary_pred(*__first, __val)) | |
13733 | ++__first; | |
13734 | ||
13735 | while (__first != __last) | |
13736 | { | |
13737 | typename iterator_traits<_ForwardIterator>::difference_type | |
13738 | __n = __count; | |
13739 | _ForwardIterator __i = __first; | |
13740 | ++__i; | |
13741 | while (__i != __last && __n != 1 && __binary_pred(*__i, __val)) | |
13742 | { | |
13743 | ++__i; | |
13744 | --__n; | |
13745 | } | |
13746 | if (__n == 1) | |
13747 | return __first; | |
13748 | if (__i == __last) | |
13749 | return __last; | |
13750 | __first = ++__i; | |
13751 | while (__first != __last && !__binary_pred(*__first, __val)) | |
13752 | ++__first; | |
13753 | } | |
13754 | return __last; | |
13755 | } | |
13756 | # 776 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13757 | template<typename _RandomAccessIter, typename _Integer, typename _Tp, | |
13758 | typename _BinaryPredicate> | |
13759 | _RandomAccessIter | |
13760 | __search_n(_RandomAccessIter __first, _RandomAccessIter __last, | |
13761 | _Integer __count, const _Tp& __val, | |
13762 | _BinaryPredicate __binary_pred, std::random_access_iterator_tag) | |
13763 | { | |
13764 | ||
13765 | typedef typename std::iterator_traits<_RandomAccessIter>::difference_type | |
13766 | _DistanceType; | |
13767 | ||
13768 | _DistanceType __tailSize = __last - __first; | |
13769 | const _DistanceType __pattSize = __count; | |
13770 | ||
13771 | if (__tailSize < __pattSize) | |
13772 | return __last; | |
13773 | ||
13774 | const _DistanceType __skipOffset = __pattSize - 1; | |
13775 | _RandomAccessIter __lookAhead = __first + __skipOffset; | |
13776 | __tailSize -= __pattSize; | |
13777 | ||
13778 | while (1) | |
13779 | { | |
13780 | ||
13781 | ||
13782 | while (!__binary_pred(*__lookAhead, __val)) | |
13783 | { | |
13784 | if (__tailSize < __pattSize) | |
13785 | return __last; | |
13786 | __lookAhead += __pattSize; | |
13787 | __tailSize -= __pattSize; | |
13788 | } | |
13789 | _DistanceType __remainder = __skipOffset; | |
13790 | for (_RandomAccessIter __backTrack = __lookAhead - 1; | |
13791 | __binary_pred(*__backTrack, __val); --__backTrack) | |
13792 | { | |
13793 | if (--__remainder == 0) | |
13794 | return (__lookAhead - __skipOffset); | |
13795 | } | |
13796 | if (__remainder > __tailSize) | |
13797 | return __last; | |
13798 | __lookAhead += __remainder; | |
13799 | __tailSize -= __remainder; | |
13800 | } | |
13801 | } | |
13802 | # 837 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13803 | template<typename _ForwardIterator, typename _Integer, typename _Tp, | |
13804 | typename _BinaryPredicate> | |
13805 | _ForwardIterator | |
13806 | search_n(_ForwardIterator __first, _ForwardIterator __last, | |
13807 | _Integer __count, const _Tp& __val, | |
13808 | _BinaryPredicate __binary_pred) | |
13809 | { | |
13810 | ||
13811 | ||
13812 | ||
13813 | ||
13814 | ; | |
13815 | ||
13816 | if (__count <= 0) | |
13817 | return __first; | |
13818 | if (__count == 1) | |
13819 | { | |
13820 | while (__first != __last && !__binary_pred(*__first, __val)) | |
13821 | ++__first; | |
13822 | return __first; | |
13823 | } | |
13824 | return std::__search_n(__first, __last, __count, __val, __binary_pred, | |
13825 | std::__iterator_category(__first)); | |
13826 | } | |
13827 | # 873 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13828 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
13829 | _ForwardIterator2 | |
13830 | swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
13831 | _ForwardIterator2 __first2) | |
13832 | { | |
13833 | ||
13834 | ||
13835 | ||
13836 | ||
13837 | ||
13838 | ||
13839 | ||
13840 | ||
13841 | ||
13842 | ||
13843 | ||
13844 | ; | |
13845 | ||
13846 | for ( ; __first1 != __last1; ++__first1, ++__first2) | |
13847 | std::iter_swap(__first1, __first2); | |
13848 | return __first2; | |
13849 | } | |
13850 | # 911 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13851 | template<typename _InputIterator, typename _OutputIterator, | |
13852 | typename _UnaryOperation> | |
13853 | _OutputIterator | |
13854 | transform(_InputIterator __first, _InputIterator __last, | |
13855 | _OutputIterator __result, _UnaryOperation __unary_op) | |
13856 | { | |
13857 | ||
13858 | ||
13859 | ||
13860 | ||
13861 | ||
13862 | ; | |
13863 | ||
13864 | for ( ; __first != __last; ++__first, ++__result) | |
13865 | *__result = __unary_op(*__first); | |
13866 | return __result; | |
13867 | } | |
13868 | # 946 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13869 | template<typename _InputIterator1, typename _InputIterator2, | |
13870 | typename _OutputIterator, typename _BinaryOperation> | |
13871 | _OutputIterator | |
13872 | transform(_InputIterator1 __first1, _InputIterator1 __last1, | |
13873 | _InputIterator2 __first2, _OutputIterator __result, | |
13874 | _BinaryOperation __binary_op) | |
13875 | { | |
13876 | ||
13877 | ||
13878 | ||
13879 | ||
13880 | ||
13881 | ||
13882 | ; | |
13883 | ||
13884 | for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) | |
13885 | *__result = __binary_op(*__first1, *__first2); | |
13886 | return __result; | |
13887 | } | |
13888 | # 978 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13889 | template<typename _ForwardIterator, typename _Tp> | |
13890 | void | |
13891 | replace(_ForwardIterator __first, _ForwardIterator __last, | |
13892 | const _Tp& __old_value, const _Tp& __new_value) | |
13893 | { | |
13894 | ||
13895 | ||
13896 | ||
13897 | ||
13898 | ||
13899 | ||
13900 | ||
13901 | ; | |
13902 | ||
13903 | for ( ; __first != __last; ++__first) | |
13904 | if (*__first == __old_value) | |
13905 | *__first = __new_value; | |
13906 | } | |
13907 | # 1009 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13908 | template<typename _ForwardIterator, typename _Predicate, typename _Tp> | |
13909 | void | |
13910 | replace_if(_ForwardIterator __first, _ForwardIterator __last, | |
13911 | _Predicate __pred, const _Tp& __new_value) | |
13912 | { | |
13913 | ||
13914 | ||
13915 | ||
13916 | ||
13917 | ||
13918 | ||
13919 | ||
13920 | ; | |
13921 | ||
13922 | for ( ; __first != __last; ++__first) | |
13923 | if (__pred(*__first)) | |
13924 | *__first = __new_value; | |
13925 | } | |
13926 | # 1042 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13927 | template<typename _InputIterator, typename _OutputIterator, typename _Tp> | |
13928 | _OutputIterator | |
13929 | replace_copy(_InputIterator __first, _InputIterator __last, | |
13930 | _OutputIterator __result, | |
13931 | const _Tp& __old_value, const _Tp& __new_value) | |
13932 | { | |
13933 | ||
13934 | ||
13935 | ||
13936 | ||
13937 | ||
13938 | ||
13939 | ; | |
13940 | ||
13941 | for ( ; __first != __last; ++__first, ++__result) | |
13942 | if (*__first == __old_value) | |
13943 | *__result = __new_value; | |
13944 | else | |
13945 | *__result = *__first; | |
13946 | return __result; | |
13947 | } | |
13948 | # 1078 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13949 | template<typename _InputIterator, typename _OutputIterator, | |
13950 | typename _Predicate, typename _Tp> | |
13951 | _OutputIterator | |
13952 | replace_copy_if(_InputIterator __first, _InputIterator __last, | |
13953 | _OutputIterator __result, | |
13954 | _Predicate __pred, const _Tp& __new_value) | |
13955 | { | |
13956 | ||
13957 | ||
13958 | ||
13959 | ||
13960 | ||
13961 | ||
13962 | ; | |
13963 | ||
13964 | for ( ; __first != __last; ++__first, ++__result) | |
13965 | if (__pred(*__first)) | |
13966 | *__result = __new_value; | |
13967 | else | |
13968 | *__result = *__first; | |
13969 | return __result; | |
13970 | } | |
13971 | # 1112 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13972 | template<typename _ForwardIterator, typename _Generator> | |
13973 | void | |
13974 | generate(_ForwardIterator __first, _ForwardIterator __last, | |
13975 | _Generator __gen) | |
13976 | { | |
13977 | ||
13978 | ||
13979 | ||
13980 | ||
13981 | ; | |
13982 | ||
13983 | for ( ; __first != __last; ++__first) | |
13984 | *__first = __gen(); | |
13985 | } | |
13986 | # 1138 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
13987 | template<typename _OutputIterator, typename _Size, typename _Generator> | |
13988 | _OutputIterator | |
13989 | generate_n(_OutputIterator __first, _Size __n, _Generator __gen) | |
13990 | { | |
13991 | ||
13992 | ||
13993 | ||
13994 | ||
13995 | ||
13996 | for ( ; __n > 0; --__n, ++__first) | |
13997 | *__first = __gen(); | |
13998 | return __first; | |
13999 | } | |
14000 | # 1165 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14001 | template<typename _InputIterator, typename _OutputIterator, typename _Tp> | |
14002 | _OutputIterator | |
14003 | remove_copy(_InputIterator __first, _InputIterator __last, | |
14004 | _OutputIterator __result, const _Tp& __value) | |
14005 | { | |
14006 | ||
14007 | ||
14008 | ||
14009 | ||
14010 | ||
14011 | ||
14012 | ; | |
14013 | ||
14014 | for ( ; __first != __last; ++__first) | |
14015 | if (!(*__first == __value)) | |
14016 | { | |
14017 | *__result = *__first; | |
14018 | ++__result; | |
14019 | } | |
14020 | return __result; | |
14021 | } | |
14022 | # 1201 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14023 | template<typename _InputIterator, typename _OutputIterator, | |
14024 | typename _Predicate> | |
14025 | _OutputIterator | |
14026 | remove_copy_if(_InputIterator __first, _InputIterator __last, | |
14027 | _OutputIterator __result, _Predicate __pred) | |
14028 | { | |
14029 | ||
14030 | ||
14031 | ||
14032 | ||
14033 | ||
14034 | ||
14035 | ; | |
14036 | ||
14037 | for ( ; __first != __last; ++__first) | |
14038 | if (!__pred(*__first)) | |
14039 | { | |
14040 | *__result = *__first; | |
14041 | ++__result; | |
14042 | } | |
14043 | return __result; | |
14044 | } | |
14045 | # 1240 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14046 | template<typename _ForwardIterator, typename _Tp> | |
14047 | _ForwardIterator | |
14048 | remove(_ForwardIterator __first, _ForwardIterator __last, | |
14049 | const _Tp& __value) | |
14050 | { | |
14051 | ||
14052 | ||
14053 | ||
14054 | ||
14055 | ||
14056 | ; | |
14057 | ||
14058 | __first = std::find(__first, __last, __value); | |
14059 | _ForwardIterator __i = __first; | |
14060 | return __first == __last ? __first | |
14061 | : std::remove_copy(++__i, __last, | |
14062 | __first, __value); | |
14063 | } | |
14064 | # 1275 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14065 | template<typename _ForwardIterator, typename _Predicate> | |
14066 | _ForwardIterator | |
14067 | remove_if(_ForwardIterator __first, _ForwardIterator __last, | |
14068 | _Predicate __pred) | |
14069 | { | |
14070 | ||
14071 | ||
14072 | ||
14073 | ||
14074 | ||
14075 | ; | |
14076 | ||
14077 | __first = std::find_if(__first, __last, __pred); | |
14078 | _ForwardIterator __i = __first; | |
14079 | return __first == __last ? __first | |
14080 | : std::remove_copy_if(++__i, __last, | |
14081 | __first, __pred); | |
14082 | } | |
14083 | # 1301 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14084 | template<typename _InputIterator, typename _OutputIterator> | |
14085 | _OutputIterator | |
14086 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
14087 | _OutputIterator __result, | |
14088 | output_iterator_tag) | |
14089 | { | |
14090 | ||
14091 | typename iterator_traits<_InputIterator>::value_type __value = *__first; | |
14092 | *__result = __value; | |
14093 | while (++__first != __last) | |
14094 | if (!(__value == *__first)) | |
14095 | { | |
14096 | __value = *__first; | |
14097 | *++__result = __value; | |
14098 | } | |
14099 | return ++__result; | |
14100 | } | |
14101 | # 1326 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14102 | template<typename _InputIterator, typename _ForwardIterator> | |
14103 | _ForwardIterator | |
14104 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
14105 | _ForwardIterator __result, | |
14106 | forward_iterator_tag) | |
14107 | { | |
14108 | ||
14109 | *__result = *__first; | |
14110 | while (++__first != __last) | |
14111 | if (!(*__result == *__first)) | |
14112 | *++__result = *__first; | |
14113 | return ++__result; | |
14114 | } | |
14115 | # 1348 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14116 | template<typename _InputIterator, typename _OutputIterator, | |
14117 | typename _BinaryPredicate> | |
14118 | _OutputIterator | |
14119 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
14120 | _OutputIterator __result, | |
14121 | _BinaryPredicate __binary_pred, | |
14122 | output_iterator_tag) | |
14123 | { | |
14124 | ||
14125 | ||
14126 | ||
14127 | ||
14128 | ||
14129 | typename iterator_traits<_InputIterator>::value_type __value = *__first; | |
14130 | *__result = __value; | |
14131 | while (++__first != __last) | |
14132 | if (!__binary_pred(__value, *__first)) | |
14133 | { | |
14134 | __value = *__first; | |
14135 | *++__result = __value; | |
14136 | } | |
14137 | return ++__result; | |
14138 | } | |
14139 | # 1380 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14140 | template<typename _InputIterator, typename _ForwardIterator, | |
14141 | typename _BinaryPredicate> | |
14142 | _ForwardIterator | |
14143 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
14144 | _ForwardIterator __result, | |
14145 | _BinaryPredicate __binary_pred, | |
14146 | forward_iterator_tag) | |
14147 | { | |
14148 | ||
14149 | ||
14150 | ||
14151 | ||
14152 | ||
14153 | *__result = *__first; | |
14154 | while (++__first != __last) | |
14155 | if (!__binary_pred(*__result, *__first)) *++__result = *__first; | |
14156 | return ++__result; | |
14157 | } | |
14158 | # 1412 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14159 | template<typename _InputIterator, typename _OutputIterator> | |
14160 | inline _OutputIterator | |
14161 | unique_copy(_InputIterator __first, _InputIterator __last, | |
14162 | _OutputIterator __result) | |
14163 | { | |
14164 | ||
14165 | ||
14166 | ||
14167 | ||
14168 | ||
14169 | ||
14170 | ; | |
14171 | ||
14172 | typedef typename iterator_traits<_OutputIterator>::iterator_category | |
14173 | _IterType; | |
14174 | ||
14175 | if (__first == __last) return __result; | |
14176 | return std::__unique_copy(__first, __last, __result, _IterType()); | |
14177 | } | |
14178 | # 1447 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14179 | template<typename _InputIterator, typename _OutputIterator, | |
14180 | typename _BinaryPredicate> | |
14181 | inline _OutputIterator | |
14182 | unique_copy(_InputIterator __first, _InputIterator __last, | |
14183 | _OutputIterator __result, | |
14184 | _BinaryPredicate __binary_pred) | |
14185 | { | |
14186 | ||
14187 | ||
14188 | ||
14189 | ||
14190 | ; | |
14191 | ||
14192 | typedef typename iterator_traits<_OutputIterator>::iterator_category | |
14193 | _IterType; | |
14194 | ||
14195 | if (__first == __last) return __result; | |
14196 | return std::__unique_copy(__first, __last, __result, | |
14197 | __binary_pred, _IterType()); | |
14198 | } | |
14199 | # 1481 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14200 | template<typename _ForwardIterator> | |
14201 | _ForwardIterator | |
14202 | unique(_ForwardIterator __first, _ForwardIterator __last) | |
14203 | { | |
14204 | ||
14205 | ||
14206 | ||
14207 | ||
14208 | ||
14209 | ; | |
14210 | ||
14211 | ||
14212 | __first = std::adjacent_find(__first, __last); | |
14213 | if (__first == __last) | |
14214 | return __last; | |
14215 | ||
14216 | ||
14217 | _ForwardIterator __dest = __first; | |
14218 | ++__first; | |
14219 | while (++__first != __last) | |
14220 | if (!(*__dest == *__first)) | |
14221 | *++__dest = *__first; | |
14222 | return ++__dest; | |
14223 | } | |
14224 | # 1520 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14225 | template<typename _ForwardIterator, typename _BinaryPredicate> | |
14226 | _ForwardIterator | |
14227 | unique(_ForwardIterator __first, _ForwardIterator __last, | |
14228 | _BinaryPredicate __binary_pred) | |
14229 | { | |
14230 | ||
14231 | ||
14232 | ||
14233 | ||
14234 | ||
14235 | ||
14236 | ; | |
14237 | ||
14238 | ||
14239 | __first = std::adjacent_find(__first, __last, __binary_pred); | |
14240 | if (__first == __last) | |
14241 | return __last; | |
14242 | ||
14243 | ||
14244 | _ForwardIterator __dest = __first; | |
14245 | ++__first; | |
14246 | while (++__first != __last) | |
14247 | if (!__binary_pred(*__dest, *__first)) | |
14248 | *++__dest = *__first; | |
14249 | return ++__dest; | |
14250 | } | |
14251 | # 1554 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14252 | template<typename _BidirectionalIterator> | |
14253 | void | |
14254 | __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
14255 | bidirectional_iterator_tag) | |
14256 | { | |
14257 | while (true) | |
14258 | if (__first == __last || __first == --__last) | |
14259 | return; | |
14260 | else | |
14261 | { | |
14262 | std::iter_swap(__first, __last); | |
14263 | ++__first; | |
14264 | } | |
14265 | } | |
14266 | # 1576 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14267 | template<typename _RandomAccessIterator> | |
14268 | void | |
14269 | __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14270 | random_access_iterator_tag) | |
14271 | { | |
14272 | if (__first == __last) | |
14273 | return; | |
14274 | --__last; | |
14275 | while (__first < __last) | |
14276 | { | |
14277 | std::iter_swap(__first, __last); | |
14278 | ++__first; | |
14279 | --__last; | |
14280 | } | |
14281 | } | |
14282 | # 1603 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14283 | template<typename _BidirectionalIterator> | |
14284 | inline void | |
14285 | reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) | |
14286 | { | |
14287 | ||
14288 | ||
14289 | ||
14290 | ; | |
14291 | std::__reverse(__first, __last, std::__iterator_category(__first)); | |
14292 | } | |
14293 | # 1629 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14294 | template<typename _BidirectionalIterator, typename _OutputIterator> | |
14295 | _OutputIterator | |
14296 | reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
14297 | _OutputIterator __result) | |
14298 | { | |
14299 | ||
14300 | ||
14301 | ||
14302 | ||
14303 | ||
14304 | ; | |
14305 | ||
14306 | while (__first != __last) | |
14307 | { | |
14308 | --__last; | |
14309 | *__result = *__last; | |
14310 | ++__result; | |
14311 | } | |
14312 | return __result; | |
14313 | } | |
14314 | # 1657 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14315 | template<typename _EuclideanRingElement> | |
14316 | _EuclideanRingElement | |
14317 | __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) | |
14318 | { | |
14319 | while (__n != 0) | |
14320 | { | |
14321 | _EuclideanRingElement __t = __m % __n; | |
14322 | __m = __n; | |
14323 | __n = __t; | |
14324 | } | |
14325 | return __m; | |
14326 | } | |
14327 | ||
14328 | ||
14329 | ||
14330 | ||
14331 | ||
14332 | ||
14333 | template<typename _ForwardIterator> | |
14334 | void | |
14335 | __rotate(_ForwardIterator __first, | |
14336 | _ForwardIterator __middle, | |
14337 | _ForwardIterator __last, | |
14338 | forward_iterator_tag) | |
14339 | { | |
14340 | if (__first == __middle || __last == __middle) | |
14341 | return; | |
14342 | ||
14343 | _ForwardIterator __first2 = __middle; | |
14344 | do | |
14345 | { | |
14346 | swap(*__first, *__first2); | |
14347 | ++__first; | |
14348 | ++__first2; | |
14349 | if (__first == __middle) | |
14350 | __middle = __first2; | |
14351 | } | |
14352 | while (__first2 != __last); | |
14353 | ||
14354 | __first2 = __middle; | |
14355 | ||
14356 | while (__first2 != __last) | |
14357 | { | |
14358 | swap(*__first, *__first2); | |
14359 | ++__first; | |
14360 | ++__first2; | |
14361 | if (__first == __middle) | |
14362 | __middle = __first2; | |
14363 | else if (__first2 == __last) | |
14364 | __first2 = __middle; | |
14365 | } | |
14366 | } | |
14367 | ||
14368 | ||
14369 | ||
14370 | ||
14371 | ||
14372 | ||
14373 | template<typename _BidirectionalIterator> | |
14374 | void | |
14375 | __rotate(_BidirectionalIterator __first, | |
14376 | _BidirectionalIterator __middle, | |
14377 | _BidirectionalIterator __last, | |
14378 | bidirectional_iterator_tag) | |
14379 | { | |
14380 | ||
14381 | ||
14382 | ||
14383 | ||
14384 | if (__first == __middle || __last == __middle) | |
14385 | return; | |
14386 | ||
14387 | std::__reverse(__first, __middle, bidirectional_iterator_tag()); | |
14388 | std::__reverse(__middle, __last, bidirectional_iterator_tag()); | |
14389 | ||
14390 | while (__first != __middle && __middle != __last) | |
14391 | { | |
14392 | swap(*__first, *--__last); | |
14393 | ++__first; | |
14394 | } | |
14395 | ||
14396 | if (__first == __middle) | |
14397 | std::__reverse(__middle, __last, bidirectional_iterator_tag()); | |
14398 | else | |
14399 | std::__reverse(__first, __middle, bidirectional_iterator_tag()); | |
14400 | } | |
14401 | ||
14402 | ||
14403 | ||
14404 | ||
14405 | ||
14406 | ||
14407 | template<typename _RandomAccessIterator> | |
14408 | void | |
14409 | __rotate(_RandomAccessIterator __first, | |
14410 | _RandomAccessIterator __middle, | |
14411 | _RandomAccessIterator __last, | |
14412 | random_access_iterator_tag) | |
14413 | { | |
14414 | ||
14415 | ||
14416 | ||
14417 | ||
14418 | if (__first == __middle || __last == __middle) | |
14419 | return; | |
14420 | ||
14421 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
14422 | _Distance; | |
14423 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14424 | _ValueType; | |
14425 | ||
14426 | const _Distance __n = __last - __first; | |
14427 | const _Distance __k = __middle - __first; | |
14428 | const _Distance __l = __n - __k; | |
14429 | ||
14430 | if (__k == __l) | |
14431 | { | |
14432 | std::swap_ranges(__first, __middle, __middle); | |
14433 | return; | |
14434 | } | |
14435 | ||
14436 | const _Distance __d = __gcd(__n, __k); | |
14437 | ||
14438 | for (_Distance __i = 0; __i < __d; __i++) | |
14439 | { | |
14440 | _ValueType __tmp = *__first; | |
14441 | _RandomAccessIterator __p = __first; | |
14442 | ||
14443 | if (__k < __l) | |
14444 | { | |
14445 | for (_Distance __j = 0; __j < __l / __d; __j++) | |
14446 | { | |
14447 | if (__p > __first + __l) | |
14448 | { | |
14449 | *__p = *(__p - __l); | |
14450 | __p -= __l; | |
14451 | } | |
14452 | ||
14453 | *__p = *(__p + __k); | |
14454 | __p += __k; | |
14455 | } | |
14456 | } | |
14457 | else | |
14458 | { | |
14459 | for (_Distance __j = 0; __j < __k / __d - 1; __j ++) | |
14460 | { | |
14461 | if (__p < __last - __k) | |
14462 | { | |
14463 | *__p = *(__p + __k); | |
14464 | __p += __k; | |
14465 | } | |
14466 | *__p = * (__p - __l); | |
14467 | __p -= __l; | |
14468 | } | |
14469 | } | |
14470 | ||
14471 | *__p = __tmp; | |
14472 | ++__first; | |
14473 | } | |
14474 | } | |
14475 | # 1836 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14476 | template<typename _ForwardIterator> | |
14477 | inline void | |
14478 | rotate(_ForwardIterator __first, _ForwardIterator __middle, | |
14479 | _ForwardIterator __last) | |
14480 | { | |
14481 | ||
14482 | ||
14483 | ||
14484 | ; | |
14485 | ; | |
14486 | ||
14487 | typedef typename iterator_traits<_ForwardIterator>::iterator_category | |
14488 | _IterType; | |
14489 | std::__rotate(__first, __middle, __last, _IterType()); | |
14490 | } | |
14491 | # 1869 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14492 | template<typename _ForwardIterator, typename _OutputIterator> | |
14493 | _OutputIterator | |
14494 | rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, | |
14495 | _ForwardIterator __last, _OutputIterator __result) | |
14496 | { | |
14497 | ||
14498 | ||
14499 | ||
14500 | ||
14501 | ; | |
14502 | ; | |
14503 | ||
14504 | return std::copy(__first, __middle, | |
14505 | std::copy(__middle, __last, __result)); | |
14506 | } | |
14507 | # 1895 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14508 | template<typename _RandomAccessIterator> | |
14509 | inline void | |
14510 | random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
14511 | { | |
14512 | ||
14513 | ||
14514 | ||
14515 | ; | |
14516 | ||
14517 | if (__first != __last) | |
14518 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
14519 | std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); | |
14520 | } | |
14521 | # 1922 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14522 | template<typename _RandomAccessIterator, typename _RandomNumberGenerator> | |
14523 | void | |
14524 | random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14525 | _RandomNumberGenerator& __rand) | |
14526 | { | |
14527 | ||
14528 | ||
14529 | ||
14530 | ; | |
14531 | ||
14532 | if (__first == __last) | |
14533 | return; | |
14534 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
14535 | std::iter_swap(__i, __first + __rand((__i - __first) + 1)); | |
14536 | } | |
14537 | ||
14538 | ||
14539 | ||
14540 | ||
14541 | ||
14542 | ||
14543 | ||
14544 | template<typename _ForwardIterator, typename _Predicate> | |
14545 | _ForwardIterator | |
14546 | __partition(_ForwardIterator __first, _ForwardIterator __last, | |
14547 | _Predicate __pred, | |
14548 | forward_iterator_tag) | |
14549 | { | |
14550 | if (__first == __last) | |
14551 | return __first; | |
14552 | ||
14553 | while (__pred(*__first)) | |
14554 | if (++__first == __last) | |
14555 | return __first; | |
14556 | ||
14557 | _ForwardIterator __next = __first; | |
14558 | ||
14559 | while (++__next != __last) | |
14560 | if (__pred(*__next)) | |
14561 | { | |
14562 | swap(*__first, *__next); | |
14563 | ++__first; | |
14564 | } | |
14565 | ||
14566 | return __first; | |
14567 | } | |
14568 | ||
14569 | ||
14570 | ||
14571 | ||
14572 | ||
14573 | ||
14574 | template<typename _BidirectionalIterator, typename _Predicate> | |
14575 | _BidirectionalIterator | |
14576 | __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
14577 | _Predicate __pred, | |
14578 | bidirectional_iterator_tag) | |
14579 | { | |
14580 | while (true) | |
14581 | { | |
14582 | while (true) | |
14583 | if (__first == __last) | |
14584 | return __first; | |
14585 | else if (__pred(*__first)) | |
14586 | ++__first; | |
14587 | else | |
14588 | break; | |
14589 | --__last; | |
14590 | while (true) | |
14591 | if (__first == __last) | |
14592 | return __first; | |
14593 | else if (!__pred(*__last)) | |
14594 | --__last; | |
14595 | else | |
14596 | break; | |
14597 | std::iter_swap(__first, __last); | |
14598 | ++__first; | |
14599 | } | |
14600 | } | |
14601 | # 2016 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14602 | template<typename _ForwardIterator, typename _Predicate> | |
14603 | inline _ForwardIterator | |
14604 | partition(_ForwardIterator __first, _ForwardIterator __last, | |
14605 | _Predicate __pred) | |
14606 | { | |
14607 | ||
14608 | ||
14609 | ||
14610 | ||
14611 | ||
14612 | ; | |
14613 | ||
14614 | return std::__partition(__first, __last, __pred, | |
14615 | std::__iterator_category(__first)); | |
14616 | } | |
14617 | ||
14618 | ||
14619 | ||
14620 | ||
14621 | ||
14622 | ||
14623 | ||
14624 | template<typename _ForwardIterator, typename _Predicate, typename _Distance> | |
14625 | _ForwardIterator | |
14626 | __inplace_stable_partition(_ForwardIterator __first, | |
14627 | _ForwardIterator __last, | |
14628 | _Predicate __pred, _Distance __len) | |
14629 | { | |
14630 | if (__len == 1) | |
14631 | return __pred(*__first) ? __last : __first; | |
14632 | _ForwardIterator __middle = __first; | |
14633 | std::advance(__middle, __len / 2); | |
14634 | _ForwardIterator __begin = std::__inplace_stable_partition(__first, | |
14635 | __middle, | |
14636 | __pred, | |
14637 | __len / 2); | |
14638 | _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, | |
14639 | __pred, | |
14640 | __len | |
14641 | - __len / 2); | |
14642 | std::rotate(__begin, __middle, __end); | |
14643 | std::advance(__begin, std::distance(__middle, __end)); | |
14644 | return __begin; | |
14645 | } | |
14646 | ||
14647 | ||
14648 | ||
14649 | ||
14650 | ||
14651 | ||
14652 | template<typename _ForwardIterator, typename _Pointer, typename _Predicate, | |
14653 | typename _Distance> | |
14654 | _ForwardIterator | |
14655 | __stable_partition_adaptive(_ForwardIterator __first, | |
14656 | _ForwardIterator __last, | |
14657 | _Predicate __pred, _Distance __len, | |
14658 | _Pointer __buffer, | |
14659 | _Distance __buffer_size) | |
14660 | { | |
14661 | if (__len <= __buffer_size) | |
14662 | { | |
14663 | _ForwardIterator __result1 = __first; | |
14664 | _Pointer __result2 = __buffer; | |
14665 | for ( ; __first != __last ; ++__first) | |
14666 | if (__pred(*__first)) | |
14667 | { | |
14668 | *__result1 = *__first; | |
14669 | ++__result1; | |
14670 | } | |
14671 | else | |
14672 | { | |
14673 | *__result2 = *__first; | |
14674 | ++__result2; | |
14675 | } | |
14676 | std::copy(__buffer, __result2, __result1); | |
14677 | return __result1; | |
14678 | } | |
14679 | else | |
14680 | { | |
14681 | _ForwardIterator __middle = __first; | |
14682 | std::advance(__middle, __len / 2); | |
14683 | _ForwardIterator __begin = | |
14684 | std::__stable_partition_adaptive(__first, __middle, __pred, | |
14685 | __len / 2, __buffer, | |
14686 | __buffer_size); | |
14687 | _ForwardIterator __end = | |
14688 | std::__stable_partition_adaptive(__middle, __last, __pred, | |
14689 | __len - __len / 2, | |
14690 | __buffer, __buffer_size); | |
14691 | std::rotate(__begin, __middle, __end); | |
14692 | std::advance(__begin, std::distance(__middle, __end)); | |
14693 | return __begin; | |
14694 | } | |
14695 | } | |
14696 | # 2127 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14697 | template<typename _ForwardIterator, typename _Predicate> | |
14698 | _ForwardIterator | |
14699 | stable_partition(_ForwardIterator __first, _ForwardIterator __last, | |
14700 | _Predicate __pred) | |
14701 | { | |
14702 | ||
14703 | ||
14704 | ||
14705 | ||
14706 | ||
14707 | ; | |
14708 | ||
14709 | if (__first == __last) | |
14710 | return __first; | |
14711 | else | |
14712 | { | |
14713 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
14714 | _ValueType; | |
14715 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
14716 | _DistanceType; | |
14717 | ||
14718 | _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, | |
14719 | __last); | |
14720 | if (__buf.size() > 0) | |
14721 | return | |
14722 | std::__stable_partition_adaptive(__first, __last, __pred, | |
14723 | _DistanceType(__buf.requested_size()), | |
14724 | __buf.begin(), __buf.size()); | |
14725 | else | |
14726 | return | |
14727 | std::__inplace_stable_partition(__first, __last, __pred, | |
14728 | _DistanceType(__buf.requested_size())); | |
14729 | } | |
14730 | } | |
14731 | ||
14732 | ||
14733 | ||
14734 | ||
14735 | ||
14736 | ||
14737 | template<typename _RandomAccessIterator, typename _Tp> | |
14738 | _RandomAccessIterator | |
14739 | __unguarded_partition(_RandomAccessIterator __first, | |
14740 | _RandomAccessIterator __last, _Tp __pivot) | |
14741 | { | |
14742 | while (true) | |
14743 | { | |
14744 | while (*__first < __pivot) | |
14745 | ++__first; | |
14746 | --__last; | |
14747 | while (__pivot < *__last) | |
14748 | --__last; | |
14749 | if (!(__first < __last)) | |
14750 | return __first; | |
14751 | std::iter_swap(__first, __last); | |
14752 | ++__first; | |
14753 | } | |
14754 | } | |
14755 | ||
14756 | ||
14757 | ||
14758 | ||
14759 | ||
14760 | ||
14761 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
14762 | _RandomAccessIterator | |
14763 | __unguarded_partition(_RandomAccessIterator __first, | |
14764 | _RandomAccessIterator __last, | |
14765 | _Tp __pivot, _Compare __comp) | |
14766 | { | |
14767 | while (true) | |
14768 | { | |
14769 | while (__comp(*__first, __pivot)) | |
14770 | ++__first; | |
14771 | --__last; | |
14772 | while (__comp(__pivot, *__last)) | |
14773 | --__last; | |
14774 | if (!(__first < __last)) | |
14775 | return __first; | |
14776 | std::iter_swap(__first, __last); | |
14777 | ++__first; | |
14778 | } | |
14779 | } | |
14780 | ||
14781 | ||
14782 | ||
14783 | ||
14784 | ||
14785 | ||
14786 | ||
14787 | enum { _S_threshold = 16 }; | |
14788 | ||
14789 | ||
14790 | ||
14791 | ||
14792 | ||
14793 | ||
14794 | template<typename _RandomAccessIterator, typename _Tp> | |
14795 | void | |
14796 | __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val) | |
14797 | { | |
14798 | _RandomAccessIterator __next = __last; | |
14799 | --__next; | |
14800 | while (__val < *__next) | |
14801 | { | |
14802 | *__last = *__next; | |
14803 | __last = __next; | |
14804 | --__next; | |
14805 | } | |
14806 | *__last = __val; | |
14807 | } | |
14808 | ||
14809 | ||
14810 | ||
14811 | ||
14812 | ||
14813 | ||
14814 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
14815 | void | |
14816 | __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val, | |
14817 | _Compare __comp) | |
14818 | { | |
14819 | _RandomAccessIterator __next = __last; | |
14820 | --__next; | |
14821 | while (__comp(__val, *__next)) | |
14822 | { | |
14823 | *__last = *__next; | |
14824 | __last = __next; | |
14825 | --__next; | |
14826 | } | |
14827 | *__last = __val; | |
14828 | } | |
14829 | ||
14830 | ||
14831 | ||
14832 | ||
14833 | ||
14834 | ||
14835 | template<typename _RandomAccessIterator> | |
14836 | void | |
14837 | __insertion_sort(_RandomAccessIterator __first, | |
14838 | _RandomAccessIterator __last) | |
14839 | { | |
14840 | if (__first == __last) | |
14841 | return; | |
14842 | ||
14843 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
14844 | { | |
14845 | typename iterator_traits<_RandomAccessIterator>::value_type | |
14846 | __val = *__i; | |
14847 | if (__val < *__first) | |
14848 | { | |
14849 | std::copy_backward(__first, __i, __i + 1); | |
14850 | *__first = __val; | |
14851 | } | |
14852 | else | |
14853 | std::__unguarded_linear_insert(__i, __val); | |
14854 | } | |
14855 | } | |
14856 | ||
14857 | ||
14858 | ||
14859 | ||
14860 | ||
14861 | ||
14862 | template<typename _RandomAccessIterator, typename _Compare> | |
14863 | void | |
14864 | __insertion_sort(_RandomAccessIterator __first, | |
14865 | _RandomAccessIterator __last, _Compare __comp) | |
14866 | { | |
14867 | if (__first == __last) return; | |
14868 | ||
14869 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
14870 | { | |
14871 | typename iterator_traits<_RandomAccessIterator>::value_type | |
14872 | __val = *__i; | |
14873 | if (__comp(__val, *__first)) | |
14874 | { | |
14875 | std::copy_backward(__first, __i, __i + 1); | |
14876 | *__first = __val; | |
14877 | } | |
14878 | else | |
14879 | std::__unguarded_linear_insert(__i, __val, __comp); | |
14880 | } | |
14881 | } | |
14882 | ||
14883 | ||
14884 | ||
14885 | ||
14886 | ||
14887 | ||
14888 | template<typename _RandomAccessIterator> | |
14889 | inline void | |
14890 | __unguarded_insertion_sort(_RandomAccessIterator __first, | |
14891 | _RandomAccessIterator __last) | |
14892 | { | |
14893 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14894 | _ValueType; | |
14895 | ||
14896 | for (_RandomAccessIterator __i = __first; __i != __last; ++__i) | |
14897 | std::__unguarded_linear_insert(__i, _ValueType(*__i)); | |
14898 | } | |
14899 | ||
14900 | ||
14901 | ||
14902 | ||
14903 | ||
14904 | ||
14905 | template<typename _RandomAccessIterator, typename _Compare> | |
14906 | inline void | |
14907 | __unguarded_insertion_sort(_RandomAccessIterator __first, | |
14908 | _RandomAccessIterator __last, _Compare __comp) | |
14909 | { | |
14910 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14911 | _ValueType; | |
14912 | ||
14913 | for (_RandomAccessIterator __i = __first; __i != __last; ++__i) | |
14914 | std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp); | |
14915 | } | |
14916 | ||
14917 | ||
14918 | ||
14919 | ||
14920 | ||
14921 | ||
14922 | template<typename _RandomAccessIterator> | |
14923 | void | |
14924 | __final_insertion_sort(_RandomAccessIterator __first, | |
14925 | _RandomAccessIterator __last) | |
14926 | { | |
14927 | if (__last - __first > int(_S_threshold)) | |
14928 | { | |
14929 | std::__insertion_sort(__first, __first + int(_S_threshold)); | |
14930 | std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); | |
14931 | } | |
14932 | else | |
14933 | std::__insertion_sort(__first, __last); | |
14934 | } | |
14935 | ||
14936 | ||
14937 | ||
14938 | ||
14939 | ||
14940 | ||
14941 | template<typename _RandomAccessIterator, typename _Compare> | |
14942 | void | |
14943 | __final_insertion_sort(_RandomAccessIterator __first, | |
14944 | _RandomAccessIterator __last, _Compare __comp) | |
14945 | { | |
14946 | if (__last - __first > int(_S_threshold)) | |
14947 | { | |
14948 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | |
14949 | std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, | |
14950 | __comp); | |
14951 | } | |
14952 | else | |
14953 | std::__insertion_sort(__first, __last, __comp); | |
14954 | } | |
14955 | ||
14956 | ||
14957 | ||
14958 | ||
14959 | ||
14960 | ||
14961 | template<typename _Size> | |
14962 | inline _Size | |
14963 | __lg(_Size __n) | |
14964 | { | |
14965 | _Size __k; | |
14966 | for (__k = 0; __n != 1; __n >>= 1) | |
14967 | ++__k; | |
14968 | return __k; | |
14969 | } | |
14970 | # 2416 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14971 | template<typename _RandomAccessIterator> | |
14972 | void | |
14973 | partial_sort(_RandomAccessIterator __first, | |
14974 | _RandomAccessIterator __middle, | |
14975 | _RandomAccessIterator __last) | |
14976 | { | |
14977 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14978 | _ValueType; | |
14979 | ||
14980 | ||
14981 | ||
14982 | ||
14983 | ||
14984 | ; | |
14985 | ; | |
14986 | ||
14987 | std::make_heap(__first, __middle); | |
14988 | for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) | |
14989 | if (*__i < *__first) | |
14990 | std::__pop_heap(__first, __middle, __i, _ValueType(*__i)); | |
14991 | std::sort_heap(__first, __middle); | |
14992 | } | |
14993 | # 2457 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
14994 | template<typename _RandomAccessIterator, typename _Compare> | |
14995 | void | |
14996 | partial_sort(_RandomAccessIterator __first, | |
14997 | _RandomAccessIterator __middle, | |
14998 | _RandomAccessIterator __last, | |
14999 | _Compare __comp) | |
15000 | { | |
15001 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15002 | _ValueType; | |
15003 | ||
15004 | ||
15005 | ||
15006 | ||
15007 | ||
15008 | ||
15009 | ; | |
15010 | ; | |
15011 | ||
15012 | std::make_heap(__first, __middle, __comp); | |
15013 | for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) | |
15014 | if (__comp(*__i, *__first)) | |
15015 | std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp); | |
15016 | std::sort_heap(__first, __middle, __comp); | |
15017 | } | |
15018 | # 2499 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15019 | template<typename _InputIterator, typename _RandomAccessIterator> | |
15020 | _RandomAccessIterator | |
15021 | partial_sort_copy(_InputIterator __first, _InputIterator __last, | |
15022 | _RandomAccessIterator __result_first, | |
15023 | _RandomAccessIterator __result_last) | |
15024 | { | |
15025 | typedef typename iterator_traits<_InputIterator>::value_type | |
15026 | _InputValueType; | |
15027 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15028 | _OutputValueType; | |
15029 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
15030 | _DistanceType; | |
15031 | ||
15032 | ||
15033 | ||
15034 | ||
15035 | ||
15036 | ||
15037 | ||
15038 | ; | |
15039 | ; | |
15040 | ||
15041 | if (__result_first == __result_last) | |
15042 | return __result_last; | |
15043 | _RandomAccessIterator __result_real_last = __result_first; | |
15044 | while(__first != __last && __result_real_last != __result_last) | |
15045 | { | |
15046 | *__result_real_last = *__first; | |
15047 | ++__result_real_last; | |
15048 | ++__first; | |
15049 | } | |
15050 | std::make_heap(__result_first, __result_real_last); | |
15051 | while (__first != __last) | |
15052 | { | |
15053 | if (*__first < *__result_first) | |
15054 | std::__adjust_heap(__result_first, _DistanceType(0), | |
15055 | _DistanceType(__result_real_last | |
15056 | - __result_first), | |
15057 | _InputValueType(*__first)); | |
15058 | ++__first; | |
15059 | } | |
15060 | std::sort_heap(__result_first, __result_real_last); | |
15061 | return __result_real_last; | |
15062 | } | |
15063 | # 2563 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15064 | template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare> | |
15065 | _RandomAccessIterator | |
15066 | partial_sort_copy(_InputIterator __first, _InputIterator __last, | |
15067 | _RandomAccessIterator __result_first, | |
15068 | _RandomAccessIterator __result_last, | |
15069 | _Compare __comp) | |
15070 | { | |
15071 | typedef typename iterator_traits<_InputIterator>::value_type | |
15072 | _InputValueType; | |
15073 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15074 | _OutputValueType; | |
15075 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
15076 | _DistanceType; | |
15077 | ||
15078 | ||
15079 | ||
15080 | ||
15081 | ||
15082 | ||
15083 | ||
15084 | ||
15085 | ||
15086 | ; | |
15087 | ; | |
15088 | ||
15089 | if (__result_first == __result_last) | |
15090 | return __result_last; | |
15091 | _RandomAccessIterator __result_real_last = __result_first; | |
15092 | while(__first != __last && __result_real_last != __result_last) | |
15093 | { | |
15094 | *__result_real_last = *__first; | |
15095 | ++__result_real_last; | |
15096 | ++__first; | |
15097 | } | |
15098 | std::make_heap(__result_first, __result_real_last, __comp); | |
15099 | while (__first != __last) | |
15100 | { | |
15101 | if (__comp(*__first, *__result_first)) | |
15102 | std::__adjust_heap(__result_first, _DistanceType(0), | |
15103 | _DistanceType(__result_real_last | |
15104 | - __result_first), | |
15105 | _InputValueType(*__first), | |
15106 | __comp); | |
15107 | ++__first; | |
15108 | } | |
15109 | std::sort_heap(__result_first, __result_real_last, __comp); | |
15110 | return __result_real_last; | |
15111 | } | |
15112 | ||
15113 | ||
15114 | ||
15115 | ||
15116 | ||
15117 | ||
15118 | template<typename _RandomAccessIterator, typename _Size> | |
15119 | void | |
15120 | __introsort_loop(_RandomAccessIterator __first, | |
15121 | _RandomAccessIterator __last, | |
15122 | _Size __depth_limit) | |
15123 | { | |
15124 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15125 | _ValueType; | |
15126 | ||
15127 | while (__last - __first > int(_S_threshold)) | |
15128 | { | |
15129 | if (__depth_limit == 0) | |
15130 | { | |
15131 | std::partial_sort(__first, __last, __last); | |
15132 | return; | |
15133 | } | |
15134 | --__depth_limit; | |
15135 | _RandomAccessIterator __cut = | |
15136 | std::__unguarded_partition(__first, __last, | |
15137 | _ValueType(std::__median(*__first, | |
15138 | *(__first | |
15139 | + (__last | |
15140 | - __first) | |
15141 | / 2), | |
15142 | *(__last | |
15143 | - 1)))); | |
15144 | std::__introsort_loop(__cut, __last, __depth_limit); | |
15145 | __last = __cut; | |
15146 | } | |
15147 | } | |
15148 | ||
15149 | ||
15150 | ||
15151 | ||
15152 | ||
15153 | ||
15154 | template<typename _RandomAccessIterator, typename _Size, typename _Compare> | |
15155 | void | |
15156 | __introsort_loop(_RandomAccessIterator __first, | |
15157 | _RandomAccessIterator __last, | |
15158 | _Size __depth_limit, _Compare __comp) | |
15159 | { | |
15160 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15161 | _ValueType; | |
15162 | ||
15163 | while (__last - __first > int(_S_threshold)) | |
15164 | { | |
15165 | if (__depth_limit == 0) | |
15166 | { | |
15167 | std::partial_sort(__first, __last, __last, __comp); | |
15168 | return; | |
15169 | } | |
15170 | --__depth_limit; | |
15171 | _RandomAccessIterator __cut = | |
15172 | std::__unguarded_partition(__first, __last, | |
15173 | _ValueType(std::__median(*__first, | |
15174 | *(__first | |
15175 | + (__last | |
15176 | - __first) | |
15177 | / 2), | |
15178 | *(__last - 1), | |
15179 | __comp)), | |
15180 | __comp); | |
15181 | std::__introsort_loop(__cut, __last, __depth_limit, __comp); | |
15182 | __last = __cut; | |
15183 | } | |
15184 | } | |
15185 | # 2698 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15186 | template<typename _RandomAccessIterator> | |
15187 | inline void | |
15188 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
15189 | { | |
15190 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15191 | _ValueType; | |
15192 | ||
15193 | ||
15194 | ||
15195 | ||
15196 | ||
15197 | ; | |
15198 | ||
15199 | if (__first != __last) | |
15200 | { | |
15201 | std::__introsort_loop(__first, __last, __lg(__last - __first) * 2); | |
15202 | std::__final_insertion_sort(__first, __last); | |
15203 | } | |
15204 | } | |
15205 | # 2732 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15206 | template<typename _RandomAccessIterator, typename _Compare> | |
15207 | inline void | |
15208 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
15209 | _Compare __comp) | |
15210 | { | |
15211 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15212 | _ValueType; | |
15213 | ||
15214 | ||
15215 | ||
15216 | ||
15217 | ||
15218 | ||
15219 | ; | |
15220 | ||
15221 | if (__first != __last) | |
15222 | { | |
15223 | std::__introsort_loop(__first, __last, __lg(__last - __first) * 2, | |
15224 | __comp); | |
15225 | std::__final_insertion_sort(__first, __last, __comp); | |
15226 | } | |
15227 | } | |
15228 | # 2765 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15229 | template<typename _ForwardIterator, typename _Tp> | |
15230 | _ForwardIterator | |
15231 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | |
15232 | const _Tp& __val) | |
15233 | { | |
15234 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
15235 | _ValueType; | |
15236 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
15237 | _DistanceType; | |
15238 | ||
15239 | ||
15240 | ||
15241 | ||
15242 | ||
15243 | ||
15244 | ||
15245 | ||
15246 | ||
15247 | ; | |
15248 | ||
15249 | _DistanceType __len = std::distance(__first, __last); | |
15250 | _DistanceType __half; | |
15251 | _ForwardIterator __middle; | |
15252 | ||
15253 | while (__len > 0) | |
15254 | { | |
15255 | __half = __len >> 1; | |
15256 | __middle = __first; | |
15257 | std::advance(__middle, __half); | |
15258 | if (*__middle < __val) | |
15259 | { | |
15260 | __first = __middle; | |
15261 | ++__first; | |
15262 | __len = __len - __half - 1; | |
15263 | } | |
15264 | else | |
15265 | __len = __half; | |
15266 | } | |
15267 | return __first; | |
15268 | } | |
15269 | # 2820 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15270 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
15271 | _ForwardIterator | |
15272 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | |
15273 | const _Tp& __val, _Compare __comp) | |
15274 | { | |
15275 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
15276 | _ValueType; | |
15277 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
15278 | _DistanceType; | |
15279 | ||
15280 | ||
15281 | ||
15282 | ||
15283 | ||
15284 | ; | |
15285 | ||
15286 | _DistanceType __len = std::distance(__first, __last); | |
15287 | _DistanceType __half; | |
15288 | _ForwardIterator __middle; | |
15289 | ||
15290 | while (__len > 0) | |
15291 | { | |
15292 | __half = __len >> 1; | |
15293 | __middle = __first; | |
15294 | std::advance(__middle, __half); | |
15295 | if (__comp(*__middle, __val)) | |
15296 | { | |
15297 | __first = __middle; | |
15298 | ++__first; | |
15299 | __len = __len - __half - 1; | |
15300 | } | |
15301 | else | |
15302 | __len = __half; | |
15303 | } | |
15304 | return __first; | |
15305 | } | |
15306 | # 2867 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15307 | template<typename _ForwardIterator, typename _Tp> | |
15308 | _ForwardIterator | |
15309 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | |
15310 | const _Tp& __val) | |
15311 | { | |
15312 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
15313 | _ValueType; | |
15314 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
15315 | _DistanceType; | |
15316 | ||
15317 | ||
15318 | ||
15319 | ||
15320 | ||
15321 | ||
15322 | ; | |
15323 | ||
15324 | _DistanceType __len = std::distance(__first, __last); | |
15325 | _DistanceType __half; | |
15326 | _ForwardIterator __middle; | |
15327 | ||
15328 | while (__len > 0) | |
15329 | { | |
15330 | __half = __len >> 1; | |
15331 | __middle = __first; | |
15332 | std::advance(__middle, __half); | |
15333 | if (__val < *__middle) | |
15334 | __len = __half; | |
15335 | else | |
15336 | { | |
15337 | __first = __middle; | |
15338 | ++__first; | |
15339 | __len = __len - __half - 1; | |
15340 | } | |
15341 | } | |
15342 | return __first; | |
15343 | } | |
15344 | # 2919 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15345 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
15346 | _ForwardIterator | |
15347 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | |
15348 | const _Tp& __val, _Compare __comp) | |
15349 | { | |
15350 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
15351 | _ValueType; | |
15352 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
15353 | _DistanceType; | |
15354 | ||
15355 | ||
15356 | ||
15357 | ||
15358 | ||
15359 | ; | |
15360 | ||
15361 | _DistanceType __len = std::distance(__first, __last); | |
15362 | _DistanceType __half; | |
15363 | _ForwardIterator __middle; | |
15364 | ||
15365 | while (__len > 0) | |
15366 | { | |
15367 | __half = __len >> 1; | |
15368 | __middle = __first; | |
15369 | std::advance(__middle, __half); | |
15370 | if (__comp(__val, *__middle)) | |
15371 | __len = __half; | |
15372 | else | |
15373 | { | |
15374 | __first = __middle; | |
15375 | ++__first; | |
15376 | __len = __len - __half - 1; | |
15377 | } | |
15378 | } | |
15379 | return __first; | |
15380 | } | |
15381 | ||
15382 | ||
15383 | ||
15384 | ||
15385 | ||
15386 | ||
15387 | template<typename _BidirectionalIterator, typename _Distance> | |
15388 | void | |
15389 | __merge_without_buffer(_BidirectionalIterator __first, | |
15390 | _BidirectionalIterator __middle, | |
15391 | _BidirectionalIterator __last, | |
15392 | _Distance __len1, _Distance __len2) | |
15393 | { | |
15394 | if (__len1 == 0 || __len2 == 0) | |
15395 | return; | |
15396 | if (__len1 + __len2 == 2) | |
15397 | { | |
15398 | if (*__middle < *__first) | |
15399 | std::iter_swap(__first, __middle); | |
15400 | return; | |
15401 | } | |
15402 | _BidirectionalIterator __first_cut = __first; | |
15403 | _BidirectionalIterator __second_cut = __middle; | |
15404 | _Distance __len11 = 0; | |
15405 | _Distance __len22 = 0; | |
15406 | if (__len1 > __len2) | |
15407 | { | |
15408 | __len11 = __len1 / 2; | |
15409 | std::advance(__first_cut, __len11); | |
15410 | __second_cut = std::lower_bound(__middle, __last, *__first_cut); | |
15411 | __len22 = std::distance(__middle, __second_cut); | |
15412 | } | |
15413 | else | |
15414 | { | |
15415 | __len22 = __len2 / 2; | |
15416 | std::advance(__second_cut, __len22); | |
15417 | __first_cut = std::upper_bound(__first, __middle, *__second_cut); | |
15418 | __len11 = std::distance(__first, __first_cut); | |
15419 | } | |
15420 | std::rotate(__first_cut, __middle, __second_cut); | |
15421 | _BidirectionalIterator __new_middle = __first_cut; | |
15422 | std::advance(__new_middle, std::distance(__middle, __second_cut)); | |
15423 | std::__merge_without_buffer(__first, __first_cut, __new_middle, | |
15424 | __len11, __len22); | |
15425 | std::__merge_without_buffer(__new_middle, __second_cut, __last, | |
15426 | __len1 - __len11, __len2 - __len22); | |
15427 | } | |
15428 | ||
15429 | ||
15430 | ||
15431 | ||
15432 | ||
15433 | ||
15434 | template<typename _BidirectionalIterator, typename _Distance, | |
15435 | typename _Compare> | |
15436 | void | |
15437 | __merge_without_buffer(_BidirectionalIterator __first, | |
15438 | _BidirectionalIterator __middle, | |
15439 | _BidirectionalIterator __last, | |
15440 | _Distance __len1, _Distance __len2, | |
15441 | _Compare __comp) | |
15442 | { | |
15443 | if (__len1 == 0 || __len2 == 0) | |
15444 | return; | |
15445 | if (__len1 + __len2 == 2) | |
15446 | { | |
15447 | if (__comp(*__middle, *__first)) | |
15448 | std::iter_swap(__first, __middle); | |
15449 | return; | |
15450 | } | |
15451 | _BidirectionalIterator __first_cut = __first; | |
15452 | _BidirectionalIterator __second_cut = __middle; | |
15453 | _Distance __len11 = 0; | |
15454 | _Distance __len22 = 0; | |
15455 | if (__len1 > __len2) | |
15456 | { | |
15457 | __len11 = __len1 / 2; | |
15458 | std::advance(__first_cut, __len11); | |
15459 | __second_cut = std::lower_bound(__middle, __last, *__first_cut, | |
15460 | __comp); | |
15461 | __len22 = std::distance(__middle, __second_cut); | |
15462 | } | |
15463 | else | |
15464 | { | |
15465 | __len22 = __len2 / 2; | |
15466 | std::advance(__second_cut, __len22); | |
15467 | __first_cut = std::upper_bound(__first, __middle, *__second_cut, | |
15468 | __comp); | |
15469 | __len11 = std::distance(__first, __first_cut); | |
15470 | } | |
15471 | std::rotate(__first_cut, __middle, __second_cut); | |
15472 | _BidirectionalIterator __new_middle = __first_cut; | |
15473 | std::advance(__new_middle, std::distance(__middle, __second_cut)); | |
15474 | std::__merge_without_buffer(__first, __first_cut, __new_middle, | |
15475 | __len11, __len22, __comp); | |
15476 | std::__merge_without_buffer(__new_middle, __second_cut, __last, | |
15477 | __len1 - __len11, __len2 - __len22, __comp); | |
15478 | } | |
15479 | ||
15480 | ||
15481 | ||
15482 | ||
15483 | ||
15484 | ||
15485 | template<typename _RandomAccessIterator> | |
15486 | void | |
15487 | __inplace_stable_sort(_RandomAccessIterator __first, | |
15488 | _RandomAccessIterator __last) | |
15489 | { | |
15490 | if (__last - __first < 15) | |
15491 | { | |
15492 | std::__insertion_sort(__first, __last); | |
15493 | return; | |
15494 | } | |
15495 | _RandomAccessIterator __middle = __first + (__last - __first) / 2; | |
15496 | std::__inplace_stable_sort(__first, __middle); | |
15497 | std::__inplace_stable_sort(__middle, __last); | |
15498 | std::__merge_without_buffer(__first, __middle, __last, | |
15499 | __middle - __first, | |
15500 | __last - __middle); | |
15501 | } | |
15502 | ||
15503 | ||
15504 | ||
15505 | ||
15506 | ||
15507 | ||
15508 | template<typename _RandomAccessIterator, typename _Compare> | |
15509 | void | |
15510 | __inplace_stable_sort(_RandomAccessIterator __first, | |
15511 | _RandomAccessIterator __last, _Compare __comp) | |
15512 | { | |
15513 | if (__last - __first < 15) | |
15514 | { | |
15515 | std::__insertion_sort(__first, __last, __comp); | |
15516 | return; | |
15517 | } | |
15518 | _RandomAccessIterator __middle = __first + (__last - __first) / 2; | |
15519 | std::__inplace_stable_sort(__first, __middle, __comp); | |
15520 | std::__inplace_stable_sort(__middle, __last, __comp); | |
15521 | std::__merge_without_buffer(__first, __middle, __last, | |
15522 | __middle - __first, | |
15523 | __last - __middle, | |
15524 | __comp); | |
15525 | } | |
15526 | # 3117 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15527 | template<typename _InputIterator1, typename _InputIterator2, | |
15528 | typename _OutputIterator> | |
15529 | _OutputIterator | |
15530 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | |
15531 | _InputIterator2 __first2, _InputIterator2 __last2, | |
15532 | _OutputIterator __result) | |
15533 | { | |
15534 | ||
15535 | ||
15536 | ||
15537 | ||
15538 | ||
15539 | ||
15540 | ||
15541 | ||
15542 | ||
15543 | ||
15544 | ; | |
15545 | ; | |
15546 | ||
15547 | while (__first1 != __last1 && __first2 != __last2) | |
15548 | { | |
15549 | if (*__first2 < *__first1) | |
15550 | { | |
15551 | *__result = *__first2; | |
15552 | ++__first2; | |
15553 | } | |
15554 | else | |
15555 | { | |
15556 | *__result = *__first1; | |
15557 | ++__first1; | |
15558 | } | |
15559 | ++__result; | |
15560 | } | |
15561 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
15562 | __result)); | |
15563 | } | |
15564 | # 3175 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15565 | template<typename _InputIterator1, typename _InputIterator2, | |
15566 | typename _OutputIterator, typename _Compare> | |
15567 | _OutputIterator | |
15568 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | |
15569 | _InputIterator2 __first2, _InputIterator2 __last2, | |
15570 | _OutputIterator __result, _Compare __comp) | |
15571 | { | |
15572 | ||
15573 | ||
15574 | ||
15575 | ||
15576 | ||
15577 | ||
15578 | ||
15579 | ||
15580 | ||
15581 | ||
15582 | ||
15583 | ; | |
15584 | ; | |
15585 | ||
15586 | while (__first1 != __last1 && __first2 != __last2) | |
15587 | { | |
15588 | if (__comp(*__first2, *__first1)) | |
15589 | { | |
15590 | *__result = *__first2; | |
15591 | ++__first2; | |
15592 | } | |
15593 | else | |
15594 | { | |
15595 | *__result = *__first1; | |
15596 | ++__first1; | |
15597 | } | |
15598 | ++__result; | |
15599 | } | |
15600 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
15601 | __result)); | |
15602 | } | |
15603 | ||
15604 | template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, | |
15605 | typename _Distance> | |
15606 | void | |
15607 | __merge_sort_loop(_RandomAccessIterator1 __first, | |
15608 | _RandomAccessIterator1 __last, | |
15609 | _RandomAccessIterator2 __result, | |
15610 | _Distance __step_size) | |
15611 | { | |
15612 | const _Distance __two_step = 2 * __step_size; | |
15613 | ||
15614 | while (__last - __first >= __two_step) | |
15615 | { | |
15616 | __result = std::merge(__first, __first + __step_size, | |
15617 | __first + __step_size, __first + __two_step, | |
15618 | __result); | |
15619 | __first += __two_step; | |
15620 | } | |
15621 | ||
15622 | __step_size = std::min(_Distance(__last - __first), __step_size); | |
15623 | std::merge(__first, __first + __step_size, __first + __step_size, __last, | |
15624 | __result); | |
15625 | } | |
15626 | ||
15627 | template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, | |
15628 | typename _Distance, typename _Compare> | |
15629 | void | |
15630 | __merge_sort_loop(_RandomAccessIterator1 __first, | |
15631 | _RandomAccessIterator1 __last, | |
15632 | _RandomAccessIterator2 __result, _Distance __step_size, | |
15633 | _Compare __comp) | |
15634 | { | |
15635 | const _Distance __two_step = 2 * __step_size; | |
15636 | ||
15637 | while (__last - __first >= __two_step) | |
15638 | { | |
15639 | __result = std::merge(__first, __first + __step_size, | |
15640 | __first + __step_size, __first + __two_step, | |
15641 | __result, | |
15642 | __comp); | |
15643 | __first += __two_step; | |
15644 | } | |
15645 | __step_size = std::min(_Distance(__last - __first), __step_size); | |
15646 | ||
15647 | std::merge(__first, __first + __step_size, | |
15648 | __first + __step_size, __last, | |
15649 | __result, | |
15650 | __comp); | |
15651 | } | |
15652 | ||
15653 | enum { _S_chunk_size = 7 }; | |
15654 | ||
15655 | template<typename _RandomAccessIterator, typename _Distance> | |
15656 | void | |
15657 | __chunk_insertion_sort(_RandomAccessIterator __first, | |
15658 | _RandomAccessIterator __last, | |
15659 | _Distance __chunk_size) | |
15660 | { | |
15661 | while (__last - __first >= __chunk_size) | |
15662 | { | |
15663 | std::__insertion_sort(__first, __first + __chunk_size); | |
15664 | __first += __chunk_size; | |
15665 | } | |
15666 | std::__insertion_sort(__first, __last); | |
15667 | } | |
15668 | ||
15669 | template<typename _RandomAccessIterator, typename _Distance, typename _Compare> | |
15670 | void | |
15671 | __chunk_insertion_sort(_RandomAccessIterator __first, | |
15672 | _RandomAccessIterator __last, | |
15673 | _Distance __chunk_size, _Compare __comp) | |
15674 | { | |
15675 | while (__last - __first >= __chunk_size) | |
15676 | { | |
15677 | std::__insertion_sort(__first, __first + __chunk_size, __comp); | |
15678 | __first += __chunk_size; | |
15679 | } | |
15680 | std::__insertion_sort(__first, __last, __comp); | |
15681 | } | |
15682 | ||
15683 | template<typename _RandomAccessIterator, typename _Pointer> | |
15684 | void | |
15685 | __merge_sort_with_buffer(_RandomAccessIterator __first, | |
15686 | _RandomAccessIterator __last, | |
15687 | _Pointer __buffer) | |
15688 | { | |
15689 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
15690 | _Distance; | |
15691 | ||
15692 | const _Distance __len = __last - __first; | |
15693 | const _Pointer __buffer_last = __buffer + __len; | |
15694 | ||
15695 | _Distance __step_size = _S_chunk_size; | |
15696 | std::__chunk_insertion_sort(__first, __last, __step_size); | |
15697 | ||
15698 | while (__step_size < __len) | |
15699 | { | |
15700 | std::__merge_sort_loop(__first, __last, __buffer, __step_size); | |
15701 | __step_size *= 2; | |
15702 | std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); | |
15703 | __step_size *= 2; | |
15704 | } | |
15705 | } | |
15706 | ||
15707 | template<typename _RandomAccessIterator, typename _Pointer, typename _Compare> | |
15708 | void | |
15709 | __merge_sort_with_buffer(_RandomAccessIterator __first, | |
15710 | _RandomAccessIterator __last, | |
15711 | _Pointer __buffer, _Compare __comp) | |
15712 | { | |
15713 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
15714 | _Distance; | |
15715 | ||
15716 | const _Distance __len = __last - __first; | |
15717 | const _Pointer __buffer_last = __buffer + __len; | |
15718 | ||
15719 | _Distance __step_size = _S_chunk_size; | |
15720 | std::__chunk_insertion_sort(__first, __last, __step_size, __comp); | |
15721 | ||
15722 | while (__step_size < __len) | |
15723 | { | |
15724 | std::__merge_sort_loop(__first, __last, __buffer, | |
15725 | __step_size, __comp); | |
15726 | __step_size *= 2; | |
15727 | std::__merge_sort_loop(__buffer, __buffer_last, __first, | |
15728 | __step_size, __comp); | |
15729 | __step_size *= 2; | |
15730 | } | |
15731 | } | |
15732 | ||
15733 | ||
15734 | ||
15735 | ||
15736 | ||
15737 | ||
15738 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
15739 | typename _BidirectionalIterator3> | |
15740 | _BidirectionalIterator3 | |
15741 | __merge_backward(_BidirectionalIterator1 __first1, | |
15742 | _BidirectionalIterator1 __last1, | |
15743 | _BidirectionalIterator2 __first2, | |
15744 | _BidirectionalIterator2 __last2, | |
15745 | _BidirectionalIterator3 __result) | |
15746 | { | |
15747 | if (__first1 == __last1) | |
15748 | return std::copy_backward(__first2, __last2, __result); | |
15749 | if (__first2 == __last2) | |
15750 | return std::copy_backward(__first1, __last1, __result); | |
15751 | --__last1; | |
15752 | --__last2; | |
15753 | while (true) | |
15754 | { | |
15755 | if (*__last2 < *__last1) | |
15756 | { | |
15757 | *--__result = *__last1; | |
15758 | if (__first1 == __last1) | |
15759 | return std::copy_backward(__first2, ++__last2, __result); | |
15760 | --__last1; | |
15761 | } | |
15762 | else | |
15763 | { | |
15764 | *--__result = *__last2; | |
15765 | if (__first2 == __last2) | |
15766 | return std::copy_backward(__first1, ++__last1, __result); | |
15767 | --__last2; | |
15768 | } | |
15769 | } | |
15770 | } | |
15771 | ||
15772 | ||
15773 | ||
15774 | ||
15775 | ||
15776 | ||
15777 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
15778 | typename _BidirectionalIterator3, typename _Compare> | |
15779 | _BidirectionalIterator3 | |
15780 | __merge_backward(_BidirectionalIterator1 __first1, | |
15781 | _BidirectionalIterator1 __last1, | |
15782 | _BidirectionalIterator2 __first2, | |
15783 | _BidirectionalIterator2 __last2, | |
15784 | _BidirectionalIterator3 __result, | |
15785 | _Compare __comp) | |
15786 | { | |
15787 | if (__first1 == __last1) | |
15788 | return std::copy_backward(__first2, __last2, __result); | |
15789 | if (__first2 == __last2) | |
15790 | return std::copy_backward(__first1, __last1, __result); | |
15791 | --__last1; | |
15792 | --__last2; | |
15793 | while (true) | |
15794 | { | |
15795 | if (__comp(*__last2, *__last1)) | |
15796 | { | |
15797 | *--__result = *__last1; | |
15798 | if (__first1 == __last1) | |
15799 | return std::copy_backward(__first2, ++__last2, __result); | |
15800 | --__last1; | |
15801 | } | |
15802 | else | |
15803 | { | |
15804 | *--__result = *__last2; | |
15805 | if (__first2 == __last2) | |
15806 | return std::copy_backward(__first1, ++__last1, __result); | |
15807 | --__last2; | |
15808 | } | |
15809 | } | |
15810 | } | |
15811 | ||
15812 | ||
15813 | ||
15814 | ||
15815 | ||
15816 | ||
15817 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
15818 | typename _Distance> | |
15819 | _BidirectionalIterator1 | |
15820 | __rotate_adaptive(_BidirectionalIterator1 __first, | |
15821 | _BidirectionalIterator1 __middle, | |
15822 | _BidirectionalIterator1 __last, | |
15823 | _Distance __len1, _Distance __len2, | |
15824 | _BidirectionalIterator2 __buffer, | |
15825 | _Distance __buffer_size) | |
15826 | { | |
15827 | _BidirectionalIterator2 __buffer_end; | |
15828 | if (__len1 > __len2 && __len2 <= __buffer_size) | |
15829 | { | |
15830 | __buffer_end = std::copy(__middle, __last, __buffer); | |
15831 | std::copy_backward(__first, __middle, __last); | |
15832 | return std::copy(__buffer, __buffer_end, __first); | |
15833 | } | |
15834 | else if (__len1 <= __buffer_size) | |
15835 | { | |
15836 | __buffer_end = std::copy(__first, __middle, __buffer); | |
15837 | std::copy(__middle, __last, __first); | |
15838 | return std::copy_backward(__buffer, __buffer_end, __last); | |
15839 | } | |
15840 | else | |
15841 | { | |
15842 | std::rotate(__first, __middle, __last); | |
15843 | std::advance(__first, std::distance(__middle, __last)); | |
15844 | return __first; | |
15845 | } | |
15846 | } | |
15847 | ||
15848 | ||
15849 | ||
15850 | ||
15851 | ||
15852 | ||
15853 | template<typename _BidirectionalIterator, typename _Distance, | |
15854 | typename _Pointer> | |
15855 | void | |
15856 | __merge_adaptive(_BidirectionalIterator __first, | |
15857 | _BidirectionalIterator __middle, | |
15858 | _BidirectionalIterator __last, | |
15859 | _Distance __len1, _Distance __len2, | |
15860 | _Pointer __buffer, _Distance __buffer_size) | |
15861 | { | |
15862 | if (__len1 <= __len2 && __len1 <= __buffer_size) | |
15863 | { | |
15864 | _Pointer __buffer_end = std::copy(__first, __middle, __buffer); | |
15865 | std::merge(__buffer, __buffer_end, __middle, __last, __first); | |
15866 | } | |
15867 | else if (__len2 <= __buffer_size) | |
15868 | { | |
15869 | _Pointer __buffer_end = std::copy(__middle, __last, __buffer); | |
15870 | std::__merge_backward(__first, __middle, __buffer, | |
15871 | __buffer_end, __last); | |
15872 | } | |
15873 | else | |
15874 | { | |
15875 | _BidirectionalIterator __first_cut = __first; | |
15876 | _BidirectionalIterator __second_cut = __middle; | |
15877 | _Distance __len11 = 0; | |
15878 | _Distance __len22 = 0; | |
15879 | if (__len1 > __len2) | |
15880 | { | |
15881 | __len11 = __len1 / 2; | |
15882 | std::advance(__first_cut, __len11); | |
15883 | __second_cut = std::lower_bound(__middle, __last, | |
15884 | *__first_cut); | |
15885 | __len22 = std::distance(__middle, __second_cut); | |
15886 | } | |
15887 | else | |
15888 | { | |
15889 | __len22 = __len2 / 2; | |
15890 | std::advance(__second_cut, __len22); | |
15891 | __first_cut = std::upper_bound(__first, __middle, | |
15892 | *__second_cut); | |
15893 | __len11 = std::distance(__first, __first_cut); | |
15894 | } | |
15895 | _BidirectionalIterator __new_middle = | |
15896 | std::__rotate_adaptive(__first_cut, __middle, __second_cut, | |
15897 | __len1 - __len11, __len22, __buffer, | |
15898 | __buffer_size); | |
15899 | std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, | |
15900 | __len22, __buffer, __buffer_size); | |
15901 | std::__merge_adaptive(__new_middle, __second_cut, __last, | |
15902 | __len1 - __len11, | |
15903 | __len2 - __len22, __buffer, __buffer_size); | |
15904 | } | |
15905 | } | |
15906 | ||
15907 | ||
15908 | ||
15909 | ||
15910 | ||
15911 | ||
15912 | template<typename _BidirectionalIterator, typename _Distance, typename _Pointer, | |
15913 | typename _Compare> | |
15914 | void | |
15915 | __merge_adaptive(_BidirectionalIterator __first, | |
15916 | _BidirectionalIterator __middle, | |
15917 | _BidirectionalIterator __last, | |
15918 | _Distance __len1, _Distance __len2, | |
15919 | _Pointer __buffer, _Distance __buffer_size, | |
15920 | _Compare __comp) | |
15921 | { | |
15922 | if (__len1 <= __len2 && __len1 <= __buffer_size) | |
15923 | { | |
15924 | _Pointer __buffer_end = std::copy(__first, __middle, __buffer); | |
15925 | std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp); | |
15926 | } | |
15927 | else if (__len2 <= __buffer_size) | |
15928 | { | |
15929 | _Pointer __buffer_end = std::copy(__middle, __last, __buffer); | |
15930 | std::__merge_backward(__first, __middle, __buffer, __buffer_end, | |
15931 | __last, __comp); | |
15932 | } | |
15933 | else | |
15934 | { | |
15935 | _BidirectionalIterator __first_cut = __first; | |
15936 | _BidirectionalIterator __second_cut = __middle; | |
15937 | _Distance __len11 = 0; | |
15938 | _Distance __len22 = 0; | |
15939 | if (__len1 > __len2) | |
15940 | { | |
15941 | __len11 = __len1 / 2; | |
15942 | std::advance(__first_cut, __len11); | |
15943 | __second_cut = std::lower_bound(__middle, __last, *__first_cut, | |
15944 | __comp); | |
15945 | __len22 = std::distance(__middle, __second_cut); | |
15946 | } | |
15947 | else | |
15948 | { | |
15949 | __len22 = __len2 / 2; | |
15950 | std::advance(__second_cut, __len22); | |
15951 | __first_cut = std::upper_bound(__first, __middle, *__second_cut, | |
15952 | __comp); | |
15953 | __len11 = std::distance(__first, __first_cut); | |
15954 | } | |
15955 | _BidirectionalIterator __new_middle = | |
15956 | std::__rotate_adaptive(__first_cut, __middle, __second_cut, | |
15957 | __len1 - __len11, __len22, __buffer, | |
15958 | __buffer_size); | |
15959 | std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, | |
15960 | __len22, __buffer, __buffer_size, __comp); | |
15961 | std::__merge_adaptive(__new_middle, __second_cut, __last, | |
15962 | __len1 - __len11, | |
15963 | __len2 - __len22, __buffer, | |
15964 | __buffer_size, __comp); | |
15965 | } | |
15966 | } | |
15967 | # 3595 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
15968 | template<typename _BidirectionalIterator> | |
15969 | void | |
15970 | inplace_merge(_BidirectionalIterator __first, | |
15971 | _BidirectionalIterator __middle, | |
15972 | _BidirectionalIterator __last) | |
15973 | { | |
15974 | typedef typename iterator_traits<_BidirectionalIterator>::value_type | |
15975 | _ValueType; | |
15976 | typedef typename iterator_traits<_BidirectionalIterator>::difference_type | |
15977 | _DistanceType; | |
15978 | ||
15979 | ||
15980 | ||
15981 | ||
15982 | ||
15983 | ; | |
15984 | ; | |
15985 | ||
15986 | if (__first == __middle || __middle == __last) | |
15987 | return; | |
15988 | ||
15989 | _DistanceType __len1 = std::distance(__first, __middle); | |
15990 | _DistanceType __len2 = std::distance(__middle, __last); | |
15991 | ||
15992 | _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, | |
15993 | __last); | |
15994 | if (__buf.begin() == 0) | |
15995 | std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); | |
15996 | else | |
15997 | std::__merge_adaptive(__first, __middle, __last, __len1, __len2, | |
15998 | __buf.begin(), _DistanceType(__buf.size())); | |
15999 | } | |
16000 | # 3649 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16001 | template<typename _BidirectionalIterator, typename _Compare> | |
16002 | void | |
16003 | inplace_merge(_BidirectionalIterator __first, | |
16004 | _BidirectionalIterator __middle, | |
16005 | _BidirectionalIterator __last, | |
16006 | _Compare __comp) | |
16007 | { | |
16008 | typedef typename iterator_traits<_BidirectionalIterator>::value_type | |
16009 | _ValueType; | |
16010 | typedef typename iterator_traits<_BidirectionalIterator>::difference_type | |
16011 | _DistanceType; | |
16012 | ||
16013 | ||
16014 | ||
16015 | ||
16016 | ||
16017 | ||
16018 | ; | |
16019 | ; | |
16020 | ||
16021 | if (__first == __middle || __middle == __last) | |
16022 | return; | |
16023 | ||
16024 | const _DistanceType __len1 = std::distance(__first, __middle); | |
16025 | const _DistanceType __len2 = std::distance(__middle, __last); | |
16026 | ||
16027 | _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, | |
16028 | __last); | |
16029 | if (__buf.begin() == 0) | |
16030 | std::__merge_without_buffer(__first, __middle, __last, __len1, | |
16031 | __len2, __comp); | |
16032 | else | |
16033 | std::__merge_adaptive(__first, __middle, __last, __len1, __len2, | |
16034 | __buf.begin(), _DistanceType(__buf.size()), | |
16035 | __comp); | |
16036 | } | |
16037 | ||
16038 | template<typename _RandomAccessIterator, typename _Pointer, | |
16039 | typename _Distance> | |
16040 | void | |
16041 | __stable_sort_adaptive(_RandomAccessIterator __first, | |
16042 | _RandomAccessIterator __last, | |
16043 | _Pointer __buffer, _Distance __buffer_size) | |
16044 | { | |
16045 | const _Distance __len = (__last - __first + 1) / 2; | |
16046 | const _RandomAccessIterator __middle = __first + __len; | |
16047 | if (__len > __buffer_size) | |
16048 | { | |
16049 | std::__stable_sort_adaptive(__first, __middle, | |
16050 | __buffer, __buffer_size); | |
16051 | std::__stable_sort_adaptive(__middle, __last, | |
16052 | __buffer, __buffer_size); | |
16053 | } | |
16054 | else | |
16055 | { | |
16056 | std::__merge_sort_with_buffer(__first, __middle, __buffer); | |
16057 | std::__merge_sort_with_buffer(__middle, __last, __buffer); | |
16058 | } | |
16059 | std::__merge_adaptive(__first, __middle, __last, | |
16060 | _Distance(__middle - __first), | |
16061 | _Distance(__last - __middle), | |
16062 | __buffer, __buffer_size); | |
16063 | } | |
16064 | ||
16065 | template<typename _RandomAccessIterator, typename _Pointer, | |
16066 | typename _Distance, typename _Compare> | |
16067 | void | |
16068 | __stable_sort_adaptive(_RandomAccessIterator __first, | |
16069 | _RandomAccessIterator __last, | |
16070 | _Pointer __buffer, _Distance __buffer_size, | |
16071 | _Compare __comp) | |
16072 | { | |
16073 | const _Distance __len = (__last - __first + 1) / 2; | |
16074 | const _RandomAccessIterator __middle = __first + __len; | |
16075 | if (__len > __buffer_size) | |
16076 | { | |
16077 | std::__stable_sort_adaptive(__first, __middle, __buffer, | |
16078 | __buffer_size, __comp); | |
16079 | std::__stable_sort_adaptive(__middle, __last, __buffer, | |
16080 | __buffer_size, __comp); | |
16081 | } | |
16082 | else | |
16083 | { | |
16084 | std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); | |
16085 | std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); | |
16086 | } | |
16087 | std::__merge_adaptive(__first, __middle, __last, | |
16088 | _Distance(__middle - __first), | |
16089 | _Distance(__last - __middle), | |
16090 | __buffer, __buffer_size, | |
16091 | __comp); | |
16092 | } | |
16093 | # 3758 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16094 | template<typename _RandomAccessIterator> | |
16095 | inline void | |
16096 | stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
16097 | { | |
16098 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16099 | _ValueType; | |
16100 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16101 | _DistanceType; | |
16102 | ||
16103 | ||
16104 | ||
16105 | ||
16106 | ||
16107 | ; | |
16108 | ||
16109 | _Temporary_buffer<_RandomAccessIterator, _ValueType> | |
16110 | buf(__first, __last); | |
16111 | if (buf.begin() == 0) | |
16112 | std::__inplace_stable_sort(__first, __last); | |
16113 | else | |
16114 | std::__stable_sort_adaptive(__first, __last, buf.begin(), | |
16115 | _DistanceType(buf.size())); | |
16116 | } | |
16117 | # 3799 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16118 | template<typename _RandomAccessIterator, typename _Compare> | |
16119 | inline void | |
16120 | stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16121 | _Compare __comp) | |
16122 | { | |
16123 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16124 | _ValueType; | |
16125 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16126 | _DistanceType; | |
16127 | ||
16128 | ||
16129 | ||
16130 | ||
16131 | ||
16132 | ||
16133 | ||
16134 | ; | |
16135 | ||
16136 | _Temporary_buffer<_RandomAccessIterator, _ValueType> buf(__first, __last); | |
16137 | if (buf.begin() == 0) | |
16138 | std::__inplace_stable_sort(__first, __last, __comp); | |
16139 | else | |
16140 | std::__stable_sort_adaptive(__first, __last, buf.begin(), | |
16141 | _DistanceType(buf.size()), __comp); | |
16142 | } | |
16143 | # 3840 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16144 | template<typename _RandomAccessIterator> | |
16145 | void | |
16146 | nth_element(_RandomAccessIterator __first, | |
16147 | _RandomAccessIterator __nth, | |
16148 | _RandomAccessIterator __last) | |
16149 | { | |
16150 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16151 | _ValueType; | |
16152 | ||
16153 | ||
16154 | ||
16155 | ||
16156 | ||
16157 | ; | |
16158 | ; | |
16159 | ||
16160 | while (__last - __first > 3) | |
16161 | { | |
16162 | _RandomAccessIterator __cut = | |
16163 | std::__unguarded_partition(__first, __last, | |
16164 | _ValueType(std::__median(*__first, | |
16165 | *(__first | |
16166 | + (__last | |
16167 | - __first) | |
16168 | / 2), | |
16169 | *(__last | |
16170 | - 1)))); | |
16171 | if (__cut <= __nth) | |
16172 | __first = __cut; | |
16173 | else | |
16174 | __last = __cut; | |
16175 | } | |
16176 | std::__insertion_sort(__first, __last); | |
16177 | } | |
16178 | # 3891 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16179 | template<typename _RandomAccessIterator, typename _Compare> | |
16180 | void | |
16181 | nth_element(_RandomAccessIterator __first, | |
16182 | _RandomAccessIterator __nth, | |
16183 | _RandomAccessIterator __last, | |
16184 | _Compare __comp) | |
16185 | { | |
16186 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16187 | _ValueType; | |
16188 | ||
16189 | ||
16190 | ||
16191 | ||
16192 | ||
16193 | ||
16194 | ; | |
16195 | ; | |
16196 | ||
16197 | while (__last - __first > 3) | |
16198 | { | |
16199 | _RandomAccessIterator __cut = | |
16200 | std::__unguarded_partition(__first, __last, | |
16201 | _ValueType(std::__median(*__first, | |
16202 | *(__first | |
16203 | + (__last | |
16204 | - __first) | |
16205 | / 2), | |
16206 | *(__last - 1), | |
16207 | __comp)), __comp); | |
16208 | if (__cut <= __nth) | |
16209 | __first = __cut; | |
16210 | else | |
16211 | __last = __cut; | |
16212 | } | |
16213 | std::__insertion_sort(__first, __last, __comp); | |
16214 | } | |
16215 | # 3944 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16216 | template<typename _ForwardIterator, typename _Tp> | |
16217 | pair<_ForwardIterator, _ForwardIterator> | |
16218 | equal_range(_ForwardIterator __first, _ForwardIterator __last, | |
16219 | const _Tp& __val) | |
16220 | { | |
16221 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
16222 | _ValueType; | |
16223 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
16224 | _DistanceType; | |
16225 | ||
16226 | ||
16227 | ||
16228 | ||
16229 | ||
16230 | ||
16231 | ; | |
16232 | ||
16233 | _DistanceType __len = std::distance(__first, __last); | |
16234 | _DistanceType __half; | |
16235 | _ForwardIterator __middle, __left, __right; | |
16236 | ||
16237 | while (__len > 0) | |
16238 | { | |
16239 | __half = __len >> 1; | |
16240 | __middle = __first; | |
16241 | std::advance(__middle, __half); | |
16242 | if (*__middle < __val) | |
16243 | { | |
16244 | __first = __middle; | |
16245 | ++__first; | |
16246 | __len = __len - __half - 1; | |
16247 | } | |
16248 | else if (__val < *__middle) | |
16249 | __len = __half; | |
16250 | else | |
16251 | { | |
16252 | __left = std::lower_bound(__first, __middle, __val); | |
16253 | std::advance(__first, __len); | |
16254 | __right = std::upper_bound(++__middle, __first, __val); | |
16255 | return pair<_ForwardIterator, _ForwardIterator>(__left, __right); | |
16256 | } | |
16257 | } | |
16258 | return pair<_ForwardIterator, _ForwardIterator>(__first, __first); | |
16259 | } | |
16260 | # 4006 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16261 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
16262 | pair<_ForwardIterator, _ForwardIterator> | |
16263 | equal_range(_ForwardIterator __first, _ForwardIterator __last, | |
16264 | const _Tp& __val, | |
16265 | _Compare __comp) | |
16266 | { | |
16267 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
16268 | _ValueType; | |
16269 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
16270 | _DistanceType; | |
16271 | ||
16272 | ||
16273 | ||
16274 | ||
16275 | ||
16276 | ||
16277 | ||
16278 | ; | |
16279 | ||
16280 | _DistanceType __len = std::distance(__first, __last); | |
16281 | _DistanceType __half; | |
16282 | _ForwardIterator __middle, __left, __right; | |
16283 | ||
16284 | while (__len > 0) | |
16285 | { | |
16286 | __half = __len >> 1; | |
16287 | __middle = __first; | |
16288 | std::advance(__middle, __half); | |
16289 | if (__comp(*__middle, __val)) | |
16290 | { | |
16291 | __first = __middle; | |
16292 | ++__first; | |
16293 | __len = __len - __half - 1; | |
16294 | } | |
16295 | else if (__comp(__val, *__middle)) | |
16296 | __len = __half; | |
16297 | else | |
16298 | { | |
16299 | __left = std::lower_bound(__first, __middle, __val, __comp); | |
16300 | std::advance(__first, __len); | |
16301 | __right = std::upper_bound(++__middle, __first, __val, __comp); | |
16302 | return pair<_ForwardIterator, _ForwardIterator>(__left, __right); | |
16303 | } | |
16304 | } | |
16305 | return pair<_ForwardIterator, _ForwardIterator>(__first, __first); | |
16306 | } | |
16307 | # 4064 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16308 | template<typename _ForwardIterator, typename _Tp> | |
16309 | bool | |
16310 | binary_search(_ForwardIterator __first, _ForwardIterator __last, | |
16311 | const _Tp& __val) | |
16312 | { | |
16313 | ||
16314 | ||
16315 | ||
16316 | ||
16317 | ||
16318 | ||
16319 | ; | |
16320 | ||
16321 | _ForwardIterator __i = std::lower_bound(__first, __last, __val); | |
16322 | return __i != __last && !(__val < *__i); | |
16323 | } | |
16324 | # 4096 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16325 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
16326 | bool | |
16327 | binary_search(_ForwardIterator __first, _ForwardIterator __last, | |
16328 | const _Tp& __val, _Compare __comp) | |
16329 | { | |
16330 | ||
16331 | ||
16332 | ||
16333 | ||
16334 | ||
16335 | ||
16336 | ; | |
16337 | ||
16338 | _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); | |
16339 | return __i != __last && !__comp(__val, *__i); | |
16340 | } | |
16341 | # 4134 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16342 | template<typename _InputIterator1, typename _InputIterator2> | |
16343 | bool | |
16344 | includes(_InputIterator1 __first1, _InputIterator1 __last1, | |
16345 | _InputIterator2 __first2, _InputIterator2 __last2) | |
16346 | { | |
16347 | ||
16348 | ||
16349 | ||
16350 | ||
16351 | ||
16352 | ||
16353 | ||
16354 | ||
16355 | ; | |
16356 | ; | |
16357 | ||
16358 | while (__first1 != __last1 && __first2 != __last2) | |
16359 | if (*__first2 < *__first1) | |
16360 | return false; | |
16361 | else if(*__first1 < *__first2) | |
16362 | ++__first1; | |
16363 | else | |
16364 | ++__first1, ++__first2; | |
16365 | ||
16366 | return __first2 == __last2; | |
16367 | } | |
16368 | # 4180 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16369 | template<typename _InputIterator1, typename _InputIterator2, | |
16370 | typename _Compare> | |
16371 | bool | |
16372 | includes(_InputIterator1 __first1, _InputIterator1 __last1, | |
16373 | _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) | |
16374 | { | |
16375 | ||
16376 | ||
16377 | ||
16378 | ||
16379 | ||
16380 | ||
16381 | ||
16382 | ||
16383 | ||
16384 | ; | |
16385 | ; | |
16386 | ||
16387 | while (__first1 != __last1 && __first2 != __last2) | |
16388 | if (__comp(*__first2, *__first1)) | |
16389 | return false; | |
16390 | else if(__comp(*__first1, *__first2)) | |
16391 | ++__first1; | |
16392 | else | |
16393 | ++__first1, ++__first2; | |
16394 | ||
16395 | return __first2 == __last2; | |
16396 | } | |
16397 | # 4226 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16398 | template<typename _InputIterator1, typename _InputIterator2, | |
16399 | typename _OutputIterator> | |
16400 | _OutputIterator | |
16401 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, | |
16402 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16403 | _OutputIterator __result) | |
16404 | { | |
16405 | ||
16406 | ||
16407 | ||
16408 | ||
16409 | ||
16410 | ||
16411 | ||
16412 | ||
16413 | ||
16414 | ||
16415 | ; | |
16416 | ; | |
16417 | ||
16418 | while (__first1 != __last1 && __first2 != __last2) | |
16419 | { | |
16420 | if (*__first1 < *__first2) | |
16421 | { | |
16422 | *__result = *__first1; | |
16423 | ++__first1; | |
16424 | } | |
16425 | else if (*__first2 < *__first1) | |
16426 | { | |
16427 | *__result = *__first2; | |
16428 | ++__first2; | |
16429 | } | |
16430 | else | |
16431 | { | |
16432 | *__result = *__first1; | |
16433 | ++__first1; | |
16434 | ++__first2; | |
16435 | } | |
16436 | ++__result; | |
16437 | } | |
16438 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
16439 | __result)); | |
16440 | } | |
16441 | # 4288 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16442 | template<typename _InputIterator1, typename _InputIterator2, | |
16443 | typename _OutputIterator, typename _Compare> | |
16444 | _OutputIterator | |
16445 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, | |
16446 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16447 | _OutputIterator __result, _Compare __comp) | |
16448 | { | |
16449 | ||
16450 | ||
16451 | ||
16452 | ||
16453 | ||
16454 | ||
16455 | ||
16456 | ||
16457 | ||
16458 | ||
16459 | ||
16460 | ; | |
16461 | ; | |
16462 | ||
16463 | while (__first1 != __last1 && __first2 != __last2) | |
16464 | { | |
16465 | if (__comp(*__first1, *__first2)) | |
16466 | { | |
16467 | *__result = *__first1; | |
16468 | ++__first1; | |
16469 | } | |
16470 | else if (__comp(*__first2, *__first1)) | |
16471 | { | |
16472 | *__result = *__first2; | |
16473 | ++__first2; | |
16474 | } | |
16475 | else | |
16476 | { | |
16477 | *__result = *__first1; | |
16478 | ++__first1; | |
16479 | ++__first2; | |
16480 | } | |
16481 | ++__result; | |
16482 | } | |
16483 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
16484 | __result)); | |
16485 | } | |
16486 | # 4349 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16487 | template<typename _InputIterator1, typename _InputIterator2, | |
16488 | typename _OutputIterator> | |
16489 | _OutputIterator | |
16490 | set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, | |
16491 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16492 | _OutputIterator __result) | |
16493 | { | |
16494 | ||
16495 | ||
16496 | ||
16497 | ||
16498 | ||
16499 | ||
16500 | ||
16501 | ||
16502 | ||
16503 | ||
16504 | ; | |
16505 | ; | |
16506 | ||
16507 | while (__first1 != __last1 && __first2 != __last2) | |
16508 | if (*__first1 < *__first2) | |
16509 | ++__first1; | |
16510 | else if (*__first2 < *__first1) | |
16511 | ++__first2; | |
16512 | else | |
16513 | { | |
16514 | *__result = *__first1; | |
16515 | ++__first1; | |
16516 | ++__first2; | |
16517 | ++__result; | |
16518 | } | |
16519 | return __result; | |
16520 | } | |
16521 | # 4403 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16522 | template<typename _InputIterator1, typename _InputIterator2, | |
16523 | typename _OutputIterator, typename _Compare> | |
16524 | _OutputIterator | |
16525 | set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, | |
16526 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16527 | _OutputIterator __result, _Compare __comp) | |
16528 | { | |
16529 | ||
16530 | ||
16531 | ||
16532 | ||
16533 | ||
16534 | ||
16535 | ||
16536 | ||
16537 | ||
16538 | ||
16539 | ||
16540 | ; | |
16541 | ; | |
16542 | ||
16543 | while (__first1 != __last1 && __first2 != __last2) | |
16544 | if (__comp(*__first1, *__first2)) | |
16545 | ++__first1; | |
16546 | else if (__comp(*__first2, *__first1)) | |
16547 | ++__first2; | |
16548 | else | |
16549 | { | |
16550 | *__result = *__first1; | |
16551 | ++__first1; | |
16552 | ++__first2; | |
16553 | ++__result; | |
16554 | } | |
16555 | return __result; | |
16556 | } | |
16557 | # 4457 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16558 | template<typename _InputIterator1, typename _InputIterator2, | |
16559 | typename _OutputIterator> | |
16560 | _OutputIterator | |
16561 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
16562 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16563 | _OutputIterator __result) | |
16564 | { | |
16565 | ||
16566 | ||
16567 | ||
16568 | ||
16569 | ||
16570 | ||
16571 | ||
16572 | ||
16573 | ||
16574 | ||
16575 | ; | |
16576 | ; | |
16577 | ||
16578 | while (__first1 != __last1 && __first2 != __last2) | |
16579 | if (*__first1 < *__first2) | |
16580 | { | |
16581 | *__result = *__first1; | |
16582 | ++__first1; | |
16583 | ++__result; | |
16584 | } | |
16585 | else if (*__first2 < *__first1) | |
16586 | ++__first2; | |
16587 | else | |
16588 | { | |
16589 | ++__first1; | |
16590 | ++__first2; | |
16591 | } | |
16592 | return std::copy(__first1, __last1, __result); | |
16593 | } | |
16594 | # 4515 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16595 | template<typename _InputIterator1, typename _InputIterator2, | |
16596 | typename _OutputIterator, typename _Compare> | |
16597 | _OutputIterator | |
16598 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
16599 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16600 | _OutputIterator __result, _Compare __comp) | |
16601 | { | |
16602 | ||
16603 | ||
16604 | ||
16605 | ||
16606 | ||
16607 | ||
16608 | ||
16609 | ||
16610 | ||
16611 | ||
16612 | ||
16613 | ; | |
16614 | ; | |
16615 | ||
16616 | while (__first1 != __last1 && __first2 != __last2) | |
16617 | if (__comp(*__first1, *__first2)) | |
16618 | { | |
16619 | *__result = *__first1; | |
16620 | ++__first1; | |
16621 | ++__result; | |
16622 | } | |
16623 | else if (__comp(*__first2, *__first1)) | |
16624 | ++__first2; | |
16625 | else | |
16626 | { | |
16627 | ++__first1; | |
16628 | ++__first2; | |
16629 | } | |
16630 | return std::copy(__first1, __last1, __result); | |
16631 | } | |
16632 | # 4569 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16633 | template<typename _InputIterator1, typename _InputIterator2, | |
16634 | typename _OutputIterator> | |
16635 | _OutputIterator | |
16636 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
16637 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16638 | _OutputIterator __result) | |
16639 | { | |
16640 | ||
16641 | ||
16642 | ||
16643 | ||
16644 | ||
16645 | ||
16646 | ||
16647 | ||
16648 | ||
16649 | ||
16650 | ; | |
16651 | ; | |
16652 | ||
16653 | while (__first1 != __last1 && __first2 != __last2) | |
16654 | if (*__first1 < *__first2) | |
16655 | { | |
16656 | *__result = *__first1; | |
16657 | ++__first1; | |
16658 | ++__result; | |
16659 | } | |
16660 | else if (*__first2 < *__first1) | |
16661 | { | |
16662 | *__result = *__first2; | |
16663 | ++__first2; | |
16664 | ++__result; | |
16665 | } | |
16666 | else | |
16667 | { | |
16668 | ++__first1; | |
16669 | ++__first2; | |
16670 | } | |
16671 | return std::copy(__first2, __last2, std::copy(__first1, | |
16672 | __last1, __result)); | |
16673 | } | |
16674 | # 4630 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16675 | template<typename _InputIterator1, typename _InputIterator2, | |
16676 | typename _OutputIterator, typename _Compare> | |
16677 | _OutputIterator | |
16678 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
16679 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16680 | _OutputIterator __result, | |
16681 | _Compare __comp) | |
16682 | { | |
16683 | ||
16684 | ||
16685 | ||
16686 | ||
16687 | ||
16688 | ||
16689 | ||
16690 | ||
16691 | ||
16692 | ||
16693 | ||
16694 | ; | |
16695 | ; | |
16696 | ||
16697 | while (__first1 != __last1 && __first2 != __last2) | |
16698 | if (__comp(*__first1, *__first2)) | |
16699 | { | |
16700 | *__result = *__first1; | |
16701 | ++__first1; | |
16702 | ++__result; | |
16703 | } | |
16704 | else if (__comp(*__first2, *__first1)) | |
16705 | { | |
16706 | *__result = *__first2; | |
16707 | ++__first2; | |
16708 | ++__result; | |
16709 | } | |
16710 | else | |
16711 | { | |
16712 | ++__first1; | |
16713 | ++__first2; | |
16714 | } | |
16715 | return std::copy(__first2, __last2, std::copy(__first1, | |
16716 | __last1, __result)); | |
16717 | } | |
16718 | # 4683 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16719 | template<typename _ForwardIterator> | |
16720 | _ForwardIterator | |
16721 | max_element(_ForwardIterator __first, _ForwardIterator __last) | |
16722 | { | |
16723 | ||
16724 | ||
16725 | ||
16726 | ||
16727 | ; | |
16728 | ||
16729 | if (__first == __last) | |
16730 | return __first; | |
16731 | _ForwardIterator __result = __first; | |
16732 | while (++__first != __last) | |
16733 | if (*__result < *__first) | |
16734 | __result = __first; | |
16735 | return __result; | |
16736 | } | |
16737 | # 4710 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16738 | template<typename _ForwardIterator, typename _Compare> | |
16739 | _ForwardIterator | |
16740 | max_element(_ForwardIterator __first, _ForwardIterator __last, | |
16741 | _Compare __comp) | |
16742 | { | |
16743 | ||
16744 | ||
16745 | ||
16746 | ||
16747 | ||
16748 | ; | |
16749 | ||
16750 | if (__first == __last) return __first; | |
16751 | _ForwardIterator __result = __first; | |
16752 | while (++__first != __last) | |
16753 | if (__comp(*__result, *__first)) __result = __first; | |
16754 | return __result; | |
16755 | } | |
16756 | ||
16757 | ||
16758 | ||
16759 | ||
16760 | ||
16761 | ||
16762 | ||
16763 | template<typename _ForwardIterator> | |
16764 | _ForwardIterator | |
16765 | min_element(_ForwardIterator __first, _ForwardIterator __last) | |
16766 | { | |
16767 | ||
16768 | ||
16769 | ||
16770 | ||
16771 | ; | |
16772 | ||
16773 | if (__first == __last) | |
16774 | return __first; | |
16775 | _ForwardIterator __result = __first; | |
16776 | while (++__first != __last) | |
16777 | if (*__first < *__result) | |
16778 | __result = __first; | |
16779 | return __result; | |
16780 | } | |
16781 | # 4762 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16782 | template<typename _ForwardIterator, typename _Compare> | |
16783 | _ForwardIterator | |
16784 | min_element(_ForwardIterator __first, _ForwardIterator __last, | |
16785 | _Compare __comp) | |
16786 | { | |
16787 | ||
16788 | ||
16789 | ||
16790 | ||
16791 | ||
16792 | ; | |
16793 | ||
16794 | if (__first == __last) | |
16795 | return __first; | |
16796 | _ForwardIterator __result = __first; | |
16797 | while (++__first != __last) | |
16798 | if (__comp(*__first, *__result)) | |
16799 | __result = __first; | |
16800 | return __result; | |
16801 | } | |
16802 | # 4797 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16803 | template<typename _BidirectionalIterator> | |
16804 | bool | |
16805 | next_permutation(_BidirectionalIterator __first, | |
16806 | _BidirectionalIterator __last) | |
16807 | { | |
16808 | ||
16809 | ||
16810 | ||
16811 | ||
16812 | ||
16813 | ; | |
16814 | ||
16815 | if (__first == __last) | |
16816 | return false; | |
16817 | _BidirectionalIterator __i = __first; | |
16818 | ++__i; | |
16819 | if (__i == __last) | |
16820 | return false; | |
16821 | __i = __last; | |
16822 | --__i; | |
16823 | ||
16824 | for(;;) | |
16825 | { | |
16826 | _BidirectionalIterator __ii = __i; | |
16827 | --__i; | |
16828 | if (*__i < *__ii) | |
16829 | { | |
16830 | _BidirectionalIterator __j = __last; | |
16831 | while (!(*__i < *--__j)) | |
16832 | {} | |
16833 | std::iter_swap(__i, __j); | |
16834 | std::reverse(__ii, __last); | |
16835 | return true; | |
16836 | } | |
16837 | if (__i == __first) | |
16838 | { | |
16839 | std::reverse(__first, __last); | |
16840 | return false; | |
16841 | } | |
16842 | } | |
16843 | } | |
16844 | # 4853 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16845 | template<typename _BidirectionalIterator, typename _Compare> | |
16846 | bool | |
16847 | next_permutation(_BidirectionalIterator __first, | |
16848 | _BidirectionalIterator __last, _Compare __comp) | |
16849 | { | |
16850 | ||
16851 | ||
16852 | ||
16853 | ||
16854 | ||
16855 | ||
16856 | ; | |
16857 | ||
16858 | if (__first == __last) | |
16859 | return false; | |
16860 | _BidirectionalIterator __i = __first; | |
16861 | ++__i; | |
16862 | if (__i == __last) | |
16863 | return false; | |
16864 | __i = __last; | |
16865 | --__i; | |
16866 | ||
16867 | for(;;) | |
16868 | { | |
16869 | _BidirectionalIterator __ii = __i; | |
16870 | --__i; | |
16871 | if (__comp(*__i, *__ii)) | |
16872 | { | |
16873 | _BidirectionalIterator __j = __last; | |
16874 | while (!__comp(*__i, *--__j)) | |
16875 | {} | |
16876 | std::iter_swap(__i, __j); | |
16877 | std::reverse(__ii, __last); | |
16878 | return true; | |
16879 | } | |
16880 | if (__i == __first) | |
16881 | { | |
16882 | std::reverse(__first, __last); | |
16883 | return false; | |
16884 | } | |
16885 | } | |
16886 | } | |
16887 | # 4908 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16888 | template<typename _BidirectionalIterator> | |
16889 | bool | |
16890 | prev_permutation(_BidirectionalIterator __first, | |
16891 | _BidirectionalIterator __last) | |
16892 | { | |
16893 | ||
16894 | ||
16895 | ||
16896 | ||
16897 | ||
16898 | ; | |
16899 | ||
16900 | if (__first == __last) | |
16901 | return false; | |
16902 | _BidirectionalIterator __i = __first; | |
16903 | ++__i; | |
16904 | if (__i == __last) | |
16905 | return false; | |
16906 | __i = __last; | |
16907 | --__i; | |
16908 | ||
16909 | for(;;) | |
16910 | { | |
16911 | _BidirectionalIterator __ii = __i; | |
16912 | --__i; | |
16913 | if (*__ii < *__i) | |
16914 | { | |
16915 | _BidirectionalIterator __j = __last; | |
16916 | while (!(*--__j < *__i)) | |
16917 | {} | |
16918 | std::iter_swap(__i, __j); | |
16919 | std::reverse(__ii, __last); | |
16920 | return true; | |
16921 | } | |
16922 | if (__i == __first) | |
16923 | { | |
16924 | std::reverse(__first, __last); | |
16925 | return false; | |
16926 | } | |
16927 | } | |
16928 | } | |
16929 | # 4964 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16930 | template<typename _BidirectionalIterator, typename _Compare> | |
16931 | bool | |
16932 | prev_permutation(_BidirectionalIterator __first, | |
16933 | _BidirectionalIterator __last, _Compare __comp) | |
16934 | { | |
16935 | ||
16936 | ||
16937 | ||
16938 | ||
16939 | ||
16940 | ||
16941 | ; | |
16942 | ||
16943 | if (__first == __last) | |
16944 | return false; | |
16945 | _BidirectionalIterator __i = __first; | |
16946 | ++__i; | |
16947 | if (__i == __last) | |
16948 | return false; | |
16949 | __i = __last; | |
16950 | --__i; | |
16951 | ||
16952 | for(;;) | |
16953 | { | |
16954 | _BidirectionalIterator __ii = __i; | |
16955 | --__i; | |
16956 | if (__comp(*__ii, *__i)) | |
16957 | { | |
16958 | _BidirectionalIterator __j = __last; | |
16959 | while (!__comp(*--__j, *__i)) | |
16960 | {} | |
16961 | std::iter_swap(__i, __j); | |
16962 | std::reverse(__ii, __last); | |
16963 | return true; | |
16964 | } | |
16965 | if (__i == __first) | |
16966 | { | |
16967 | std::reverse(__first, __last); | |
16968 | return false; | |
16969 | } | |
16970 | } | |
16971 | } | |
16972 | # 5023 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16973 | template<typename _InputIterator, typename _ForwardIterator> | |
16974 | _InputIterator | |
16975 | find_first_of(_InputIterator __first1, _InputIterator __last1, | |
16976 | _ForwardIterator __first2, _ForwardIterator __last2) | |
16977 | { | |
16978 | ||
16979 | ||
16980 | ||
16981 | ||
16982 | ||
16983 | ||
16984 | ; | |
16985 | ; | |
16986 | ||
16987 | for ( ; __first1 != __last1; ++__first1) | |
16988 | for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) | |
16989 | if (*__first1 == *__iter) | |
16990 | return __first1; | |
16991 | return __last1; | |
16992 | } | |
16993 | # 5059 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
16994 | template<typename _InputIterator, typename _ForwardIterator, | |
16995 | typename _BinaryPredicate> | |
16996 | _InputIterator | |
16997 | find_first_of(_InputIterator __first1, _InputIterator __last1, | |
16998 | _ForwardIterator __first2, _ForwardIterator __last2, | |
16999 | _BinaryPredicate __comp) | |
17000 | { | |
17001 | ||
17002 | ||
17003 | ||
17004 | ||
17005 | ||
17006 | ||
17007 | ; | |
17008 | ; | |
17009 | ||
17010 | for ( ; __first1 != __last1; ++__first1) | |
17011 | for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) | |
17012 | if (__comp(*__first1, *__iter)) | |
17013 | return __first1; | |
17014 | return __last1; | |
17015 | } | |
17016 | # 5089 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
17017 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
17018 | _ForwardIterator1 | |
17019 | __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
17020 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
17021 | forward_iterator_tag, forward_iterator_tag) | |
17022 | { | |
17023 | if (__first2 == __last2) | |
17024 | return __last1; | |
17025 | else | |
17026 | { | |
17027 | _ForwardIterator1 __result = __last1; | |
17028 | while (1) | |
17029 | { | |
17030 | _ForwardIterator1 __new_result | |
17031 | = std::search(__first1, __last1, __first2, __last2); | |
17032 | if (__new_result == __last1) | |
17033 | return __result; | |
17034 | else | |
17035 | { | |
17036 | __result = __new_result; | |
17037 | __first1 = __new_result; | |
17038 | ++__first1; | |
17039 | } | |
17040 | } | |
17041 | } | |
17042 | } | |
17043 | ||
17044 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
17045 | typename _BinaryPredicate> | |
17046 | _ForwardIterator1 | |
17047 | __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
17048 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
17049 | forward_iterator_tag, forward_iterator_tag, | |
17050 | _BinaryPredicate __comp) | |
17051 | { | |
17052 | if (__first2 == __last2) | |
17053 | return __last1; | |
17054 | else | |
17055 | { | |
17056 | _ForwardIterator1 __result = __last1; | |
17057 | while (1) | |
17058 | { | |
17059 | _ForwardIterator1 __new_result | |
17060 | = std::search(__first1, __last1, __first2, __last2, __comp); | |
17061 | if (__new_result == __last1) | |
17062 | return __result; | |
17063 | else | |
17064 | { | |
17065 | __result = __new_result; | |
17066 | __first1 = __new_result; | |
17067 | ++__first1; | |
17068 | } | |
17069 | } | |
17070 | } | |
17071 | } | |
17072 | ||
17073 | ||
17074 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2> | |
17075 | _BidirectionalIterator1 | |
17076 | __find_end(_BidirectionalIterator1 __first1, | |
17077 | _BidirectionalIterator1 __last1, | |
17078 | _BidirectionalIterator2 __first2, | |
17079 | _BidirectionalIterator2 __last2, | |
17080 | bidirectional_iterator_tag, bidirectional_iterator_tag) | |
17081 | { | |
17082 | ||
17083 | ||
17084 | ||
17085 | ||
17086 | ||
17087 | ||
17088 | typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; | |
17089 | typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; | |
17090 | ||
17091 | _RevIterator1 __rlast1(__first1); | |
17092 | _RevIterator2 __rlast2(__first2); | |
17093 | _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, | |
17094 | _RevIterator2(__last2), __rlast2); | |
17095 | ||
17096 | if (__rresult == __rlast1) | |
17097 | return __last1; | |
17098 | else | |
17099 | { | |
17100 | _BidirectionalIterator1 __result = __rresult.base(); | |
17101 | std::advance(__result, -std::distance(__first2, __last2)); | |
17102 | return __result; | |
17103 | } | |
17104 | } | |
17105 | ||
17106 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
17107 | typename _BinaryPredicate> | |
17108 | _BidirectionalIterator1 | |
17109 | __find_end(_BidirectionalIterator1 __first1, | |
17110 | _BidirectionalIterator1 __last1, | |
17111 | _BidirectionalIterator2 __first2, | |
17112 | _BidirectionalIterator2 __last2, | |
17113 | bidirectional_iterator_tag, bidirectional_iterator_tag, | |
17114 | _BinaryPredicate __comp) | |
17115 | { | |
17116 | ||
17117 | ||
17118 | ||
17119 | ||
17120 | ||
17121 | ||
17122 | typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; | |
17123 | typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; | |
17124 | ||
17125 | _RevIterator1 __rlast1(__first1); | |
17126 | _RevIterator2 __rlast2(__first2); | |
17127 | _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, | |
17128 | _RevIterator2(__last2), __rlast2, | |
17129 | __comp); | |
17130 | ||
17131 | if (__rresult == __rlast1) | |
17132 | return __last1; | |
17133 | else | |
17134 | { | |
17135 | _BidirectionalIterator1 __result = __rresult.base(); | |
17136 | std::advance(__result, -std::distance(__first2, __last2)); | |
17137 | return __result; | |
17138 | } | |
17139 | } | |
17140 | # 5239 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
17141 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
17142 | inline _ForwardIterator1 | |
17143 | find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
17144 | _ForwardIterator2 __first2, _ForwardIterator2 __last2) | |
17145 | { | |
17146 | ||
17147 | ||
17148 | ||
17149 | ||
17150 | ||
17151 | ||
17152 | ; | |
17153 | ; | |
17154 | ||
17155 | return std::__find_end(__first1, __last1, __first2, __last2, | |
17156 | std::__iterator_category(__first1), | |
17157 | std::__iterator_category(__first2)); | |
17158 | } | |
17159 | # 5284 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_algo.h" 3 | |
17160 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
17161 | typename _BinaryPredicate> | |
17162 | inline _ForwardIterator1 | |
17163 | find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
17164 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
17165 | _BinaryPredicate __comp) | |
17166 | { | |
17167 | ||
17168 | ||
17169 | ||
17170 | ||
17171 | ||
17172 | ||
17173 | ; | |
17174 | ; | |
17175 | ||
17176 | return std::__find_end(__first1, __last1, __first2, __last2, | |
17177 | std::__iterator_category(__first1), | |
17178 | std::__iterator_category(__first2), | |
17179 | __comp); | |
17180 | } | |
17181 | ||
17182 | } | |
17183 | # 69 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/algorithm" 2 3 | |
17184 | # 56 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 2 3 | |
17185 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.tcc" 1 3 | |
17186 | # 46 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.tcc" 3 | |
17187 | ||
17188 | # 47 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.tcc" 3 | |
17189 | ||
17190 | namespace std | |
17191 | { | |
17192 | template<typename _Type> | |
17193 | inline bool | |
17194 | __is_null_pointer(_Type* __ptr) | |
17195 | { return __ptr == 0; } | |
17196 | ||
17197 | template<typename _Type> | |
17198 | inline bool | |
17199 | __is_null_pointer(_Type) | |
17200 | { return false; } | |
17201 | ||
17202 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17203 | const typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17204 | basic_string<_CharT, _Traits, _Alloc>:: | |
17205 | _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; | |
17206 | ||
17207 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17208 | const _CharT | |
17209 | basic_string<_CharT, _Traits, _Alloc>:: | |
17210 | _Rep::_S_terminal = _CharT(); | |
17211 | ||
17212 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17213 | const typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17214 | basic_string<_CharT, _Traits, _Alloc>::npos; | |
17215 | ||
17216 | ||
17217 | ||
17218 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17219 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17220 | basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ | |
17221 | (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / | |
17222 | sizeof(size_type)]; | |
17223 | ||
17224 | ||
17225 | ||
17226 | ||
17227 | ||
17228 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17229 | template<typename _InIterator> | |
17230 | _CharT* | |
17231 | basic_string<_CharT, _Traits, _Alloc>:: | |
17232 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
17233 | input_iterator_tag) | |
17234 | { | |
17235 | ||
17236 | if (__beg == __end && __a == _Alloc()) | |
17237 | return _S_empty_rep()._M_refdata(); | |
17238 | ||
17239 | ||
17240 | _CharT __buf[128]; | |
17241 | size_type __len = 0; | |
17242 | while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) | |
17243 | { | |
17244 | __buf[__len++] = *__beg; | |
17245 | ++__beg; | |
17246 | } | |
17247 | _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); | |
17248 | _M_copy(__r->_M_refdata(), __buf, __len); | |
17249 | try | |
17250 | { | |
17251 | while (__beg != __end) | |
17252 | { | |
17253 | if (__len == __r->_M_capacity) | |
17254 | { | |
17255 | ||
17256 | _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); | |
17257 | _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); | |
17258 | __r->_M_destroy(__a); | |
17259 | __r = __another; | |
17260 | } | |
17261 | __r->_M_refdata()[__len++] = *__beg; | |
17262 | ++__beg; | |
17263 | } | |
17264 | } | |
17265 | catch(...) | |
17266 | { | |
17267 | __r->_M_destroy(__a); | |
17268 | throw; | |
17269 | } | |
17270 | __r->_M_set_length_and_sharable(__len); | |
17271 | return __r->_M_refdata(); | |
17272 | } | |
17273 | ||
17274 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17275 | template <typename _InIterator> | |
17276 | _CharT* | |
17277 | basic_string<_CharT, _Traits, _Alloc>:: | |
17278 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
17279 | forward_iterator_tag) | |
17280 | { | |
17281 | ||
17282 | if (__beg == __end && __a == _Alloc()) | |
17283 | return _S_empty_rep()._M_refdata(); | |
17284 | ||
17285 | ||
17286 | if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0)) | |
17287 | __throw_logic_error(("basic_string::_S_construct NULL not valid")); | |
17288 | ||
17289 | const size_type __dnew = static_cast<size_type>(std::distance(__beg, | |
17290 | __end)); | |
17291 | ||
17292 | _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); | |
17293 | try | |
17294 | { _S_copy_chars(__r->_M_refdata(), __beg, __end); } | |
17295 | catch(...) | |
17296 | { | |
17297 | __r->_M_destroy(__a); | |
17298 | throw; | |
17299 | } | |
17300 | __r->_M_set_length_and_sharable(__dnew); | |
17301 | return __r->_M_refdata(); | |
17302 | } | |
17303 | ||
17304 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17305 | _CharT* | |
17306 | basic_string<_CharT, _Traits, _Alloc>:: | |
17307 | _S_construct(size_type __n, _CharT __c, const _Alloc& __a) | |
17308 | { | |
17309 | ||
17310 | if (__n == 0 && __a == _Alloc()) | |
17311 | return _S_empty_rep()._M_refdata(); | |
17312 | ||
17313 | ||
17314 | _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); | |
17315 | if (__n) | |
17316 | _M_assign(__r->_M_refdata(), __n, __c); | |
17317 | ||
17318 | __r->_M_set_length_and_sharable(__n); | |
17319 | return __r->_M_refdata(); | |
17320 | } | |
17321 | ||
17322 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17323 | basic_string<_CharT, _Traits, _Alloc>:: | |
17324 | basic_string(const basic_string& __str) | |
17325 | : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), | |
17326 | __str.get_allocator()), | |
17327 | __str.get_allocator()) | |
17328 | { } | |
17329 | ||
17330 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17331 | basic_string<_CharT, _Traits, _Alloc>:: | |
17332 | basic_string(const _Alloc& __a) | |
17333 | : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) | |
17334 | { } | |
17335 | ||
17336 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17337 | basic_string<_CharT, _Traits, _Alloc>:: | |
17338 | basic_string(const basic_string& __str, size_type __pos, size_type __n) | |
17339 | : _M_dataplus(_S_construct(__str._M_data() | |
17340 | + __str._M_check(__pos, | |
17341 | "basic_string::basic_string"), | |
17342 | __str._M_data() + __str._M_limit(__pos, __n) | |
17343 | + __pos, _Alloc()), _Alloc()) | |
17344 | { } | |
17345 | ||
17346 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17347 | basic_string<_CharT, _Traits, _Alloc>:: | |
17348 | basic_string(const basic_string& __str, size_type __pos, | |
17349 | size_type __n, const _Alloc& __a) | |
17350 | : _M_dataplus(_S_construct(__str._M_data() | |
17351 | + __str._M_check(__pos, | |
17352 | "basic_string::basic_string"), | |
17353 | __str._M_data() + __str._M_limit(__pos, __n) | |
17354 | + __pos, __a), __a) | |
17355 | { } | |
17356 | ||
17357 | ||
17358 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17359 | basic_string<_CharT, _Traits, _Alloc>:: | |
17360 | basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) | |
17361 | : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) | |
17362 | { } | |
17363 | ||
17364 | ||
17365 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17366 | basic_string<_CharT, _Traits, _Alloc>:: | |
17367 | basic_string(const _CharT* __s, const _Alloc& __a) | |
17368 | : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : | |
17369 | __s + npos, __a), __a) | |
17370 | { } | |
17371 | ||
17372 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17373 | basic_string<_CharT, _Traits, _Alloc>:: | |
17374 | basic_string(size_type __n, _CharT __c, const _Alloc& __a) | |
17375 | : _M_dataplus(_S_construct(__n, __c, __a), __a) | |
17376 | { } | |
17377 | ||
17378 | ||
17379 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17380 | template<typename _InputIterator> | |
17381 | basic_string<_CharT, _Traits, _Alloc>:: | |
17382 | basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) | |
17383 | : _M_dataplus(_S_construct(__beg, __end, __a), __a) | |
17384 | { } | |
17385 | ||
17386 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17387 | basic_string<_CharT, _Traits, _Alloc>& | |
17388 | basic_string<_CharT, _Traits, _Alloc>:: | |
17389 | assign(const basic_string& __str) | |
17390 | { | |
17391 | if (_M_rep() != __str._M_rep()) | |
17392 | { | |
17393 | ||
17394 | const allocator_type __a = this->get_allocator(); | |
17395 | _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); | |
17396 | _M_rep()->_M_dispose(__a); | |
17397 | _M_data(__tmp); | |
17398 | } | |
17399 | return *this; | |
17400 | } | |
17401 | ||
17402 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17403 | basic_string<_CharT, _Traits, _Alloc>& | |
17404 | basic_string<_CharT, _Traits, _Alloc>:: | |
17405 | assign(const _CharT* __s, size_type __n) | |
17406 | { | |
17407 | ; | |
17408 | _M_check_length(this->size(), __n, "basic_string::assign"); | |
17409 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
17410 | return _M_replace_safe(size_type(0), this->size(), __s, __n); | |
17411 | else | |
17412 | { | |
17413 | ||
17414 | const size_type __pos = __s - _M_data(); | |
17415 | if (__pos >= __n) | |
17416 | _M_copy(_M_data(), __s, __n); | |
17417 | else if (__pos) | |
17418 | _M_move(_M_data(), __s, __n); | |
17419 | _M_rep()->_M_set_length_and_sharable(__n); | |
17420 | return *this; | |
17421 | } | |
17422 | } | |
17423 | ||
17424 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17425 | basic_string<_CharT, _Traits, _Alloc>& | |
17426 | basic_string<_CharT, _Traits, _Alloc>:: | |
17427 | append(size_type __n, _CharT __c) | |
17428 | { | |
17429 | if (__n) | |
17430 | { | |
17431 | _M_check_length(size_type(0), __n, "basic_string::append"); | |
17432 | const size_type __len = __n + this->size(); | |
17433 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
17434 | this->reserve(__len); | |
17435 | _M_assign(_M_data() + this->size(), __n, __c); | |
17436 | _M_rep()->_M_set_length_and_sharable(__len); | |
17437 | } | |
17438 | return *this; | |
17439 | } | |
17440 | ||
17441 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17442 | basic_string<_CharT, _Traits, _Alloc>& | |
17443 | basic_string<_CharT, _Traits, _Alloc>:: | |
17444 | append(const _CharT* __s, size_type __n) | |
17445 | { | |
17446 | ; | |
17447 | if (__n) | |
17448 | { | |
17449 | _M_check_length(size_type(0), __n, "basic_string::append"); | |
17450 | const size_type __len = __n + this->size(); | |
17451 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
17452 | { | |
17453 | if (_M_disjunct(__s)) | |
17454 | this->reserve(__len); | |
17455 | else | |
17456 | { | |
17457 | const size_type __off = __s - _M_data(); | |
17458 | this->reserve(__len); | |
17459 | __s = _M_data() + __off; | |
17460 | } | |
17461 | } | |
17462 | _M_copy(_M_data() + this->size(), __s, __n); | |
17463 | _M_rep()->_M_set_length_and_sharable(__len); | |
17464 | } | |
17465 | return *this; | |
17466 | } | |
17467 | ||
17468 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17469 | basic_string<_CharT, _Traits, _Alloc>& | |
17470 | basic_string<_CharT, _Traits, _Alloc>:: | |
17471 | append(const basic_string& __str) | |
17472 | { | |
17473 | const size_type __size = __str.size(); | |
17474 | if (__size) | |
17475 | { | |
17476 | const size_type __len = __size + this->size(); | |
17477 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
17478 | this->reserve(__len); | |
17479 | _M_copy(_M_data() + this->size(), __str._M_data(), __size); | |
17480 | _M_rep()->_M_set_length_and_sharable(__len); | |
17481 | } | |
17482 | return *this; | |
17483 | } | |
17484 | ||
17485 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17486 | basic_string<_CharT, _Traits, _Alloc>& | |
17487 | basic_string<_CharT, _Traits, _Alloc>:: | |
17488 | append(const basic_string& __str, size_type __pos, size_type __n) | |
17489 | { | |
17490 | __str._M_check(__pos, "basic_string::append"); | |
17491 | __n = __str._M_limit(__pos, __n); | |
17492 | if (__n) | |
17493 | { | |
17494 | const size_type __len = __n + this->size(); | |
17495 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
17496 | this->reserve(__len); | |
17497 | _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); | |
17498 | _M_rep()->_M_set_length_and_sharable(__len); | |
17499 | } | |
17500 | return *this; | |
17501 | } | |
17502 | ||
17503 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17504 | basic_string<_CharT, _Traits, _Alloc>& | |
17505 | basic_string<_CharT, _Traits, _Alloc>:: | |
17506 | insert(size_type __pos, const _CharT* __s, size_type __n) | |
17507 | { | |
17508 | ; | |
17509 | _M_check(__pos, "basic_string::insert"); | |
17510 | _M_check_length(size_type(0), __n, "basic_string::insert"); | |
17511 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
17512 | return _M_replace_safe(__pos, size_type(0), __s, __n); | |
17513 | else | |
17514 | { | |
17515 | ||
17516 | const size_type __off = __s - _M_data(); | |
17517 | _M_mutate(__pos, 0, __n); | |
17518 | __s = _M_data() + __off; | |
17519 | _CharT* __p = _M_data() + __pos; | |
17520 | if (__s + __n <= __p) | |
17521 | _M_copy(__p, __s, __n); | |
17522 | else if (__s >= __p) | |
17523 | _M_copy(__p, __s + __n, __n); | |
17524 | else | |
17525 | { | |
17526 | const size_type __nleft = __p - __s; | |
17527 | _M_copy(__p, __s, __nleft); | |
17528 | _M_copy(__p + __nleft, __p + __n, __n - __nleft); | |
17529 | } | |
17530 | return *this; | |
17531 | } | |
17532 | } | |
17533 | ||
17534 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17535 | basic_string<_CharT, _Traits, _Alloc>& | |
17536 | basic_string<_CharT, _Traits, _Alloc>:: | |
17537 | replace(size_type __pos, size_type __n1, const _CharT* __s, | |
17538 | size_type __n2) | |
17539 | { | |
17540 | ; | |
17541 | _M_check(__pos, "basic_string::replace"); | |
17542 | __n1 = _M_limit(__pos, __n1); | |
17543 | _M_check_length(__n1, __n2, "basic_string::replace"); | |
17544 | bool __left; | |
17545 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
17546 | return _M_replace_safe(__pos, __n1, __s, __n2); | |
17547 | else if ((__left = __s + __n2 <= _M_data() + __pos) | |
17548 | || _M_data() + __pos + __n1 <= __s) | |
17549 | { | |
17550 | ||
17551 | size_type __off = __s - _M_data(); | |
17552 | __left ? __off : (__off += __n2 - __n1); | |
17553 | _M_mutate(__pos, __n1, __n2); | |
17554 | _M_copy(_M_data() + __pos, _M_data() + __off, __n2); | |
17555 | return *this; | |
17556 | } | |
17557 | else | |
17558 | { | |
17559 | ||
17560 | const basic_string __tmp(__s, __n2); | |
17561 | return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); | |
17562 | } | |
17563 | } | |
17564 | ||
17565 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17566 | void | |
17567 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
17568 | _M_destroy(const _Alloc& __a) throw () | |
17569 | { | |
17570 | const size_type __size = sizeof(_Rep_base) + | |
17571 | (this->_M_capacity + 1) * sizeof(_CharT); | |
17572 | _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size); | |
17573 | } | |
17574 | ||
17575 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17576 | void | |
17577 | basic_string<_CharT, _Traits, _Alloc>:: | |
17578 | _M_leak_hard() | |
17579 | { | |
17580 | ||
17581 | if (_M_rep() == &_S_empty_rep()) | |
17582 | return; | |
17583 | ||
17584 | if (_M_rep()->_M_is_shared()) | |
17585 | _M_mutate(0, 0, 0); | |
17586 | _M_rep()->_M_set_leaked(); | |
17587 | } | |
17588 | ||
17589 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17590 | void | |
17591 | basic_string<_CharT, _Traits, _Alloc>:: | |
17592 | _M_mutate(size_type __pos, size_type __len1, size_type __len2) | |
17593 | { | |
17594 | const size_type __old_size = this->size(); | |
17595 | const size_type __new_size = __old_size + __len2 - __len1; | |
17596 | const size_type __how_much = __old_size - __pos - __len1; | |
17597 | ||
17598 | if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) | |
17599 | { | |
17600 | ||
17601 | const allocator_type __a = get_allocator(); | |
17602 | _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); | |
17603 | ||
17604 | if (__pos) | |
17605 | _M_copy(__r->_M_refdata(), _M_data(), __pos); | |
17606 | if (__how_much) | |
17607 | _M_copy(__r->_M_refdata() + __pos + __len2, | |
17608 | _M_data() + __pos + __len1, __how_much); | |
17609 | ||
17610 | _M_rep()->_M_dispose(__a); | |
17611 | _M_data(__r->_M_refdata()); | |
17612 | } | |
17613 | else if (__how_much && __len1 != __len2) | |
17614 | { | |
17615 | ||
17616 | _M_move(_M_data() + __pos + __len2, | |
17617 | _M_data() + __pos + __len1, __how_much); | |
17618 | } | |
17619 | _M_rep()->_M_set_length_and_sharable(__new_size); | |
17620 | } | |
17621 | ||
17622 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17623 | void | |
17624 | basic_string<_CharT, _Traits, _Alloc>:: | |
17625 | reserve(size_type __res) | |
17626 | { | |
17627 | if (__res != this->capacity() || _M_rep()->_M_is_shared()) | |
17628 | { | |
17629 | ||
17630 | if (__res < this->size()) | |
17631 | __res = this->size(); | |
17632 | const allocator_type __a = get_allocator(); | |
17633 | _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); | |
17634 | _M_rep()->_M_dispose(__a); | |
17635 | _M_data(__tmp); | |
17636 | } | |
17637 | } | |
17638 | ||
17639 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17640 | void | |
17641 | basic_string<_CharT, _Traits, _Alloc>:: | |
17642 | swap(basic_string& __s) | |
17643 | { | |
17644 | if (_M_rep()->_M_is_leaked()) | |
17645 | _M_rep()->_M_set_sharable(); | |
17646 | if (__s._M_rep()->_M_is_leaked()) | |
17647 | __s._M_rep()->_M_set_sharable(); | |
17648 | if (this->get_allocator() == __s.get_allocator()) | |
17649 | { | |
17650 | _CharT* __tmp = _M_data(); | |
17651 | _M_data(__s._M_data()); | |
17652 | __s._M_data(__tmp); | |
17653 | } | |
17654 | ||
17655 | else | |
17656 | { | |
17657 | const basic_string __tmp1(_M_ibegin(), _M_iend(), | |
17658 | __s.get_allocator()); | |
17659 | const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), | |
17660 | this->get_allocator()); | |
17661 | *this = __tmp2; | |
17662 | __s = __tmp1; | |
17663 | } | |
17664 | } | |
17665 | ||
17666 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17667 | typename basic_string<_CharT, _Traits, _Alloc>::_Rep* | |
17668 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
17669 | _S_create(size_type __capacity, size_type __old_capacity, | |
17670 | const _Alloc& __alloc) | |
17671 | { | |
17672 | ||
17673 | ||
17674 | if (__capacity > _S_max_size) | |
17675 | __throw_length_error(("basic_string::_S_create")); | |
17676 | # 558 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.tcc" 3 | |
17677 | const size_type __pagesize = 4096; | |
17678 | const size_type __malloc_header_size = 4 * sizeof(void*); | |
17679 | ||
17680 | ||
17681 | ||
17682 | ||
17683 | ||
17684 | ||
17685 | ||
17686 | if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) | |
17687 | __capacity = 2 * __old_capacity; | |
17688 | ||
17689 | ||
17690 | ||
17691 | ||
17692 | size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); | |
17693 | ||
17694 | const size_type __adj_size = __size + __malloc_header_size; | |
17695 | if (__adj_size > __pagesize && __capacity > __old_capacity) | |
17696 | { | |
17697 | const size_type __extra = __pagesize - __adj_size % __pagesize; | |
17698 | __capacity += __extra / sizeof(_CharT); | |
17699 | ||
17700 | if (__capacity > _S_max_size) | |
17701 | __capacity = _S_max_size; | |
17702 | __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); | |
17703 | } | |
17704 | ||
17705 | ||
17706 | ||
17707 | void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); | |
17708 | _Rep *__p = new (__place) _Rep; | |
17709 | __p->_M_capacity = __capacity; | |
17710 | ||
17711 | ||
17712 | ||
17713 | ||
17714 | ||
17715 | ||
17716 | ||
17717 | __p->_M_set_sharable(); | |
17718 | return __p; | |
17719 | } | |
17720 | ||
17721 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17722 | _CharT* | |
17723 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
17724 | _M_clone(const _Alloc& __alloc, size_type __res) | |
17725 | { | |
17726 | ||
17727 | const size_type __requested_cap = this->_M_length + __res; | |
17728 | _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, | |
17729 | __alloc); | |
17730 | if (this->_M_length) | |
17731 | _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); | |
17732 | ||
17733 | __r->_M_set_length_and_sharable(this->_M_length); | |
17734 | return __r->_M_refdata(); | |
17735 | } | |
17736 | ||
17737 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17738 | void | |
17739 | basic_string<_CharT, _Traits, _Alloc>:: | |
17740 | resize(size_type __n, _CharT __c) | |
17741 | { | |
17742 | const size_type __size = this->size(); | |
17743 | _M_check_length(__size, __n, "basic_string::resize"); | |
17744 | if (__size < __n) | |
17745 | this->append(__n - __size, __c); | |
17746 | else if (__n < __size) | |
17747 | this->erase(__n); | |
17748 | ||
17749 | } | |
17750 | ||
17751 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17752 | template<typename _InputIterator> | |
17753 | basic_string<_CharT, _Traits, _Alloc>& | |
17754 | basic_string<_CharT, _Traits, _Alloc>:: | |
17755 | _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, | |
17756 | _InputIterator __k2, __false_type) | |
17757 | { | |
17758 | const basic_string __s(__k1, __k2); | |
17759 | const size_type __n1 = __i2 - __i1; | |
17760 | _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); | |
17761 | return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), | |
17762 | __s.size()); | |
17763 | } | |
17764 | ||
17765 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17766 | basic_string<_CharT, _Traits, _Alloc>& | |
17767 | basic_string<_CharT, _Traits, _Alloc>:: | |
17768 | _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, | |
17769 | _CharT __c) | |
17770 | { | |
17771 | _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); | |
17772 | _M_mutate(__pos1, __n1, __n2); | |
17773 | if (__n2) | |
17774 | _M_assign(_M_data() + __pos1, __n2, __c); | |
17775 | return *this; | |
17776 | } | |
17777 | ||
17778 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17779 | basic_string<_CharT, _Traits, _Alloc>& | |
17780 | basic_string<_CharT, _Traits, _Alloc>:: | |
17781 | _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, | |
17782 | size_type __n2) | |
17783 | { | |
17784 | _M_mutate(__pos1, __n1, __n2); | |
17785 | if (__n2) | |
17786 | _M_copy(_M_data() + __pos1, __s, __n2); | |
17787 | return *this; | |
17788 | } | |
17789 | ||
17790 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17791 | basic_string<_CharT, _Traits, _Alloc> | |
17792 | operator+(const _CharT* __lhs, | |
17793 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
17794 | { | |
17795 | ; | |
17796 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
17797 | typedef typename __string_type::size_type __size_type; | |
17798 | const __size_type __len = _Traits::length(__lhs); | |
17799 | __string_type __str; | |
17800 | __str.reserve(__len + __rhs.size()); | |
17801 | __str.append(__lhs, __len); | |
17802 | __str.append(__rhs); | |
17803 | return __str; | |
17804 | } | |
17805 | ||
17806 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17807 | basic_string<_CharT, _Traits, _Alloc> | |
17808 | operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
17809 | { | |
17810 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
17811 | typedef typename __string_type::size_type __size_type; | |
17812 | __string_type __str; | |
17813 | const __size_type __len = __rhs.size(); | |
17814 | __str.reserve(__len + 1); | |
17815 | __str.append(__size_type(1), __lhs); | |
17816 | __str.append(__rhs); | |
17817 | return __str; | |
17818 | } | |
17819 | ||
17820 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17821 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17822 | basic_string<_CharT, _Traits, _Alloc>:: | |
17823 | copy(_CharT* __s, size_type __n, size_type __pos) const | |
17824 | { | |
17825 | _M_check(__pos, "basic_string::copy"); | |
17826 | __n = _M_limit(__pos, __n); | |
17827 | ; | |
17828 | if (__n) | |
17829 | _M_copy(__s, _M_data() + __pos, __n); | |
17830 | ||
17831 | return __n; | |
17832 | } | |
17833 | ||
17834 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17835 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17836 | basic_string<_CharT, _Traits, _Alloc>:: | |
17837 | find(const _CharT* __s, size_type __pos, size_type __n) const | |
17838 | { | |
17839 | ; | |
17840 | size_type __ret = npos; | |
17841 | const size_type __size = this->size(); | |
17842 | if (__pos + __n <= __size) | |
17843 | { | |
17844 | const _CharT* __data = _M_data(); | |
17845 | const _CharT* __p = std::search(__data + __pos, __data + __size, | |
17846 | __s, __s + __n, traits_type::eq); | |
17847 | if (__p != __data + __size || __n == 0) | |
17848 | __ret = __p - __data; | |
17849 | } | |
17850 | return __ret; | |
17851 | } | |
17852 | ||
17853 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17854 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17855 | basic_string<_CharT, _Traits, _Alloc>:: | |
17856 | find(_CharT __c, size_type __pos) const | |
17857 | { | |
17858 | size_type __ret = npos; | |
17859 | const size_type __size = this->size(); | |
17860 | if (__pos < __size) | |
17861 | { | |
17862 | const _CharT* __data = _M_data(); | |
17863 | const size_type __n = __size - __pos; | |
17864 | const _CharT* __p = traits_type::find(__data + __pos, __n, __c); | |
17865 | if (__p) | |
17866 | __ret = __p - __data; | |
17867 | } | |
17868 | return __ret; | |
17869 | } | |
17870 | ||
17871 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17872 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17873 | basic_string<_CharT, _Traits, _Alloc>:: | |
17874 | rfind(const _CharT* __s, size_type __pos, size_type __n) const | |
17875 | { | |
17876 | ; | |
17877 | const size_type __size = this->size(); | |
17878 | if (__n <= __size) | |
17879 | { | |
17880 | __pos = std::min(size_type(__size - __n), __pos); | |
17881 | const _CharT* __data = _M_data(); | |
17882 | do | |
17883 | { | |
17884 | if (traits_type::compare(__data + __pos, __s, __n) == 0) | |
17885 | return __pos; | |
17886 | } | |
17887 | while (__pos-- > 0); | |
17888 | } | |
17889 | return npos; | |
17890 | } | |
17891 | ||
17892 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17893 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17894 | basic_string<_CharT, _Traits, _Alloc>:: | |
17895 | rfind(_CharT __c, size_type __pos) const | |
17896 | { | |
17897 | size_type __size = this->size(); | |
17898 | if (__size) | |
17899 | { | |
17900 | if (--__size > __pos) | |
17901 | __size = __pos; | |
17902 | for (++__size; __size-- > 0; ) | |
17903 | if (traits_type::eq(_M_data()[__size], __c)) | |
17904 | return __size; | |
17905 | } | |
17906 | return npos; | |
17907 | } | |
17908 | ||
17909 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17910 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17911 | basic_string<_CharT, _Traits, _Alloc>:: | |
17912 | find_first_of(const _CharT* __s, size_type __pos, size_type __n) const | |
17913 | { | |
17914 | ; | |
17915 | for (; __n && __pos < this->size(); ++__pos) | |
17916 | { | |
17917 | const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); | |
17918 | if (__p) | |
17919 | return __pos; | |
17920 | } | |
17921 | return npos; | |
17922 | } | |
17923 | ||
17924 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17925 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17926 | basic_string<_CharT, _Traits, _Alloc>:: | |
17927 | find_last_of(const _CharT* __s, size_type __pos, size_type __n) const | |
17928 | { | |
17929 | ; | |
17930 | size_type __size = this->size(); | |
17931 | if (__size && __n) | |
17932 | { | |
17933 | if (--__size > __pos) | |
17934 | __size = __pos; | |
17935 | do | |
17936 | { | |
17937 | if (traits_type::find(__s, __n, _M_data()[__size])) | |
17938 | return __size; | |
17939 | } | |
17940 | while (__size-- != 0); | |
17941 | } | |
17942 | return npos; | |
17943 | } | |
17944 | ||
17945 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17946 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17947 | basic_string<_CharT, _Traits, _Alloc>:: | |
17948 | find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const | |
17949 | { | |
17950 | ; | |
17951 | for (; __pos < this->size(); ++__pos) | |
17952 | if (!traits_type::find(__s, __n, _M_data()[__pos])) | |
17953 | return __pos; | |
17954 | return npos; | |
17955 | } | |
17956 | ||
17957 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17958 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17959 | basic_string<_CharT, _Traits, _Alloc>:: | |
17960 | find_first_not_of(_CharT __c, size_type __pos) const | |
17961 | { | |
17962 | for (; __pos < this->size(); ++__pos) | |
17963 | if (!traits_type::eq(_M_data()[__pos], __c)) | |
17964 | return __pos; | |
17965 | return npos; | |
17966 | } | |
17967 | ||
17968 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17969 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17970 | basic_string<_CharT, _Traits, _Alloc>:: | |
17971 | find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const | |
17972 | { | |
17973 | ; | |
17974 | size_type __size = this->size(); | |
17975 | if (__size) | |
17976 | { | |
17977 | if (--__size > __pos) | |
17978 | __size = __pos; | |
17979 | do | |
17980 | { | |
17981 | if (!traits_type::find(__s, __n, _M_data()[__size])) | |
17982 | return __size; | |
17983 | } | |
17984 | while (__size--); | |
17985 | } | |
17986 | return npos; | |
17987 | } | |
17988 | ||
17989 | template<typename _CharT, typename _Traits, typename _Alloc> | |
17990 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
17991 | basic_string<_CharT, _Traits, _Alloc>:: | |
17992 | find_last_not_of(_CharT __c, size_type __pos) const | |
17993 | { | |
17994 | size_type __size = this->size(); | |
17995 | if (__size) | |
17996 | { | |
17997 | if (--__size > __pos) | |
17998 | __size = __pos; | |
17999 | do | |
18000 | { | |
18001 | if (!traits_type::eq(_M_data()[__size], __c)) | |
18002 | return __size; | |
18003 | } | |
18004 | while (__size--); | |
18005 | } | |
18006 | return npos; | |
18007 | } | |
18008 | ||
18009 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18010 | int | |
18011 | basic_string<_CharT, _Traits, _Alloc>:: | |
18012 | compare(size_type __pos, size_type __n, const basic_string& __str) const | |
18013 | { | |
18014 | _M_check(__pos, "basic_string::compare"); | |
18015 | __n = _M_limit(__pos, __n); | |
18016 | const size_type __osize = __str.size(); | |
18017 | const size_type __len = std::min(__n, __osize); | |
18018 | int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); | |
18019 | if (!__r) | |
18020 | __r = __n - __osize; | |
18021 | return __r; | |
18022 | } | |
18023 | ||
18024 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18025 | int | |
18026 | basic_string<_CharT, _Traits, _Alloc>:: | |
18027 | compare(size_type __pos1, size_type __n1, const basic_string& __str, | |
18028 | size_type __pos2, size_type __n2) const | |
18029 | { | |
18030 | _M_check(__pos1, "basic_string::compare"); | |
18031 | __str._M_check(__pos2, "basic_string::compare"); | |
18032 | __n1 = _M_limit(__pos1, __n1); | |
18033 | __n2 = __str._M_limit(__pos2, __n2); | |
18034 | const size_type __len = std::min(__n1, __n2); | |
18035 | int __r = traits_type::compare(_M_data() + __pos1, | |
18036 | __str.data() + __pos2, __len); | |
18037 | if (!__r) | |
18038 | __r = __n1 - __n2; | |
18039 | return __r; | |
18040 | } | |
18041 | ||
18042 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18043 | int | |
18044 | basic_string<_CharT, _Traits, _Alloc>:: | |
18045 | compare(const _CharT* __s) const | |
18046 | { | |
18047 | ; | |
18048 | const size_type __size = this->size(); | |
18049 | const size_type __osize = traits_type::length(__s); | |
18050 | const size_type __len = std::min(__size, __osize); | |
18051 | int __r = traits_type::compare(_M_data(), __s, __len); | |
18052 | if (!__r) | |
18053 | __r = __size - __osize; | |
18054 | return __r; | |
18055 | } | |
18056 | ||
18057 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18058 | int | |
18059 | basic_string <_CharT, _Traits, _Alloc>:: | |
18060 | compare(size_type __pos, size_type __n1, const _CharT* __s) const | |
18061 | { | |
18062 | ; | |
18063 | _M_check(__pos, "basic_string::compare"); | |
18064 | __n1 = _M_limit(__pos, __n1); | |
18065 | const size_type __osize = traits_type::length(__s); | |
18066 | const size_type __len = std::min(__n1, __osize); | |
18067 | int __r = traits_type::compare(_M_data() + __pos, __s, __len); | |
18068 | if (!__r) | |
18069 | __r = __n1 - __osize; | |
18070 | return __r; | |
18071 | } | |
18072 | ||
18073 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18074 | int | |
18075 | basic_string <_CharT, _Traits, _Alloc>:: | |
18076 | compare(size_type __pos, size_type __n1, const _CharT* __s, | |
18077 | size_type __n2) const | |
18078 | { | |
18079 | ; | |
18080 | _M_check(__pos, "basic_string::compare"); | |
18081 | __n1 = _M_limit(__pos, __n1); | |
18082 | const size_type __len = std::min(__n1, __n2); | |
18083 | int __r = traits_type::compare(_M_data() + __pos, __s, __len); | |
18084 | if (!__r) | |
18085 | __r = __n1 - __n2; | |
18086 | return __r; | |
18087 | } | |
18088 | ||
18089 | ||
18090 | ||
18091 | ||
18092 | ||
18093 | extern template class basic_string<char>; | |
18094 | extern template | |
18095 | basic_istream<char>& | |
18096 | operator>>(basic_istream<char>&, string&); | |
18097 | extern template | |
18098 | basic_ostream<char>& | |
18099 | operator<<(basic_ostream<char>&, const string&); | |
18100 | extern template | |
18101 | basic_istream<char>& | |
18102 | getline(basic_istream<char>&, string&, char); | |
18103 | extern template | |
18104 | basic_istream<char>& | |
18105 | getline(basic_istream<char>&, string&); | |
18106 | # 1004 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_string.tcc" 3 | |
18107 | } | |
18108 | # 57 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/string" 2 3 | |
18109 | # 19 "./boost/format.hpp" 2 | |
18110 | # 1 "./boost/detail/workaround.hpp" 1 | |
18111 | # 41 "./boost/detail/workaround.hpp" | |
18112 | # 1 "./boost/config.hpp" 1 | |
18113 | # 26 "./boost/config.hpp" | |
18114 | # 1 "./boost/config/user.hpp" 1 | |
18115 | # 27 "./boost/config.hpp" 2 | |
18116 | ||
18117 | ||
18118 | ||
18119 | ||
18120 | # 1 "./boost/config/select_compiler_config.hpp" 1 | |
18121 | # 32 "./boost/config.hpp" 2 | |
18122 | ||
18123 | ||
18124 | ||
18125 | # 1 "./boost/config/compiler/gcc.hpp" 1 | |
18126 | # 36 "./boost/config.hpp" 2 | |
18127 | ||
18128 | ||
18129 | ||
18130 | ||
18131 | # 1 "./boost/config/select_stdlib_config.hpp" 1 | |
18132 | # 20 "./boost/config/select_stdlib_config.hpp" | |
18133 | # 1 "./boost/config/no_tr1/utility.hpp" 1 | |
18134 | # 21 "./boost/config/no_tr1/utility.hpp" | |
18135 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/utility" 1 3 | |
18136 | # 63 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/utility" 3 | |
18137 | ||
18138 | # 64 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/utility" 3 | |
18139 | ||
18140 | ||
18141 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_relops.h" 1 3 | |
18142 | # 74 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_relops.h" 3 | |
18143 | namespace std | |
18144 | { | |
18145 | namespace rel_ops | |
18146 | { | |
18147 | # 90 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_relops.h" 3 | |
18148 | template <class _Tp> | |
18149 | inline bool | |
18150 | operator!=(const _Tp& __x, const _Tp& __y) | |
18151 | { return !(__x == __y); } | |
18152 | # 103 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_relops.h" 3 | |
18153 | template <class _Tp> | |
18154 | inline bool | |
18155 | operator>(const _Tp& __x, const _Tp& __y) | |
18156 | { return __y < __x; } | |
18157 | # 116 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_relops.h" 3 | |
18158 | template <class _Tp> | |
18159 | inline bool | |
18160 | operator<=(const _Tp& __x, const _Tp& __y) | |
18161 | { return !(__y < __x); } | |
18162 | # 129 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/stl_relops.h" 3 | |
18163 | template <class _Tp> | |
18164 | inline bool | |
18165 | operator>=(const _Tp& __x, const _Tp& __y) | |
18166 | { return !(__x < __y); } | |
18167 | ||
18168 | } | |
18169 | } | |
18170 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/utility" 2 3 | |
18171 | # 22 "./boost/config/no_tr1/utility.hpp" 2 | |
18172 | # 21 "./boost/config/select_stdlib_config.hpp" 2 | |
18173 | # 41 "./boost/config.hpp" 2 | |
18174 | ||
18175 | ||
18176 | ||
18177 | # 1 "./boost/config/stdlib/libstdcpp3.hpp" 1 | |
18178 | # 45 "./boost/config.hpp" 2 | |
18179 | ||
18180 | ||
18181 | ||
18182 | ||
18183 | # 1 "./boost/config/select_platform_config.hpp" 1 | |
18184 | # 50 "./boost/config.hpp" 2 | |
18185 | ||
18186 | ||
18187 | ||
18188 | # 1 "./boost/config/platform/linux.hpp" 1 | |
18189 | # 70 "./boost/config/platform/linux.hpp" | |
18190 | # 1 "./boost/config/posix_features.hpp" 1 | |
18191 | # 71 "./boost/config/platform/linux.hpp" 2 | |
18192 | # 54 "./boost/config.hpp" 2 | |
18193 | ||
18194 | ||
18195 | ||
18196 | # 1 "./boost/config/suffix.hpp" 1 | |
18197 | # 432 "./boost/config/suffix.hpp" | |
18198 | namespace boost{ | |
18199 | ||
18200 | __extension__ typedef long long long_long_type; | |
18201 | __extension__ typedef unsigned long long ulong_long_type; | |
18202 | ||
18203 | ||
18204 | ||
18205 | ||
18206 | } | |
18207 | # 58 "./boost/config.hpp" 2 | |
18208 | # 42 "./boost/detail/workaround.hpp" 2 | |
18209 | # 20 "./boost/format.hpp" 2 | |
18210 | ||
18211 | ||
18212 | ||
18213 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/locale" 1 3 | |
18214 | # 41 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/locale" 3 | |
18215 | ||
18216 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/locale" 3 | |
18217 | ||
18218 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/localefwd.h" 1 3 | |
18219 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/localefwd.h" 3 | |
18220 | ||
18221 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/localefwd.h" 3 | |
18222 | ||
18223 | ||
18224 | ||
18225 | ||
18226 | ||
18227 | ||
18228 | namespace std | |
18229 | { | |
18230 | ||
18231 | class locale; | |
18232 | ||
18233 | ||
18234 | template<typename _CharT> | |
18235 | inline bool | |
18236 | isspace(_CharT, const locale&); | |
18237 | ||
18238 | template<typename _CharT> | |
18239 | inline bool | |
18240 | isprint(_CharT, const locale&); | |
18241 | ||
18242 | template<typename _CharT> | |
18243 | inline bool | |
18244 | iscntrl(_CharT, const locale&); | |
18245 | ||
18246 | template<typename _CharT> | |
18247 | inline bool | |
18248 | isupper(_CharT, const locale&); | |
18249 | ||
18250 | template<typename _CharT> | |
18251 | inline bool | |
18252 | islower(_CharT, const locale&); | |
18253 | ||
18254 | template<typename _CharT> | |
18255 | inline bool | |
18256 | isalpha(_CharT, const locale&); | |
18257 | ||
18258 | template<typename _CharT> | |
18259 | inline bool | |
18260 | isdigit(_CharT, const locale&); | |
18261 | ||
18262 | template<typename _CharT> | |
18263 | inline bool | |
18264 | ispunct(_CharT, const locale&); | |
18265 | ||
18266 | template<typename _CharT> | |
18267 | inline bool | |
18268 | isxdigit(_CharT, const locale&); | |
18269 | ||
18270 | template<typename _CharT> | |
18271 | inline bool | |
18272 | isalnum(_CharT, const locale&); | |
18273 | ||
18274 | template<typename _CharT> | |
18275 | inline bool | |
18276 | isgraph(_CharT, const locale&); | |
18277 | ||
18278 | template<typename _CharT> | |
18279 | inline _CharT | |
18280 | toupper(_CharT, const locale&); | |
18281 | ||
18282 | template<typename _CharT> | |
18283 | inline _CharT | |
18284 | tolower(_CharT, const locale&); | |
18285 | ||
18286 | ||
18287 | class ctype_base; | |
18288 | template<typename _CharT> | |
18289 | class ctype; | |
18290 | template<> class ctype<char>; | |
18291 | ||
18292 | ||
18293 | ||
18294 | template<typename _CharT> | |
18295 | class ctype_byname; | |
18296 | ||
18297 | ||
18298 | class codecvt_base; | |
18299 | class __enc_traits; | |
18300 | template<typename _InternT, typename _ExternT, typename _StateT> | |
18301 | class codecvt; | |
18302 | template<> class codecvt<char, char, mbstate_t>; | |
18303 | ||
18304 | ||
18305 | ||
18306 | template<typename _InternT, typename _ExternT, typename _StateT> | |
18307 | class codecvt_byname; | |
18308 | ||
18309 | ||
18310 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
18311 | class num_get; | |
18312 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
18313 | class num_put; | |
18314 | template<typename _CharT> class numpunct; | |
18315 | template<typename _CharT> class numpunct_byname; | |
18316 | ||
18317 | ||
18318 | template<typename _CharT> | |
18319 | class collate; | |
18320 | template<typename _CharT> class | |
18321 | collate_byname; | |
18322 | ||
18323 | ||
18324 | class time_base; | |
18325 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
18326 | class time_get; | |
18327 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
18328 | class time_get_byname; | |
18329 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
18330 | class time_put; | |
18331 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
18332 | class time_put_byname; | |
18333 | ||
18334 | ||
18335 | class money_base; | |
18336 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
18337 | class money_get; | |
18338 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
18339 | class money_put; | |
18340 | template<typename _CharT, bool _Intl = false> | |
18341 | class moneypunct; | |
18342 | template<typename _CharT, bool _Intl = false> | |
18343 | class moneypunct_byname; | |
18344 | ||
18345 | ||
18346 | class messages_base; | |
18347 | template<typename _CharT> | |
18348 | class messages; | |
18349 | template<typename _CharT> | |
18350 | class messages_byname; | |
18351 | ||
18352 | template<typename _Facet> | |
18353 | bool | |
18354 | has_facet(const locale& __loc) throw(); | |
18355 | ||
18356 | template<typename _Facet> | |
18357 | const _Facet& | |
18358 | use_facet(const locale& __loc); | |
18359 | ||
18360 | template<typename _Facet> | |
18361 | inline const _Facet& | |
18362 | __check_facet(const _Facet* __f) | |
18363 | { | |
18364 | if (!__f) | |
18365 | __throw_bad_cast(); | |
18366 | return *__f; | |
18367 | } | |
18368 | } | |
18369 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/locale" 2 3 | |
18370 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 1 3 | |
18371 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18372 | ||
18373 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18374 | ||
18375 | ||
18376 | ||
18377 | ||
18378 | ||
18379 | ||
18380 | ||
18381 | namespace std | |
18382 | { | |
18383 | # 67 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18384 | class locale | |
18385 | { | |
18386 | public: | |
18387 | ||
18388 | ||
18389 | typedef int category; | |
18390 | ||
18391 | ||
18392 | class facet; | |
18393 | class id; | |
18394 | class _Impl; | |
18395 | ||
18396 | friend class facet; | |
18397 | friend class _Impl; | |
18398 | ||
18399 | template<typename _Facet> | |
18400 | friend bool | |
18401 | has_facet(const locale&) throw(); | |
18402 | ||
18403 | template<typename _Facet> | |
18404 | friend const _Facet& | |
18405 | use_facet(const locale&); | |
18406 | ||
18407 | template<typename _Cache> | |
18408 | friend struct __use_cache; | |
18409 | # 105 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18410 | static const category none = 0; | |
18411 | static const category ctype = 1L << 0; | |
18412 | static const category numeric = 1L << 1; | |
18413 | static const category collate = 1L << 2; | |
18414 | static const category time = 1L << 3; | |
18415 | static const category monetary = 1L << 4; | |
18416 | static const category messages = 1L << 5; | |
18417 | static const category all = (ctype | numeric | collate | | |
18418 | time | monetary | messages); | |
18419 | # 124 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18420 | locale() throw(); | |
18421 | # 133 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18422 | locale(const locale& __other) throw(); | |
18423 | # 143 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18424 | explicit | |
18425 | locale(const char* __s); | |
18426 | # 158 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18427 | locale(const locale& __base, const char* __s, category __cat); | |
18428 | # 171 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18429 | locale(const locale& __base, const locale& __add, category __cat); | |
18430 | # 183 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18431 | template<typename _Facet> | |
18432 | locale(const locale& __other, _Facet* __f); | |
18433 | ||
18434 | ||
18435 | ~locale() throw(); | |
18436 | # 197 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18437 | const locale& | |
18438 | operator=(const locale& __other) throw(); | |
18439 | # 212 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18440 | template<typename _Facet> | |
18441 | locale | |
18442 | combine(const locale& __other) const; | |
18443 | ||
18444 | ||
18445 | ||
18446 | ||
18447 | ||
18448 | ||
18449 | string | |
18450 | name() const; | |
18451 | # 231 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18452 | bool | |
18453 | operator==(const locale& __other) const throw (); | |
18454 | ||
18455 | ||
18456 | ||
18457 | ||
18458 | ||
18459 | ||
18460 | ||
18461 | inline bool | |
18462 | operator!=(const locale& __other) const throw () | |
18463 | { return !(this->operator==(__other)); } | |
18464 | # 259 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18465 | template<typename _Char, typename _Traits, typename _Alloc> | |
18466 | bool | |
18467 | operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, | |
18468 | const basic_string<_Char, _Traits, _Alloc>& __s2) const; | |
18469 | # 275 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18470 | static locale | |
18471 | global(const locale&); | |
18472 | ||
18473 | ||
18474 | ||
18475 | ||
18476 | static const locale& | |
18477 | classic(); | |
18478 | ||
18479 | private: | |
18480 | ||
18481 | _Impl* _M_impl; | |
18482 | ||
18483 | ||
18484 | static _Impl* _S_classic; | |
18485 | ||
18486 | ||
18487 | static _Impl* _S_global; | |
18488 | ||
18489 | ||
18490 | ||
18491 | ||
18492 | ||
18493 | static const char* const* const _S_categories; | |
18494 | # 310 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18495 | enum { _S_categories_size = 6 + 0 }; | |
18496 | ||
18497 | ||
18498 | static __gthread_once_t _S_once; | |
18499 | ||
18500 | ||
18501 | explicit | |
18502 | locale(_Impl*) throw(); | |
18503 | ||
18504 | static void | |
18505 | _S_initialize(); | |
18506 | ||
18507 | static void | |
18508 | _S_initialize_once(); | |
18509 | ||
18510 | static category | |
18511 | _S_normalize_category(category); | |
18512 | ||
18513 | void | |
18514 | _M_coalesce(const locale& __base, const locale& __add, category __cat); | |
18515 | }; | |
18516 | # 343 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18517 | class locale::facet | |
18518 | { | |
18519 | private: | |
18520 | friend class locale; | |
18521 | friend class locale::_Impl; | |
18522 | ||
18523 | mutable _Atomic_word _M_refcount; | |
18524 | ||
18525 | ||
18526 | static __c_locale _S_c_locale; | |
18527 | ||
18528 | ||
18529 | static const char _S_c_name[2]; | |
18530 | ||
18531 | ||
18532 | static __gthread_once_t _S_once; | |
18533 | ||
18534 | ||
18535 | static void | |
18536 | _S_initialize_once(); | |
18537 | ||
18538 | protected: | |
18539 | # 374 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18540 | explicit | |
18541 | facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) | |
18542 | { } | |
18543 | ||
18544 | ||
18545 | virtual | |
18546 | ~facet(); | |
18547 | ||
18548 | static void | |
18549 | _S_create_c_locale(__c_locale& __cloc, const char* __s, | |
18550 | __c_locale __old = 0); | |
18551 | ||
18552 | static __c_locale | |
18553 | _S_clone_c_locale(__c_locale& __cloc); | |
18554 | ||
18555 | static void | |
18556 | _S_destroy_c_locale(__c_locale& __cloc); | |
18557 | ||
18558 | ||
18559 | ||
18560 | static __c_locale | |
18561 | _S_get_c_locale(); | |
18562 | ||
18563 | static const char* | |
18564 | _S_get_c_name(); | |
18565 | ||
18566 | private: | |
18567 | inline void | |
18568 | _M_add_reference() const throw() | |
18569 | { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
18570 | ||
18571 | inline void | |
18572 | _M_remove_reference() const throw() | |
18573 | { | |
18574 | if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1) | |
18575 | { | |
18576 | try | |
18577 | { delete this; } | |
18578 | catch (...) | |
18579 | { } | |
18580 | } | |
18581 | } | |
18582 | ||
18583 | facet(const facet&); | |
18584 | ||
18585 | facet& | |
18586 | operator=(const facet&); | |
18587 | }; | |
18588 | # 434 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_classes.h" 3 | |
18589 | class locale::id | |
18590 | { | |
18591 | private: | |
18592 | friend class locale; | |
18593 | friend class locale::_Impl; | |
18594 | ||
18595 | template<typename _Facet> | |
18596 | friend const _Facet& | |
18597 | use_facet(const locale&); | |
18598 | ||
18599 | template<typename _Facet> | |
18600 | friend bool | |
18601 | has_facet(const locale&) throw (); | |
18602 | ||
18603 | ||
18604 | ||
18605 | ||
18606 | mutable size_t _M_index; | |
18607 | ||
18608 | ||
18609 | static _Atomic_word _S_refcount; | |
18610 | ||
18611 | void | |
18612 | operator=(const id&); | |
18613 | ||
18614 | id(const id&); | |
18615 | ||
18616 | public: | |
18617 | ||
18618 | ||
18619 | ||
18620 | id() { } | |
18621 | ||
18622 | size_t | |
18623 | _M_id() const; | |
18624 | }; | |
18625 | ||
18626 | ||
18627 | ||
18628 | class locale::_Impl | |
18629 | { | |
18630 | public: | |
18631 | ||
18632 | friend class locale; | |
18633 | friend class locale::facet; | |
18634 | ||
18635 | template<typename _Facet> | |
18636 | friend bool | |
18637 | has_facet(const locale&) throw(); | |
18638 | ||
18639 | template<typename _Facet> | |
18640 | friend const _Facet& | |
18641 | use_facet(const locale&); | |
18642 | ||
18643 | template<typename _Cache> | |
18644 | friend struct __use_cache; | |
18645 | ||
18646 | private: | |
18647 | ||
18648 | _Atomic_word _M_refcount; | |
18649 | const facet** _M_facets; | |
18650 | size_t _M_facets_size; | |
18651 | const facet** _M_caches; | |
18652 | char** _M_names; | |
18653 | static const locale::id* const _S_id_ctype[]; | |
18654 | static const locale::id* const _S_id_numeric[]; | |
18655 | static const locale::id* const _S_id_collate[]; | |
18656 | static const locale::id* const _S_id_time[]; | |
18657 | static const locale::id* const _S_id_monetary[]; | |
18658 | static const locale::id* const _S_id_messages[]; | |
18659 | static const locale::id* const* const _S_facet_categories[]; | |
18660 | ||
18661 | inline void | |
18662 | _M_add_reference() throw() | |
18663 | { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
18664 | ||
18665 | inline void | |
18666 | _M_remove_reference() throw() | |
18667 | { | |
18668 | if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1) | |
18669 | { | |
18670 | try | |
18671 | { delete this; } | |
18672 | catch(...) | |
18673 | { } | |
18674 | } | |
18675 | } | |
18676 | ||
18677 | _Impl(const _Impl&, size_t); | |
18678 | _Impl(const char*, size_t); | |
18679 | _Impl(size_t) throw(); | |
18680 | ||
18681 | ~_Impl() throw(); | |
18682 | ||
18683 | _Impl(const _Impl&); | |
18684 | ||
18685 | void | |
18686 | operator=(const _Impl&); | |
18687 | ||
18688 | inline bool | |
18689 | _M_check_same_name() | |
18690 | { | |
18691 | bool __ret = true; | |
18692 | if (_M_names[1]) | |
18693 | ||
18694 | for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) | |
18695 | __ret = std::strcmp(_M_names[__i], _M_names[__i + 1]) == 0; | |
18696 | return __ret; | |
18697 | } | |
18698 | ||
18699 | void | |
18700 | _M_replace_categories(const _Impl*, category); | |
18701 | ||
18702 | void | |
18703 | _M_replace_category(const _Impl*, const locale::id* const*); | |
18704 | ||
18705 | void | |
18706 | _M_replace_facet(const _Impl*, const locale::id*); | |
18707 | ||
18708 | void | |
18709 | _M_install_facet(const locale::id*, const facet*); | |
18710 | ||
18711 | template<typename _Facet> | |
18712 | inline void | |
18713 | _M_init_facet(_Facet* __facet) | |
18714 | { _M_install_facet(&_Facet::id, __facet); } | |
18715 | ||
18716 | void | |
18717 | _M_install_cache(const facet*, size_t); | |
18718 | }; | |
18719 | ||
18720 | template<typename _Facet> | |
18721 | locale::locale(const locale& __other, _Facet* __f) | |
18722 | { | |
18723 | _M_impl = new _Impl(*__other._M_impl, 1); | |
18724 | ||
18725 | try | |
18726 | { _M_impl->_M_install_facet(&_Facet::id, __f); } | |
18727 | catch(...) | |
18728 | { | |
18729 | _M_impl->_M_remove_reference(); | |
18730 | throw; | |
18731 | } | |
18732 | delete [] _M_impl->_M_names[0]; | |
18733 | _M_impl->_M_names[0] = 0; | |
18734 | } | |
18735 | } | |
18736 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/locale" 2 3 | |
18737 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 1 3 | |
18738 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
18739 | ||
18740 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
18741 | ||
18742 | ||
18743 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwctype" 1 3 | |
18744 | # 48 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwctype" 3 | |
18745 | ||
18746 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/cwctype" 3 | |
18747 | # 47 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
18748 | ||
18749 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 1 3 | |
18750 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
18751 | ||
18752 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
18753 | ||
18754 | ||
18755 | ||
18756 | ||
18757 | ||
18758 | namespace std | |
18759 | { | |
18760 | ||
18761 | ||
18762 | ||
18763 | ||
18764 | enum _Ios_Fmtflags | |
18765 | { | |
18766 | _S_boolalpha = 1L << 0, | |
18767 | _S_dec = 1L << 1, | |
18768 | _S_fixed = 1L << 2, | |
18769 | _S_hex = 1L << 3, | |
18770 | _S_internal = 1L << 4, | |
18771 | _S_left = 1L << 5, | |
18772 | _S_oct = 1L << 6, | |
18773 | _S_right = 1L << 7, | |
18774 | _S_scientific = 1L << 8, | |
18775 | _S_showbase = 1L << 9, | |
18776 | _S_showpoint = 1L << 10, | |
18777 | _S_showpos = 1L << 11, | |
18778 | _S_skipws = 1L << 12, | |
18779 | _S_unitbuf = 1L << 13, | |
18780 | _S_uppercase = 1L << 14, | |
18781 | _S_adjustfield = _S_left | _S_right | _S_internal, | |
18782 | _S_basefield = _S_dec | _S_oct | _S_hex, | |
18783 | _S_floatfield = _S_scientific | _S_fixed, | |
18784 | _S_ios_fmtflags_end = 1L << 16 | |
18785 | }; | |
18786 | ||
18787 | inline _Ios_Fmtflags | |
18788 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
18789 | { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); } | |
18790 | ||
18791 | inline _Ios_Fmtflags | |
18792 | operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
18793 | { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); } | |
18794 | ||
18795 | inline _Ios_Fmtflags | |
18796 | operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
18797 | { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
18798 | ||
18799 | inline _Ios_Fmtflags& | |
18800 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
18801 | { return __a = __a | __b; } | |
18802 | ||
18803 | inline _Ios_Fmtflags& | |
18804 | operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
18805 | { return __a = __a & __b; } | |
18806 | ||
18807 | inline _Ios_Fmtflags& | |
18808 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
18809 | { return __a = __a ^ __b; } | |
18810 | ||
18811 | inline _Ios_Fmtflags | |
18812 | operator~(_Ios_Fmtflags __a) | |
18813 | { return _Ios_Fmtflags(~static_cast<int>(__a)); } | |
18814 | ||
18815 | ||
18816 | enum _Ios_Openmode | |
18817 | { | |
18818 | _S_app = 1L << 0, | |
18819 | _S_ate = 1L << 1, | |
18820 | _S_bin = 1L << 2, | |
18821 | _S_in = 1L << 3, | |
18822 | _S_out = 1L << 4, | |
18823 | _S_trunc = 1L << 5, | |
18824 | _S_ios_openmode_end = 1L << 16 | |
18825 | }; | |
18826 | ||
18827 | inline _Ios_Openmode | |
18828 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) | |
18829 | { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); } | |
18830 | ||
18831 | inline _Ios_Openmode | |
18832 | operator|(_Ios_Openmode __a, _Ios_Openmode __b) | |
18833 | { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); } | |
18834 | ||
18835 | inline _Ios_Openmode | |
18836 | operator^(_Ios_Openmode __a, _Ios_Openmode __b) | |
18837 | { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
18838 | ||
18839 | inline _Ios_Openmode& | |
18840 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
18841 | { return __a = __a | __b; } | |
18842 | ||
18843 | inline _Ios_Openmode& | |
18844 | operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
18845 | { return __a = __a & __b; } | |
18846 | ||
18847 | inline _Ios_Openmode& | |
18848 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
18849 | { return __a = __a ^ __b; } | |
18850 | ||
18851 | inline _Ios_Openmode | |
18852 | operator~(_Ios_Openmode __a) | |
18853 | { return _Ios_Openmode(~static_cast<int>(__a)); } | |
18854 | ||
18855 | ||
18856 | enum _Ios_Iostate | |
18857 | { | |
18858 | _S_goodbit = 0, | |
18859 | _S_badbit = 1L << 0, | |
18860 | _S_eofbit = 1L << 1, | |
18861 | _S_failbit = 1L << 2, | |
18862 | _S_ios_iostate_end = 1L << 16 | |
18863 | }; | |
18864 | ||
18865 | inline _Ios_Iostate | |
18866 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) | |
18867 | { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); } | |
18868 | ||
18869 | inline _Ios_Iostate | |
18870 | operator|(_Ios_Iostate __a, _Ios_Iostate __b) | |
18871 | { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); } | |
18872 | ||
18873 | inline _Ios_Iostate | |
18874 | operator^(_Ios_Iostate __a, _Ios_Iostate __b) | |
18875 | { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
18876 | ||
18877 | inline _Ios_Iostate& | |
18878 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
18879 | { return __a = __a | __b; } | |
18880 | ||
18881 | inline _Ios_Iostate& | |
18882 | operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
18883 | { return __a = __a & __b; } | |
18884 | ||
18885 | inline _Ios_Iostate& | |
18886 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
18887 | { return __a = __a ^ __b; } | |
18888 | ||
18889 | inline _Ios_Iostate | |
18890 | operator~(_Ios_Iostate __a) | |
18891 | { return _Ios_Iostate(~static_cast<int>(__a)); } | |
18892 | ||
18893 | enum _Ios_Seekdir | |
18894 | { | |
18895 | _S_beg = 0, | |
18896 | _S_cur = 1, | |
18897 | _S_end = 2, | |
18898 | _S_ios_seekdir_end = 1L << 16 | |
18899 | }; | |
18900 | # 201 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
18901 | class ios_base | |
18902 | { | |
18903 | public: | |
18904 | ||
18905 | ||
18906 | ||
18907 | class failure : public exception | |
18908 | { | |
18909 | public: | |
18910 | ||
18911 | ||
18912 | explicit | |
18913 | failure(const string& __str) throw(); | |
18914 | ||
18915 | ||
18916 | ||
18917 | virtual | |
18918 | ~failure() throw(); | |
18919 | ||
18920 | virtual const char* | |
18921 | what() const throw(); | |
18922 | ||
18923 | private: | |
18924 | string _M_msg; | |
18925 | }; | |
18926 | # 253 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
18927 | typedef _Ios_Fmtflags fmtflags; | |
18928 | ||
18929 | ||
18930 | static const fmtflags boolalpha = _S_boolalpha; | |
18931 | ||
18932 | ||
18933 | static const fmtflags dec = _S_dec; | |
18934 | ||
18935 | ||
18936 | static const fmtflags fixed = _S_fixed; | |
18937 | ||
18938 | ||
18939 | static const fmtflags hex = _S_hex; | |
18940 | ||
18941 | ||
18942 | ||
18943 | ||
18944 | static const fmtflags internal = _S_internal; | |
18945 | ||
18946 | ||
18947 | ||
18948 | static const fmtflags left = _S_left; | |
18949 | ||
18950 | ||
18951 | static const fmtflags oct = _S_oct; | |
18952 | ||
18953 | ||
18954 | ||
18955 | static const fmtflags right = _S_right; | |
18956 | ||
18957 | ||
18958 | static const fmtflags scientific = _S_scientific; | |
18959 | ||
18960 | ||
18961 | ||
18962 | static const fmtflags showbase = _S_showbase; | |
18963 | ||
18964 | ||
18965 | ||
18966 | static const fmtflags showpoint = _S_showpoint; | |
18967 | ||
18968 | ||
18969 | static const fmtflags showpos = _S_showpos; | |
18970 | ||
18971 | ||
18972 | static const fmtflags skipws = _S_skipws; | |
18973 | ||
18974 | ||
18975 | static const fmtflags unitbuf = _S_unitbuf; | |
18976 | ||
18977 | ||
18978 | ||
18979 | static const fmtflags uppercase = _S_uppercase; | |
18980 | ||
18981 | ||
18982 | static const fmtflags adjustfield = _S_adjustfield; | |
18983 | ||
18984 | ||
18985 | static const fmtflags basefield = _S_basefield; | |
18986 | ||
18987 | ||
18988 | static const fmtflags floatfield = _S_floatfield; | |
18989 | # 328 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
18990 | typedef _Ios_Iostate iostate; | |
18991 | ||
18992 | ||
18993 | ||
18994 | static const iostate badbit = _S_badbit; | |
18995 | ||
18996 | ||
18997 | static const iostate eofbit = _S_eofbit; | |
18998 | ||
18999 | ||
19000 | ||
19001 | ||
19002 | static const iostate failbit = _S_failbit; | |
19003 | ||
19004 | ||
19005 | static const iostate goodbit = _S_goodbit; | |
19006 | # 359 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19007 | typedef _Ios_Openmode openmode; | |
19008 | ||
19009 | ||
19010 | static const openmode app = _S_app; | |
19011 | ||
19012 | ||
19013 | static const openmode ate = _S_ate; | |
19014 | ||
19015 | ||
19016 | ||
19017 | ||
19018 | ||
19019 | static const openmode binary = _S_bin; | |
19020 | ||
19021 | ||
19022 | static const openmode in = _S_in; | |
19023 | ||
19024 | ||
19025 | static const openmode out = _S_out; | |
19026 | ||
19027 | ||
19028 | static const openmode trunc = _S_trunc; | |
19029 | # 392 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19030 | typedef _Ios_Seekdir seekdir; | |
19031 | ||
19032 | ||
19033 | static const seekdir beg = _S_beg; | |
19034 | ||
19035 | ||
19036 | static const seekdir cur = _S_cur; | |
19037 | ||
19038 | ||
19039 | static const seekdir end = _S_end; | |
19040 | ||
19041 | ||
19042 | typedef int io_state; | |
19043 | typedef int open_mode; | |
19044 | typedef int seek_dir; | |
19045 | ||
19046 | typedef std::streampos streampos; | |
19047 | typedef std::streamoff streamoff; | |
19048 | # 418 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19049 | enum event | |
19050 | { | |
19051 | erase_event, | |
19052 | imbue_event, | |
19053 | copyfmt_event | |
19054 | }; | |
19055 | # 435 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19056 | typedef void (*event_callback) (event, ios_base&, int); | |
19057 | # 447 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19058 | void | |
19059 | register_callback(event_callback __fn, int __index); | |
19060 | ||
19061 | protected: | |
19062 | ||
19063 | ||
19064 | ||
19065 | ||
19066 | ||
19067 | ||
19068 | streamsize _M_precision; | |
19069 | streamsize _M_width; | |
19070 | fmtflags _M_flags; | |
19071 | iostate _M_exception; | |
19072 | iostate _M_streambuf_state; | |
19073 | ||
19074 | ||
19075 | ||
19076 | ||
19077 | struct _Callback_list | |
19078 | { | |
19079 | ||
19080 | _Callback_list* _M_next; | |
19081 | ios_base::event_callback _M_fn; | |
19082 | int _M_index; | |
19083 | _Atomic_word _M_refcount; | |
19084 | ||
19085 | _Callback_list(ios_base::event_callback __fn, int __index, | |
19086 | _Callback_list* __cb) | |
19087 | : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } | |
19088 | ||
19089 | void | |
19090 | _M_add_reference() { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
19091 | ||
19092 | ||
19093 | int | |
19094 | _M_remove_reference() | |
19095 | { return __gnu_cxx::__exchange_and_add(&_M_refcount, -1); } | |
19096 | }; | |
19097 | ||
19098 | _Callback_list* _M_callbacks; | |
19099 | ||
19100 | void | |
19101 | _M_call_callbacks(event __ev) throw(); | |
19102 | ||
19103 | void | |
19104 | _M_dispose_callbacks(void); | |
19105 | ||
19106 | ||
19107 | struct _Words | |
19108 | { | |
19109 | void* _M_pword; | |
19110 | long _M_iword; | |
19111 | _Words() : _M_pword(0), _M_iword(0) { } | |
19112 | }; | |
19113 | ||
19114 | ||
19115 | _Words _M_word_zero; | |
19116 | ||
19117 | ||
19118 | ||
19119 | enum { _S_local_word_size = 8 }; | |
19120 | _Words _M_local_word[_S_local_word_size]; | |
19121 | ||
19122 | ||
19123 | int _M_word_size; | |
19124 | _Words* _M_word; | |
19125 | ||
19126 | _Words& | |
19127 | _M_grow_words(int __index, bool __iword); | |
19128 | ||
19129 | ||
19130 | locale _M_ios_locale; | |
19131 | ||
19132 | void | |
19133 | _M_init(); | |
19134 | ||
19135 | public: | |
19136 | ||
19137 | ||
19138 | ||
19139 | ||
19140 | ||
19141 | class Init | |
19142 | { | |
19143 | friend class ios_base; | |
19144 | public: | |
19145 | Init(); | |
19146 | ~Init(); | |
19147 | ||
19148 | private: | |
19149 | static _Atomic_word _S_refcount; | |
19150 | static bool _S_synced_with_stdio; | |
19151 | }; | |
19152 | ||
19153 | ||
19154 | ||
19155 | ||
19156 | ||
19157 | ||
19158 | inline fmtflags | |
19159 | flags() const { return _M_flags; } | |
19160 | # 557 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19161 | inline fmtflags | |
19162 | flags(fmtflags __fmtfl) | |
19163 | { | |
19164 | fmtflags __old = _M_flags; | |
19165 | _M_flags = __fmtfl; | |
19166 | return __old; | |
19167 | } | |
19168 | # 573 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19169 | inline fmtflags | |
19170 | setf(fmtflags __fmtfl) | |
19171 | { | |
19172 | fmtflags __old = _M_flags; | |
19173 | _M_flags |= __fmtfl; | |
19174 | return __old; | |
19175 | } | |
19176 | # 590 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19177 | inline fmtflags | |
19178 | setf(fmtflags __fmtfl, fmtflags __mask) | |
19179 | { | |
19180 | fmtflags __old = _M_flags; | |
19181 | _M_flags &= ~__mask; | |
19182 | _M_flags |= (__fmtfl & __mask); | |
19183 | return __old; | |
19184 | } | |
19185 | ||
19186 | ||
19187 | ||
19188 | ||
19189 | ||
19190 | ||
19191 | ||
19192 | inline void | |
19193 | unsetf(fmtflags __mask) { _M_flags &= ~__mask; } | |
19194 | # 617 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19195 | inline streamsize | |
19196 | precision() const { return _M_precision; } | |
19197 | ||
19198 | ||
19199 | ||
19200 | ||
19201 | ||
19202 | ||
19203 | inline streamsize | |
19204 | precision(streamsize __prec) | |
19205 | { | |
19206 | streamsize __old = _M_precision; | |
19207 | _M_precision = __prec; | |
19208 | return __old; | |
19209 | } | |
19210 | ||
19211 | ||
19212 | ||
19213 | ||
19214 | ||
19215 | ||
19216 | ||
19217 | inline streamsize | |
19218 | width() const { return _M_width; } | |
19219 | ||
19220 | ||
19221 | ||
19222 | ||
19223 | ||
19224 | ||
19225 | inline streamsize | |
19226 | width(streamsize __wide) | |
19227 | { | |
19228 | streamsize __old = _M_width; | |
19229 | _M_width = __wide; | |
19230 | return __old; | |
19231 | } | |
19232 | # 666 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19233 | static bool | |
19234 | sync_with_stdio(bool __sync = true); | |
19235 | # 678 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19236 | locale | |
19237 | imbue(const locale& __loc); | |
19238 | # 689 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19239 | inline locale | |
19240 | getloc() const { return _M_ios_locale; } | |
19241 | # 699 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19242 | inline const locale& | |
19243 | _M_getloc() const { return _M_ios_locale; } | |
19244 | # 717 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19245 | static int | |
19246 | xalloc() throw(); | |
19247 | # 733 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19248 | inline long& | |
19249 | iword(int __ix) | |
19250 | { | |
19251 | _Words& __word = (__ix < _M_word_size) | |
19252 | ? _M_word[__ix] : _M_grow_words(__ix, true); | |
19253 | return __word._M_iword; | |
19254 | } | |
19255 | # 754 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19256 | inline void*& | |
19257 | pword(int __ix) | |
19258 | { | |
19259 | _Words& __word = (__ix < _M_word_size) | |
19260 | ? _M_word[__ix] : _M_grow_words(__ix, false); | |
19261 | return __word._M_pword; | |
19262 | } | |
19263 | # 771 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ios_base.h" 3 | |
19264 | virtual ~ios_base(); | |
19265 | ||
19266 | protected: | |
19267 | ios_base(); | |
19268 | ||
19269 | ||
19270 | ||
19271 | private: | |
19272 | ios_base(const ios_base&); | |
19273 | ||
19274 | ios_base& | |
19275 | operator=(const ios_base&); | |
19276 | }; | |
19277 | ||
19278 | ||
19279 | ||
19280 | inline ios_base& | |
19281 | boolalpha(ios_base& __base) | |
19282 | { | |
19283 | __base.setf(ios_base::boolalpha); | |
19284 | return __base; | |
19285 | } | |
19286 | ||
19287 | ||
19288 | inline ios_base& | |
19289 | noboolalpha(ios_base& __base) | |
19290 | { | |
19291 | __base.unsetf(ios_base::boolalpha); | |
19292 | return __base; | |
19293 | } | |
19294 | ||
19295 | ||
19296 | inline ios_base& | |
19297 | showbase(ios_base& __base) | |
19298 | { | |
19299 | __base.setf(ios_base::showbase); | |
19300 | return __base; | |
19301 | } | |
19302 | ||
19303 | ||
19304 | inline ios_base& | |
19305 | noshowbase(ios_base& __base) | |
19306 | { | |
19307 | __base.unsetf(ios_base::showbase); | |
19308 | return __base; | |
19309 | } | |
19310 | ||
19311 | ||
19312 | inline ios_base& | |
19313 | showpoint(ios_base& __base) | |
19314 | { | |
19315 | __base.setf(ios_base::showpoint); | |
19316 | return __base; | |
19317 | } | |
19318 | ||
19319 | ||
19320 | inline ios_base& | |
19321 | noshowpoint(ios_base& __base) | |
19322 | { | |
19323 | __base.unsetf(ios_base::showpoint); | |
19324 | return __base; | |
19325 | } | |
19326 | ||
19327 | ||
19328 | inline ios_base& | |
19329 | showpos(ios_base& __base) | |
19330 | { | |
19331 | __base.setf(ios_base::showpos); | |
19332 | return __base; | |
19333 | } | |
19334 | ||
19335 | ||
19336 | inline ios_base& | |
19337 | noshowpos(ios_base& __base) | |
19338 | { | |
19339 | __base.unsetf(ios_base::showpos); | |
19340 | return __base; | |
19341 | } | |
19342 | ||
19343 | ||
19344 | inline ios_base& | |
19345 | skipws(ios_base& __base) | |
19346 | { | |
19347 | __base.setf(ios_base::skipws); | |
19348 | return __base; | |
19349 | } | |
19350 | ||
19351 | ||
19352 | inline ios_base& | |
19353 | noskipws(ios_base& __base) | |
19354 | { | |
19355 | __base.unsetf(ios_base::skipws); | |
19356 | return __base; | |
19357 | } | |
19358 | ||
19359 | ||
19360 | inline ios_base& | |
19361 | uppercase(ios_base& __base) | |
19362 | { | |
19363 | __base.setf(ios_base::uppercase); | |
19364 | return __base; | |
19365 | } | |
19366 | ||
19367 | ||
19368 | inline ios_base& | |
19369 | nouppercase(ios_base& __base) | |
19370 | { | |
19371 | __base.unsetf(ios_base::uppercase); | |
19372 | return __base; | |
19373 | } | |
19374 | ||
19375 | ||
19376 | inline ios_base& | |
19377 | unitbuf(ios_base& __base) | |
19378 | { | |
19379 | __base.setf(ios_base::unitbuf); | |
19380 | return __base; | |
19381 | } | |
19382 | ||
19383 | ||
19384 | inline ios_base& | |
19385 | nounitbuf(ios_base& __base) | |
19386 | { | |
19387 | __base.unsetf(ios_base::unitbuf); | |
19388 | return __base; | |
19389 | } | |
19390 | ||
19391 | ||
19392 | ||
19393 | inline ios_base& | |
19394 | internal(ios_base& __base) | |
19395 | { | |
19396 | __base.setf(ios_base::internal, ios_base::adjustfield); | |
19397 | return __base; | |
19398 | } | |
19399 | ||
19400 | ||
19401 | inline ios_base& | |
19402 | left(ios_base& __base) | |
19403 | { | |
19404 | __base.setf(ios_base::left, ios_base::adjustfield); | |
19405 | return __base; | |
19406 | } | |
19407 | ||
19408 | ||
19409 | inline ios_base& | |
19410 | right(ios_base& __base) | |
19411 | { | |
19412 | __base.setf(ios_base::right, ios_base::adjustfield); | |
19413 | return __base; | |
19414 | } | |
19415 | ||
19416 | ||
19417 | ||
19418 | inline ios_base& | |
19419 | dec(ios_base& __base) | |
19420 | { | |
19421 | __base.setf(ios_base::dec, ios_base::basefield); | |
19422 | return __base; | |
19423 | } | |
19424 | ||
19425 | ||
19426 | inline ios_base& | |
19427 | hex(ios_base& __base) | |
19428 | { | |
19429 | __base.setf(ios_base::hex, ios_base::basefield); | |
19430 | return __base; | |
19431 | } | |
19432 | ||
19433 | ||
19434 | inline ios_base& | |
19435 | oct(ios_base& __base) | |
19436 | { | |
19437 | __base.setf(ios_base::oct, ios_base::basefield); | |
19438 | return __base; | |
19439 | } | |
19440 | ||
19441 | ||
19442 | ||
19443 | inline ios_base& | |
19444 | fixed(ios_base& __base) | |
19445 | { | |
19446 | __base.setf(ios_base::fixed, ios_base::floatfield); | |
19447 | return __base; | |
19448 | } | |
19449 | ||
19450 | ||
19451 | inline ios_base& | |
19452 | scientific(ios_base& __base) | |
19453 | { | |
19454 | __base.setf(ios_base::scientific, ios_base::floatfield); | |
19455 | return __base; | |
19456 | } | |
19457 | } | |
19458 | # 49 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
19459 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 1 3 | |
19460 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19461 | ||
19462 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19463 | ||
19464 | ||
19465 | ||
19466 | ||
19467 | ||
19468 | ||
19469 | namespace std | |
19470 | { | |
19471 | ||
19472 | ||
19473 | ||
19474 | ||
19475 | ||
19476 | template<typename _CharT, typename _Traits> | |
19477 | streamsize | |
19478 | __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, | |
19479 | basic_streambuf<_CharT, _Traits>* __sbout); | |
19480 | # 121 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19481 | template<typename _CharT, typename _Traits> | |
19482 | class basic_streambuf | |
19483 | { | |
19484 | public: | |
19485 | ||
19486 | ||
19487 | ||
19488 | ||
19489 | ||
19490 | ||
19491 | typedef _CharT char_type; | |
19492 | typedef _Traits traits_type; | |
19493 | typedef typename traits_type::int_type int_type; | |
19494 | typedef typename traits_type::pos_type pos_type; | |
19495 | typedef typename traits_type::off_type off_type; | |
19496 | # 144 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19497 | typedef basic_streambuf<char_type, traits_type> __streambuf_type; | |
19498 | ||
19499 | ||
19500 | friend class basic_ios<char_type, traits_type>; | |
19501 | friend class basic_istream<char_type, traits_type>; | |
19502 | friend class basic_ostream<char_type, traits_type>; | |
19503 | friend class istreambuf_iterator<char_type, traits_type>; | |
19504 | friend class ostreambuf_iterator<char_type, traits_type>; | |
19505 | ||
19506 | friend streamsize | |
19507 | __copy_streambufs<>(__streambuf_type* __sbin, | |
19508 | __streambuf_type* __sbout); | |
19509 | ||
19510 | template<typename _CharT2, typename _Traits2> | |
19511 | friend basic_istream<_CharT2, _Traits2>& | |
19512 | operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); | |
19513 | ||
19514 | template<typename _CharT2, typename _Traits2, typename _Alloc> | |
19515 | friend basic_istream<_CharT2, _Traits2>& | |
19516 | operator>>(basic_istream<_CharT2, _Traits2>&, | |
19517 | basic_string<_CharT2, _Traits2, _Alloc>&); | |
19518 | ||
19519 | template<typename _CharT2, typename _Traits2, typename _Alloc> | |
19520 | friend basic_istream<_CharT2, _Traits2>& | |
19521 | getline(basic_istream<_CharT2, _Traits2>&, | |
19522 | basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); | |
19523 | ||
19524 | protected: | |
19525 | # 182 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19526 | char_type* _M_in_beg; | |
19527 | char_type* _M_in_cur; | |
19528 | char_type* _M_in_end; | |
19529 | char_type* _M_out_beg; | |
19530 | char_type* _M_out_cur; | |
19531 | char_type* _M_out_end; | |
19532 | ||
19533 | ||
19534 | ||
19535 | ||
19536 | ||
19537 | ||
19538 | locale _M_buf_locale; | |
19539 | ||
19540 | public: | |
19541 | ||
19542 | virtual | |
19543 | ~basic_streambuf() | |
19544 | { } | |
19545 | # 210 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19546 | locale | |
19547 | pubimbue(const locale &__loc) | |
19548 | { | |
19549 | locale __tmp(this->getloc()); | |
19550 | this->imbue(__loc); | |
19551 | _M_buf_locale = __loc; | |
19552 | return __tmp; | |
19553 | } | |
19554 | # 227 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19555 | locale | |
19556 | getloc() const | |
19557 | { return _M_buf_locale; } | |
19558 | # 240 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19559 | __streambuf_type* | |
19560 | pubsetbuf(char_type* __s, streamsize __n) | |
19561 | { return this->setbuf(__s, __n); } | |
19562 | ||
19563 | pos_type | |
19564 | pubseekoff(off_type __off, ios_base::seekdir __way, | |
19565 | ios_base::openmode __mode = ios_base::in | ios_base::out) | |
19566 | { return this->seekoff(__off, __way, __mode); } | |
19567 | ||
19568 | pos_type | |
19569 | pubseekpos(pos_type __sp, | |
19570 | ios_base::openmode __mode = ios_base::in | ios_base::out) | |
19571 | { return this->seekpos(__sp, __mode); } | |
19572 | ||
19573 | int | |
19574 | pubsync() { return this->sync(); } | |
19575 | # 267 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19576 | streamsize | |
19577 | in_avail() | |
19578 | { | |
19579 | const streamsize __ret = this->egptr() - this->gptr(); | |
19580 | return __ret ? __ret : this->showmanyc(); | |
19581 | } | |
19582 | # 281 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19583 | int_type | |
19584 | snextc() | |
19585 | { | |
19586 | int_type __ret = traits_type::eof(); | |
19587 | if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), | |
19588 | __ret), true)) | |
19589 | __ret = this->sgetc(); | |
19590 | return __ret; | |
19591 | } | |
19592 | # 299 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19593 | int_type | |
19594 | sbumpc() | |
19595 | { | |
19596 | int_type __ret; | |
19597 | if (__builtin_expect(this->gptr() < this->egptr(), true)) | |
19598 | { | |
19599 | __ret = traits_type::to_int_type(*this->gptr()); | |
19600 | this->gbump(1); | |
19601 | } | |
19602 | else | |
19603 | __ret = this->uflow(); | |
19604 | return __ret; | |
19605 | } | |
19606 | # 321 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19607 | int_type | |
19608 | sgetc() | |
19609 | { | |
19610 | int_type __ret; | |
19611 | if (__builtin_expect(this->gptr() < this->egptr(), true)) | |
19612 | __ret = traits_type::to_int_type(*this->gptr()); | |
19613 | else | |
19614 | __ret = this->underflow(); | |
19615 | return __ret; | |
19616 | } | |
19617 | # 340 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19618 | streamsize | |
19619 | sgetn(char_type* __s, streamsize __n) | |
19620 | { return this->xsgetn(__s, __n); } | |
19621 | # 354 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19622 | int_type | |
19623 | sputbackc(char_type __c) | |
19624 | { | |
19625 | int_type __ret; | |
19626 | const bool __testpos = this->eback() < this->gptr(); | |
19627 | if (__builtin_expect(!__testpos || | |
19628 | !traits_type::eq(__c, this->gptr()[-1]), false)) | |
19629 | __ret = this->pbackfail(traits_type::to_int_type(__c)); | |
19630 | else | |
19631 | { | |
19632 | this->gbump(-1); | |
19633 | __ret = traits_type::to_int_type(*this->gptr()); | |
19634 | } | |
19635 | return __ret; | |
19636 | } | |
19637 | # 379 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19638 | int_type | |
19639 | sungetc() | |
19640 | { | |
19641 | int_type __ret; | |
19642 | if (__builtin_expect(this->eback() < this->gptr(), true)) | |
19643 | { | |
19644 | this->gbump(-1); | |
19645 | __ret = traits_type::to_int_type(*this->gptr()); | |
19646 | } | |
19647 | else | |
19648 | __ret = this->pbackfail(); | |
19649 | return __ret; | |
19650 | } | |
19651 | # 406 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19652 | int_type | |
19653 | sputc(char_type __c) | |
19654 | { | |
19655 | int_type __ret; | |
19656 | if (__builtin_expect(this->pptr() < this->epptr(), true)) | |
19657 | { | |
19658 | *this->pptr() = __c; | |
19659 | this->pbump(1); | |
19660 | __ret = traits_type::to_int_type(__c); | |
19661 | } | |
19662 | else | |
19663 | __ret = this->overflow(traits_type::to_int_type(__c)); | |
19664 | return __ret; | |
19665 | } | |
19666 | # 432 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19667 | streamsize | |
19668 | sputn(const char_type* __s, streamsize __n) | |
19669 | { return this->xsputn(__s, __n); } | |
19670 | ||
19671 | protected: | |
19672 | # 446 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19673 | basic_streambuf() | |
19674 | : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), | |
19675 | _M_out_beg(0), _M_out_cur(0), _M_out_end(0), | |
19676 | _M_buf_locale(locale()) | |
19677 | { } | |
19678 | # 464 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19679 | char_type* | |
19680 | eback() const { return _M_in_beg; } | |
19681 | ||
19682 | char_type* | |
19683 | gptr() const { return _M_in_cur; } | |
19684 | ||
19685 | char_type* | |
19686 | egptr() const { return _M_in_end; } | |
19687 | # 480 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19688 | void | |
19689 | gbump(int __n) { _M_in_cur += __n; } | |
19690 | # 491 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19691 | void | |
19692 | setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) | |
19693 | { | |
19694 | _M_in_beg = __gbeg; | |
19695 | _M_in_cur = __gnext; | |
19696 | _M_in_end = __gend; | |
19697 | } | |
19698 | # 511 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19699 | char_type* | |
19700 | pbase() const { return _M_out_beg; } | |
19701 | ||
19702 | char_type* | |
19703 | pptr() const { return _M_out_cur; } | |
19704 | ||
19705 | char_type* | |
19706 | epptr() const { return _M_out_end; } | |
19707 | # 527 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19708 | void | |
19709 | pbump(int __n) { _M_out_cur += __n; } | |
19710 | # 537 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19711 | void | |
19712 | setp(char_type* __pbeg, char_type* __pend) | |
19713 | { | |
19714 | _M_out_beg = _M_out_cur = __pbeg; | |
19715 | _M_out_end = __pend; | |
19716 | } | |
19717 | # 558 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19718 | virtual void | |
19719 | imbue(const locale&) | |
19720 | { } | |
19721 | # 573 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19722 | virtual basic_streambuf<char_type,_Traits>* | |
19723 | setbuf(char_type*, streamsize) | |
19724 | { return this; } | |
19725 | # 584 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19726 | virtual pos_type | |
19727 | seekoff(off_type, ios_base::seekdir, | |
19728 | ios_base::openmode = ios_base::in | ios_base::out) | |
19729 | { return pos_type(off_type(-1)); } | |
19730 | # 596 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19731 | virtual pos_type | |
19732 | seekpos(pos_type, | |
19733 | ios_base::openmode = ios_base::in | ios_base::out) | |
19734 | { return pos_type(off_type(-1)); } | |
19735 | # 609 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19736 | virtual int | |
19737 | sync() { return 0; } | |
19738 | # 631 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19739 | virtual streamsize | |
19740 | showmanyc() { return 0; } | |
19741 | # 647 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19742 | virtual streamsize | |
19743 | xsgetn(char_type* __s, streamsize __n); | |
19744 | # 669 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19745 | virtual int_type | |
19746 | underflow() | |
19747 | { return traits_type::eof(); } | |
19748 | # 682 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19749 | virtual int_type | |
19750 | uflow() | |
19751 | { | |
19752 | int_type __ret = traits_type::eof(); | |
19753 | const bool __testeof = traits_type::eq_int_type(this->underflow(), | |
19754 | __ret); | |
19755 | if (!__testeof) | |
19756 | { | |
19757 | __ret = traits_type::to_int_type(*this->gptr()); | |
19758 | this->gbump(1); | |
19759 | } | |
19760 | return __ret; | |
19761 | } | |
19762 | # 706 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19763 | virtual int_type | |
19764 | pbackfail(int_type = traits_type::eof()) | |
19765 | { return traits_type::eof(); } | |
19766 | # 724 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19767 | virtual streamsize | |
19768 | xsputn(const char_type* __s, streamsize __n); | |
19769 | # 749 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19770 | virtual int_type | |
19771 | overflow(int_type = traits_type::eof()) | |
19772 | { return traits_type::eof(); } | |
19773 | # 778 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 3 | |
19774 | private: | |
19775 | ||
19776 | ||
19777 | basic_streambuf(const __streambuf_type& __sb) | |
19778 | : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), | |
19779 | _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), | |
19780 | _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), | |
19781 | _M_buf_locale(__sb._M_buf_locale) | |
19782 | { } | |
19783 | ||
19784 | __streambuf_type& | |
19785 | operator=(const __streambuf_type&) { return *this; }; | |
19786 | }; | |
19787 | ||
19788 | ||
19789 | template<> | |
19790 | streamsize | |
19791 | __copy_streambufs(basic_streambuf<char>* __sbin, | |
19792 | basic_streambuf<char>* __sbout); | |
19793 | ||
19794 | ||
19795 | ||
19796 | ||
19797 | ||
19798 | ||
19799 | } | |
19800 | ||
19801 | ||
19802 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/streambuf.tcc" 1 3 | |
19803 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/streambuf.tcc" 3 | |
19804 | ||
19805 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/streambuf.tcc" 3 | |
19806 | ||
19807 | namespace std | |
19808 | { | |
19809 | template<typename _CharT, typename _Traits> | |
19810 | streamsize | |
19811 | basic_streambuf<_CharT, _Traits>:: | |
19812 | xsgetn(char_type* __s, streamsize __n) | |
19813 | { | |
19814 | streamsize __ret = 0; | |
19815 | while (__ret < __n) | |
19816 | { | |
19817 | const streamsize __buf_len = this->egptr() - this->gptr(); | |
19818 | if (__buf_len) | |
19819 | { | |
19820 | const streamsize __remaining = __n - __ret; | |
19821 | const streamsize __len = std::min(__buf_len, __remaining); | |
19822 | traits_type::copy(__s, this->gptr(), __len); | |
19823 | __ret += __len; | |
19824 | __s += __len; | |
19825 | this->gbump(__len); | |
19826 | } | |
19827 | ||
19828 | if (__ret < __n) | |
19829 | { | |
19830 | const int_type __c = this->uflow(); | |
19831 | if (!traits_type::eq_int_type(__c, traits_type::eof())) | |
19832 | { | |
19833 | traits_type::assign(*__s++, traits_type::to_char_type(__c)); | |
19834 | ++__ret; | |
19835 | } | |
19836 | else | |
19837 | break; | |
19838 | } | |
19839 | } | |
19840 | return __ret; | |
19841 | } | |
19842 | ||
19843 | template<typename _CharT, typename _Traits> | |
19844 | streamsize | |
19845 | basic_streambuf<_CharT, _Traits>:: | |
19846 | xsputn(const char_type* __s, streamsize __n) | |
19847 | { | |
19848 | streamsize __ret = 0; | |
19849 | while (__ret < __n) | |
19850 | { | |
19851 | const streamsize __buf_len = this->epptr() - this->pptr(); | |
19852 | if (__buf_len) | |
19853 | { | |
19854 | const streamsize __remaining = __n - __ret; | |
19855 | const streamsize __len = std::min(__buf_len, __remaining); | |
19856 | traits_type::copy(this->pptr(), __s, __len); | |
19857 | __ret += __len; | |
19858 | __s += __len; | |
19859 | this->pbump(__len); | |
19860 | } | |
19861 | ||
19862 | if (__ret < __n) | |
19863 | { | |
19864 | int_type __c = this->overflow(traits_type::to_int_type(*__s)); | |
19865 | if (!traits_type::eq_int_type(__c, traits_type::eof())) | |
19866 | { | |
19867 | ++__ret; | |
19868 | ++__s; | |
19869 | } | |
19870 | else | |
19871 | break; | |
19872 | } | |
19873 | } | |
19874 | return __ret; | |
19875 | } | |
19876 | ||
19877 | ||
19878 | ||
19879 | ||
19880 | template<typename _CharT, typename _Traits> | |
19881 | streamsize | |
19882 | __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, | |
19883 | basic_streambuf<_CharT, _Traits>* __sbout) | |
19884 | { | |
19885 | streamsize __ret = 0; | |
19886 | typename _Traits::int_type __c = __sbin->sgetc(); | |
19887 | while (!_Traits::eq_int_type(__c, _Traits::eof())) | |
19888 | { | |
19889 | __c = __sbout->sputc(_Traits::to_char_type(__c)); | |
19890 | if (_Traits::eq_int_type(__c, _Traits::eof())) | |
19891 | break; | |
19892 | ++__ret; | |
19893 | __c = __sbin->snextc(); | |
19894 | } | |
19895 | return __ret; | |
19896 | } | |
19897 | ||
19898 | ||
19899 | ||
19900 | ||
19901 | ||
19902 | extern template class basic_streambuf<char>; | |
19903 | extern template | |
19904 | streamsize | |
19905 | __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*); | |
19906 | # 152 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/streambuf.tcc" 3 | |
19907 | } | |
19908 | # 807 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/streambuf" 2 3 | |
19909 | # 50 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
19910 | ||
19911 | namespace std | |
19912 | { | |
19913 | # 63 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
19914 | template<typename _Tv> | |
19915 | void | |
19916 | __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err, | |
19917 | const __c_locale& __cloc); | |
19918 | ||
19919 | ||
19920 | template<> | |
19921 | void | |
19922 | __convert_to_v(const char*, float&, ios_base::iostate&, | |
19923 | const __c_locale&); | |
19924 | ||
19925 | template<> | |
19926 | void | |
19927 | __convert_to_v(const char*, double&, ios_base::iostate&, | |
19928 | const __c_locale&); | |
19929 | ||
19930 | template<> | |
19931 | void | |
19932 | __convert_to_v(const char*, long double&, ios_base::iostate&, | |
19933 | const __c_locale&); | |
19934 | ||
19935 | ||
19936 | ||
19937 | template<typename _CharT, typename _Traits> | |
19938 | struct __pad | |
19939 | { | |
19940 | static void | |
19941 | _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, | |
19942 | const _CharT* __olds, const streamsize __newlen, | |
19943 | const streamsize __oldlen, const bool __num); | |
19944 | }; | |
19945 | ||
19946 | ||
19947 | ||
19948 | ||
19949 | ||
19950 | ||
19951 | template<typename _CharT> | |
19952 | _CharT* | |
19953 | __add_grouping(_CharT* __s, _CharT __sep, | |
19954 | const char* __gbeg, size_t __gsize, | |
19955 | const _CharT* __first, const _CharT* __last); | |
19956 | ||
19957 | ||
19958 | ||
19959 | ||
19960 | template<typename _CharT> | |
19961 | inline | |
19962 | ostreambuf_iterator<_CharT> | |
19963 | __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) | |
19964 | { | |
19965 | __s._M_put(__ws, __len); | |
19966 | return __s; | |
19967 | } | |
19968 | ||
19969 | ||
19970 | template<typename _CharT, typename _OutIter> | |
19971 | inline | |
19972 | _OutIter | |
19973 | __write(_OutIter __s, const _CharT* __ws, int __len) | |
19974 | { | |
19975 | for (int __j = 0; __j < __len; __j++, ++__s) | |
19976 | *__s = __ws[__j]; | |
19977 | return __s; | |
19978 | } | |
19979 | ||
19980 | ||
19981 | ||
19982 | ||
19983 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/ctype_base.h" 1 3 | |
19984 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/ctype_base.h" 3 | |
19985 | struct ctype_base | |
19986 | { | |
19987 | ||
19988 | ||
19989 | ||
19990 | typedef const __ctype_touplow_t* __to_type; | |
19991 | ||
19992 | ||
19993 | ||
19994 | typedef __ctype_mask_t mask; | |
19995 | static const mask upper = _ISupper; | |
19996 | static const mask lower = _ISlower; | |
19997 | static const mask alpha = _ISalpha; | |
19998 | static const mask digit = _ISdigit; | |
19999 | static const mask xdigit = _ISxdigit; | |
20000 | static const mask space = _ISspace; | |
20001 | static const mask print = _ISprint; | |
20002 | static const mask graph = _ISalpha | _ISdigit | _ISpunct; | |
20003 | static const mask cntrl = _IScntrl; | |
20004 | static const mask punct = _ISpunct; | |
20005 | static const mask alnum = _ISalpha | _ISdigit; | |
20006 | }; | |
20007 | # 133 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
20008 | # 144 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20009 | template<typename _CharT> | |
20010 | class __ctype_abstract_base : public locale::facet, public ctype_base | |
20011 | { | |
20012 | public: | |
20013 | ||
20014 | ||
20015 | typedef _CharT char_type; | |
20016 | # 162 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20017 | bool | |
20018 | is(mask __m, char_type __c) const | |
20019 | { return this->do_is(__m, __c); } | |
20020 | # 179 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20021 | const char_type* | |
20022 | is(const char_type *__lo, const char_type *__hi, mask *__vec) const | |
20023 | { return this->do_is(__lo, __hi, __vec); } | |
20024 | # 195 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20025 | const char_type* | |
20026 | scan_is(mask __m, const char_type* __lo, const char_type* __hi) const | |
20027 | { return this->do_scan_is(__m, __lo, __hi); } | |
20028 | # 211 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20029 | const char_type* | |
20030 | scan_not(mask __m, const char_type* __lo, const char_type* __hi) const | |
20031 | { return this->do_scan_not(__m, __lo, __hi); } | |
20032 | # 225 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20033 | char_type | |
20034 | toupper(char_type __c) const | |
20035 | { return this->do_toupper(__c); } | |
20036 | # 240 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20037 | const char_type* | |
20038 | toupper(char_type *__lo, const char_type* __hi) const | |
20039 | { return this->do_toupper(__lo, __hi); } | |
20040 | # 254 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20041 | char_type | |
20042 | tolower(char_type __c) const | |
20043 | { return this->do_tolower(__c); } | |
20044 | # 269 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20045 | const char_type* | |
20046 | tolower(char_type* __lo, const char_type* __hi) const | |
20047 | { return this->do_tolower(__lo, __hi); } | |
20048 | # 286 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20049 | char_type | |
20050 | widen(char __c) const | |
20051 | { return this->do_widen(__c); } | |
20052 | # 305 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20053 | const char* | |
20054 | widen(const char* __lo, const char* __hi, char_type* __to) const | |
20055 | { return this->do_widen(__lo, __hi, __to); } | |
20056 | # 324 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20057 | char | |
20058 | narrow(char_type __c, char __dfault) const | |
20059 | { return this->do_narrow(__c, __dfault); } | |
20060 | # 346 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20061 | const char_type* | |
20062 | narrow(const char_type* __lo, const char_type* __hi, | |
20063 | char __dfault, char *__to) const | |
20064 | { return this->do_narrow(__lo, __hi, __dfault, __to); } | |
20065 | ||
20066 | protected: | |
20067 | explicit | |
20068 | __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } | |
20069 | ||
20070 | virtual | |
20071 | ~__ctype_abstract_base() { } | |
20072 | # 371 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20073 | virtual bool | |
20074 | do_is(mask __m, char_type __c) const = 0; | |
20075 | # 390 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20076 | virtual const char_type* | |
20077 | do_is(const char_type* __lo, const char_type* __hi, | |
20078 | mask* __vec) const = 0; | |
20079 | # 409 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20080 | virtual const char_type* | |
20081 | do_scan_is(mask __m, const char_type* __lo, | |
20082 | const char_type* __hi) const = 0; | |
20083 | # 428 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20084 | virtual const char_type* | |
20085 | do_scan_not(mask __m, const char_type* __lo, | |
20086 | const char_type* __hi) const = 0; | |
20087 | # 446 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20088 | virtual char_type | |
20089 | do_toupper(char_type) const = 0; | |
20090 | # 463 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20091 | virtual const char_type* | |
20092 | do_toupper(char_type* __lo, const char_type* __hi) const = 0; | |
20093 | # 479 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20094 | virtual char_type | |
20095 | do_tolower(char_type) const = 0; | |
20096 | # 496 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20097 | virtual const char_type* | |
20098 | do_tolower(char_type* __lo, const char_type* __hi) const = 0; | |
20099 | # 515 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20100 | virtual char_type | |
20101 | do_widen(char) const = 0; | |
20102 | # 536 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20103 | virtual const char* | |
20104 | do_widen(const char* __lo, const char* __hi, | |
20105 | char_type* __dest) const = 0; | |
20106 | # 558 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20107 | virtual char | |
20108 | do_narrow(char_type, char __dfault) const = 0; | |
20109 | # 582 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20110 | virtual const char_type* | |
20111 | do_narrow(const char_type* __lo, const char_type* __hi, | |
20112 | char __dfault, char* __dest) const = 0; | |
20113 | }; | |
20114 | # 605 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20115 | template<typename _CharT> | |
20116 | class ctype : public __ctype_abstract_base<_CharT> | |
20117 | { | |
20118 | public: | |
20119 | ||
20120 | typedef _CharT char_type; | |
20121 | typedef typename __ctype_abstract_base<_CharT>::mask mask; | |
20122 | ||
20123 | ||
20124 | static locale::id id; | |
20125 | ||
20126 | explicit | |
20127 | ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } | |
20128 | ||
20129 | protected: | |
20130 | virtual | |
20131 | ~ctype(); | |
20132 | ||
20133 | virtual bool | |
20134 | do_is(mask __m, char_type __c) const; | |
20135 | ||
20136 | virtual const char_type* | |
20137 | do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; | |
20138 | ||
20139 | virtual const char_type* | |
20140 | do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; | |
20141 | ||
20142 | virtual const char_type* | |
20143 | do_scan_not(mask __m, const char_type* __lo, | |
20144 | const char_type* __hi) const; | |
20145 | ||
20146 | virtual char_type | |
20147 | do_toupper(char_type __c) const; | |
20148 | ||
20149 | virtual const char_type* | |
20150 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
20151 | ||
20152 | virtual char_type | |
20153 | do_tolower(char_type __c) const; | |
20154 | ||
20155 | virtual const char_type* | |
20156 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
20157 | ||
20158 | virtual char_type | |
20159 | do_widen(char __c) const; | |
20160 | ||
20161 | virtual const char* | |
20162 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const; | |
20163 | ||
20164 | virtual char | |
20165 | do_narrow(char_type, char __dfault) const; | |
20166 | ||
20167 | virtual const char_type* | |
20168 | do_narrow(const char_type* __lo, const char_type* __hi, | |
20169 | char __dfault, char* __dest) const; | |
20170 | }; | |
20171 | ||
20172 | template<typename _CharT> | |
20173 | locale::id ctype<_CharT>::id; | |
20174 | # 674 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20175 | template<> | |
20176 | class ctype<char> : public locale::facet, public ctype_base | |
20177 | { | |
20178 | public: | |
20179 | ||
20180 | ||
20181 | typedef char char_type; | |
20182 | ||
20183 | protected: | |
20184 | ||
20185 | __c_locale _M_c_locale_ctype; | |
20186 | bool _M_del; | |
20187 | __to_type _M_toupper; | |
20188 | __to_type _M_tolower; | |
20189 | const mask* _M_table; | |
20190 | mutable char _M_widen_ok; | |
20191 | mutable char _M_widen[1 + static_cast<unsigned char>(-1)]; | |
20192 | mutable char _M_narrow[1 + static_cast<unsigned char>(-1)]; | |
20193 | mutable char _M_narrow_ok; | |
20194 | ||
20195 | ||
20196 | public: | |
20197 | ||
20198 | static locale::id id; | |
20199 | ||
20200 | static const size_t table_size = 1 + static_cast<unsigned char>(-1); | |
20201 | # 711 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20202 | explicit | |
20203 | ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); | |
20204 | # 724 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20205 | explicit | |
20206 | ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, | |
20207 | size_t __refs = 0); | |
20208 | # 737 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20209 | inline bool | |
20210 | is(mask __m, char __c) const; | |
20211 | # 752 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20212 | inline const char* | |
20213 | is(const char* __lo, const char* __hi, mask* __vec) const; | |
20214 | # 766 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20215 | inline const char* | |
20216 | scan_is(mask __m, const char* __lo, const char* __hi) const; | |
20217 | # 780 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20218 | inline const char* | |
20219 | scan_not(mask __m, const char* __lo, const char* __hi) const; | |
20220 | # 795 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20221 | char_type | |
20222 | toupper(char_type __c) const | |
20223 | { return this->do_toupper(__c); } | |
20224 | # 812 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20225 | const char_type* | |
20226 | toupper(char_type *__lo, const char_type* __hi) const | |
20227 | { return this->do_toupper(__lo, __hi); } | |
20228 | # 828 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20229 | char_type | |
20230 | tolower(char_type __c) const | |
20231 | { return this->do_tolower(__c); } | |
20232 | # 845 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20233 | const char_type* | |
20234 | tolower(char_type* __lo, const char_type* __hi) const | |
20235 | { return this->do_tolower(__lo, __hi); } | |
20236 | # 865 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20237 | char_type | |
20238 | widen(char __c) const | |
20239 | { | |
20240 | if (_M_widen_ok) | |
20241 | return _M_widen[static_cast<unsigned char>(__c)]; | |
20242 | this->_M_widen_init(); | |
20243 | return this->do_widen(__c); | |
20244 | } | |
20245 | # 892 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20246 | const char* | |
20247 | widen(const char* __lo, const char* __hi, char_type* __to) const | |
20248 | { | |
20249 | if (_M_widen_ok == 1) | |
20250 | { | |
20251 | memcpy(__to, __lo, __hi - __lo); | |
20252 | return __hi; | |
20253 | } | |
20254 | if (!_M_widen_ok) | |
20255 | _M_widen_init(); | |
20256 | return this->do_widen(__lo, __hi, __to); | |
20257 | } | |
20258 | # 923 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20259 | char | |
20260 | narrow(char_type __c, char __dfault) const | |
20261 | { | |
20262 | if (_M_narrow[static_cast<unsigned char>(__c)]) | |
20263 | return _M_narrow[static_cast<unsigned char>(__c)]; | |
20264 | const char __t = do_narrow(__c, __dfault); | |
20265 | if (__t != __dfault) | |
20266 | _M_narrow[static_cast<unsigned char>(__c)] = __t; | |
20267 | return __t; | |
20268 | } | |
20269 | # 956 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20270 | const char_type* | |
20271 | narrow(const char_type* __lo, const char_type* __hi, | |
20272 | char __dfault, char *__to) const | |
20273 | { | |
20274 | if (__builtin_expect(_M_narrow_ok == 1, true)) | |
20275 | { | |
20276 | memcpy(__to, __lo, __hi - __lo); | |
20277 | return __hi; | |
20278 | } | |
20279 | if (!_M_narrow_ok) | |
20280 | _M_narrow_init(); | |
20281 | return this->do_narrow(__lo, __hi, __dfault, __to); | |
20282 | } | |
20283 | ||
20284 | protected: | |
20285 | ||
20286 | ||
20287 | const mask* | |
20288 | table() const throw() | |
20289 | { return _M_table; } | |
20290 | ||
20291 | ||
20292 | static const mask* | |
20293 | classic_table() throw(); | |
20294 | ||
20295 | ||
20296 | ||
20297 | ||
20298 | ||
20299 | ||
20300 | ||
20301 | virtual | |
20302 | ~ctype(); | |
20303 | # 1003 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20304 | virtual char_type | |
20305 | do_toupper(char_type) const; | |
20306 | # 1020 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20307 | virtual const char_type* | |
20308 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
20309 | # 1036 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20310 | virtual char_type | |
20311 | do_tolower(char_type) const; | |
20312 | # 1053 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20313 | virtual const char_type* | |
20314 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
20315 | # 1073 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20316 | virtual char_type | |
20317 | do_widen(char __c) const | |
20318 | { return __c; } | |
20319 | # 1096 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20320 | virtual const char* | |
20321 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const | |
20322 | { | |
20323 | memcpy(__dest, __lo, __hi - __lo); | |
20324 | return __hi; | |
20325 | } | |
20326 | # 1122 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20327 | virtual char | |
20328 | do_narrow(char_type __c, char) const | |
20329 | { return __c; } | |
20330 | # 1148 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20331 | virtual const char_type* | |
20332 | do_narrow(const char_type* __lo, const char_type* __hi, | |
20333 | char, char* __dest) const | |
20334 | { | |
20335 | memcpy(__dest, __lo, __hi - __lo); | |
20336 | return __hi; | |
20337 | } | |
20338 | ||
20339 | private: | |
20340 | ||
20341 | void _M_widen_init() const | |
20342 | { | |
20343 | char __tmp[sizeof(_M_widen)]; | |
20344 | for (size_t __i = 0; __i < sizeof(_M_widen); ++__i) | |
20345 | __tmp[__i] = __i; | |
20346 | do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); | |
20347 | ||
20348 | _M_widen_ok = 1; | |
20349 | ||
20350 | if (memcmp(__tmp, _M_widen, sizeof(_M_widen))) | |
20351 | _M_widen_ok = 2; | |
20352 | } | |
20353 | ||
20354 | ||
20355 | ||
20356 | ||
20357 | void _M_narrow_init() const | |
20358 | { | |
20359 | char __tmp[sizeof(_M_narrow)]; | |
20360 | for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i) | |
20361 | __tmp[__i] = __i; | |
20362 | do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow); | |
20363 | ||
20364 | _M_narrow_ok = 1; | |
20365 | if (memcmp(__tmp, _M_narrow, sizeof(_M_narrow))) | |
20366 | _M_narrow_ok = 2; | |
20367 | else | |
20368 | { | |
20369 | ||
20370 | ||
20371 | char __c; | |
20372 | do_narrow(__tmp, __tmp + 1, 1, &__c); | |
20373 | if (__c == 1) | |
20374 | _M_narrow_ok = 2; | |
20375 | } | |
20376 | } | |
20377 | }; | |
20378 | ||
20379 | template<> | |
20380 | const ctype<char>& | |
20381 | use_facet<ctype<char> >(const locale& __loc); | |
20382 | # 1508 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20383 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/ctype_inline.h" 1 3 | |
20384 | # 37 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/ctype_inline.h" 3 | |
20385 | bool | |
20386 | ctype<char>:: | |
20387 | is(mask __m, char __c) const | |
20388 | { return _M_table[static_cast<unsigned char>(__c)] & __m; } | |
20389 | ||
20390 | const char* | |
20391 | ctype<char>:: | |
20392 | is(const char* __low, const char* __high, mask* __vec) const | |
20393 | { | |
20394 | while (__low < __high) | |
20395 | *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; | |
20396 | return __high; | |
20397 | } | |
20398 | ||
20399 | const char* | |
20400 | ctype<char>:: | |
20401 | scan_is(mask __m, const char* __low, const char* __high) const | |
20402 | { | |
20403 | while (__low < __high | |
20404 | && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) | |
20405 | ++__low; | |
20406 | return __low; | |
20407 | } | |
20408 | ||
20409 | const char* | |
20410 | ctype<char>:: | |
20411 | scan_not(mask __m, const char* __low, const char* __high) const | |
20412 | { | |
20413 | while (__low < __high | |
20414 | && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) | |
20415 | ++__low; | |
20416 | return __low; | |
20417 | } | |
20418 | # 1509 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
20419 | ||
20420 | ||
20421 | template<typename _CharT> | |
20422 | class ctype_byname : public ctype<_CharT> | |
20423 | { | |
20424 | public: | |
20425 | typedef _CharT char_type; | |
20426 | ||
20427 | explicit | |
20428 | ctype_byname(const char* __s, size_t __refs = 0); | |
20429 | ||
20430 | protected: | |
20431 | virtual | |
20432 | ~ctype_byname() { }; | |
20433 | }; | |
20434 | ||
20435 | ||
20436 | template<> | |
20437 | ctype_byname<char>::ctype_byname(const char*, size_t refs); | |
20438 | ||
20439 | template<> | |
20440 | ctype_byname<wchar_t>::ctype_byname(const char*, size_t refs); | |
20441 | ||
20442 | ||
20443 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 1 3 | |
20444 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20445 | ||
20446 | # 46 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20447 | ||
20448 | ||
20449 | class codecvt_base | |
20450 | { | |
20451 | public: | |
20452 | enum result | |
20453 | { | |
20454 | ok, | |
20455 | partial, | |
20456 | error, | |
20457 | noconv | |
20458 | }; | |
20459 | }; | |
20460 | # 69 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20461 | template<typename _InternT, typename _ExternT, typename _StateT> | |
20462 | class __codecvt_abstract_base | |
20463 | : public locale::facet, public codecvt_base | |
20464 | { | |
20465 | public: | |
20466 | ||
20467 | typedef codecvt_base::result result; | |
20468 | typedef _InternT intern_type; | |
20469 | typedef _ExternT extern_type; | |
20470 | typedef _StateT state_type; | |
20471 | # 117 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20472 | result | |
20473 | out(state_type& __state, const intern_type* __from, | |
20474 | const intern_type* __from_end, const intern_type*& __from_next, | |
20475 | extern_type* __to, extern_type* __to_end, | |
20476 | extern_type*& __to_next) const | |
20477 | { | |
20478 | return this->do_out(__state, __from, __from_end, __from_next, | |
20479 | __to, __to_end, __to_next); | |
20480 | } | |
20481 | # 156 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20482 | result | |
20483 | unshift(state_type& __state, extern_type* __to, extern_type* __to_end, | |
20484 | extern_type*& __to_next) const | |
20485 | { return this->do_unshift(__state, __to,__to_end,__to_next); } | |
20486 | # 197 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20487 | result | |
20488 | in(state_type& __state, const extern_type* __from, | |
20489 | const extern_type* __from_end, const extern_type*& __from_next, | |
20490 | intern_type* __to, intern_type* __to_end, | |
20491 | intern_type*& __to_next) const | |
20492 | { | |
20493 | return this->do_in(__state, __from, __from_end, __from_next, | |
20494 | __to, __to_end, __to_next); | |
20495 | } | |
20496 | ||
20497 | int | |
20498 | encoding() const throw() | |
20499 | { return this->do_encoding(); } | |
20500 | ||
20501 | bool | |
20502 | always_noconv() const throw() | |
20503 | { return this->do_always_noconv(); } | |
20504 | ||
20505 | int | |
20506 | length(state_type& __state, const extern_type* __from, | |
20507 | const extern_type* __end, size_t __max) const | |
20508 | { return this->do_length(__state, __from, __end, __max); } | |
20509 | ||
20510 | int | |
20511 | max_length() const throw() | |
20512 | { return this->do_max_length(); } | |
20513 | ||
20514 | protected: | |
20515 | explicit | |
20516 | __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } | |
20517 | ||
20518 | virtual | |
20519 | ~__codecvt_abstract_base() { } | |
20520 | # 238 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20521 | virtual result | |
20522 | do_out(state_type& __state, const intern_type* __from, | |
20523 | const intern_type* __from_end, const intern_type*& __from_next, | |
20524 | extern_type* __to, extern_type* __to_end, | |
20525 | extern_type*& __to_next) const = 0; | |
20526 | ||
20527 | virtual result | |
20528 | do_unshift(state_type& __state, extern_type* __to, | |
20529 | extern_type* __to_end, extern_type*& __to_next) const = 0; | |
20530 | ||
20531 | virtual result | |
20532 | do_in(state_type& __state, const extern_type* __from, | |
20533 | const extern_type* __from_end, const extern_type*& __from_next, | |
20534 | intern_type* __to, intern_type* __to_end, | |
20535 | intern_type*& __to_next) const = 0; | |
20536 | ||
20537 | virtual int | |
20538 | do_encoding() const throw() = 0; | |
20539 | ||
20540 | virtual bool | |
20541 | do_always_noconv() const throw() = 0; | |
20542 | ||
20543 | virtual int | |
20544 | do_length(state_type&, const extern_type* __from, | |
20545 | const extern_type* __end, size_t __max) const = 0; | |
20546 | ||
20547 | virtual int | |
20548 | do_max_length() const throw() = 0; | |
20549 | }; | |
20550 | ||
20551 | ||
20552 | ||
20553 | template<typename _InternT, typename _ExternT, typename _StateT> | |
20554 | class codecvt | |
20555 | : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> | |
20556 | { | |
20557 | public: | |
20558 | ||
20559 | typedef codecvt_base::result result; | |
20560 | typedef _InternT intern_type; | |
20561 | typedef _ExternT extern_type; | |
20562 | typedef _StateT state_type; | |
20563 | ||
20564 | protected: | |
20565 | __c_locale _M_c_locale_codecvt; | |
20566 | ||
20567 | public: | |
20568 | static locale::id id; | |
20569 | ||
20570 | explicit | |
20571 | codecvt(size_t __refs = 0) | |
20572 | : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } | |
20573 | ||
20574 | explicit | |
20575 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
20576 | ||
20577 | protected: | |
20578 | virtual | |
20579 | ~codecvt() { } | |
20580 | ||
20581 | virtual result | |
20582 | do_out(state_type& __state, const intern_type* __from, | |
20583 | const intern_type* __from_end, const intern_type*& __from_next, | |
20584 | extern_type* __to, extern_type* __to_end, | |
20585 | extern_type*& __to_next) const; | |
20586 | ||
20587 | virtual result | |
20588 | do_unshift(state_type& __state, extern_type* __to, | |
20589 | extern_type* __to_end, extern_type*& __to_next) const; | |
20590 | ||
20591 | virtual result | |
20592 | do_in(state_type& __state, const extern_type* __from, | |
20593 | const extern_type* __from_end, const extern_type*& __from_next, | |
20594 | intern_type* __to, intern_type* __to_end, | |
20595 | intern_type*& __to_next) const; | |
20596 | ||
20597 | virtual int | |
20598 | do_encoding() const throw(); | |
20599 | ||
20600 | virtual bool | |
20601 | do_always_noconv() const throw(); | |
20602 | ||
20603 | virtual int | |
20604 | do_length(state_type&, const extern_type* __from, | |
20605 | const extern_type* __end, size_t __max) const; | |
20606 | ||
20607 | virtual int | |
20608 | do_max_length() const throw(); | |
20609 | }; | |
20610 | ||
20611 | template<typename _InternT, typename _ExternT, typename _StateT> | |
20612 | locale::id codecvt<_InternT, _ExternT, _StateT>::id; | |
20613 | ||
20614 | ||
20615 | template<> | |
20616 | class codecvt<char, char, mbstate_t> | |
20617 | : public __codecvt_abstract_base<char, char, mbstate_t> | |
20618 | { | |
20619 | public: | |
20620 | ||
20621 | typedef char intern_type; | |
20622 | typedef char extern_type; | |
20623 | typedef mbstate_t state_type; | |
20624 | ||
20625 | protected: | |
20626 | __c_locale _M_c_locale_codecvt; | |
20627 | ||
20628 | public: | |
20629 | static locale::id id; | |
20630 | ||
20631 | explicit | |
20632 | codecvt(size_t __refs = 0); | |
20633 | ||
20634 | explicit | |
20635 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
20636 | ||
20637 | protected: | |
20638 | virtual | |
20639 | ~codecvt(); | |
20640 | ||
20641 | virtual result | |
20642 | do_out(state_type& __state, const intern_type* __from, | |
20643 | const intern_type* __from_end, const intern_type*& __from_next, | |
20644 | extern_type* __to, extern_type* __to_end, | |
20645 | extern_type*& __to_next) const; | |
20646 | ||
20647 | virtual result | |
20648 | do_unshift(state_type& __state, extern_type* __to, | |
20649 | extern_type* __to_end, extern_type*& __to_next) const; | |
20650 | ||
20651 | virtual result | |
20652 | do_in(state_type& __state, const extern_type* __from, | |
20653 | const extern_type* __from_end, const extern_type*& __from_next, | |
20654 | intern_type* __to, intern_type* __to_end, | |
20655 | intern_type*& __to_next) const; | |
20656 | ||
20657 | virtual int | |
20658 | do_encoding() const throw(); | |
20659 | ||
20660 | virtual bool | |
20661 | do_always_noconv() const throw(); | |
20662 | ||
20663 | virtual int | |
20664 | do_length(state_type&, const extern_type* __from, | |
20665 | const extern_type* __end, size_t __max) const; | |
20666 | ||
20667 | virtual int | |
20668 | do_max_length() const throw(); | |
20669 | }; | |
20670 | # 450 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/codecvt.h" 3 | |
20671 | template<typename _InternT, typename _ExternT, typename _StateT> | |
20672 | class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> | |
20673 | { | |
20674 | public: | |
20675 | explicit | |
20676 | codecvt_byname(const char* __s, size_t __refs = 0) | |
20677 | : codecvt<_InternT, _ExternT, _StateT>(__refs) | |
20678 | { | |
20679 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
20680 | { | |
20681 | this->_S_destroy_c_locale(this->_M_c_locale_codecvt); | |
20682 | this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); | |
20683 | } | |
20684 | } | |
20685 | ||
20686 | protected: | |
20687 | virtual | |
20688 | ~codecvt_byname() { } | |
20689 | }; | |
20690 | # 1534 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
20691 | ||
20692 | ||
20693 | class __num_base | |
20694 | { | |
20695 | public: | |
20696 | ||
20697 | ||
20698 | enum | |
20699 | { | |
20700 | _S_ominus, | |
20701 | _S_oplus, | |
20702 | _S_ox, | |
20703 | _S_oX, | |
20704 | _S_odigits, | |
20705 | _S_odigits_end = _S_odigits + 16, | |
20706 | _S_oudigits = _S_odigits_end, | |
20707 | _S_oudigits_end = _S_oudigits + 16, | |
20708 | _S_oe = _S_odigits + 14, | |
20709 | _S_oE = _S_oudigits + 14, | |
20710 | _S_oend = _S_oudigits_end | |
20711 | }; | |
20712 | ||
20713 | ||
20714 | ||
20715 | ||
20716 | ||
20717 | ||
20718 | static const char* _S_atoms_out; | |
20719 | ||
20720 | ||
20721 | ||
20722 | static const char* _S_atoms_in; | |
20723 | ||
20724 | enum | |
20725 | { | |
20726 | _S_iminus, | |
20727 | _S_iplus, | |
20728 | _S_ix, | |
20729 | _S_iX, | |
20730 | _S_izero, | |
20731 | _S_ie = _S_izero + 14, | |
20732 | _S_iE = _S_izero + 20, | |
20733 | _S_iend = 26 | |
20734 | }; | |
20735 | ||
20736 | ||
20737 | ||
20738 | static void | |
20739 | _S_format_float(const ios_base& __io, char* __fptr, char __mod); | |
20740 | }; | |
20741 | ||
20742 | template<typename _CharT> | |
20743 | struct __numpunct_cache : public locale::facet | |
20744 | { | |
20745 | const char* _M_grouping; | |
20746 | size_t _M_grouping_size; | |
20747 | bool _M_use_grouping; | |
20748 | const _CharT* _M_truename; | |
20749 | size_t _M_truename_size; | |
20750 | const _CharT* _M_falsename; | |
20751 | size_t _M_falsename_size; | |
20752 | _CharT _M_decimal_point; | |
20753 | _CharT _M_thousands_sep; | |
20754 | ||
20755 | ||
20756 | ||
20757 | ||
20758 | ||
20759 | _CharT _M_atoms_out[__num_base::_S_oend]; | |
20760 | ||
20761 | ||
20762 | ||
20763 | ||
20764 | ||
20765 | _CharT _M_atoms_in[__num_base::_S_iend]; | |
20766 | ||
20767 | bool _M_allocated; | |
20768 | ||
20769 | __numpunct_cache(size_t __refs = 0) : facet(__refs), | |
20770 | _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), | |
20771 | _M_truename(__null), _M_truename_size(0), _M_falsename(__null), | |
20772 | _M_falsename_size(0), _M_decimal_point(_CharT()), | |
20773 | _M_thousands_sep(_CharT()), _M_allocated(false) | |
20774 | { } | |
20775 | ||
20776 | ~__numpunct_cache(); | |
20777 | ||
20778 | void | |
20779 | _M_cache(const locale& __loc); | |
20780 | ||
20781 | private: | |
20782 | __numpunct_cache& | |
20783 | operator=(const __numpunct_cache&); | |
20784 | ||
20785 | explicit | |
20786 | __numpunct_cache(const __numpunct_cache&); | |
20787 | }; | |
20788 | ||
20789 | template<typename _CharT> | |
20790 | __numpunct_cache<_CharT>::~__numpunct_cache() | |
20791 | { | |
20792 | if (_M_allocated) | |
20793 | { | |
20794 | delete [] _M_grouping; | |
20795 | delete [] _M_truename; | |
20796 | delete [] _M_falsename; | |
20797 | } | |
20798 | } | |
20799 | # 1656 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20800 | template<typename _CharT> | |
20801 | class numpunct : public locale::facet | |
20802 | { | |
20803 | public: | |
20804 | ||
20805 | ||
20806 | ||
20807 | typedef _CharT char_type; | |
20808 | typedef basic_string<_CharT> string_type; | |
20809 | ||
20810 | typedef __numpunct_cache<_CharT> __cache_type; | |
20811 | ||
20812 | protected: | |
20813 | __cache_type* _M_data; | |
20814 | ||
20815 | public: | |
20816 | ||
20817 | static locale::id id; | |
20818 | ||
20819 | ||
20820 | ||
20821 | ||
20822 | ||
20823 | ||
20824 | explicit | |
20825 | numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) | |
20826 | { _M_initialize_numpunct(); } | |
20827 | # 1693 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20828 | explicit | |
20829 | numpunct(__cache_type* __cache, size_t __refs = 0) | |
20830 | : facet(__refs), _M_data(__cache) | |
20831 | { _M_initialize_numpunct(); } | |
20832 | # 1707 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20833 | explicit | |
20834 | numpunct(__c_locale __cloc, size_t __refs = 0) | |
20835 | : facet(__refs), _M_data(__null) | |
20836 | { _M_initialize_numpunct(__cloc); } | |
20837 | # 1721 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20838 | char_type | |
20839 | decimal_point() const | |
20840 | { return this->do_decimal_point(); } | |
20841 | # 1734 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20842 | char_type | |
20843 | thousands_sep() const | |
20844 | { return this->do_thousands_sep(); } | |
20845 | # 1765 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20846 | string | |
20847 | grouping() const | |
20848 | { return this->do_grouping(); } | |
20849 | # 1778 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20850 | string_type | |
20851 | truename() const | |
20852 | { return this->do_truename(); } | |
20853 | # 1791 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20854 | string_type | |
20855 | falsename() const | |
20856 | { return this->do_falsename(); } | |
20857 | ||
20858 | protected: | |
20859 | ||
20860 | virtual | |
20861 | ~numpunct(); | |
20862 | # 1808 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20863 | virtual char_type | |
20864 | do_decimal_point() const | |
20865 | { return _M_data->_M_decimal_point; } | |
20866 | # 1820 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20867 | virtual char_type | |
20868 | do_thousands_sep() const | |
20869 | { return _M_data->_M_thousands_sep; } | |
20870 | # 1833 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20871 | virtual string | |
20872 | do_grouping() const | |
20873 | { return _M_data->_M_grouping; } | |
20874 | # 1846 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20875 | virtual string_type | |
20876 | do_truename() const | |
20877 | { return _M_data->_M_truename; } | |
20878 | # 1859 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20879 | virtual string_type | |
20880 | do_falsename() const | |
20881 | { return _M_data->_M_falsename; } | |
20882 | ||
20883 | ||
20884 | void | |
20885 | _M_initialize_numpunct(__c_locale __cloc = __null); | |
20886 | }; | |
20887 | ||
20888 | template<typename _CharT> | |
20889 | locale::id numpunct<_CharT>::id; | |
20890 | ||
20891 | template<> | |
20892 | numpunct<char>::~numpunct(); | |
20893 | ||
20894 | template<> | |
20895 | void | |
20896 | numpunct<char>::_M_initialize_numpunct(__c_locale __cloc); | |
20897 | # 1888 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20898 | template<typename _CharT> | |
20899 | class numpunct_byname : public numpunct<_CharT> | |
20900 | { | |
20901 | public: | |
20902 | typedef _CharT char_type; | |
20903 | typedef basic_string<_CharT> string_type; | |
20904 | ||
20905 | explicit | |
20906 | numpunct_byname(const char* __s, size_t __refs = 0) | |
20907 | : numpunct<_CharT>(__refs) | |
20908 | { | |
20909 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
20910 | { | |
20911 | __c_locale __tmp; | |
20912 | this->_S_create_c_locale(__tmp, __s); | |
20913 | this->_M_initialize_numpunct(__tmp); | |
20914 | this->_S_destroy_c_locale(__tmp); | |
20915 | } | |
20916 | } | |
20917 | ||
20918 | protected: | |
20919 | virtual | |
20920 | ~numpunct_byname() { } | |
20921 | }; | |
20922 | # 1925 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20923 | template<typename _CharT, typename _InIter> | |
20924 | class num_get : public locale::facet | |
20925 | { | |
20926 | public: | |
20927 | ||
20928 | ||
20929 | ||
20930 | typedef _CharT char_type; | |
20931 | typedef _InIter iter_type; | |
20932 | ||
20933 | ||
20934 | ||
20935 | static locale::id id; | |
20936 | # 1946 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20937 | explicit | |
20938 | num_get(size_t __refs = 0) : facet(__refs) { } | |
20939 | # 1972 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20940 | iter_type | |
20941 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20942 | ios_base::iostate& __err, bool& __v) const | |
20943 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20944 | # 2008 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20945 | iter_type | |
20946 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20947 | ios_base::iostate& __err, long& __v) const | |
20948 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20949 | ||
20950 | iter_type | |
20951 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20952 | ios_base::iostate& __err, unsigned short& __v) const | |
20953 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20954 | ||
20955 | iter_type | |
20956 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20957 | ios_base::iostate& __err, unsigned int& __v) const | |
20958 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20959 | ||
20960 | iter_type | |
20961 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20962 | ios_base::iostate& __err, unsigned long& __v) const | |
20963 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20964 | ||
20965 | ||
20966 | iter_type | |
20967 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20968 | ios_base::iostate& __err, long long& __v) const | |
20969 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20970 | ||
20971 | iter_type | |
20972 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20973 | ios_base::iostate& __err, unsigned long long& __v) const | |
20974 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20975 | # 2067 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20976 | iter_type | |
20977 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20978 | ios_base::iostate& __err, float& __v) const | |
20979 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20980 | ||
20981 | iter_type | |
20982 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20983 | ios_base::iostate& __err, double& __v) const | |
20984 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20985 | ||
20986 | iter_type | |
20987 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20988 | ios_base::iostate& __err, long double& __v) const | |
20989 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20990 | # 2109 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
20991 | iter_type | |
20992 | get(iter_type __in, iter_type __end, ios_base& __io, | |
20993 | ios_base::iostate& __err, void*& __v) const | |
20994 | { return this->do_get(__in, __end, __io, __err, __v); } | |
20995 | ||
20996 | protected: | |
20997 | ||
20998 | virtual ~num_get() { } | |
20999 | ||
21000 | iter_type | |
21001 | _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, | |
21002 | string& __xtrc) const; | |
21003 | ||
21004 | template<typename _ValueT> | |
21005 | iter_type | |
21006 | _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, | |
21007 | _ValueT& __v) const; | |
21008 | # 2142 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21009 | virtual iter_type | |
21010 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; | |
21011 | ||
21012 | ||
21013 | virtual iter_type | |
21014 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const; | |
21015 | ||
21016 | virtual iter_type | |
21017 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21018 | unsigned short&) const; | |
21019 | ||
21020 | virtual iter_type | |
21021 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21022 | unsigned int&) const; | |
21023 | ||
21024 | virtual iter_type | |
21025 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21026 | unsigned long&) const; | |
21027 | ||
21028 | ||
21029 | virtual iter_type | |
21030 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21031 | long long&) const; | |
21032 | ||
21033 | virtual iter_type | |
21034 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21035 | unsigned long long&) const; | |
21036 | ||
21037 | ||
21038 | virtual iter_type | |
21039 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21040 | float&) const; | |
21041 | ||
21042 | virtual iter_type | |
21043 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21044 | double&) const; | |
21045 | ||
21046 | virtual iter_type | |
21047 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21048 | long double&) const; | |
21049 | ||
21050 | virtual iter_type | |
21051 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
21052 | void*&) const; | |
21053 | ||
21054 | }; | |
21055 | ||
21056 | template<typename _CharT, typename _InIter> | |
21057 | locale::id num_get<_CharT, _InIter>::id; | |
21058 | # 2204 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21059 | template<typename _CharT, typename _OutIter> | |
21060 | class num_put : public locale::facet | |
21061 | { | |
21062 | public: | |
21063 | ||
21064 | ||
21065 | ||
21066 | typedef _CharT char_type; | |
21067 | typedef _OutIter iter_type; | |
21068 | ||
21069 | ||
21070 | ||
21071 | static locale::id id; | |
21072 | # 2225 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21073 | explicit | |
21074 | num_put(size_t __refs = 0) : facet(__refs) { } | |
21075 | # 2243 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21076 | iter_type | |
21077 | put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const | |
21078 | { return this->do_put(__s, __f, __fill, __v); } | |
21079 | # 2285 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21080 | iter_type | |
21081 | put(iter_type __s, ios_base& __f, char_type __fill, long __v) const | |
21082 | { return this->do_put(__s, __f, __fill, __v); } | |
21083 | ||
21084 | iter_type | |
21085 | put(iter_type __s, ios_base& __f, char_type __fill, | |
21086 | unsigned long __v) const | |
21087 | { return this->do_put(__s, __f, __fill, __v); } | |
21088 | ||
21089 | ||
21090 | iter_type | |
21091 | put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const | |
21092 | { return this->do_put(__s, __f, __fill, __v); } | |
21093 | ||
21094 | iter_type | |
21095 | put(iter_type __s, ios_base& __f, char_type __fill, | |
21096 | unsigned long long __v) const | |
21097 | { return this->do_put(__s, __f, __fill, __v); } | |
21098 | # 2348 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21099 | iter_type | |
21100 | put(iter_type __s, ios_base& __f, char_type __fill, double __v) const | |
21101 | { return this->do_put(__s, __f, __fill, __v); } | |
21102 | ||
21103 | iter_type | |
21104 | put(iter_type __s, ios_base& __f, char_type __fill, | |
21105 | long double __v) const | |
21106 | { return this->do_put(__s, __f, __fill, __v); } | |
21107 | # 2373 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21108 | iter_type | |
21109 | put(iter_type __s, ios_base& __f, char_type __fill, | |
21110 | const void* __v) const | |
21111 | { return this->do_put(__s, __f, __fill, __v); } | |
21112 | ||
21113 | protected: | |
21114 | template<typename _ValueT> | |
21115 | iter_type | |
21116 | _M_insert_float(iter_type, ios_base& __io, char_type __fill, | |
21117 | char __mod, _ValueT __v) const; | |
21118 | ||
21119 | void | |
21120 | _M_group_float(const char* __grouping, size_t __grouping_size, | |
21121 | char_type __sep, const char_type* __p, char_type* __new, | |
21122 | char_type* __cs, int& __len) const; | |
21123 | ||
21124 | template<typename _ValueT> | |
21125 | iter_type | |
21126 | _M_insert_int(iter_type, ios_base& __io, char_type __fill, | |
21127 | _ValueT __v) const; | |
21128 | ||
21129 | void | |
21130 | _M_group_int(const char* __grouping, size_t __grouping_size, | |
21131 | char_type __sep, ios_base& __io, char_type* __new, | |
21132 | char_type* __cs, int& __len) const; | |
21133 | ||
21134 | void | |
21135 | _M_pad(char_type __fill, streamsize __w, ios_base& __io, | |
21136 | char_type* __new, const char_type* __cs, int& __len) const; | |
21137 | ||
21138 | ||
21139 | virtual | |
21140 | ~num_put() { }; | |
21141 | # 2421 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21142 | virtual iter_type | |
21143 | do_put(iter_type, ios_base&, char_type __fill, bool __v) const; | |
21144 | ||
21145 | virtual iter_type | |
21146 | do_put(iter_type, ios_base&, char_type __fill, long __v) const; | |
21147 | ||
21148 | virtual iter_type | |
21149 | do_put(iter_type, ios_base&, char_type __fill, unsigned long) const; | |
21150 | ||
21151 | ||
21152 | virtual iter_type | |
21153 | do_put(iter_type, ios_base&, char_type __fill, long long __v) const; | |
21154 | ||
21155 | virtual iter_type | |
21156 | do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const; | |
21157 | ||
21158 | ||
21159 | virtual iter_type | |
21160 | do_put(iter_type, ios_base&, char_type __fill, double __v) const; | |
21161 | ||
21162 | virtual iter_type | |
21163 | do_put(iter_type, ios_base&, char_type __fill, long double __v) const; | |
21164 | ||
21165 | virtual iter_type | |
21166 | do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; | |
21167 | ||
21168 | }; | |
21169 | ||
21170 | template <typename _CharT, typename _OutIter> | |
21171 | locale::id num_put<_CharT, _OutIter>::id; | |
21172 | # 2465 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21173 | template<typename _CharT> | |
21174 | class collate : public locale::facet | |
21175 | { | |
21176 | public: | |
21177 | ||
21178 | ||
21179 | ||
21180 | typedef _CharT char_type; | |
21181 | typedef basic_string<_CharT> string_type; | |
21182 | ||
21183 | ||
21184 | protected: | |
21185 | ||
21186 | ||
21187 | __c_locale _M_c_locale_collate; | |
21188 | ||
21189 | public: | |
21190 | ||
21191 | static locale::id id; | |
21192 | # 2492 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21193 | explicit | |
21194 | collate(size_t __refs = 0) | |
21195 | : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) | |
21196 | { } | |
21197 | # 2506 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21198 | explicit | |
21199 | collate(__c_locale __cloc, size_t __refs = 0) | |
21200 | : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) | |
21201 | { } | |
21202 | # 2523 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21203 | int | |
21204 | compare(const _CharT* __lo1, const _CharT* __hi1, | |
21205 | const _CharT* __lo2, const _CharT* __hi2) const | |
21206 | { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } | |
21207 | # 2542 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21208 | string_type | |
21209 | transform(const _CharT* __lo, const _CharT* __hi) const | |
21210 | { return this->do_transform(__lo, __hi); } | |
21211 | # 2556 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21212 | long | |
21213 | hash(const _CharT* __lo, const _CharT* __hi) const | |
21214 | { return this->do_hash(__lo, __hi); } | |
21215 | ||
21216 | ||
21217 | int | |
21218 | _M_compare(const _CharT*, const _CharT*) const; | |
21219 | ||
21220 | size_t | |
21221 | _M_transform(_CharT*, const _CharT*, size_t) const; | |
21222 | ||
21223 | protected: | |
21224 | ||
21225 | virtual | |
21226 | ~collate() | |
21227 | { _S_destroy_c_locale(_M_c_locale_collate); } | |
21228 | # 2585 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21229 | virtual int | |
21230 | do_compare(const _CharT* __lo1, const _CharT* __hi1, | |
21231 | const _CharT* __lo2, const _CharT* __hi2) const; | |
21232 | # 2601 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21233 | virtual string_type | |
21234 | do_transform(const _CharT* __lo, const _CharT* __hi) const; | |
21235 | # 2614 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21236 | virtual long | |
21237 | do_hash(const _CharT* __lo, const _CharT* __hi) const; | |
21238 | }; | |
21239 | ||
21240 | template<typename _CharT> | |
21241 | locale::id collate<_CharT>::id; | |
21242 | ||
21243 | ||
21244 | template<> | |
21245 | int | |
21246 | collate<char>::_M_compare(const char*, const char*) const; | |
21247 | ||
21248 | template<> | |
21249 | size_t | |
21250 | collate<char>::_M_transform(char*, const char*, size_t) const; | |
21251 | # 2641 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21252 | template<typename _CharT> | |
21253 | class collate_byname : public collate<_CharT> | |
21254 | { | |
21255 | public: | |
21256 | ||
21257 | ||
21258 | typedef _CharT char_type; | |
21259 | typedef basic_string<_CharT> string_type; | |
21260 | ||
21261 | ||
21262 | explicit | |
21263 | collate_byname(const char* __s, size_t __refs = 0) | |
21264 | : collate<_CharT>(__refs) | |
21265 | { | |
21266 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
21267 | { | |
21268 | this->_S_destroy_c_locale(this->_M_c_locale_collate); | |
21269 | this->_S_create_c_locale(this->_M_c_locale_collate, __s); | |
21270 | } | |
21271 | } | |
21272 | ||
21273 | protected: | |
21274 | virtual | |
21275 | ~collate_byname() { } | |
21276 | }; | |
21277 | # 2674 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21278 | class time_base | |
21279 | { | |
21280 | public: | |
21281 | enum dateorder { no_order, dmy, mdy, ymd, ydm }; | |
21282 | }; | |
21283 | ||
21284 | template<typename _CharT> | |
21285 | struct __timepunct_cache : public locale::facet | |
21286 | { | |
21287 | ||
21288 | static const _CharT* _S_timezones[14]; | |
21289 | ||
21290 | const _CharT* _M_date_format; | |
21291 | const _CharT* _M_date_era_format; | |
21292 | const _CharT* _M_time_format; | |
21293 | const _CharT* _M_time_era_format; | |
21294 | const _CharT* _M_date_time_format; | |
21295 | const _CharT* _M_date_time_era_format; | |
21296 | const _CharT* _M_am; | |
21297 | const _CharT* _M_pm; | |
21298 | const _CharT* _M_am_pm_format; | |
21299 | ||
21300 | ||
21301 | const _CharT* _M_day1; | |
21302 | const _CharT* _M_day2; | |
21303 | const _CharT* _M_day3; | |
21304 | const _CharT* _M_day4; | |
21305 | const _CharT* _M_day5; | |
21306 | const _CharT* _M_day6; | |
21307 | const _CharT* _M_day7; | |
21308 | ||
21309 | ||
21310 | const _CharT* _M_aday1; | |
21311 | const _CharT* _M_aday2; | |
21312 | const _CharT* _M_aday3; | |
21313 | const _CharT* _M_aday4; | |
21314 | const _CharT* _M_aday5; | |
21315 | const _CharT* _M_aday6; | |
21316 | const _CharT* _M_aday7; | |
21317 | ||
21318 | ||
21319 | const _CharT* _M_month01; | |
21320 | const _CharT* _M_month02; | |
21321 | const _CharT* _M_month03; | |
21322 | const _CharT* _M_month04; | |
21323 | const _CharT* _M_month05; | |
21324 | const _CharT* _M_month06; | |
21325 | const _CharT* _M_month07; | |
21326 | const _CharT* _M_month08; | |
21327 | const _CharT* _M_month09; | |
21328 | const _CharT* _M_month10; | |
21329 | const _CharT* _M_month11; | |
21330 | const _CharT* _M_month12; | |
21331 | ||
21332 | ||
21333 | const _CharT* _M_amonth01; | |
21334 | const _CharT* _M_amonth02; | |
21335 | const _CharT* _M_amonth03; | |
21336 | const _CharT* _M_amonth04; | |
21337 | const _CharT* _M_amonth05; | |
21338 | const _CharT* _M_amonth06; | |
21339 | const _CharT* _M_amonth07; | |
21340 | const _CharT* _M_amonth08; | |
21341 | const _CharT* _M_amonth09; | |
21342 | const _CharT* _M_amonth10; | |
21343 | const _CharT* _M_amonth11; | |
21344 | const _CharT* _M_amonth12; | |
21345 | ||
21346 | bool _M_allocated; | |
21347 | ||
21348 | __timepunct_cache(size_t __refs = 0) : facet(__refs), | |
21349 | _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null), | |
21350 | _M_time_era_format(__null), _M_date_time_format(__null), | |
21351 | _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null), | |
21352 | _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null), | |
21353 | _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null), | |
21354 | _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null), | |
21355 | _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null), | |
21356 | _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null), | |
21357 | _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null), | |
21358 | _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null), | |
21359 | _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null), | |
21360 | _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null), | |
21361 | _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null), | |
21362 | _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false) | |
21363 | { } | |
21364 | ||
21365 | ~__timepunct_cache(); | |
21366 | ||
21367 | void | |
21368 | _M_cache(const locale& __loc); | |
21369 | ||
21370 | private: | |
21371 | __timepunct_cache& | |
21372 | operator=(const __timepunct_cache&); | |
21373 | ||
21374 | explicit | |
21375 | __timepunct_cache(const __timepunct_cache&); | |
21376 | }; | |
21377 | ||
21378 | template<typename _CharT> | |
21379 | __timepunct_cache<_CharT>::~__timepunct_cache() | |
21380 | { | |
21381 | if (_M_allocated) | |
21382 | { | |
21383 | ||
21384 | } | |
21385 | } | |
21386 | ||
21387 | ||
21388 | template<> | |
21389 | const char* | |
21390 | __timepunct_cache<char>::_S_timezones[14]; | |
21391 | # 2795 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21392 | template<typename _CharT> | |
21393 | const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; | |
21394 | ||
21395 | template<typename _CharT> | |
21396 | class __timepunct : public locale::facet | |
21397 | { | |
21398 | public: | |
21399 | ||
21400 | typedef _CharT __char_type; | |
21401 | typedef basic_string<_CharT> __string_type; | |
21402 | typedef __timepunct_cache<_CharT> __cache_type; | |
21403 | ||
21404 | protected: | |
21405 | __cache_type* _M_data; | |
21406 | __c_locale _M_c_locale_timepunct; | |
21407 | const char* _M_name_timepunct; | |
21408 | ||
21409 | public: | |
21410 | ||
21411 | static locale::id id; | |
21412 | ||
21413 | explicit | |
21414 | __timepunct(size_t __refs = 0); | |
21415 | ||
21416 | explicit | |
21417 | __timepunct(__cache_type* __cache, size_t __refs = 0); | |
21418 | # 2832 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21419 | explicit | |
21420 | __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); | |
21421 | ||
21422 | ||
21423 | ||
21424 | void | |
21425 | _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, | |
21426 | const tm* __tm) const; | |
21427 | ||
21428 | void | |
21429 | _M_date_formats(const _CharT** __date) const | |
21430 | { | |
21431 | ||
21432 | __date[0] = _M_data->_M_date_format; | |
21433 | __date[1] = _M_data->_M_date_era_format; | |
21434 | } | |
21435 | ||
21436 | void | |
21437 | _M_time_formats(const _CharT** __time) const | |
21438 | { | |
21439 | ||
21440 | __time[0] = _M_data->_M_time_format; | |
21441 | __time[1] = _M_data->_M_time_era_format; | |
21442 | } | |
21443 | ||
21444 | void | |
21445 | _M_date_time_formats(const _CharT** __dt) const | |
21446 | { | |
21447 | ||
21448 | __dt[0] = _M_data->_M_date_time_format; | |
21449 | __dt[1] = _M_data->_M_date_time_era_format; | |
21450 | } | |
21451 | ||
21452 | void | |
21453 | _M_am_pm_format(const _CharT* __ampm) const | |
21454 | { __ampm = _M_data->_M_am_pm_format; } | |
21455 | ||
21456 | void | |
21457 | _M_am_pm(const _CharT** __ampm) const | |
21458 | { | |
21459 | __ampm[0] = _M_data->_M_am; | |
21460 | __ampm[1] = _M_data->_M_pm; | |
21461 | } | |
21462 | ||
21463 | void | |
21464 | _M_days(const _CharT** __days) const | |
21465 | { | |
21466 | __days[0] = _M_data->_M_day1; | |
21467 | __days[1] = _M_data->_M_day2; | |
21468 | __days[2] = _M_data->_M_day3; | |
21469 | __days[3] = _M_data->_M_day4; | |
21470 | __days[4] = _M_data->_M_day5; | |
21471 | __days[5] = _M_data->_M_day6; | |
21472 | __days[6] = _M_data->_M_day7; | |
21473 | } | |
21474 | ||
21475 | void | |
21476 | _M_days_abbreviated(const _CharT** __days) const | |
21477 | { | |
21478 | __days[0] = _M_data->_M_aday1; | |
21479 | __days[1] = _M_data->_M_aday2; | |
21480 | __days[2] = _M_data->_M_aday3; | |
21481 | __days[3] = _M_data->_M_aday4; | |
21482 | __days[4] = _M_data->_M_aday5; | |
21483 | __days[5] = _M_data->_M_aday6; | |
21484 | __days[6] = _M_data->_M_aday7; | |
21485 | } | |
21486 | ||
21487 | void | |
21488 | _M_months(const _CharT** __months) const | |
21489 | { | |
21490 | __months[0] = _M_data->_M_month01; | |
21491 | __months[1] = _M_data->_M_month02; | |
21492 | __months[2] = _M_data->_M_month03; | |
21493 | __months[3] = _M_data->_M_month04; | |
21494 | __months[4] = _M_data->_M_month05; | |
21495 | __months[5] = _M_data->_M_month06; | |
21496 | __months[6] = _M_data->_M_month07; | |
21497 | __months[7] = _M_data->_M_month08; | |
21498 | __months[8] = _M_data->_M_month09; | |
21499 | __months[9] = _M_data->_M_month10; | |
21500 | __months[10] = _M_data->_M_month11; | |
21501 | __months[11] = _M_data->_M_month12; | |
21502 | } | |
21503 | ||
21504 | void | |
21505 | _M_months_abbreviated(const _CharT** __months) const | |
21506 | { | |
21507 | __months[0] = _M_data->_M_amonth01; | |
21508 | __months[1] = _M_data->_M_amonth02; | |
21509 | __months[2] = _M_data->_M_amonth03; | |
21510 | __months[3] = _M_data->_M_amonth04; | |
21511 | __months[4] = _M_data->_M_amonth05; | |
21512 | __months[5] = _M_data->_M_amonth06; | |
21513 | __months[6] = _M_data->_M_amonth07; | |
21514 | __months[7] = _M_data->_M_amonth08; | |
21515 | __months[8] = _M_data->_M_amonth09; | |
21516 | __months[9] = _M_data->_M_amonth10; | |
21517 | __months[10] = _M_data->_M_amonth11; | |
21518 | __months[11] = _M_data->_M_amonth12; | |
21519 | } | |
21520 | ||
21521 | protected: | |
21522 | virtual | |
21523 | ~__timepunct(); | |
21524 | ||
21525 | ||
21526 | void | |
21527 | _M_initialize_timepunct(__c_locale __cloc = __null); | |
21528 | }; | |
21529 | ||
21530 | template<typename _CharT> | |
21531 | locale::id __timepunct<_CharT>::id; | |
21532 | ||
21533 | ||
21534 | template<> | |
21535 | void | |
21536 | __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc); | |
21537 | ||
21538 | template<> | |
21539 | void | |
21540 | __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const; | |
21541 | # 2967 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21542 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/time_members.h" 1 3 | |
21543 | # 37 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/time_members.h" 3 | |
21544 | template<typename _CharT> | |
21545 | __timepunct<_CharT>::__timepunct(size_t __refs) | |
21546 | : facet(__refs), _M_data(__null) | |
21547 | { | |
21548 | _M_name_timepunct = _S_get_c_name(); | |
21549 | _M_initialize_timepunct(); | |
21550 | } | |
21551 | ||
21552 | template<typename _CharT> | |
21553 | __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) | |
21554 | : facet(__refs), _M_data(__cache) | |
21555 | { | |
21556 | _M_name_timepunct = _S_get_c_name(); | |
21557 | _M_initialize_timepunct(); | |
21558 | } | |
21559 | ||
21560 | template<typename _CharT> | |
21561 | __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | |
21562 | size_t __refs) | |
21563 | : facet(__refs), _M_data(__null) | |
21564 | { | |
21565 | const size_t __len = std::strlen(__s) + 1; | |
21566 | char* __tmp = new char[__len]; | |
21567 | std::memcpy(__tmp, __s, __len); | |
21568 | _M_name_timepunct = __tmp; | |
21569 | ||
21570 | try | |
21571 | { _M_initialize_timepunct(__cloc); } | |
21572 | catch(...) | |
21573 | { | |
21574 | delete [] _M_name_timepunct; | |
21575 | throw; | |
21576 | } | |
21577 | } | |
21578 | ||
21579 | template<typename _CharT> | |
21580 | __timepunct<_CharT>::~__timepunct() | |
21581 | { | |
21582 | if (_M_name_timepunct != _S_get_c_name()) | |
21583 | delete [] _M_name_timepunct; | |
21584 | delete _M_data; | |
21585 | _S_destroy_c_locale(_M_c_locale_timepunct); | |
21586 | } | |
21587 | # 2968 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
21588 | # 2981 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21589 | template<typename _CharT, typename _InIter> | |
21590 | class time_get : public locale::facet, public time_base | |
21591 | { | |
21592 | public: | |
21593 | ||
21594 | ||
21595 | ||
21596 | typedef _CharT char_type; | |
21597 | typedef _InIter iter_type; | |
21598 | ||
21599 | typedef basic_string<_CharT> __string_type; | |
21600 | ||
21601 | ||
21602 | static locale::id id; | |
21603 | # 3003 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21604 | explicit | |
21605 | time_get(size_t __refs = 0) | |
21606 | : facet (__refs) { } | |
21607 | # 3020 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21608 | dateorder | |
21609 | date_order() const | |
21610 | { return this->do_date_order(); } | |
21611 | # 3044 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21612 | iter_type | |
21613 | get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
21614 | ios_base::iostate& __err, tm* __tm) const | |
21615 | { return this->do_get_time(__beg, __end, __io, __err, __tm); } | |
21616 | # 3069 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21617 | iter_type | |
21618 | get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
21619 | ios_base::iostate& __err, tm* __tm) const | |
21620 | { return this->do_get_date(__beg, __end, __io, __err, __tm); } | |
21621 | # 3097 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21622 | iter_type | |
21623 | get_weekday(iter_type __beg, iter_type __end, ios_base& __io, | |
21624 | ios_base::iostate& __err, tm* __tm) const | |
21625 | { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } | |
21626 | # 3126 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21627 | iter_type | |
21628 | get_monthname(iter_type __beg, iter_type __end, ios_base& __io, | |
21629 | ios_base::iostate& __err, tm* __tm) const | |
21630 | { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } | |
21631 | # 3152 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21632 | iter_type | |
21633 | get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
21634 | ios_base::iostate& __err, tm* __tm) const | |
21635 | { return this->do_get_year(__beg, __end, __io, __err, __tm); } | |
21636 | ||
21637 | protected: | |
21638 | ||
21639 | virtual | |
21640 | ~time_get() { } | |
21641 | # 3172 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21642 | virtual dateorder | |
21643 | do_date_order() const; | |
21644 | # 3190 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21645 | virtual iter_type | |
21646 | do_get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
21647 | ios_base::iostate& __err, tm* __tm) const; | |
21648 | # 3209 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21649 | virtual iter_type | |
21650 | do_get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
21651 | ios_base::iostate& __err, tm* __tm) const; | |
21652 | # 3228 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21653 | virtual iter_type | |
21654 | do_get_weekday(iter_type __beg, iter_type __end, ios_base&, | |
21655 | ios_base::iostate& __err, tm* __tm) const; | |
21656 | # 3247 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21657 | virtual iter_type | |
21658 | do_get_monthname(iter_type __beg, iter_type __end, ios_base&, | |
21659 | ios_base::iostate& __err, tm* __tm) const; | |
21660 | # 3266 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21661 | virtual iter_type | |
21662 | do_get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
21663 | ios_base::iostate& __err, tm* __tm) const; | |
21664 | ||
21665 | ||
21666 | iter_type | |
21667 | _M_extract_num(iter_type __beg, iter_type __end, int& __member, | |
21668 | int __min, int __max, size_t __len, | |
21669 | ios_base& __io, ios_base::iostate& __err) const; | |
21670 | ||
21671 | ||
21672 | ||
21673 | iter_type | |
21674 | _M_extract_name(iter_type __beg, iter_type __end, int& __member, | |
21675 | const _CharT** __names, size_t __indexlen, | |
21676 | ios_base& __io, ios_base::iostate& __err) const; | |
21677 | ||
21678 | ||
21679 | iter_type | |
21680 | _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, | |
21681 | ios_base::iostate& __err, tm* __tm, | |
21682 | const _CharT* __format) const; | |
21683 | }; | |
21684 | ||
21685 | template<typename _CharT, typename _InIter> | |
21686 | locale::id time_get<_CharT, _InIter>::id; | |
21687 | ||
21688 | ||
21689 | template<typename _CharT, typename _InIter> | |
21690 | class time_get_byname : public time_get<_CharT, _InIter> | |
21691 | { | |
21692 | public: | |
21693 | ||
21694 | typedef _CharT char_type; | |
21695 | typedef _InIter iter_type; | |
21696 | ||
21697 | explicit | |
21698 | time_get_byname(const char*, size_t __refs = 0) | |
21699 | : time_get<_CharT, _InIter>(__refs) { } | |
21700 | ||
21701 | protected: | |
21702 | virtual | |
21703 | ~time_get_byname() { } | |
21704 | }; | |
21705 | # 3322 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21706 | template<typename _CharT, typename _OutIter> | |
21707 | class time_put : public locale::facet | |
21708 | { | |
21709 | public: | |
21710 | ||
21711 | ||
21712 | ||
21713 | typedef _CharT char_type; | |
21714 | typedef _OutIter iter_type; | |
21715 | ||
21716 | ||
21717 | ||
21718 | static locale::id id; | |
21719 | # 3343 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21720 | explicit | |
21721 | time_put(size_t __refs = 0) | |
21722 | : facet(__refs) { } | |
21723 | # 3362 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21724 | iter_type | |
21725 | put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
21726 | const _CharT* __beg, const _CharT* __end) const; | |
21727 | # 3382 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21728 | iter_type | |
21729 | put(iter_type __s, ios_base& __io, char_type __fill, | |
21730 | const tm* __tm, char __format, char __mod = 0) const | |
21731 | { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } | |
21732 | ||
21733 | protected: | |
21734 | ||
21735 | virtual | |
21736 | ~time_put() | |
21737 | { } | |
21738 | # 3409 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21739 | virtual iter_type | |
21740 | do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
21741 | char __format, char __mod) const; | |
21742 | }; | |
21743 | ||
21744 | template<typename _CharT, typename _OutIter> | |
21745 | locale::id time_put<_CharT, _OutIter>::id; | |
21746 | ||
21747 | ||
21748 | template<typename _CharT, typename _OutIter> | |
21749 | class time_put_byname : public time_put<_CharT, _OutIter> | |
21750 | { | |
21751 | public: | |
21752 | ||
21753 | typedef _CharT char_type; | |
21754 | typedef _OutIter iter_type; | |
21755 | ||
21756 | explicit | |
21757 | time_put_byname(const char*, size_t __refs = 0) | |
21758 | : time_put<_CharT, _OutIter>(__refs) | |
21759 | { }; | |
21760 | ||
21761 | protected: | |
21762 | virtual | |
21763 | ~time_put_byname() { } | |
21764 | }; | |
21765 | # 3447 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21766 | class money_base | |
21767 | { | |
21768 | public: | |
21769 | enum part { none, space, symbol, sign, value }; | |
21770 | struct pattern { char field[4]; }; | |
21771 | ||
21772 | static const pattern _S_default_pattern; | |
21773 | ||
21774 | enum | |
21775 | { | |
21776 | _S_minus, | |
21777 | _S_zero, | |
21778 | _S_end = 11 | |
21779 | }; | |
21780 | ||
21781 | ||
21782 | ||
21783 | static const char* _S_atoms; | |
21784 | ||
21785 | ||
21786 | ||
21787 | static pattern | |
21788 | _S_construct_pattern(char __precedes, char __space, char __posn); | |
21789 | }; | |
21790 | ||
21791 | template<typename _CharT, bool _Intl> | |
21792 | struct __moneypunct_cache : public locale::facet | |
21793 | { | |
21794 | const char* _M_grouping; | |
21795 | size_t _M_grouping_size; | |
21796 | bool _M_use_grouping; | |
21797 | _CharT _M_decimal_point; | |
21798 | _CharT _M_thousands_sep; | |
21799 | const _CharT* _M_curr_symbol; | |
21800 | size_t _M_curr_symbol_size; | |
21801 | const _CharT* _M_positive_sign; | |
21802 | size_t _M_positive_sign_size; | |
21803 | const _CharT* _M_negative_sign; | |
21804 | size_t _M_negative_sign_size; | |
21805 | int _M_frac_digits; | |
21806 | money_base::pattern _M_pos_format; | |
21807 | money_base::pattern _M_neg_format; | |
21808 | ||
21809 | ||
21810 | ||
21811 | ||
21812 | _CharT _M_atoms[money_base::_S_end]; | |
21813 | ||
21814 | bool _M_allocated; | |
21815 | ||
21816 | __moneypunct_cache(size_t __refs = 0) : facet(__refs), | |
21817 | _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), | |
21818 | _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), | |
21819 | _M_curr_symbol(__null), _M_curr_symbol_size(0), | |
21820 | _M_positive_sign(__null), _M_positive_sign_size(0), | |
21821 | _M_negative_sign(__null), _M_negative_sign_size(0), | |
21822 | _M_frac_digits(0), | |
21823 | _M_pos_format(money_base::pattern()), | |
21824 | _M_neg_format(money_base::pattern()), _M_allocated(false) | |
21825 | { } | |
21826 | ||
21827 | ~__moneypunct_cache(); | |
21828 | ||
21829 | void | |
21830 | _M_cache(const locale& __loc); | |
21831 | ||
21832 | private: | |
21833 | __moneypunct_cache& | |
21834 | operator=(const __moneypunct_cache&); | |
21835 | ||
21836 | explicit | |
21837 | __moneypunct_cache(const __moneypunct_cache&); | |
21838 | }; | |
21839 | ||
21840 | template<typename _CharT, bool _Intl> | |
21841 | __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() | |
21842 | { | |
21843 | if (_M_allocated) | |
21844 | { | |
21845 | delete [] _M_grouping; | |
21846 | delete [] _M_curr_symbol; | |
21847 | delete [] _M_positive_sign; | |
21848 | delete [] _M_negative_sign; | |
21849 | } | |
21850 | } | |
21851 | ||
21852 | ||
21853 | ||
21854 | ||
21855 | ||
21856 | ||
21857 | ||
21858 | template<typename _CharT, bool _Intl> | |
21859 | class moneypunct : public locale::facet, public money_base | |
21860 | { | |
21861 | public: | |
21862 | ||
21863 | ||
21864 | ||
21865 | typedef _CharT char_type; | |
21866 | typedef basic_string<_CharT> string_type; | |
21867 | ||
21868 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
21869 | ||
21870 | private: | |
21871 | __cache_type* _M_data; | |
21872 | ||
21873 | public: | |
21874 | ||
21875 | ||
21876 | static const bool intl = _Intl; | |
21877 | ||
21878 | static locale::id id; | |
21879 | # 3568 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21880 | explicit | |
21881 | moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null) | |
21882 | { _M_initialize_moneypunct(); } | |
21883 | # 3580 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21884 | explicit | |
21885 | moneypunct(__cache_type* __cache, size_t __refs = 0) | |
21886 | : facet(__refs), _M_data(__cache) | |
21887 | { _M_initialize_moneypunct(); } | |
21888 | # 3595 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21889 | explicit | |
21890 | moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) | |
21891 | : facet(__refs), _M_data(__null) | |
21892 | { _M_initialize_moneypunct(__cloc, __s); } | |
21893 | # 3609 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21894 | char_type | |
21895 | decimal_point() const | |
21896 | { return this->do_decimal_point(); } | |
21897 | # 3622 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21898 | char_type | |
21899 | thousands_sep() const | |
21900 | { return this->do_thousands_sep(); } | |
21901 | # 3651 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21902 | string | |
21903 | grouping() const | |
21904 | { return this->do_grouping(); } | |
21905 | # 3664 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21906 | string_type | |
21907 | curr_symbol() const | |
21908 | { return this->do_curr_symbol(); } | |
21909 | # 3681 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21910 | string_type | |
21911 | positive_sign() const | |
21912 | { return this->do_positive_sign(); } | |
21913 | # 3698 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21914 | string_type | |
21915 | negative_sign() const | |
21916 | { return this->do_negative_sign(); } | |
21917 | # 3714 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21918 | int | |
21919 | frac_digits() const | |
21920 | { return this->do_frac_digits(); } | |
21921 | # 3749 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21922 | pattern | |
21923 | pos_format() const | |
21924 | { return this->do_pos_format(); } | |
21925 | ||
21926 | pattern | |
21927 | neg_format() const | |
21928 | { return this->do_neg_format(); } | |
21929 | ||
21930 | ||
21931 | protected: | |
21932 | ||
21933 | virtual | |
21934 | ~moneypunct(); | |
21935 | # 3771 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21936 | virtual char_type | |
21937 | do_decimal_point() const | |
21938 | { return _M_data->_M_decimal_point; } | |
21939 | # 3783 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21940 | virtual char_type | |
21941 | do_thousands_sep() const | |
21942 | { return _M_data->_M_thousands_sep; } | |
21943 | # 3796 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21944 | virtual string | |
21945 | do_grouping() const | |
21946 | { return _M_data->_M_grouping; } | |
21947 | # 3809 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21948 | virtual string_type | |
21949 | do_curr_symbol() const | |
21950 | { return _M_data->_M_curr_symbol; } | |
21951 | # 3822 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21952 | virtual string_type | |
21953 | do_positive_sign() const | |
21954 | { return _M_data->_M_positive_sign; } | |
21955 | # 3835 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21956 | virtual string_type | |
21957 | do_negative_sign() const | |
21958 | { return _M_data->_M_negative_sign; } | |
21959 | # 3849 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21960 | virtual int | |
21961 | do_frac_digits() const | |
21962 | { return _M_data->_M_frac_digits; } | |
21963 | # 3863 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21964 | virtual pattern | |
21965 | do_pos_format() const | |
21966 | { return _M_data->_M_pos_format; } | |
21967 | # 3877 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21968 | virtual pattern | |
21969 | do_neg_format() const | |
21970 | { return _M_data->_M_neg_format; } | |
21971 | ||
21972 | ||
21973 | void | |
21974 | _M_initialize_moneypunct(__c_locale __cloc = __null, | |
21975 | const char* __name = __null); | |
21976 | }; | |
21977 | ||
21978 | template<typename _CharT, bool _Intl> | |
21979 | locale::id moneypunct<_CharT, _Intl>::id; | |
21980 | ||
21981 | template<typename _CharT, bool _Intl> | |
21982 | const bool moneypunct<_CharT, _Intl>::intl; | |
21983 | ||
21984 | template<> | |
21985 | moneypunct<char, true>::~moneypunct(); | |
21986 | ||
21987 | template<> | |
21988 | moneypunct<char, false>::~moneypunct(); | |
21989 | ||
21990 | template<> | |
21991 | void | |
21992 | moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*); | |
21993 | ||
21994 | template<> | |
21995 | void | |
21996 | moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*); | |
21997 | # 3926 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
21998 | template<typename _CharT, bool _Intl> | |
21999 | class moneypunct_byname : public moneypunct<_CharT, _Intl> | |
22000 | { | |
22001 | public: | |
22002 | typedef _CharT char_type; | |
22003 | typedef basic_string<_CharT> string_type; | |
22004 | ||
22005 | static const bool intl = _Intl; | |
22006 | ||
22007 | explicit | |
22008 | moneypunct_byname(const char* __s, size_t __refs = 0) | |
22009 | : moneypunct<_CharT, _Intl>(__refs) | |
22010 | { | |
22011 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
22012 | { | |
22013 | __c_locale __tmp; | |
22014 | this->_S_create_c_locale(__tmp, __s); | |
22015 | this->_M_initialize_moneypunct(__tmp); | |
22016 | this->_S_destroy_c_locale(__tmp); | |
22017 | } | |
22018 | } | |
22019 | ||
22020 | protected: | |
22021 | virtual | |
22022 | ~moneypunct_byname() { } | |
22023 | }; | |
22024 | ||
22025 | template<typename _CharT, bool _Intl> | |
22026 | const bool moneypunct_byname<_CharT, _Intl>::intl; | |
22027 | # 3968 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22028 | template<typename _CharT, typename _InIter> | |
22029 | class money_get : public locale::facet | |
22030 | { | |
22031 | public: | |
22032 | ||
22033 | ||
22034 | ||
22035 | typedef _CharT char_type; | |
22036 | typedef _InIter iter_type; | |
22037 | typedef basic_string<_CharT> string_type; | |
22038 | ||
22039 | ||
22040 | ||
22041 | static locale::id id; | |
22042 | # 3990 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22043 | explicit | |
22044 | money_get(size_t __refs = 0) : facet(__refs) { } | |
22045 | # 4020 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22046 | iter_type | |
22047 | get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
22048 | ios_base::iostate& __err, long double& __units) const | |
22049 | { return this->do_get(__s, __end, __intl, __io, __err, __units); } | |
22050 | # 4050 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22051 | iter_type | |
22052 | get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
22053 | ios_base::iostate& __err, string_type& __digits) const | |
22054 | { return this->do_get(__s, __end, __intl, __io, __err, __digits); } | |
22055 | ||
22056 | protected: | |
22057 | ||
22058 | virtual | |
22059 | ~money_get() { } | |
22060 | # 4067 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22061 | virtual iter_type | |
22062 | do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
22063 | ios_base::iostate& __err, long double& __units) const; | |
22064 | # 4078 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22065 | virtual iter_type | |
22066 | do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
22067 | ios_base::iostate& __err, string_type& __digits) const; | |
22068 | ||
22069 | template<bool _Intl> | |
22070 | iter_type | |
22071 | _M_extract(iter_type __s, iter_type __end, ios_base& __io, | |
22072 | ios_base::iostate& __err, string& __digits) const; | |
22073 | }; | |
22074 | ||
22075 | template<typename _CharT, typename _InIter> | |
22076 | locale::id money_get<_CharT, _InIter>::id; | |
22077 | # 4103 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22078 | template<typename _CharT, typename _OutIter> | |
22079 | class money_put : public locale::facet | |
22080 | { | |
22081 | public: | |
22082 | ||
22083 | ||
22084 | typedef _CharT char_type; | |
22085 | typedef _OutIter iter_type; | |
22086 | typedef basic_string<_CharT> string_type; | |
22087 | ||
22088 | ||
22089 | ||
22090 | static locale::id id; | |
22091 | # 4124 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22092 | explicit | |
22093 | money_put(size_t __refs = 0) : facet(__refs) { } | |
22094 | # 4144 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22095 | iter_type | |
22096 | put(iter_type __s, bool __intl, ios_base& __io, | |
22097 | char_type __fill, long double __units) const | |
22098 | { return this->do_put(__s, __intl, __io, __fill, __units); } | |
22099 | # 4166 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22100 | iter_type | |
22101 | put(iter_type __s, bool __intl, ios_base& __io, | |
22102 | char_type __fill, const string_type& __digits) const | |
22103 | { return this->do_put(__s, __intl, __io, __fill, __digits); } | |
22104 | ||
22105 | protected: | |
22106 | ||
22107 | virtual | |
22108 | ~money_put() { } | |
22109 | # 4194 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22110 | virtual iter_type | |
22111 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
22112 | long double __units) const; | |
22113 | # 4216 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22114 | virtual iter_type | |
22115 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
22116 | const string_type& __digits) const; | |
22117 | ||
22118 | template<bool _Intl> | |
22119 | iter_type | |
22120 | _M_insert(iter_type __s, ios_base& __io, char_type __fill, | |
22121 | const string_type& __digits) const; | |
22122 | }; | |
22123 | ||
22124 | template<typename _CharT, typename _OutIter> | |
22125 | locale::id money_put<_CharT, _OutIter>::id; | |
22126 | ||
22127 | ||
22128 | ||
22129 | ||
22130 | struct messages_base | |
22131 | { | |
22132 | typedef int catalog; | |
22133 | }; | |
22134 | # 4257 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22135 | template<typename _CharT> | |
22136 | class messages : public locale::facet, public messages_base | |
22137 | { | |
22138 | public: | |
22139 | ||
22140 | ||
22141 | ||
22142 | typedef _CharT char_type; | |
22143 | typedef basic_string<_CharT> string_type; | |
22144 | ||
22145 | ||
22146 | protected: | |
22147 | ||
22148 | ||
22149 | __c_locale _M_c_locale_messages; | |
22150 | const char* _M_name_messages; | |
22151 | ||
22152 | public: | |
22153 | ||
22154 | static locale::id id; | |
22155 | # 4285 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22156 | explicit | |
22157 | messages(size_t __refs = 0); | |
22158 | # 4299 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22159 | explicit | |
22160 | messages(__c_locale __cloc, const char* __s, size_t __refs = 0); | |
22161 | # 4312 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22162 | catalog | |
22163 | open(const basic_string<char>& __s, const locale& __loc) const | |
22164 | { return this->do_open(__s, __loc); } | |
22165 | # 4330 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22166 | catalog | |
22167 | open(const basic_string<char>&, const locale&, const char*) const; | |
22168 | # 4348 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22169 | string_type | |
22170 | get(catalog __c, int __set, int __msgid, const string_type& __s) const | |
22171 | { return this->do_get(__c, __set, __msgid, __s); } | |
22172 | # 4359 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22173 | void | |
22174 | close(catalog __c) const | |
22175 | { return this->do_close(__c); } | |
22176 | ||
22177 | protected: | |
22178 | ||
22179 | virtual | |
22180 | ~messages(); | |
22181 | # 4379 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22182 | virtual catalog | |
22183 | do_open(const basic_string<char>&, const locale&) const; | |
22184 | # 4398 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22185 | virtual string_type | |
22186 | do_get(catalog, int, int, const string_type& __dfault) const; | |
22187 | ||
22188 | ||
22189 | ||
22190 | ||
22191 | ||
22192 | ||
22193 | virtual void | |
22194 | do_close(catalog) const; | |
22195 | ||
22196 | ||
22197 | char* | |
22198 | _M_convert_to_char(const string_type& __msg) const | |
22199 | { | |
22200 | ||
22201 | return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str())); | |
22202 | } | |
22203 | ||
22204 | ||
22205 | string_type | |
22206 | _M_convert_from_char(char*) const | |
22207 | { | |
22208 | # 4455 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22209 | return string_type(); | |
22210 | } | |
22211 | }; | |
22212 | ||
22213 | template<typename _CharT> | |
22214 | locale::id messages<_CharT>::id; | |
22215 | ||
22216 | ||
22217 | template<> | |
22218 | string | |
22219 | messages<char>::do_get(catalog, int, int, const string&) const; | |
22220 | # 4474 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22221 | template<typename _CharT> | |
22222 | class messages_byname : public messages<_CharT> | |
22223 | { | |
22224 | public: | |
22225 | typedef _CharT char_type; | |
22226 | typedef basic_string<_CharT> string_type; | |
22227 | ||
22228 | explicit | |
22229 | messages_byname(const char* __s, size_t __refs = 0); | |
22230 | ||
22231 | protected: | |
22232 | virtual | |
22233 | ~messages_byname() | |
22234 | { } | |
22235 | }; | |
22236 | ||
22237 | ||
22238 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/messages_members.h" 1 3 | |
22239 | # 37 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bfin-linux-uclibc/bits/messages_members.h" 3 | |
22240 | template<typename _CharT> | |
22241 | messages<_CharT>::messages(size_t __refs) | |
22242 | : facet(__refs) | |
22243 | { _M_c_locale_messages = _S_get_c_locale(); } | |
22244 | ||
22245 | template<typename _CharT> | |
22246 | messages<_CharT>::messages(__c_locale, const char*, size_t __refs) | |
22247 | : facet(__refs) | |
22248 | { _M_c_locale_messages = _S_get_c_locale(); } | |
22249 | ||
22250 | template<typename _CharT> | |
22251 | typename messages<_CharT>::catalog | |
22252 | messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | |
22253 | const char*) const | |
22254 | { return this->do_open(__s, __loc); } | |
22255 | ||
22256 | ||
22257 | template<typename _CharT> | |
22258 | messages<_CharT>::~messages() | |
22259 | { _S_destroy_c_locale(_M_c_locale_messages); } | |
22260 | ||
22261 | template<typename _CharT> | |
22262 | typename messages<_CharT>::catalog | |
22263 | messages<_CharT>::do_open(const basic_string<char>&, const locale&) const | |
22264 | { return 0; } | |
22265 | ||
22266 | template<typename _CharT> | |
22267 | typename messages<_CharT>::string_type | |
22268 | messages<_CharT>::do_get(catalog, int, int, | |
22269 | const string_type& __dfault) const | |
22270 | { return __dfault; } | |
22271 | ||
22272 | template<typename _CharT> | |
22273 | void | |
22274 | messages<_CharT>::do_close(catalog) const | |
22275 | { } | |
22276 | ||
22277 | ||
22278 | template<typename _CharT> | |
22279 | messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) | |
22280 | : messages<_CharT>(__refs) | |
22281 | { | |
22282 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
22283 | { | |
22284 | this->_S_destroy_c_locale(this->_M_c_locale_messages); | |
22285 | this->_S_create_c_locale(this->_M_c_locale_messages, __s); | |
22286 | } | |
22287 | } | |
22288 | # 4492 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 2 3 | |
22289 | # 4500 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.h" 3 | |
22290 | template<typename _CharT> | |
22291 | inline bool | |
22292 | isspace(_CharT __c, const locale& __loc) | |
22293 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); } | |
22294 | ||
22295 | ||
22296 | template<typename _CharT> | |
22297 | inline bool | |
22298 | isprint(_CharT __c, const locale& __loc) | |
22299 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); } | |
22300 | ||
22301 | ||
22302 | template<typename _CharT> | |
22303 | inline bool | |
22304 | iscntrl(_CharT __c, const locale& __loc) | |
22305 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); } | |
22306 | ||
22307 | ||
22308 | template<typename _CharT> | |
22309 | inline bool | |
22310 | isupper(_CharT __c, const locale& __loc) | |
22311 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); } | |
22312 | ||
22313 | ||
22314 | template<typename _CharT> | |
22315 | inline bool | |
22316 | islower(_CharT __c, const locale& __loc) | |
22317 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); } | |
22318 | ||
22319 | ||
22320 | template<typename _CharT> | |
22321 | inline bool | |
22322 | isalpha(_CharT __c, const locale& __loc) | |
22323 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); } | |
22324 | ||
22325 | ||
22326 | template<typename _CharT> | |
22327 | inline bool | |
22328 | isdigit(_CharT __c, const locale& __loc) | |
22329 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); } | |
22330 | ||
22331 | ||
22332 | template<typename _CharT> | |
22333 | inline bool | |
22334 | ispunct(_CharT __c, const locale& __loc) | |
22335 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); } | |
22336 | ||
22337 | ||
22338 | template<typename _CharT> | |
22339 | inline bool | |
22340 | isxdigit(_CharT __c, const locale& __loc) | |
22341 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); } | |
22342 | ||
22343 | ||
22344 | template<typename _CharT> | |
22345 | inline bool | |
22346 | isalnum(_CharT __c, const locale& __loc) | |
22347 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); } | |
22348 | ||
22349 | ||
22350 | template<typename _CharT> | |
22351 | inline bool | |
22352 | isgraph(_CharT __c, const locale& __loc) | |
22353 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); } | |
22354 | ||
22355 | ||
22356 | template<typename _CharT> | |
22357 | inline _CharT | |
22358 | toupper(_CharT __c, const locale& __loc) | |
22359 | { return use_facet<ctype<_CharT> >(__loc).toupper(__c); } | |
22360 | ||
22361 | ||
22362 | template<typename _CharT> | |
22363 | inline _CharT | |
22364 | tolower(_CharT __c, const locale& __loc) | |
22365 | { return use_facet<ctype<_CharT> >(__loc).tolower(__c); } | |
22366 | } | |
22367 | # 46 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/locale" 2 3 | |
22368 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 1 3 | |
22369 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
22370 | ||
22371 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
22372 | ||
22373 | ||
22374 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/typeinfo" 1 3 | |
22375 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/typeinfo" 3 | |
22376 | #pragma GCC visibility push(default) | |
22377 | ||
22378 | extern "C++" { | |
22379 | ||
22380 | namespace __cxxabiv1 | |
22381 | { | |
22382 | class __class_type_info; | |
22383 | } | |
22384 | # 59 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/typeinfo" 3 | |
22385 | namespace std | |
22386 | { | |
22387 | ||
22388 | ||
22389 | ||
22390 | ||
22391 | ||
22392 | ||
22393 | class type_info | |
22394 | { | |
22395 | public: | |
22396 | ||
22397 | ||
22398 | ||
22399 | ||
22400 | virtual ~type_info(); | |
22401 | ||
22402 | private: | |
22403 | ||
22404 | type_info& operator=(const type_info&); | |
22405 | type_info(const type_info&); | |
22406 | ||
22407 | protected: | |
22408 | const char *__name; | |
22409 | ||
22410 | protected: | |
22411 | explicit type_info(const char *__n): __name(__n) { } | |
22412 | ||
22413 | public: | |
22414 | ||
22415 | ||
22416 | ||
22417 | const char* name() const | |
22418 | { return __name; } | |
22419 | # 105 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/typeinfo" 3 | |
22420 | bool before(const type_info& __arg) const | |
22421 | { return __name < __arg.__name; } | |
22422 | bool operator==(const type_info& __arg) const | |
22423 | { return __name == __arg.__name; } | |
22424 | ||
22425 | bool operator!=(const type_info& __arg) const | |
22426 | { return !operator==(__arg); } | |
22427 | ||
22428 | ||
22429 | public: | |
22430 | ||
22431 | virtual bool __is_pointer_p() const; | |
22432 | ||
22433 | virtual bool __is_function_p() const; | |
22434 | ||
22435 | ||
22436 | ||
22437 | ||
22438 | ||
22439 | ||
22440 | ||
22441 | virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, | |
22442 | unsigned __outer) const; | |
22443 | ||
22444 | ||
22445 | virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, | |
22446 | void **__obj_ptr) const; | |
22447 | }; | |
22448 | ||
22449 | ||
22450 | ||
22451 | ||
22452 | ||
22453 | ||
22454 | class bad_cast : public exception | |
22455 | { | |
22456 | public: | |
22457 | bad_cast() throw() { } | |
22458 | ||
22459 | ||
22460 | virtual ~bad_cast() throw(); | |
22461 | }; | |
22462 | ||
22463 | ||
22464 | class bad_typeid : public exception | |
22465 | { | |
22466 | public: | |
22467 | bad_typeid () throw() { } | |
22468 | ||
22469 | ||
22470 | virtual ~bad_typeid() throw(); | |
22471 | }; | |
22472 | } | |
22473 | ||
22474 | #pragma GCC visibility pop | |
22475 | ||
22476 | } | |
22477 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 2 3 | |
22478 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/streambuf_iterator.h" 1 3 | |
22479 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/streambuf_iterator.h" 3 | |
22480 | ||
22481 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/streambuf_iterator.h" 3 | |
22482 | ||
22483 | ||
22484 | ||
22485 | ||
22486 | ||
22487 | ||
22488 | namespace std | |
22489 | { | |
22490 | ||
22491 | ||
22492 | template<typename _CharT, typename _Traits> | |
22493 | class istreambuf_iterator | |
22494 | : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, | |
22495 | _CharT*, _CharT&> | |
22496 | { | |
22497 | public: | |
22498 | ||
22499 | ||
22500 | ||
22501 | typedef _CharT char_type; | |
22502 | typedef _Traits traits_type; | |
22503 | typedef typename _Traits::int_type int_type; | |
22504 | typedef basic_streambuf<_CharT, _Traits> streambuf_type; | |
22505 | typedef basic_istream<_CharT, _Traits> istream_type; | |
22506 | ||
22507 | ||
22508 | private: | |
22509 | ||
22510 | ||
22511 | ||
22512 | ||
22513 | ||
22514 | ||
22515 | ||
22516 | mutable streambuf_type* _M_sbuf; | |
22517 | mutable int_type _M_c; | |
22518 | ||
22519 | public: | |
22520 | ||
22521 | istreambuf_iterator() throw() | |
22522 | : _M_sbuf(0), _M_c(traits_type::eof()) { } | |
22523 | ||
22524 | ||
22525 | istreambuf_iterator(istream_type& __s) throw() | |
22526 | : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } | |
22527 | ||
22528 | ||
22529 | istreambuf_iterator(streambuf_type* __s) throw() | |
22530 | : _M_sbuf(__s), _M_c(traits_type::eof()) { } | |
22531 | ||
22532 | ||
22533 | ||
22534 | ||
22535 | char_type | |
22536 | operator*() const | |
22537 | { | |
22538 | ||
22539 | ||
22540 | ||
22541 | ||
22542 | ||
22543 | ||
22544 | ||
22545 | return traits_type::to_char_type(_M_get()); | |
22546 | } | |
22547 | ||
22548 | ||
22549 | istreambuf_iterator& | |
22550 | operator++() | |
22551 | { | |
22552 | ; | |
22553 | ||
22554 | ||
22555 | if (_M_sbuf) | |
22556 | { | |
22557 | _M_sbuf->sbumpc(); | |
22558 | _M_c = traits_type::eof(); | |
22559 | } | |
22560 | return *this; | |
22561 | } | |
22562 | ||
22563 | ||
22564 | istreambuf_iterator | |
22565 | operator++(int) | |
22566 | { | |
22567 | ; | |
22568 | ||
22569 | ||
22570 | ||
22571 | istreambuf_iterator __old = *this; | |
22572 | if (_M_sbuf) | |
22573 | { | |
22574 | __old._M_c = _M_sbuf->sbumpc(); | |
22575 | _M_c = traits_type::eof(); | |
22576 | } | |
22577 | return __old; | |
22578 | } | |
22579 | ||
22580 | ||
22581 | ||
22582 | ||
22583 | ||
22584 | bool | |
22585 | equal(const istreambuf_iterator& __b) const | |
22586 | { | |
22587 | const bool __thiseof = _M_at_eof(); | |
22588 | const bool __beof = __b._M_at_eof(); | |
22589 | return (__thiseof && __beof || (!__thiseof && !__beof)); | |
22590 | } | |
22591 | ||
22592 | private: | |
22593 | int_type | |
22594 | _M_get() const | |
22595 | { | |
22596 | const int_type __eof = traits_type::eof(); | |
22597 | int_type __ret = __eof; | |
22598 | if (_M_sbuf) | |
22599 | { | |
22600 | if (!traits_type::eq_int_type(_M_c, __eof)) | |
22601 | __ret = _M_c; | |
22602 | else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), | |
22603 | __eof)) | |
22604 | _M_c = __ret; | |
22605 | else | |
22606 | _M_sbuf = 0; | |
22607 | } | |
22608 | return __ret; | |
22609 | } | |
22610 | ||
22611 | bool | |
22612 | _M_at_eof() const | |
22613 | { | |
22614 | const int_type __eof = traits_type::eof(); | |
22615 | return traits_type::eq_int_type(_M_get(), __eof); | |
22616 | } | |
22617 | }; | |
22618 | ||
22619 | template<typename _CharT, typename _Traits> | |
22620 | inline bool | |
22621 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | |
22622 | const istreambuf_iterator<_CharT, _Traits>& __b) | |
22623 | { return __a.equal(__b); } | |
22624 | ||
22625 | template<typename _CharT, typename _Traits> | |
22626 | inline bool | |
22627 | operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, | |
22628 | const istreambuf_iterator<_CharT, _Traits>& __b) | |
22629 | { return !__a.equal(__b); } | |
22630 | ||
22631 | ||
22632 | template<typename _CharT, typename _Traits> | |
22633 | class ostreambuf_iterator | |
22634 | : public iterator<output_iterator_tag, void, void, void, void> | |
22635 | { | |
22636 | public: | |
22637 | ||
22638 | ||
22639 | ||
22640 | typedef _CharT char_type; | |
22641 | typedef _Traits traits_type; | |
22642 | typedef basic_streambuf<_CharT, _Traits> streambuf_type; | |
22643 | typedef basic_ostream<_CharT, _Traits> ostream_type; | |
22644 | ||
22645 | ||
22646 | private: | |
22647 | streambuf_type* _M_sbuf; | |
22648 | bool _M_failed; | |
22649 | ||
22650 | public: | |
22651 | ||
22652 | ostreambuf_iterator(ostream_type& __s) throw () | |
22653 | : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } | |
22654 | ||
22655 | ||
22656 | ostreambuf_iterator(streambuf_type* __s) throw () | |
22657 | : _M_sbuf(__s), _M_failed(!_M_sbuf) { } | |
22658 | ||
22659 | ||
22660 | ostreambuf_iterator& | |
22661 | operator=(_CharT __c) | |
22662 | { | |
22663 | if (!_M_failed && | |
22664 | _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) | |
22665 | _M_failed = true; | |
22666 | return *this; | |
22667 | } | |
22668 | ||
22669 | ||
22670 | ostreambuf_iterator& | |
22671 | operator*() | |
22672 | { return *this; } | |
22673 | ||
22674 | ||
22675 | ostreambuf_iterator& | |
22676 | operator++(int) | |
22677 | { return *this; } | |
22678 | ||
22679 | ||
22680 | ostreambuf_iterator& | |
22681 | operator++() | |
22682 | { return *this; } | |
22683 | ||
22684 | ||
22685 | bool | |
22686 | failed() const throw() | |
22687 | { return _M_failed; } | |
22688 | ||
22689 | ostreambuf_iterator& | |
22690 | _M_put(const _CharT* __ws, streamsize __len) | |
22691 | { | |
22692 | if (__builtin_expect(!_M_failed, true) | |
22693 | && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, | |
22694 | false)) | |
22695 | _M_failed = true; | |
22696 | return *this; | |
22697 | } | |
22698 | }; | |
22699 | } | |
22700 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 2 3 | |
22701 | ||
22702 | namespace std | |
22703 | { | |
22704 | template<typename _Facet> | |
22705 | locale | |
22706 | locale::combine(const locale& __other) const | |
22707 | { | |
22708 | _Impl* __tmp = new _Impl(*_M_impl, 1); | |
22709 | try | |
22710 | { | |
22711 | __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); | |
22712 | } | |
22713 | catch(...) | |
22714 | { | |
22715 | __tmp->_M_remove_reference(); | |
22716 | throw; | |
22717 | } | |
22718 | return locale(__tmp); | |
22719 | } | |
22720 | ||
22721 | template<typename _CharT, typename _Traits, typename _Alloc> | |
22722 | bool | |
22723 | locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, | |
22724 | const basic_string<_CharT, _Traits, _Alloc>& __s2) const | |
22725 | { | |
22726 | typedef std::collate<_CharT> __collate_type; | |
22727 | const __collate_type& __collate = use_facet<__collate_type>(*this); | |
22728 | return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), | |
22729 | __s2.data(), __s2.data() + __s2.length()) < 0); | |
22730 | } | |
22731 | # 86 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
22732 | template<typename _Facet> | |
22733 | inline bool | |
22734 | has_facet(const locale& __loc) throw() | |
22735 | { | |
22736 | const size_t __i = _Facet::id._M_id(); | |
22737 | const locale::facet** __facets = __loc._M_impl->_M_facets; | |
22738 | return (__i < __loc._M_impl->_M_facets_size && __facets[__i]); | |
22739 | } | |
22740 | # 108 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
22741 | template<typename _Facet> | |
22742 | inline const _Facet& | |
22743 | use_facet(const locale& __loc) | |
22744 | { | |
22745 | const size_t __i = _Facet::id._M_id(); | |
22746 | const locale::facet** __facets = __loc._M_impl->_M_facets; | |
22747 | if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i])) | |
22748 | __throw_bad_cast(); | |
22749 | return static_cast<const _Facet&>(*__facets[__i]); | |
22750 | } | |
22751 | ||
22752 | ||
22753 | ||
22754 | template<typename _Facet> | |
22755 | struct __use_cache | |
22756 | { | |
22757 | const _Facet* | |
22758 | operator() (const locale& __loc) const; | |
22759 | }; | |
22760 | ||
22761 | ||
22762 | template<typename _CharT> | |
22763 | struct __use_cache<__numpunct_cache<_CharT> > | |
22764 | { | |
22765 | const __numpunct_cache<_CharT>* | |
22766 | operator() (const locale& __loc) const | |
22767 | { | |
22768 | const size_t __i = numpunct<_CharT>::id._M_id(); | |
22769 | const locale::facet** __caches = __loc._M_impl->_M_caches; | |
22770 | if (!__caches[__i]) | |
22771 | { | |
22772 | __numpunct_cache<_CharT>* __tmp = __null; | |
22773 | try | |
22774 | { | |
22775 | __tmp = new __numpunct_cache<_CharT>; | |
22776 | __tmp->_M_cache(__loc); | |
22777 | } | |
22778 | catch(...) | |
22779 | { | |
22780 | delete __tmp; | |
22781 | throw; | |
22782 | } | |
22783 | __loc._M_impl->_M_install_cache(__tmp, __i); | |
22784 | } | |
22785 | return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]); | |
22786 | } | |
22787 | }; | |
22788 | ||
22789 | template<typename _CharT, bool _Intl> | |
22790 | struct __use_cache<__moneypunct_cache<_CharT, _Intl> > | |
22791 | { | |
22792 | const __moneypunct_cache<_CharT, _Intl>* | |
22793 | operator() (const locale& __loc) const | |
22794 | { | |
22795 | const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); | |
22796 | const locale::facet** __caches = __loc._M_impl->_M_caches; | |
22797 | if (!__caches[__i]) | |
22798 | { | |
22799 | __moneypunct_cache<_CharT, _Intl>* __tmp = __null; | |
22800 | try | |
22801 | { | |
22802 | __tmp = new __moneypunct_cache<_CharT, _Intl>; | |
22803 | __tmp->_M_cache(__loc); | |
22804 | } | |
22805 | catch(...) | |
22806 | { | |
22807 | delete __tmp; | |
22808 | throw; | |
22809 | } | |
22810 | __loc._M_impl->_M_install_cache(__tmp, __i); | |
22811 | } | |
22812 | return static_cast< | |
22813 | const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); | |
22814 | } | |
22815 | }; | |
22816 | ||
22817 | template<typename _CharT> | |
22818 | void | |
22819 | __numpunct_cache<_CharT>::_M_cache(const locale& __loc) | |
22820 | { | |
22821 | _M_allocated = true; | |
22822 | ||
22823 | const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); | |
22824 | ||
22825 | _M_grouping_size = __np.grouping().size(); | |
22826 | char* __grouping = new char[_M_grouping_size]; | |
22827 | __np.grouping().copy(__grouping, _M_grouping_size); | |
22828 | _M_grouping = __grouping; | |
22829 | _M_use_grouping = (_M_grouping_size | |
22830 | && static_cast<signed char>(__np.grouping()[0]) > 0); | |
22831 | ||
22832 | _M_truename_size = __np.truename().size(); | |
22833 | _CharT* __truename = new _CharT[_M_truename_size]; | |
22834 | __np.truename().copy(__truename, _M_truename_size); | |
22835 | _M_truename = __truename; | |
22836 | ||
22837 | _M_falsename_size = __np.falsename().size(); | |
22838 | _CharT* __falsename = new _CharT[_M_falsename_size]; | |
22839 | __np.falsename().copy(__falsename, _M_falsename_size); | |
22840 | _M_falsename = __falsename; | |
22841 | ||
22842 | _M_decimal_point = __np.decimal_point(); | |
22843 | _M_thousands_sep = __np.thousands_sep(); | |
22844 | ||
22845 | const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); | |
22846 | __ct.widen(__num_base::_S_atoms_out, | |
22847 | __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); | |
22848 | __ct.widen(__num_base::_S_atoms_in, | |
22849 | __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); | |
22850 | } | |
22851 | ||
22852 | template<typename _CharT, bool _Intl> | |
22853 | void | |
22854 | __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) | |
22855 | { | |
22856 | _M_allocated = true; | |
22857 | ||
22858 | const moneypunct<_CharT, _Intl>& __mp = | |
22859 | use_facet<moneypunct<_CharT, _Intl> >(__loc); | |
22860 | ||
22861 | _M_grouping_size = __mp.grouping().size(); | |
22862 | char* __grouping = new char[_M_grouping_size]; | |
22863 | __mp.grouping().copy(__grouping, _M_grouping_size); | |
22864 | _M_grouping = __grouping; | |
22865 | _M_use_grouping = (_M_grouping_size | |
22866 | && static_cast<signed char>(__mp.grouping()[0]) > 0); | |
22867 | ||
22868 | _M_decimal_point = __mp.decimal_point(); | |
22869 | _M_thousands_sep = __mp.thousands_sep(); | |
22870 | _M_frac_digits = __mp.frac_digits(); | |
22871 | ||
22872 | _M_curr_symbol_size = __mp.curr_symbol().size(); | |
22873 | _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size]; | |
22874 | __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); | |
22875 | _M_curr_symbol = __curr_symbol; | |
22876 | ||
22877 | _M_positive_sign_size = __mp.positive_sign().size(); | |
22878 | _CharT* __positive_sign = new _CharT[_M_positive_sign_size]; | |
22879 | __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); | |
22880 | _M_positive_sign = __positive_sign; | |
22881 | ||
22882 | _M_negative_sign_size = __mp.negative_sign().size(); | |
22883 | _CharT* __negative_sign = new _CharT[_M_negative_sign_size]; | |
22884 | __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); | |
22885 | _M_negative_sign = __negative_sign; | |
22886 | ||
22887 | _M_pos_format = __mp.pos_format(); | |
22888 | _M_neg_format = __mp.neg_format(); | |
22889 | ||
22890 | const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); | |
22891 | __ct.widen(money_base::_S_atoms, | |
22892 | money_base::_S_atoms + money_base::_S_end, _M_atoms); | |
22893 | } | |
22894 | # 271 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
22895 | static bool | |
22896 | __verify_grouping(const char* __grouping, size_t __grouping_size, | |
22897 | const string& __grouping_tmp); | |
22898 | ||
22899 | template<typename _CharT, typename _InIter> | |
22900 | _InIter | |
22901 | num_get<_CharT, _InIter>:: | |
22902 | _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, | |
22903 | ios_base::iostate& __err, string& __xtrc) const | |
22904 | { | |
22905 | typedef char_traits<_CharT> __traits_type; | |
22906 | typedef __numpunct_cache<_CharT> __cache_type; | |
22907 | __use_cache<__cache_type> __uc; | |
22908 | const locale& __loc = __io._M_getloc(); | |
22909 | const __cache_type* __lc = __uc(__loc); | |
22910 | const _CharT* __lit = __lc->_M_atoms_in; | |
22911 | char_type __c = char_type(); | |
22912 | ||
22913 | ||
22914 | bool __testeof = __beg == __end; | |
22915 | ||
22916 | ||
22917 | if (!__testeof) | |
22918 | { | |
22919 | __c = *__beg; | |
22920 | const bool __plus = __c == __lit[__num_base::_S_iplus]; | |
22921 | if ((__plus || __c == __lit[__num_base::_S_iminus]) | |
22922 | && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
22923 | && !(__c == __lc->_M_decimal_point)) | |
22924 | { | |
22925 | __xtrc += __plus ? '+' : '-'; | |
22926 | if (++__beg != __end) | |
22927 | __c = *__beg; | |
22928 | else | |
22929 | __testeof = true; | |
22930 | } | |
22931 | } | |
22932 | ||
22933 | ||
22934 | bool __found_mantissa = false; | |
22935 | int __sep_pos = 0; | |
22936 | while (!__testeof) | |
22937 | { | |
22938 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep | |
22939 | || __c == __lc->_M_decimal_point) | |
22940 | break; | |
22941 | else if (__c == __lit[__num_base::_S_izero]) | |
22942 | { | |
22943 | if (!__found_mantissa) | |
22944 | { | |
22945 | __xtrc += '0'; | |
22946 | __found_mantissa = true; | |
22947 | } | |
22948 | ++__sep_pos; | |
22949 | ||
22950 | if (++__beg != __end) | |
22951 | __c = *__beg; | |
22952 | else | |
22953 | __testeof = true; | |
22954 | } | |
22955 | else | |
22956 | break; | |
22957 | } | |
22958 | ||
22959 | ||
22960 | bool __found_dec = false; | |
22961 | bool __found_sci = false; | |
22962 | string __found_grouping; | |
22963 | if (__lc->_M_use_grouping) | |
22964 | __found_grouping.reserve(32); | |
22965 | const char_type* __q; | |
22966 | const char_type* __lit_zero = __lit + __num_base::_S_izero; | |
22967 | while (!__testeof) | |
22968 | { | |
22969 | ||
22970 | ||
22971 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
22972 | { | |
22973 | if (!__found_dec && !__found_sci) | |
22974 | { | |
22975 | ||
22976 | ||
22977 | if (__sep_pos) | |
22978 | { | |
22979 | __found_grouping += static_cast<char>(__sep_pos); | |
22980 | __sep_pos = 0; | |
22981 | } | |
22982 | else | |
22983 | { | |
22984 | ||
22985 | ||
22986 | __xtrc.clear(); | |
22987 | break; | |
22988 | } | |
22989 | } | |
22990 | else | |
22991 | break; | |
22992 | } | |
22993 | else if (__c == __lc->_M_decimal_point) | |
22994 | { | |
22995 | if (!__found_dec && !__found_sci) | |
22996 | { | |
22997 | ||
22998 | ||
22999 | ||
23000 | if (__found_grouping.size()) | |
23001 | __found_grouping += static_cast<char>(__sep_pos); | |
23002 | __xtrc += '.'; | |
23003 | __found_dec = true; | |
23004 | } | |
23005 | else | |
23006 | break; | |
23007 | } | |
23008 | else if ((__q = __traits_type::find(__lit_zero, 10, __c))) | |
23009 | { | |
23010 | __xtrc += __num_base::_S_atoms_in[__q - __lit]; | |
23011 | __found_mantissa = true; | |
23012 | ++__sep_pos; | |
23013 | } | |
23014 | else if ((__c == __lit[__num_base::_S_ie] | |
23015 | || __c == __lit[__num_base::_S_iE]) | |
23016 | && !__found_sci && __found_mantissa) | |
23017 | { | |
23018 | ||
23019 | if (__found_grouping.size() && !__found_dec) | |
23020 | __found_grouping += static_cast<char>(__sep_pos); | |
23021 | __xtrc += 'e'; | |
23022 | __found_sci = true; | |
23023 | ||
23024 | ||
23025 | if (++__beg != __end) | |
23026 | { | |
23027 | __c = *__beg; | |
23028 | const bool __plus = __c == __lit[__num_base::_S_iplus]; | |
23029 | if ((__plus || __c == __lit[__num_base::_S_iminus]) | |
23030 | && !(__lc->_M_use_grouping | |
23031 | && __c == __lc->_M_thousands_sep) | |
23032 | && !(__c == __lc->_M_decimal_point)) | |
23033 | __xtrc += __plus ? '+' : '-'; | |
23034 | else | |
23035 | continue; | |
23036 | } | |
23037 | else | |
23038 | { | |
23039 | __testeof = true; | |
23040 | break; | |
23041 | } | |
23042 | } | |
23043 | else | |
23044 | ||
23045 | break; | |
23046 | ||
23047 | if (++__beg != __end) | |
23048 | __c = *__beg; | |
23049 | else | |
23050 | __testeof = true; | |
23051 | } | |
23052 | ||
23053 | ||
23054 | ||
23055 | if (__found_grouping.size()) | |
23056 | { | |
23057 | ||
23058 | if (!__found_dec && !__found_sci) | |
23059 | __found_grouping += static_cast<char>(__sep_pos); | |
23060 | ||
23061 | if (!std::__verify_grouping(__lc->_M_grouping, | |
23062 | __lc->_M_grouping_size, | |
23063 | __found_grouping)) | |
23064 | __err |= ios_base::failbit; | |
23065 | } | |
23066 | ||
23067 | ||
23068 | if (__testeof) | |
23069 | __err |= ios_base::eofbit; | |
23070 | return __beg; | |
23071 | } | |
23072 | ||
23073 | template<typename _ValueT> | |
23074 | struct __to_unsigned_type | |
23075 | { typedef _ValueT __type; }; | |
23076 | ||
23077 | template<> | |
23078 | struct __to_unsigned_type<long> | |
23079 | { typedef unsigned long __type; }; | |
23080 | ||
23081 | ||
23082 | template<> | |
23083 | struct __to_unsigned_type<long long> | |
23084 | { typedef unsigned long long __type; }; | |
23085 | ||
23086 | ||
23087 | template<typename _CharT, typename _InIter> | |
23088 | template<typename _ValueT> | |
23089 | _InIter | |
23090 | num_get<_CharT, _InIter>:: | |
23091 | _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, | |
23092 | ios_base::iostate& __err, _ValueT& __v) const | |
23093 | { | |
23094 | typedef char_traits<_CharT> __traits_type; | |
23095 | typedef typename __to_unsigned_type<_ValueT>::__type __unsigned_type; | |
23096 | typedef __numpunct_cache<_CharT> __cache_type; | |
23097 | __use_cache<__cache_type> __uc; | |
23098 | const locale& __loc = __io._M_getloc(); | |
23099 | const __cache_type* __lc = __uc(__loc); | |
23100 | const _CharT* __lit = __lc->_M_atoms_in; | |
23101 | char_type __c = char_type(); | |
23102 | ||
23103 | ||
23104 | const ios_base::fmtflags __basefield = __io.flags() | |
23105 | & ios_base::basefield; | |
23106 | const bool __oct = __basefield == ios_base::oct; | |
23107 | int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); | |
23108 | ||
23109 | ||
23110 | bool __testeof = __beg == __end; | |
23111 | ||
23112 | ||
23113 | bool __negative = false; | |
23114 | if (!__testeof) | |
23115 | { | |
23116 | __c = *__beg; | |
23117 | if (numeric_limits<_ValueT>::is_signed) | |
23118 | __negative = __c == __lit[__num_base::_S_iminus]; | |
23119 | if ((__negative || __c == __lit[__num_base::_S_iplus]) | |
23120 | && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
23121 | && !(__c == __lc->_M_decimal_point)) | |
23122 | { | |
23123 | if (++__beg != __end) | |
23124 | __c = *__beg; | |
23125 | else | |
23126 | __testeof = true; | |
23127 | } | |
23128 | } | |
23129 | ||
23130 | ||
23131 | ||
23132 | bool __found_zero = false; | |
23133 | int __sep_pos = 0; | |
23134 | while (!__testeof) | |
23135 | { | |
23136 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep | |
23137 | || __c == __lc->_M_decimal_point) | |
23138 | break; | |
23139 | else if (__c == __lit[__num_base::_S_izero] | |
23140 | && (!__found_zero || __base == 10)) | |
23141 | { | |
23142 | __found_zero = true; | |
23143 | ++__sep_pos; | |
23144 | if (__basefield == 0) | |
23145 | __base = 8; | |
23146 | if (__base == 8) | |
23147 | __sep_pos = 0; | |
23148 | } | |
23149 | else if (__found_zero | |
23150 | && (__c == __lit[__num_base::_S_ix] | |
23151 | || __c == __lit[__num_base::_S_iX])) | |
23152 | { | |
23153 | if (__basefield == 0) | |
23154 | __base = 16; | |
23155 | if (__base == 16) | |
23156 | { | |
23157 | __found_zero = false; | |
23158 | __sep_pos = 0; | |
23159 | } | |
23160 | else | |
23161 | break; | |
23162 | } | |
23163 | else | |
23164 | break; | |
23165 | ||
23166 | if (++__beg != __end) | |
23167 | { | |
23168 | __c = *__beg; | |
23169 | if (!__found_zero) | |
23170 | break; | |
23171 | } | |
23172 | else | |
23173 | __testeof = true; | |
23174 | } | |
23175 | ||
23176 | ||
23177 | ||
23178 | const size_t __len = (__base == 16 ? __num_base::_S_iend | |
23179 | - __num_base::_S_izero : __base); | |
23180 | ||
23181 | ||
23182 | string __found_grouping; | |
23183 | if (__lc->_M_use_grouping) | |
23184 | __found_grouping.reserve(32); | |
23185 | bool __testfail = false; | |
23186 | const __unsigned_type __max = __negative ? | |
23187 | -numeric_limits<_ValueT>::min() : numeric_limits<_ValueT>::max(); | |
23188 | const __unsigned_type __smax = __max / __base; | |
23189 | __unsigned_type __result = 0; | |
23190 | const char_type* __q; | |
23191 | const char_type* __lit_zero = __lit + __num_base::_S_izero; | |
23192 | while (!__testeof) | |
23193 | { | |
23194 | ||
23195 | ||
23196 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
23197 | { | |
23198 | ||
23199 | ||
23200 | if (__sep_pos) | |
23201 | { | |
23202 | __found_grouping += static_cast<char>(__sep_pos); | |
23203 | __sep_pos = 0; | |
23204 | } | |
23205 | else | |
23206 | { | |
23207 | __testfail = true; | |
23208 | break; | |
23209 | } | |
23210 | } | |
23211 | else if (__c == __lc->_M_decimal_point) | |
23212 | break; | |
23213 | else if ((__q = __traits_type::find(__lit_zero, __len, __c))) | |
23214 | { | |
23215 | int __digit = __q - __lit_zero; | |
23216 | if (__digit > 15) | |
23217 | __digit -= 6; | |
23218 | if (__result > __smax) | |
23219 | __testfail = true; | |
23220 | else | |
23221 | { | |
23222 | __result *= __base; | |
23223 | __testfail |= __result > __max - __digit; | |
23224 | __result += __digit; | |
23225 | ++__sep_pos; | |
23226 | } | |
23227 | } | |
23228 | else | |
23229 | ||
23230 | break; | |
23231 | ||
23232 | if (++__beg != __end) | |
23233 | __c = *__beg; | |
23234 | else | |
23235 | __testeof = true; | |
23236 | } | |
23237 | ||
23238 | ||
23239 | ||
23240 | if (__found_grouping.size()) | |
23241 | { | |
23242 | ||
23243 | __found_grouping += static_cast<char>(__sep_pos); | |
23244 | ||
23245 | if (!std::__verify_grouping(__lc->_M_grouping, | |
23246 | __lc->_M_grouping_size, | |
23247 | __found_grouping)) | |
23248 | __err |= ios_base::failbit; | |
23249 | } | |
23250 | ||
23251 | if (!__testfail && (__sep_pos || __found_zero | |
23252 | || __found_grouping.size())) | |
23253 | __v = __negative ? -__result : __result; | |
23254 | else | |
23255 | __err |= ios_base::failbit; | |
23256 | ||
23257 | if (__testeof) | |
23258 | __err |= ios_base::eofbit; | |
23259 | return __beg; | |
23260 | } | |
23261 | ||
23262 | ||
23263 | ||
23264 | template<typename _CharT, typename _InIter> | |
23265 | _InIter | |
23266 | num_get<_CharT, _InIter>:: | |
23267 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23268 | ios_base::iostate& __err, bool& __v) const | |
23269 | { | |
23270 | if (!(__io.flags() & ios_base::boolalpha)) | |
23271 | { | |
23272 | ||
23273 | ||
23274 | ||
23275 | long __l = -1; | |
23276 | __beg = _M_extract_int(__beg, __end, __io, __err, __l); | |
23277 | if (__l == 0 || __l == 1) | |
23278 | __v = __l; | |
23279 | else | |
23280 | __err |= ios_base::failbit; | |
23281 | } | |
23282 | else | |
23283 | { | |
23284 | ||
23285 | typedef __numpunct_cache<_CharT> __cache_type; | |
23286 | __use_cache<__cache_type> __uc; | |
23287 | const locale& __loc = __io._M_getloc(); | |
23288 | const __cache_type* __lc = __uc(__loc); | |
23289 | ||
23290 | bool __testf = true; | |
23291 | bool __testt = true; | |
23292 | size_t __n; | |
23293 | bool __testeof = __beg == __end; | |
23294 | for (__n = 0; !__testeof; ++__n) | |
23295 | { | |
23296 | const char_type __c = *__beg; | |
23297 | ||
23298 | if (__testf) | |
23299 | if (__n < __lc->_M_falsename_size) | |
23300 | __testf = __c == __lc->_M_falsename[__n]; | |
23301 | else | |
23302 | break; | |
23303 | ||
23304 | if (__testt) | |
23305 | if (__n < __lc->_M_truename_size) | |
23306 | __testt = __c == __lc->_M_truename[__n]; | |
23307 | else | |
23308 | break; | |
23309 | ||
23310 | if (!__testf && !__testt) | |
23311 | break; | |
23312 | ||
23313 | if (++__beg == __end) | |
23314 | __testeof = true; | |
23315 | } | |
23316 | if (__testf && __n == __lc->_M_falsename_size) | |
23317 | __v = 0; | |
23318 | else if (__testt && __n == __lc->_M_truename_size) | |
23319 | __v = 1; | |
23320 | else | |
23321 | __err |= ios_base::failbit; | |
23322 | ||
23323 | if (__testeof) | |
23324 | __err |= ios_base::eofbit; | |
23325 | } | |
23326 | return __beg; | |
23327 | } | |
23328 | ||
23329 | template<typename _CharT, typename _InIter> | |
23330 | _InIter | |
23331 | num_get<_CharT, _InIter>:: | |
23332 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23333 | ios_base::iostate& __err, long& __v) const | |
23334 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
23335 | ||
23336 | template<typename _CharT, typename _InIter> | |
23337 | _InIter | |
23338 | num_get<_CharT, _InIter>:: | |
23339 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23340 | ios_base::iostate& __err, unsigned short& __v) const | |
23341 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
23342 | ||
23343 | template<typename _CharT, typename _InIter> | |
23344 | _InIter | |
23345 | num_get<_CharT, _InIter>:: | |
23346 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23347 | ios_base::iostate& __err, unsigned int& __v) const | |
23348 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
23349 | ||
23350 | template<typename _CharT, typename _InIter> | |
23351 | _InIter | |
23352 | num_get<_CharT, _InIter>:: | |
23353 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23354 | ios_base::iostate& __err, unsigned long& __v) const | |
23355 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
23356 | ||
23357 | ||
23358 | template<typename _CharT, typename _InIter> | |
23359 | _InIter | |
23360 | num_get<_CharT, _InIter>:: | |
23361 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23362 | ios_base::iostate& __err, long long& __v) const | |
23363 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
23364 | ||
23365 | template<typename _CharT, typename _InIter> | |
23366 | _InIter | |
23367 | num_get<_CharT, _InIter>:: | |
23368 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23369 | ios_base::iostate& __err, unsigned long long& __v) const | |
23370 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
23371 | ||
23372 | ||
23373 | template<typename _CharT, typename _InIter> | |
23374 | _InIter | |
23375 | num_get<_CharT, _InIter>:: | |
23376 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23377 | ios_base::iostate& __err, float& __v) const | |
23378 | { | |
23379 | string __xtrc; | |
23380 | __xtrc.reserve(32); | |
23381 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
23382 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
23383 | return __beg; | |
23384 | } | |
23385 | ||
23386 | template<typename _CharT, typename _InIter> | |
23387 | _InIter | |
23388 | num_get<_CharT, _InIter>:: | |
23389 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23390 | ios_base::iostate& __err, double& __v) const | |
23391 | { | |
23392 | string __xtrc; | |
23393 | __xtrc.reserve(32); | |
23394 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
23395 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
23396 | return __beg; | |
23397 | } | |
23398 | ||
23399 | template<typename _CharT, typename _InIter> | |
23400 | _InIter | |
23401 | num_get<_CharT, _InIter>:: | |
23402 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23403 | ios_base::iostate& __err, long double& __v) const | |
23404 | { | |
23405 | string __xtrc; | |
23406 | __xtrc.reserve(32); | |
23407 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
23408 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
23409 | return __beg; | |
23410 | } | |
23411 | ||
23412 | template<typename _CharT, typename _InIter> | |
23413 | _InIter | |
23414 | num_get<_CharT, _InIter>:: | |
23415 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
23416 | ios_base::iostate& __err, void*& __v) const | |
23417 | { | |
23418 | ||
23419 | typedef ios_base::fmtflags fmtflags; | |
23420 | const fmtflags __fmt = __io.flags(); | |
23421 | __io.flags(__fmt & ~ios_base::basefield | ios_base::hex); | |
23422 | ||
23423 | unsigned long __ul; | |
23424 | __beg = _M_extract_int(__beg, __end, __io, __err, __ul); | |
23425 | ||
23426 | ||
23427 | __io.flags(__fmt); | |
23428 | ||
23429 | if (!(__err & ios_base::failbit)) | |
23430 | __v = reinterpret_cast<void*>(__ul); | |
23431 | return __beg; | |
23432 | } | |
23433 | ||
23434 | ||
23435 | ||
23436 | template<typename _CharT, typename _OutIter> | |
23437 | void | |
23438 | num_put<_CharT, _OutIter>:: | |
23439 | _M_pad(_CharT __fill, streamsize __w, ios_base& __io, | |
23440 | _CharT* __new, const _CharT* __cs, int& __len) const | |
23441 | { | |
23442 | ||
23443 | ||
23444 | __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs, | |
23445 | __w, __len, true); | |
23446 | __len = static_cast<int>(__w); | |
23447 | } | |
23448 | ||
23449 | ||
23450 | ||
23451 | ||
23452 | template<typename _CharT> | |
23453 | inline int | |
23454 | __int_to_char(_CharT* __bufend, long __v, const _CharT* __lit, | |
23455 | ios_base::fmtflags __flags) | |
23456 | { | |
23457 | unsigned long __ul = __v; | |
23458 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
23459 | if (__builtin_expect(__basefield != ios_base::oct | |
23460 | && __basefield != ios_base::hex, true)) | |
23461 | __ul = __v < 0 ? -__v : __ul; | |
23462 | return __int_to_char(__bufend, __ul, __lit, __flags, false); | |
23463 | } | |
23464 | ||
23465 | template<typename _CharT> | |
23466 | inline int | |
23467 | __int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit, | |
23468 | ios_base::fmtflags __flags) | |
23469 | { return __int_to_char(__bufend, __v, __lit, __flags, false); } | |
23470 | ||
23471 | ||
23472 | template<typename _CharT> | |
23473 | inline int | |
23474 | __int_to_char(_CharT* __bufend, long long __v, const _CharT* __lit, | |
23475 | ios_base::fmtflags __flags) | |
23476 | { | |
23477 | unsigned long long __ull = __v; | |
23478 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
23479 | if (__builtin_expect(__basefield != ios_base::oct | |
23480 | && __basefield != ios_base::hex, true)) | |
23481 | __ull = __v < 0 ? -__v : __ull; | |
23482 | return __int_to_char(__bufend, __ull, __lit, __flags, false); | |
23483 | } | |
23484 | ||
23485 | template<typename _CharT> | |
23486 | inline int | |
23487 | __int_to_char(_CharT* __bufend, unsigned long long __v, | |
23488 | const _CharT* __lit, ios_base::fmtflags __flags) | |
23489 | { return __int_to_char(__bufend, __v, __lit, __flags, false); } | |
23490 | ||
23491 | ||
23492 | ||
23493 | template<typename _CharT, typename _ValueT> | |
23494 | int | |
23495 | __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, | |
23496 | ios_base::fmtflags __flags, bool) | |
23497 | { | |
23498 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
23499 | _CharT* __buf = __bufend; | |
23500 | ||
23501 | if (__builtin_expect(__basefield != ios_base::oct | |
23502 | && __basefield != ios_base::hex, true)) | |
23503 | { | |
23504 | ||
23505 | do | |
23506 | { | |
23507 | *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; | |
23508 | __v /= 10; | |
23509 | } | |
23510 | while (__v != 0); | |
23511 | } | |
23512 | else if (__basefield == ios_base::oct) | |
23513 | { | |
23514 | ||
23515 | do | |
23516 | { | |
23517 | *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; | |
23518 | __v >>= 3; | |
23519 | } | |
23520 | while (__v != 0); | |
23521 | } | |
23522 | else | |
23523 | { | |
23524 | ||
23525 | const bool __uppercase = __flags & ios_base::uppercase; | |
23526 | const int __case_offset = __uppercase ? __num_base::_S_oudigits | |
23527 | : __num_base::_S_odigits; | |
23528 | do | |
23529 | { | |
23530 | *--__buf = __lit[(__v & 0xf) + __case_offset]; | |
23531 | __v >>= 4; | |
23532 | } | |
23533 | while (__v != 0); | |
23534 | } | |
23535 | return __bufend - __buf; | |
23536 | } | |
23537 | ||
23538 | template<typename _CharT, typename _OutIter> | |
23539 | void | |
23540 | num_put<_CharT, _OutIter>:: | |
23541 | _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, | |
23542 | ios_base&, _CharT* __new, _CharT* __cs, int& __len) const | |
23543 | { | |
23544 | _CharT* __p = std::__add_grouping(__new, __sep, __grouping, | |
23545 | __grouping_size, __cs, __cs + __len); | |
23546 | __len = __p - __new; | |
23547 | } | |
23548 | ||
23549 | template<typename _CharT, typename _OutIter> | |
23550 | template<typename _ValueT> | |
23551 | _OutIter | |
23552 | num_put<_CharT, _OutIter>:: | |
23553 | _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, | |
23554 | _ValueT __v) const | |
23555 | { | |
23556 | typedef __numpunct_cache<_CharT> __cache_type; | |
23557 | __use_cache<__cache_type> __uc; | |
23558 | const locale& __loc = __io._M_getloc(); | |
23559 | const __cache_type* __lc = __uc(__loc); | |
23560 | const _CharT* __lit = __lc->_M_atoms_out; | |
23561 | const ios_base::fmtflags __flags = __io.flags(); | |
23562 | ||
23563 | ||
23564 | const int __ilen = 5 * sizeof(_ValueT); | |
23565 | _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
23566 | * __ilen)); | |
23567 | ||
23568 | ||
23569 | ||
23570 | int __len = __int_to_char(__cs + __ilen, __v, __lit, __flags); | |
23571 | __cs += __ilen - __len; | |
23572 | ||
23573 | ||
23574 | if (__lc->_M_use_grouping) | |
23575 | { | |
23576 | ||
23577 | ||
23578 | _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
23579 | * (__len + 1) | |
23580 | * 2)); | |
23581 | _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, | |
23582 | __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); | |
23583 | __cs = __cs2 + 2; | |
23584 | } | |
23585 | ||
23586 | ||
23587 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
23588 | if (__builtin_expect(__basefield != ios_base::oct | |
23589 | && __basefield != ios_base::hex, true)) | |
23590 | { | |
23591 | ||
23592 | if (__v > 0) | |
23593 | { | |
23594 | if (__flags & ios_base::showpos | |
23595 | && numeric_limits<_ValueT>::is_signed) | |
23596 | *--__cs = __lit[__num_base::_S_oplus], ++__len; | |
23597 | } | |
23598 | else if (__v) | |
23599 | *--__cs = __lit[__num_base::_S_ominus], ++__len; | |
23600 | } | |
23601 | else if (__flags & ios_base::showbase && __v) | |
23602 | { | |
23603 | if (__basefield == ios_base::oct) | |
23604 | *--__cs = __lit[__num_base::_S_odigits], ++__len; | |
23605 | else | |
23606 | { | |
23607 | ||
23608 | const bool __uppercase = __flags & ios_base::uppercase; | |
23609 | *--__cs = __lit[__num_base::_S_ox + __uppercase]; | |
23610 | ||
23611 | *--__cs = __lit[__num_base::_S_odigits]; | |
23612 | __len += 2; | |
23613 | } | |
23614 | } | |
23615 | ||
23616 | ||
23617 | const streamsize __w = __io.width(); | |
23618 | if (__w > static_cast<streamsize>(__len)) | |
23619 | { | |
23620 | _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
23621 | * __w)); | |
23622 | _M_pad(__fill, __w, __io, __cs3, __cs, __len); | |
23623 | __cs = __cs3; | |
23624 | } | |
23625 | __io.width(0); | |
23626 | ||
23627 | ||
23628 | ||
23629 | return std::__write(__s, __cs, __len); | |
23630 | } | |
23631 | ||
23632 | template<typename _CharT, typename _OutIter> | |
23633 | void | |
23634 | num_put<_CharT, _OutIter>:: | |
23635 | _M_group_float(const char* __grouping, size_t __grouping_size, | |
23636 | _CharT __sep, const _CharT* __p, _CharT* __new, | |
23637 | _CharT* __cs, int& __len) const | |
23638 | { | |
23639 | ||
23640 | ||
23641 | ||
23642 | const int __declen = __p ? __p - __cs : __len; | |
23643 | _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, | |
23644 | __grouping_size, | |
23645 | __cs, __cs + __declen); | |
23646 | ||
23647 | ||
23648 | int __newlen = __p2 - __new; | |
23649 | if (__p) | |
23650 | { | |
23651 | char_traits<_CharT>::copy(__p2, __p, __len - __declen); | |
23652 | __newlen += __len - __declen; | |
23653 | } | |
23654 | __len = __newlen; | |
23655 | } | |
23656 | # 1043 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
23657 | template<typename _CharT, typename _OutIter> | |
23658 | template<typename _ValueT> | |
23659 | _OutIter | |
23660 | num_put<_CharT, _OutIter>:: | |
23661 | _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, | |
23662 | _ValueT __v) const | |
23663 | { | |
23664 | typedef __numpunct_cache<_CharT> __cache_type; | |
23665 | __use_cache<__cache_type> __uc; | |
23666 | const locale& __loc = __io._M_getloc(); | |
23667 | const __cache_type* __lc = __uc(__loc); | |
23668 | ||
23669 | ||
23670 | streamsize __prec = __io.precision(); | |
23671 | if (__prec < static_cast<streamsize>(0)) | |
23672 | __prec = static_cast<streamsize>(6); | |
23673 | ||
23674 | const int __max_digits = numeric_limits<_ValueT>::digits10; | |
23675 | ||
23676 | ||
23677 | int __len; | |
23678 | ||
23679 | char __fbuf[16]; | |
23680 | # 1087 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
23681 | const bool __fixed = __io.flags() & ios_base::fixed; | |
23682 | const int __max_exp = numeric_limits<_ValueT>::max_exponent10; | |
23683 | ||
23684 | ||
23685 | ||
23686 | ||
23687 | ||
23688 | ||
23689 | ||
23690 | const int __cs_size = __fixed ? __max_exp + __prec + 4 | |
23691 | : __max_digits * 2 + __prec; | |
23692 | char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
23693 | ||
23694 | __num_base::_S_format_float(__io, __fbuf, __mod); | |
23695 | __len = std::__convert_from_v(__cs, 0, __fbuf, __v, | |
23696 | _S_get_c_locale(), __prec); | |
23697 | ||
23698 | ||
23699 | ||
23700 | ||
23701 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
23702 | ||
23703 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
23704 | * __len)); | |
23705 | __ctype.widen(__cs, __cs + __len, __ws); | |
23706 | ||
23707 | ||
23708 | const _CharT __cdec = __ctype.widen('.'); | |
23709 | const _CharT __dec = __lc->_M_decimal_point; | |
23710 | const _CharT* __p = char_traits<_CharT>::find(__ws, __len, __cdec); | |
23711 | if (__p) | |
23712 | __ws[__p - __ws] = __dec; | |
23713 | ||
23714 | ||
23715 | ||
23716 | ||
23717 | if (__lc->_M_use_grouping | |
23718 | && (__p || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' | |
23719 | && __cs[1] >= '0' && __cs[2] >= '0'))) | |
23720 | { | |
23721 | ||
23722 | ||
23723 | _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
23724 | * __len * 2)); | |
23725 | ||
23726 | streamsize __off = 0; | |
23727 | if (__cs[0] == '-' || __cs[0] == '+') | |
23728 | { | |
23729 | __off = 1; | |
23730 | __ws2[0] = __ws[0]; | |
23731 | __len -= 1; | |
23732 | } | |
23733 | ||
23734 | _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, | |
23735 | __lc->_M_thousands_sep, __p, __ws2 + __off, | |
23736 | __ws + __off, __len); | |
23737 | __len += __off; | |
23738 | ||
23739 | __ws = __ws2; | |
23740 | } | |
23741 | ||
23742 | ||
23743 | const streamsize __w = __io.width(); | |
23744 | if (__w > static_cast<streamsize>(__len)) | |
23745 | { | |
23746 | _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
23747 | * __w)); | |
23748 | _M_pad(__fill, __w, __io, __ws3, __ws, __len); | |
23749 | __ws = __ws3; | |
23750 | } | |
23751 | __io.width(0); | |
23752 | ||
23753 | ||
23754 | ||
23755 | return std::__write(__s, __ws, __len); | |
23756 | } | |
23757 | ||
23758 | template<typename _CharT, typename _OutIter> | |
23759 | _OutIter | |
23760 | num_put<_CharT, _OutIter>:: | |
23761 | do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const | |
23762 | { | |
23763 | const ios_base::fmtflags __flags = __io.flags(); | |
23764 | if ((__flags & ios_base::boolalpha) == 0) | |
23765 | { | |
23766 | const long __l = __v; | |
23767 | __s = _M_insert_int(__s, __io, __fill, __l); | |
23768 | } | |
23769 | else | |
23770 | { | |
23771 | typedef __numpunct_cache<_CharT> __cache_type; | |
23772 | __use_cache<__cache_type> __uc; | |
23773 | const locale& __loc = __io._M_getloc(); | |
23774 | const __cache_type* __lc = __uc(__loc); | |
23775 | ||
23776 | const _CharT* __name = __v ? __lc->_M_truename | |
23777 | : __lc->_M_falsename; | |
23778 | int __len = __v ? __lc->_M_truename_size | |
23779 | : __lc->_M_falsename_size; | |
23780 | ||
23781 | const streamsize __w = __io.width(); | |
23782 | if (__w > static_cast<streamsize>(__len)) | |
23783 | { | |
23784 | _CharT* __cs | |
23785 | = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
23786 | * __w)); | |
23787 | _M_pad(__fill, __w, __io, __cs, __name, __len); | |
23788 | __name = __cs; | |
23789 | } | |
23790 | __io.width(0); | |
23791 | __s = std::__write(__s, __name, __len); | |
23792 | } | |
23793 | return __s; | |
23794 | } | |
23795 | ||
23796 | template<typename _CharT, typename _OutIter> | |
23797 | _OutIter | |
23798 | num_put<_CharT, _OutIter>:: | |
23799 | do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const | |
23800 | { return _M_insert_int(__s, __io, __fill, __v); } | |
23801 | ||
23802 | template<typename _CharT, typename _OutIter> | |
23803 | _OutIter | |
23804 | num_put<_CharT, _OutIter>:: | |
23805 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
23806 | unsigned long __v) const | |
23807 | { return _M_insert_int(__s, __io, __fill, __v); } | |
23808 | ||
23809 | ||
23810 | template<typename _CharT, typename _OutIter> | |
23811 | _OutIter | |
23812 | num_put<_CharT, _OutIter>:: | |
23813 | do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const | |
23814 | { return _M_insert_int(__s, __io, __fill, __v); } | |
23815 | ||
23816 | template<typename _CharT, typename _OutIter> | |
23817 | _OutIter | |
23818 | num_put<_CharT, _OutIter>:: | |
23819 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
23820 | unsigned long long __v) const | |
23821 | { return _M_insert_int(__s, __io, __fill, __v); } | |
23822 | ||
23823 | ||
23824 | template<typename _CharT, typename _OutIter> | |
23825 | _OutIter | |
23826 | num_put<_CharT, _OutIter>:: | |
23827 | do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const | |
23828 | { return _M_insert_float(__s, __io, __fill, char(), __v); } | |
23829 | ||
23830 | template<typename _CharT, typename _OutIter> | |
23831 | _OutIter | |
23832 | num_put<_CharT, _OutIter>:: | |
23833 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
23834 | long double __v) const | |
23835 | { return _M_insert_float(__s, __io, __fill, 'L', __v); } | |
23836 | ||
23837 | template<typename _CharT, typename _OutIter> | |
23838 | _OutIter | |
23839 | num_put<_CharT, _OutIter>:: | |
23840 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
23841 | const void* __v) const | |
23842 | { | |
23843 | const ios_base::fmtflags __flags = __io.flags(); | |
23844 | const ios_base::fmtflags __fmt = ~(ios_base::basefield | |
23845 | | ios_base::uppercase | |
23846 | | ios_base::internal); | |
23847 | __io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase)); | |
23848 | ||
23849 | __s = _M_insert_int(__s, __io, __fill, | |
23850 | reinterpret_cast<unsigned long>(__v)); | |
23851 | __io.flags(__flags); | |
23852 | return __s; | |
23853 | } | |
23854 | ||
23855 | template<typename _CharT, typename _InIter> | |
23856 | template<bool _Intl> | |
23857 | _InIter | |
23858 | money_get<_CharT, _InIter>:: | |
23859 | _M_extract(iter_type __beg, iter_type __end, ios_base& __io, | |
23860 | ios_base::iostate& __err, string& __units) const | |
23861 | { | |
23862 | typedef char_traits<_CharT> __traits_type; | |
23863 | typedef typename string_type::size_type size_type; | |
23864 | typedef money_base::part part; | |
23865 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
23866 | ||
23867 | const locale& __loc = __io._M_getloc(); | |
23868 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
23869 | ||
23870 | __use_cache<__cache_type> __uc; | |
23871 | const __cache_type* __lc = __uc(__loc); | |
23872 | const char_type* __lit = __lc->_M_atoms; | |
23873 | ||
23874 | ||
23875 | bool __negative = false; | |
23876 | ||
23877 | size_type __sign_size = 0; | |
23878 | ||
23879 | const bool __mandatory_sign = (__lc->_M_positive_sign_size | |
23880 | && __lc->_M_negative_sign_size); | |
23881 | ||
23882 | string __grouping_tmp; | |
23883 | if (__lc->_M_use_grouping) | |
23884 | __grouping_tmp.reserve(32); | |
23885 | ||
23886 | int __last_pos = 0; | |
23887 | ||
23888 | int __n = 0; | |
23889 | ||
23890 | bool __testvalid = true; | |
23891 | ||
23892 | bool __testdecfound = false; | |
23893 | ||
23894 | ||
23895 | string __res; | |
23896 | __res.reserve(32); | |
23897 | ||
23898 | const char_type* __lit_zero = __lit + money_base::_S_zero; | |
23899 | const money_base::pattern __p = __lc->_M_neg_format; | |
23900 | for (int __i = 0; __i < 4 && __testvalid; ++__i) | |
23901 | { | |
23902 | const part __which = static_cast<part>(__p.field[__i]); | |
23903 | switch (__which) | |
23904 | { | |
23905 | case money_base::symbol: | |
23906 | ||
23907 | ||
23908 | ||
23909 | ||
23910 | if (__io.flags() & ios_base::showbase || __sign_size > 1 | |
23911 | || __i == 0 | |
23912 | || (__i == 1 && (__mandatory_sign | |
23913 | || (static_cast<part>(__p.field[0]) | |
23914 | == money_base::sign) | |
23915 | || (static_cast<part>(__p.field[2]) | |
23916 | == money_base::space))) | |
23917 | || (__i == 2 && ((static_cast<part>(__p.field[3]) | |
23918 | == money_base::value) | |
23919 | || __mandatory_sign | |
23920 | && (static_cast<part>(__p.field[3]) | |
23921 | == money_base::sign)))) | |
23922 | { | |
23923 | const size_type __len = __lc->_M_curr_symbol_size; | |
23924 | size_type __j = 0; | |
23925 | for (; __beg != __end && __j < __len | |
23926 | && *__beg == __lc->_M_curr_symbol[__j]; | |
23927 | ++__beg, ++__j); | |
23928 | if (__j != __len | |
23929 | && (__j || __io.flags() & ios_base::showbase)) | |
23930 | __testvalid = false; | |
23931 | } | |
23932 | break; | |
23933 | case money_base::sign: | |
23934 | ||
23935 | if (__lc->_M_positive_sign_size && __beg != __end | |
23936 | && *__beg == __lc->_M_positive_sign[0]) | |
23937 | { | |
23938 | __sign_size = __lc->_M_positive_sign_size; | |
23939 | ++__beg; | |
23940 | } | |
23941 | else if (__lc->_M_negative_sign_size && __beg != __end | |
23942 | && *__beg == __lc->_M_negative_sign[0]) | |
23943 | { | |
23944 | __negative = true; | |
23945 | __sign_size = __lc->_M_negative_sign_size; | |
23946 | ++__beg; | |
23947 | } | |
23948 | else if (__lc->_M_positive_sign_size | |
23949 | && !__lc->_M_negative_sign_size) | |
23950 | ||
23951 | ||
23952 | __negative = true; | |
23953 | else if (__mandatory_sign) | |
23954 | __testvalid = false; | |
23955 | break; | |
23956 | case money_base::value: | |
23957 | ||
23958 | ||
23959 | for (; __beg != __end; ++__beg) | |
23960 | { | |
23961 | const char_type __c = *__beg; | |
23962 | const char_type* __q = __traits_type::find(__lit_zero, | |
23963 | 10, __c); | |
23964 | if (__q != 0) | |
23965 | { | |
23966 | __res += money_base::_S_atoms[__q - __lit]; | |
23967 | ++__n; | |
23968 | } | |
23969 | else if (__c == __lc->_M_decimal_point | |
23970 | && !__testdecfound) | |
23971 | { | |
23972 | __last_pos = __n; | |
23973 | __n = 0; | |
23974 | __testdecfound = true; | |
23975 | } | |
23976 | else if (__lc->_M_use_grouping | |
23977 | && __c == __lc->_M_thousands_sep | |
23978 | && !__testdecfound) | |
23979 | { | |
23980 | if (__n) | |
23981 | { | |
23982 | ||
23983 | __grouping_tmp += static_cast<char>(__n); | |
23984 | __n = 0; | |
23985 | } | |
23986 | else | |
23987 | { | |
23988 | __testvalid = false; | |
23989 | break; | |
23990 | } | |
23991 | } | |
23992 | else | |
23993 | break; | |
23994 | } | |
23995 | if (__res.empty()) | |
23996 | __testvalid = false; | |
23997 | break; | |
23998 | case money_base::space: | |
23999 | ||
24000 | if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) | |
24001 | ++__beg; | |
24002 | else | |
24003 | __testvalid = false; | |
24004 | case money_base::none: | |
24005 | ||
24006 | if (__i != 3) | |
24007 | for (; __beg != __end | |
24008 | && __ctype.is(ctype_base::space, *__beg); ++__beg); | |
24009 | break; | |
24010 | } | |
24011 | } | |
24012 | ||
24013 | ||
24014 | if (__sign_size > 1 && __testvalid) | |
24015 | { | |
24016 | const char_type* __sign = __negative ? __lc->_M_negative_sign | |
24017 | : __lc->_M_positive_sign; | |
24018 | size_type __i = 1; | |
24019 | for (; __beg != __end && __i < __sign_size | |
24020 | && *__beg == __sign[__i]; ++__beg, ++__i); | |
24021 | ||
24022 | if (__i != __sign_size) | |
24023 | __testvalid = false; | |
24024 | } | |
24025 | ||
24026 | if (__testvalid) | |
24027 | { | |
24028 | ||
24029 | if (__res.size() > 1) | |
24030 | { | |
24031 | const size_type __first = __res.find_first_not_of('0'); | |
24032 | const bool __only_zeros = __first == string::npos; | |
24033 | if (__first) | |
24034 | __res.erase(0, __only_zeros ? __res.size() - 1 : __first); | |
24035 | } | |
24036 | ||
24037 | ||
24038 | if (__negative && __res[0] != '0') | |
24039 | __res.insert(__res.begin(), '-'); | |
24040 | ||
24041 | ||
24042 | if (__grouping_tmp.size()) | |
24043 | { | |
24044 | ||
24045 | __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos | |
24046 | : __n); | |
24047 | if (!std::__verify_grouping(__lc->_M_grouping, | |
24048 | __lc->_M_grouping_size, | |
24049 | __grouping_tmp)) | |
24050 | __err |= ios_base::failbit; | |
24051 | } | |
24052 | ||
24053 | ||
24054 | if (__testdecfound && __lc->_M_frac_digits > 0 | |
24055 | && __n != __lc->_M_frac_digits) | |
24056 | __testvalid = false; | |
24057 | } | |
24058 | ||
24059 | ||
24060 | if (!__testvalid) | |
24061 | __err |= ios_base::failbit; | |
24062 | else | |
24063 | __units.swap(__res); | |
24064 | ||
24065 | ||
24066 | if (__beg == __end) | |
24067 | __err |= ios_base::eofbit; | |
24068 | return __beg; | |
24069 | } | |
24070 | ||
24071 | template<typename _CharT, typename _InIter> | |
24072 | _InIter | |
24073 | money_get<_CharT, _InIter>:: | |
24074 | do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, | |
24075 | ios_base::iostate& __err, long double& __units) const | |
24076 | { | |
24077 | string __str; | |
24078 | if (__intl) | |
24079 | __beg = _M_extract<true>(__beg, __end, __io, __err, __str); | |
24080 | else | |
24081 | __beg = _M_extract<false>(__beg, __end, __io, __err, __str); | |
24082 | std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); | |
24083 | return __beg; | |
24084 | } | |
24085 | ||
24086 | template<typename _CharT, typename _InIter> | |
24087 | _InIter | |
24088 | money_get<_CharT, _InIter>:: | |
24089 | do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, | |
24090 | ios_base::iostate& __err, string_type& __units) const | |
24091 | { | |
24092 | typedef typename string::size_type size_type; | |
24093 | ||
24094 | const locale& __loc = __io._M_getloc(); | |
24095 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24096 | ||
24097 | string __str; | |
24098 | const iter_type __ret = __intl ? _M_extract<true>(__beg, __end, __io, | |
24099 | __err, __str) | |
24100 | : _M_extract<false>(__beg, __end, __io, | |
24101 | __err, __str); | |
24102 | const size_type __len = __str.size(); | |
24103 | if (__len) | |
24104 | { | |
24105 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
24106 | * __len)); | |
24107 | __ctype.widen(__str.data(), __str.data() + __len, __ws); | |
24108 | __units.assign(__ws, __len); | |
24109 | } | |
24110 | ||
24111 | return __ret; | |
24112 | } | |
24113 | ||
24114 | template<typename _CharT, typename _OutIter> | |
24115 | template<bool _Intl> | |
24116 | _OutIter | |
24117 | money_put<_CharT, _OutIter>:: | |
24118 | _M_insert(iter_type __s, ios_base& __io, char_type __fill, | |
24119 | const string_type& __digits) const | |
24120 | { | |
24121 | typedef typename string_type::size_type size_type; | |
24122 | typedef money_base::part part; | |
24123 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
24124 | ||
24125 | const locale& __loc = __io._M_getloc(); | |
24126 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24127 | ||
24128 | __use_cache<__cache_type> __uc; | |
24129 | const __cache_type* __lc = __uc(__loc); | |
24130 | const char_type* __lit = __lc->_M_atoms; | |
24131 | ||
24132 | ||
24133 | ||
24134 | const char_type* __beg = __digits.data(); | |
24135 | ||
24136 | money_base::pattern __p; | |
24137 | const char_type* __sign; | |
24138 | size_type __sign_size; | |
24139 | if (!(*__beg == __lit[money_base::_S_minus])) | |
24140 | { | |
24141 | __p = __lc->_M_pos_format; | |
24142 | __sign = __lc->_M_positive_sign; | |
24143 | __sign_size = __lc->_M_positive_sign_size; | |
24144 | } | |
24145 | else | |
24146 | { | |
24147 | __p = __lc->_M_neg_format; | |
24148 | __sign = __lc->_M_negative_sign; | |
24149 | __sign_size = __lc->_M_negative_sign_size; | |
24150 | if (__digits.size()) | |
24151 | ++__beg; | |
24152 | } | |
24153 | ||
24154 | ||
24155 | size_type __len = __ctype.scan_not(ctype_base::digit, __beg, | |
24156 | __beg + __digits.size()) - __beg; | |
24157 | if (__len) | |
24158 | { | |
24159 | ||
24160 | ||
24161 | ||
24162 | string_type __value; | |
24163 | __value.reserve(2 * __len); | |
24164 | ||
24165 | ||
24166 | ||
24167 | int __paddec = __len - __lc->_M_frac_digits; | |
24168 | if (__paddec > 0) | |
24169 | { | |
24170 | if (__lc->_M_frac_digits < 0) | |
24171 | __paddec = __len; | |
24172 | if (__lc->_M_grouping_size) | |
24173 | { | |
24174 | _CharT* __ws = | |
24175 | static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
24176 | * 2 * __len)); | |
24177 | _CharT* __ws_end = | |
24178 | std::__add_grouping(__ws, __lc->_M_thousands_sep, | |
24179 | __lc->_M_grouping, | |
24180 | __lc->_M_grouping_size, | |
24181 | __beg, __beg + __paddec); | |
24182 | __value.assign(__ws, __ws_end - __ws); | |
24183 | } | |
24184 | else | |
24185 | __value.assign(__beg, __paddec); | |
24186 | } | |
24187 | ||
24188 | ||
24189 | if (__lc->_M_frac_digits > 0) | |
24190 | { | |
24191 | __value += __lc->_M_decimal_point; | |
24192 | if (__paddec >= 0) | |
24193 | __value.append(__beg + __paddec, __lc->_M_frac_digits); | |
24194 | else | |
24195 | { | |
24196 | ||
24197 | __value.append(-__paddec, __lit[money_base::_S_zero]); | |
24198 | __value.append(__beg, __len); | |
24199 | } | |
24200 | } | |
24201 | ||
24202 | ||
24203 | const ios_base::fmtflags __f = __io.flags() | |
24204 | & ios_base::adjustfield; | |
24205 | __len = __value.size() + __sign_size; | |
24206 | __len += ((__io.flags() & ios_base::showbase) | |
24207 | ? __lc->_M_curr_symbol_size : 0); | |
24208 | ||
24209 | string_type __res; | |
24210 | __res.reserve(2 * __len); | |
24211 | ||
24212 | const size_type __width = static_cast<size_type>(__io.width()); | |
24213 | const bool __testipad = (__f == ios_base::internal | |
24214 | && __len < __width); | |
24215 | ||
24216 | for (int __i = 0; __i < 4; ++__i) | |
24217 | { | |
24218 | const part __which = static_cast<part>(__p.field[__i]); | |
24219 | switch (__which) | |
24220 | { | |
24221 | case money_base::symbol: | |
24222 | if (__io.flags() & ios_base::showbase) | |
24223 | __res.append(__lc->_M_curr_symbol, | |
24224 | __lc->_M_curr_symbol_size); | |
24225 | break; | |
24226 | case money_base::sign: | |
24227 | ||
24228 | ||
24229 | ||
24230 | if (__sign_size) | |
24231 | __res += __sign[0]; | |
24232 | break; | |
24233 | case money_base::value: | |
24234 | __res += __value; | |
24235 | break; | |
24236 | case money_base::space: | |
24237 | ||
24238 | ||
24239 | ||
24240 | if (__testipad) | |
24241 | __res.append(__width - __len, __fill); | |
24242 | else | |
24243 | __res += __fill; | |
24244 | break; | |
24245 | case money_base::none: | |
24246 | if (__testipad) | |
24247 | __res.append(__width - __len, __fill); | |
24248 | break; | |
24249 | } | |
24250 | } | |
24251 | ||
24252 | ||
24253 | if (__sign_size > 1) | |
24254 | __res.append(__sign + 1, __sign_size - 1); | |
24255 | ||
24256 | ||
24257 | __len = __res.size(); | |
24258 | if (__width > __len) | |
24259 | { | |
24260 | if (__f == ios_base::left) | |
24261 | ||
24262 | __res.append(__width - __len, __fill); | |
24263 | else | |
24264 | ||
24265 | __res.insert(0, __width - __len, __fill); | |
24266 | __len = __width; | |
24267 | } | |
24268 | ||
24269 | ||
24270 | __s = std::__write(__s, __res.data(), __len); | |
24271 | } | |
24272 | __io.width(0); | |
24273 | return __s; | |
24274 | } | |
24275 | ||
24276 | template<typename _CharT, typename _OutIter> | |
24277 | _OutIter | |
24278 | money_put<_CharT, _OutIter>:: | |
24279 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
24280 | long double __units) const | |
24281 | { | |
24282 | const locale __loc = __io.getloc(); | |
24283 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24284 | # 1708 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
24285 | const int __cs_size = numeric_limits<long double>::max_exponent10 + 3; | |
24286 | char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
24287 | int __len = std::__convert_from_v(__cs, 0, "%.*Lf", __units, | |
24288 | _S_get_c_locale(), 0); | |
24289 | ||
24290 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
24291 | * __cs_size)); | |
24292 | __ctype.widen(__cs, __cs + __len, __ws); | |
24293 | const string_type __digits(__ws, __len); | |
24294 | return __intl ? _M_insert<true>(__s, __io, __fill, __digits) | |
24295 | : _M_insert<false>(__s, __io, __fill, __digits); | |
24296 | } | |
24297 | ||
24298 | template<typename _CharT, typename _OutIter> | |
24299 | _OutIter | |
24300 | money_put<_CharT, _OutIter>:: | |
24301 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
24302 | const string_type& __digits) const | |
24303 | { return __intl ? _M_insert<true>(__s, __io, __fill, __digits) | |
24304 | : _M_insert<false>(__s, __io, __fill, __digits); } | |
24305 | ||
24306 | ||
24307 | ||
24308 | ||
24309 | ||
24310 | template<typename _CharT, typename _InIter> | |
24311 | time_base::dateorder | |
24312 | time_get<_CharT, _InIter>::do_date_order() const | |
24313 | { return time_base::no_order; } | |
24314 | ||
24315 | ||
24316 | ||
24317 | template<typename _CharT, typename _InIter> | |
24318 | _InIter | |
24319 | time_get<_CharT, _InIter>:: | |
24320 | _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, | |
24321 | ios_base::iostate& __err, tm* __tm, | |
24322 | const _CharT* __format) const | |
24323 | { | |
24324 | const locale& __loc = __io._M_getloc(); | |
24325 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
24326 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24327 | const size_t __len = char_traits<_CharT>::length(__format); | |
24328 | ||
24329 | for (size_t __i = 0; __beg != __end && __i < __len && !__err; ++__i) | |
24330 | { | |
24331 | if (__ctype.narrow(__format[__i], 0) == '%') | |
24332 | { | |
24333 | ||
24334 | char __c = __ctype.narrow(__format[++__i], 0); | |
24335 | int __mem = 0; | |
24336 | if (__c == 'E' || __c == 'O') | |
24337 | __c = __ctype.narrow(__format[++__i], 0); | |
24338 | switch (__c) | |
24339 | { | |
24340 | const char* __cs; | |
24341 | _CharT __wcs[10]; | |
24342 | case 'a': | |
24343 | ||
24344 | const char_type* __days1[7]; | |
24345 | __tp._M_days_abbreviated(__days1); | |
24346 | __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, | |
24347 | 7, __io, __err); | |
24348 | break; | |
24349 | case 'A': | |
24350 | ||
24351 | const char_type* __days2[7]; | |
24352 | __tp._M_days(__days2); | |
24353 | __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, | |
24354 | 7, __io, __err); | |
24355 | break; | |
24356 | case 'h': | |
24357 | case 'b': | |
24358 | ||
24359 | const char_type* __months1[12]; | |
24360 | __tp._M_months_abbreviated(__months1); | |
24361 | __beg = _M_extract_name(__beg, __end, __tm->tm_mon, | |
24362 | __months1, 12, __io, __err); | |
24363 | break; | |
24364 | case 'B': | |
24365 | ||
24366 | const char_type* __months2[12]; | |
24367 | __tp._M_months(__months2); | |
24368 | __beg = _M_extract_name(__beg, __end, __tm->tm_mon, | |
24369 | __months2, 12, __io, __err); | |
24370 | break; | |
24371 | case 'c': | |
24372 | ||
24373 | const char_type* __dt[2]; | |
24374 | __tp._M_date_time_formats(__dt); | |
24375 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24376 | __tm, __dt[0]); | |
24377 | break; | |
24378 | case 'd': | |
24379 | ||
24380 | __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, | |
24381 | __io, __err); | |
24382 | break; | |
24383 | case 'e': | |
24384 | ||
24385 | ||
24386 | if (__ctype.is(ctype_base::space, *__beg)) | |
24387 | __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, | |
24388 | 1, __io, __err); | |
24389 | else | |
24390 | __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, | |
24391 | 2, __io, __err); | |
24392 | break; | |
24393 | case 'D': | |
24394 | ||
24395 | __cs = "%m/%d/%y"; | |
24396 | __ctype.widen(__cs, __cs + 9, __wcs); | |
24397 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24398 | __tm, __wcs); | |
24399 | break; | |
24400 | case 'H': | |
24401 | ||
24402 | __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, | |
24403 | __io, __err); | |
24404 | break; | |
24405 | case 'I': | |
24406 | ||
24407 | __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, | |
24408 | __io, __err); | |
24409 | break; | |
24410 | case 'm': | |
24411 | ||
24412 | __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, | |
24413 | __io, __err); | |
24414 | if (!__err) | |
24415 | __tm->tm_mon = __mem - 1; | |
24416 | break; | |
24417 | case 'M': | |
24418 | ||
24419 | __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, | |
24420 | __io, __err); | |
24421 | break; | |
24422 | case 'n': | |
24423 | if (__ctype.narrow(*__beg, 0) == '\n') | |
24424 | ++__beg; | |
24425 | else | |
24426 | __err |= ios_base::failbit; | |
24427 | break; | |
24428 | case 'R': | |
24429 | ||
24430 | __cs = "%H:%M"; | |
24431 | __ctype.widen(__cs, __cs + 6, __wcs); | |
24432 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24433 | __tm, __wcs); | |
24434 | break; | |
24435 | case 'S': | |
24436 | ||
24437 | ||
24438 | ||
24439 | ||
24440 | ||
24441 | __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2, | |
24442 | ||
24443 | __io, __err); | |
24444 | break; | |
24445 | case 't': | |
24446 | if (__ctype.narrow(*__beg, 0) == '\t') | |
24447 | ++__beg; | |
24448 | else | |
24449 | __err |= ios_base::failbit; | |
24450 | break; | |
24451 | case 'T': | |
24452 | ||
24453 | __cs = "%H:%M:%S"; | |
24454 | __ctype.widen(__cs, __cs + 9, __wcs); | |
24455 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24456 | __tm, __wcs); | |
24457 | break; | |
24458 | case 'x': | |
24459 | ||
24460 | const char_type* __dates[2]; | |
24461 | __tp._M_date_formats(__dates); | |
24462 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24463 | __tm, __dates[0]); | |
24464 | break; | |
24465 | case 'X': | |
24466 | ||
24467 | const char_type* __times[2]; | |
24468 | __tp._M_time_formats(__times); | |
24469 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24470 | __tm, __times[0]); | |
24471 | break; | |
24472 | case 'y': | |
24473 | case 'C': | |
24474 | ||
24475 | __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2, | |
24476 | __io, __err); | |
24477 | break; | |
24478 | case 'Y': | |
24479 | ||
24480 | __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, | |
24481 | __io, __err); | |
24482 | if (!__err) | |
24483 | __tm->tm_year = __mem - 1900; | |
24484 | break; | |
24485 | case 'Z': | |
24486 | ||
24487 | if (__ctype.is(ctype_base::upper, *__beg)) | |
24488 | { | |
24489 | int __tmp; | |
24490 | __beg = _M_extract_name(__beg, __end, __tmp, | |
24491 | __timepunct_cache<_CharT>::_S_timezones, | |
24492 | 14, __io, __err); | |
24493 | ||
24494 | ||
24495 | if (__beg != __end && !__err && __tmp == 0 | |
24496 | && (*__beg == __ctype.widen('-') | |
24497 | || *__beg == __ctype.widen('+'))) | |
24498 | { | |
24499 | __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, | |
24500 | __io, __err); | |
24501 | __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, | |
24502 | __io, __err); | |
24503 | } | |
24504 | } | |
24505 | else | |
24506 | __err |= ios_base::failbit; | |
24507 | break; | |
24508 | default: | |
24509 | ||
24510 | __err |= ios_base::failbit; | |
24511 | } | |
24512 | } | |
24513 | else | |
24514 | { | |
24515 | ||
24516 | if (__format[__i] == *__beg) | |
24517 | ++__beg; | |
24518 | else | |
24519 | __err |= ios_base::failbit; | |
24520 | } | |
24521 | } | |
24522 | return __beg; | |
24523 | } | |
24524 | ||
24525 | template<typename _CharT, typename _InIter> | |
24526 | _InIter | |
24527 | time_get<_CharT, _InIter>:: | |
24528 | _M_extract_num(iter_type __beg, iter_type __end, int& __member, | |
24529 | int __min, int __max, size_t __len, | |
24530 | ios_base& __io, ios_base::iostate& __err) const | |
24531 | { | |
24532 | const locale& __loc = __io._M_getloc(); | |
24533 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24534 | ||
24535 | ||
24536 | int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); | |
24537 | ||
24538 | ++__min; | |
24539 | size_t __i = 0; | |
24540 | int __value = 0; | |
24541 | for (; __beg != __end && __i < __len; ++__beg, ++__i) | |
24542 | { | |
24543 | const char __c = __ctype.narrow(*__beg, '*'); | |
24544 | if (__c >= '0' && __c <= '9') | |
24545 | { | |
24546 | __value = __value * 10 + (__c - '0'); | |
24547 | const int __valuec = __value * __mult; | |
24548 | if (__valuec > __max || __valuec + __mult < __min) | |
24549 | break; | |
24550 | __mult /= 10; | |
24551 | } | |
24552 | else | |
24553 | break; | |
24554 | } | |
24555 | if (__i == __len) | |
24556 | __member = __value; | |
24557 | else | |
24558 | __err |= ios_base::failbit; | |
24559 | return __beg; | |
24560 | } | |
24561 | ||
24562 | ||
24563 | ||
24564 | template<typename _CharT, typename _InIter> | |
24565 | _InIter | |
24566 | time_get<_CharT, _InIter>:: | |
24567 | _M_extract_name(iter_type __beg, iter_type __end, int& __member, | |
24568 | const _CharT** __names, size_t __indexlen, | |
24569 | ios_base& __io, ios_base::iostate& __err) const | |
24570 | { | |
24571 | typedef char_traits<_CharT> __traits_type; | |
24572 | const locale& __loc = __io._M_getloc(); | |
24573 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24574 | ||
24575 | int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int) | |
24576 | * __indexlen)); | |
24577 | size_t __nmatches = 0; | |
24578 | size_t __pos = 0; | |
24579 | bool __testvalid = true; | |
24580 | const char_type* __name; | |
24581 | ||
24582 | ||
24583 | ||
24584 | ||
24585 | ||
24586 | if (__beg != __end) | |
24587 | { | |
24588 | const char_type __c = *__beg; | |
24589 | for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) | |
24590 | if (__c == __names[__i1][0] | |
24591 | || __c == __ctype.toupper(__names[__i1][0])) | |
24592 | __matches[__nmatches++] = __i1; | |
24593 | } | |
24594 | ||
24595 | while (__nmatches > 1) | |
24596 | { | |
24597 | ||
24598 | size_t __minlen = __traits_type::length(__names[__matches[0]]); | |
24599 | for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) | |
24600 | __minlen = std::min(__minlen, | |
24601 | __traits_type::length(__names[__matches[__i2]])); | |
24602 | ++__beg, ++__pos; | |
24603 | if (__pos < __minlen && __beg != __end) | |
24604 | for (size_t __i3 = 0; __i3 < __nmatches;) | |
24605 | { | |
24606 | __name = __names[__matches[__i3]]; | |
24607 | if (!(__name[__pos] == *__beg)) | |
24608 | __matches[__i3] = __matches[--__nmatches]; | |
24609 | else | |
24610 | ++__i3; | |
24611 | } | |
24612 | else | |
24613 | break; | |
24614 | } | |
24615 | ||
24616 | if (__nmatches == 1) | |
24617 | { | |
24618 | ||
24619 | ++__beg, ++__pos; | |
24620 | __name = __names[__matches[0]]; | |
24621 | const size_t __len = __traits_type::length(__name); | |
24622 | while (__pos < __len && __beg != __end && __name[__pos] == *__beg) | |
24623 | ++__beg, ++__pos; | |
24624 | ||
24625 | if (__len == __pos) | |
24626 | __member = __matches[0]; | |
24627 | else | |
24628 | __testvalid = false; | |
24629 | } | |
24630 | else | |
24631 | __testvalid = false; | |
24632 | if (!__testvalid) | |
24633 | __err |= ios_base::failbit; | |
24634 | return __beg; | |
24635 | } | |
24636 | ||
24637 | template<typename _CharT, typename _InIter> | |
24638 | _InIter | |
24639 | time_get<_CharT, _InIter>:: | |
24640 | do_get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
24641 | ios_base::iostate& __err, tm* __tm) const | |
24642 | { | |
24643 | const locale& __loc = __io._M_getloc(); | |
24644 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
24645 | const char_type* __times[2]; | |
24646 | __tp._M_time_formats(__times); | |
24647 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24648 | __tm, __times[0]); | |
24649 | if (__beg == __end) | |
24650 | __err |= ios_base::eofbit; | |
24651 | return __beg; | |
24652 | } | |
24653 | ||
24654 | template<typename _CharT, typename _InIter> | |
24655 | _InIter | |
24656 | time_get<_CharT, _InIter>:: | |
24657 | do_get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
24658 | ios_base::iostate& __err, tm* __tm) const | |
24659 | { | |
24660 | const locale& __loc = __io._M_getloc(); | |
24661 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
24662 | const char_type* __dates[2]; | |
24663 | __tp._M_date_formats(__dates); | |
24664 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
24665 | __tm, __dates[0]); | |
24666 | if (__beg == __end) | |
24667 | __err |= ios_base::eofbit; | |
24668 | return __beg; | |
24669 | } | |
24670 | ||
24671 | template<typename _CharT, typename _InIter> | |
24672 | _InIter | |
24673 | time_get<_CharT, _InIter>:: | |
24674 | do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, | |
24675 | ios_base::iostate& __err, tm* __tm) const | |
24676 | { | |
24677 | typedef char_traits<_CharT> __traits_type; | |
24678 | const locale& __loc = __io._M_getloc(); | |
24679 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
24680 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24681 | const char_type* __days[7]; | |
24682 | __tp._M_days_abbreviated(__days); | |
24683 | int __tmpwday; | |
24684 | __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7, __io, __err); | |
24685 | ||
24686 | ||
24687 | ||
24688 | ||
24689 | ||
24690 | ||
24691 | ||
24692 | if (!__err && __beg != __end) | |
24693 | { | |
24694 | size_t __pos = __traits_type::length(__days[__tmpwday]); | |
24695 | __tp._M_days(__days); | |
24696 | const char_type* __name = __days[__tmpwday]; | |
24697 | if (__name[__pos] == *__beg) | |
24698 | { | |
24699 | ||
24700 | const size_t __len = __traits_type::length(__name); | |
24701 | while (__pos < __len && __beg != __end | |
24702 | && __name[__pos] == *__beg) | |
24703 | ++__beg, ++__pos; | |
24704 | if (__len != __pos) | |
24705 | __err |= ios_base::failbit; | |
24706 | } | |
24707 | } | |
24708 | if (!__err) | |
24709 | __tm->tm_wday = __tmpwday; | |
24710 | ||
24711 | if (__beg == __end) | |
24712 | __err |= ios_base::eofbit; | |
24713 | return __beg; | |
24714 | } | |
24715 | ||
24716 | template<typename _CharT, typename _InIter> | |
24717 | _InIter | |
24718 | time_get<_CharT, _InIter>:: | |
24719 | do_get_monthname(iter_type __beg, iter_type __end, | |
24720 | ios_base& __io, ios_base::iostate& __err, tm* __tm) const | |
24721 | { | |
24722 | typedef char_traits<_CharT> __traits_type; | |
24723 | const locale& __loc = __io._M_getloc(); | |
24724 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
24725 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24726 | const char_type* __months[12]; | |
24727 | __tp._M_months_abbreviated(__months); | |
24728 | int __tmpmon; | |
24729 | __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12, | |
24730 | __io, __err); | |
24731 | ||
24732 | ||
24733 | ||
24734 | ||
24735 | ||
24736 | ||
24737 | ||
24738 | if (!__err && __beg != __end) | |
24739 | { | |
24740 | size_t __pos = __traits_type::length(__months[__tmpmon]); | |
24741 | __tp._M_months(__months); | |
24742 | const char_type* __name = __months[__tmpmon]; | |
24743 | if (__name[__pos] == *__beg) | |
24744 | { | |
24745 | ||
24746 | const size_t __len = __traits_type::length(__name); | |
24747 | while (__pos < __len && __beg != __end | |
24748 | && __name[__pos] == *__beg) | |
24749 | ++__beg, ++__pos; | |
24750 | if (__len != __pos) | |
24751 | __err |= ios_base::failbit; | |
24752 | } | |
24753 | } | |
24754 | if (!__err) | |
24755 | __tm->tm_mon = __tmpmon; | |
24756 | ||
24757 | if (__beg == __end) | |
24758 | __err |= ios_base::eofbit; | |
24759 | return __beg; | |
24760 | } | |
24761 | ||
24762 | template<typename _CharT, typename _InIter> | |
24763 | _InIter | |
24764 | time_get<_CharT, _InIter>:: | |
24765 | do_get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
24766 | ios_base::iostate& __err, tm* __tm) const | |
24767 | { | |
24768 | const locale& __loc = __io._M_getloc(); | |
24769 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24770 | ||
24771 | size_t __i = 0; | |
24772 | int __value = 0; | |
24773 | for (; __beg != __end && __i < 4; ++__beg, ++__i) | |
24774 | { | |
24775 | const char __c = __ctype.narrow(*__beg, '*'); | |
24776 | if (__c >= '0' && __c <= '9') | |
24777 | __value = __value * 10 + (__c - '0'); | |
24778 | else | |
24779 | break; | |
24780 | } | |
24781 | if (__i == 2 || __i == 4) | |
24782 | __tm->tm_year = __i == 2 ? __value : __value - 1900; | |
24783 | else | |
24784 | __err |= ios_base::failbit; | |
24785 | if (__beg == __end) | |
24786 | __err |= ios_base::eofbit; | |
24787 | return __beg; | |
24788 | } | |
24789 | ||
24790 | template<typename _CharT, typename _OutIter> | |
24791 | _OutIter | |
24792 | time_put<_CharT, _OutIter>:: | |
24793 | put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
24794 | const _CharT* __beg, const _CharT* __end) const | |
24795 | { | |
24796 | const locale& __loc = __io._M_getloc(); | |
24797 | ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24798 | for (; __beg != __end; ++__beg) | |
24799 | if (__ctype.narrow(*__beg, 0) != '%') | |
24800 | { | |
24801 | *__s = *__beg; | |
24802 | ++__s; | |
24803 | } | |
24804 | else if (++__beg != __end) | |
24805 | { | |
24806 | char __format; | |
24807 | char __mod = 0; | |
24808 | const char __c = __ctype.narrow(*__beg, 0); | |
24809 | if (__c != 'E' && __c != 'O') | |
24810 | __format = __c; | |
24811 | else if (++__beg != __end) | |
24812 | { | |
24813 | __mod = __c; | |
24814 | __format = __ctype.narrow(*__beg, 0); | |
24815 | } | |
24816 | else | |
24817 | break; | |
24818 | __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); | |
24819 | } | |
24820 | else | |
24821 | break; | |
24822 | return __s; | |
24823 | } | |
24824 | ||
24825 | template<typename _CharT, typename _OutIter> | |
24826 | _OutIter | |
24827 | time_put<_CharT, _OutIter>:: | |
24828 | do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, | |
24829 | char __format, char __mod) const | |
24830 | { | |
24831 | const locale& __loc = __io._M_getloc(); | |
24832 | ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24833 | __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
24834 | ||
24835 | ||
24836 | ||
24837 | const size_t __maxlen = 128; | |
24838 | char_type* __res = | |
24839 | static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen)); | |
24840 | ||
24841 | ||
24842 | ||
24843 | ||
24844 | ||
24845 | ||
24846 | char_type __fmt[4]; | |
24847 | __fmt[0] = __ctype.widen('%'); | |
24848 | if (!__mod) | |
24849 | { | |
24850 | __fmt[1] = __format; | |
24851 | __fmt[2] = char_type(); | |
24852 | } | |
24853 | else | |
24854 | { | |
24855 | __fmt[1] = __mod; | |
24856 | __fmt[2] = __format; | |
24857 | __fmt[3] = char_type(); | |
24858 | } | |
24859 | ||
24860 | __tp._M_put(__res, __maxlen, __fmt, __tm); | |
24861 | ||
24862 | ||
24863 | return std::__write(__s, __res, char_traits<char_type>::length(__res)); | |
24864 | } | |
24865 | ||
24866 | ||
24867 | template<typename _CharT> | |
24868 | int | |
24869 | collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const | |
24870 | { return 0; } | |
24871 | ||
24872 | ||
24873 | template<typename _CharT> | |
24874 | size_t | |
24875 | collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const | |
24876 | { return 0; } | |
24877 | ||
24878 | template<typename _CharT> | |
24879 | int | |
24880 | collate<_CharT>:: | |
24881 | do_compare(const _CharT* __lo1, const _CharT* __hi1, | |
24882 | const _CharT* __lo2, const _CharT* __hi2) const | |
24883 | { | |
24884 | ||
24885 | ||
24886 | const string_type __one(__lo1, __hi1); | |
24887 | const string_type __two(__lo2, __hi2); | |
24888 | ||
24889 | const _CharT* __p = __one.c_str(); | |
24890 | const _CharT* __pend = __one.data() + __one.length(); | |
24891 | const _CharT* __q = __two.c_str(); | |
24892 | const _CharT* __qend = __two.data() + __two.length(); | |
24893 | ||
24894 | ||
24895 | ||
24896 | ||
24897 | for (;;) | |
24898 | { | |
24899 | const int __res = _M_compare(__p, __q); | |
24900 | if (__res) | |
24901 | return __res; | |
24902 | ||
24903 | __p += char_traits<_CharT>::length(__p); | |
24904 | __q += char_traits<_CharT>::length(__q); | |
24905 | if (__p == __pend && __q == __qend) | |
24906 | return 0; | |
24907 | else if (__p == __pend) | |
24908 | return -1; | |
24909 | else if (__q == __qend) | |
24910 | return 1; | |
24911 | ||
24912 | __p++; | |
24913 | __q++; | |
24914 | } | |
24915 | } | |
24916 | ||
24917 | template<typename _CharT> | |
24918 | typename collate<_CharT>::string_type | |
24919 | collate<_CharT>:: | |
24920 | do_transform(const _CharT* __lo, const _CharT* __hi) const | |
24921 | { | |
24922 | ||
24923 | string_type __str(__lo, __hi); | |
24924 | ||
24925 | const _CharT* __p = __str.c_str(); | |
24926 | const _CharT* __pend = __str.data() + __str.length(); | |
24927 | ||
24928 | size_t __len = (__hi - __lo) * 2; | |
24929 | ||
24930 | string_type __ret; | |
24931 | ||
24932 | ||
24933 | ||
24934 | ||
24935 | for (;;) | |
24936 | { | |
24937 | ||
24938 | _CharT* __c = | |
24939 | static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len)); | |
24940 | size_t __res = _M_transform(__c, __p, __len); | |
24941 | ||
24942 | ||
24943 | if (__res >= __len) | |
24944 | { | |
24945 | __len = __res + 1; | |
24946 | __c = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
24947 | * __len)); | |
24948 | __res = _M_transform(__c, __p, __len); | |
24949 | } | |
24950 | ||
24951 | __ret.append(__c, __res); | |
24952 | __p += char_traits<_CharT>::length(__p); | |
24953 | if (__p == __pend) | |
24954 | return __ret; | |
24955 | ||
24956 | __p++; | |
24957 | __ret.push_back(_CharT()); | |
24958 | } | |
24959 | } | |
24960 | ||
24961 | template<typename _CharT> | |
24962 | long | |
24963 | collate<_CharT>:: | |
24964 | do_hash(const _CharT* __lo, const _CharT* __hi) const | |
24965 | { | |
24966 | unsigned long __val = 0; | |
24967 | for (; __lo < __hi; ++__lo) | |
24968 | __val = *__lo + ((__val << 7) | | |
24969 | (__val >> (numeric_limits<unsigned long>::digits - 7))); | |
24970 | return static_cast<long>(__val); | |
24971 | } | |
24972 | # 2407 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
24973 | template<typename _CharT, typename _Traits> | |
24974 | void | |
24975 | __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, | |
24976 | _CharT* __news, const _CharT* __olds, | |
24977 | const streamsize __newlen, | |
24978 | const streamsize __oldlen, const bool __num) | |
24979 | { | |
24980 | const size_t __plen = static_cast<size_t>(__newlen - __oldlen); | |
24981 | const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; | |
24982 | ||
24983 | ||
24984 | if (__adjust == ios_base::left) | |
24985 | { | |
24986 | _Traits::copy(__news, const_cast<_CharT*>(__olds), __oldlen); | |
24987 | _Traits::assign(__news + __oldlen, __plen, __fill); | |
24988 | return; | |
24989 | } | |
24990 | ||
24991 | size_t __mod = 0; | |
24992 | if (__adjust == ios_base::internal && __num) | |
24993 | { | |
24994 | ||
24995 | ||
24996 | ||
24997 | const locale& __loc = __io._M_getloc(); | |
24998 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
24999 | ||
25000 | const bool __testsign = (__ctype.widen('-') == __olds[0] | |
25001 | || __ctype.widen('+') == __olds[0]); | |
25002 | const bool __testhex = (__ctype.widen('0') == __olds[0] | |
25003 | && __oldlen > 1 | |
25004 | && (__ctype.widen('x') == __olds[1] | |
25005 | || __ctype.widen('X') == __olds[1])); | |
25006 | if (__testhex) | |
25007 | { | |
25008 | __news[0] = __olds[0]; | |
25009 | __news[1] = __olds[1]; | |
25010 | __mod = 2; | |
25011 | __news += 2; | |
25012 | } | |
25013 | else if (__testsign) | |
25014 | { | |
25015 | __news[0] = __olds[0]; | |
25016 | __mod = 1; | |
25017 | ++__news; | |
25018 | } | |
25019 | ||
25020 | } | |
25021 | _Traits::assign(__news, __plen, __fill); | |
25022 | _Traits::copy(__news + __plen, const_cast<_CharT*>(__olds + __mod), | |
25023 | __oldlen - __mod); | |
25024 | } | |
25025 | ||
25026 | bool | |
25027 | __verify_grouping(const char* __grouping, size_t __grouping_size, | |
25028 | const string& __grouping_tmp) | |
25029 | { | |
25030 | const size_t __n = __grouping_tmp.size() - 1; | |
25031 | const size_t __min = std::min(__n, size_t(__grouping_size - 1)); | |
25032 | size_t __i = __n; | |
25033 | bool __test = true; | |
25034 | ||
25035 | ||
25036 | ||
25037 | ||
25038 | for (size_t __j = 0; __j < __min && __test; --__i, ++__j) | |
25039 | __test = __grouping_tmp[__i] == __grouping[__j]; | |
25040 | for (; __i && __test; --__i) | |
25041 | __test = __grouping_tmp[__i] == __grouping[__min]; | |
25042 | ||
25043 | ||
25044 | ||
25045 | if (static_cast<signed char>(__grouping[__min]) > 0) | |
25046 | __test &= __grouping_tmp[0] <= __grouping[__min]; | |
25047 | return __test; | |
25048 | } | |
25049 | ||
25050 | template<typename _CharT> | |
25051 | _CharT* | |
25052 | __add_grouping(_CharT* __s, _CharT __sep, | |
25053 | const char* __gbeg, size_t __gsize, | |
25054 | const _CharT* __first, const _CharT* __last) | |
25055 | { | |
25056 | if (__last - __first > *__gbeg | |
25057 | && static_cast<signed char>(*__gbeg) > 0) | |
25058 | { | |
25059 | const bool __bump = __gsize != 1; | |
25060 | __s = std::__add_grouping(__s, __sep, __gbeg + __bump, | |
25061 | __gsize - __bump, __first, | |
25062 | __last - *__gbeg); | |
25063 | __first = __last - *__gbeg; | |
25064 | *__s++ = __sep; | |
25065 | } | |
25066 | do | |
25067 | *__s++ = *__first++; | |
25068 | while (__first != __last); | |
25069 | return __s; | |
25070 | } | |
25071 | ||
25072 | ||
25073 | ||
25074 | ||
25075 | ||
25076 | extern template class moneypunct<char, false>; | |
25077 | extern template class moneypunct<char, true>; | |
25078 | extern template class moneypunct_byname<char, false>; | |
25079 | extern template class moneypunct_byname<char, true>; | |
25080 | extern template class money_get<char>; | |
25081 | extern template class money_put<char>; | |
25082 | extern template class numpunct<char>; | |
25083 | extern template class numpunct_byname<char>; | |
25084 | extern template class num_get<char>; | |
25085 | extern template class num_put<char>; | |
25086 | extern template class __timepunct<char>; | |
25087 | extern template class time_put<char>; | |
25088 | extern template class time_put_byname<char>; | |
25089 | extern template class time_get<char>; | |
25090 | extern template class time_get_byname<char>; | |
25091 | extern template class messages<char>; | |
25092 | extern template class messages_byname<char>; | |
25093 | extern template class ctype_byname<char>; | |
25094 | extern template class codecvt_byname<char, char, mbstate_t>; | |
25095 | extern template class collate<char>; | |
25096 | extern template class collate_byname<char>; | |
25097 | ||
25098 | extern template | |
25099 | const codecvt<char, char, mbstate_t>& | |
25100 | use_facet<codecvt<char, char, mbstate_t> >(const locale&); | |
25101 | ||
25102 | extern template | |
25103 | const collate<char>& | |
25104 | use_facet<collate<char> >(const locale&); | |
25105 | ||
25106 | extern template | |
25107 | const numpunct<char>& | |
25108 | use_facet<numpunct<char> >(const locale&); | |
25109 | ||
25110 | extern template | |
25111 | const num_put<char>& | |
25112 | use_facet<num_put<char> >(const locale&); | |
25113 | ||
25114 | extern template | |
25115 | const num_get<char>& | |
25116 | use_facet<num_get<char> >(const locale&); | |
25117 | ||
25118 | extern template | |
25119 | const moneypunct<char, true>& | |
25120 | use_facet<moneypunct<char, true> >(const locale&); | |
25121 | ||
25122 | extern template | |
25123 | const moneypunct<char, false>& | |
25124 | use_facet<moneypunct<char, false> >(const locale&); | |
25125 | ||
25126 | extern template | |
25127 | const money_put<char>& | |
25128 | use_facet<money_put<char> >(const locale&); | |
25129 | ||
25130 | extern template | |
25131 | const money_get<char>& | |
25132 | use_facet<money_get<char> >(const locale&); | |
25133 | ||
25134 | extern template | |
25135 | const __timepunct<char>& | |
25136 | use_facet<__timepunct<char> >(const locale&); | |
25137 | ||
25138 | extern template | |
25139 | const time_put<char>& | |
25140 | use_facet<time_put<char> >(const locale&); | |
25141 | ||
25142 | extern template | |
25143 | const time_get<char>& | |
25144 | use_facet<time_get<char> >(const locale&); | |
25145 | ||
25146 | extern template | |
25147 | const messages<char>& | |
25148 | use_facet<messages<char> >(const locale&); | |
25149 | ||
25150 | extern template | |
25151 | bool | |
25152 | has_facet<ctype<char> >(const locale&); | |
25153 | ||
25154 | extern template | |
25155 | bool | |
25156 | has_facet<codecvt<char, char, mbstate_t> >(const locale&); | |
25157 | ||
25158 | extern template | |
25159 | bool | |
25160 | has_facet<collate<char> >(const locale&); | |
25161 | ||
25162 | extern template | |
25163 | bool | |
25164 | has_facet<numpunct<char> >(const locale&); | |
25165 | ||
25166 | extern template | |
25167 | bool | |
25168 | has_facet<num_put<char> >(const locale&); | |
25169 | ||
25170 | extern template | |
25171 | bool | |
25172 | has_facet<num_get<char> >(const locale&); | |
25173 | ||
25174 | extern template | |
25175 | bool | |
25176 | has_facet<moneypunct<char> >(const locale&); | |
25177 | ||
25178 | extern template | |
25179 | bool | |
25180 | has_facet<money_put<char> >(const locale&); | |
25181 | ||
25182 | extern template | |
25183 | bool | |
25184 | has_facet<money_get<char> >(const locale&); | |
25185 | ||
25186 | extern template | |
25187 | bool | |
25188 | has_facet<__timepunct<char> >(const locale&); | |
25189 | ||
25190 | extern template | |
25191 | bool | |
25192 | has_facet<time_put<char> >(const locale&); | |
25193 | ||
25194 | extern template | |
25195 | bool | |
25196 | has_facet<time_get<char> >(const locale&); | |
25197 | ||
25198 | extern template | |
25199 | bool | |
25200 | has_facet<messages<char> >(const locale&); | |
25201 | # 2764 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/locale_facets.tcc" 3 | |
25202 | } | |
25203 | # 47 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/locale" 2 3 | |
25204 | # 24 "./boost/format.hpp" 2 | |
25205 | ||
25206 | ||
25207 | ||
25208 | # 1 "./boost/format/detail/compat_workarounds.hpp" 1 | |
25209 | # 33 "./boost/format/detail/compat_workarounds.hpp" | |
25210 | namespace boost { | |
25211 | namespace io { | |
25212 | ||
25213 | ||
25214 | ||
25215 | template<class Tr> | |
25216 | class CompatTraits; | |
25217 | ||
25218 | ||
25219 | ||
25220 | ||
25221 | template<class Alloc> | |
25222 | class CompatAlloc; | |
25223 | } | |
25224 | } | |
25225 | ||
25226 | ||
25227 | # 1 "./boost/format/detail/config_macros.hpp" 1 | |
25228 | # 33 "./boost/format/detail/config_macros.hpp" | |
25229 | # 1 "./boost/format/detail/workarounds_gcc-2_95.hpp" 1 | |
25230 | # 34 "./boost/format/detail/config_macros.hpp" 2 | |
25231 | # 1 "./boost/format/detail/workarounds_stlport.hpp" 1 | |
25232 | # 35 "./boost/format/detail/config_macros.hpp" 2 | |
25233 | # 86 "./boost/format/detail/config_macros.hpp" | |
25234 | namespace boost { namespace io { namespace detail { | |
25235 | ||
25236 | typedef ::std:: locale locale_t; | |
25237 | ||
25238 | ||
25239 | ||
25240 | } } } | |
25241 | # 51 "./boost/format/detail/compat_workarounds.hpp" 2 | |
25242 | # 60 "./boost/format/detail/compat_workarounds.hpp" | |
25243 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 1 3 | |
25244 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25245 | ||
25246 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25247 | ||
25248 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ios" 1 3 | |
25249 | # 41 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ios" 3 | |
25250 | ||
25251 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ios" 3 | |
25252 | # 50 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ios" 3 | |
25253 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 1 3 | |
25254 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25255 | ||
25256 | # 40 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25257 | ||
25258 | ||
25259 | ||
25260 | ||
25261 | ||
25262 | ||
25263 | namespace std | |
25264 | { | |
25265 | ||
25266 | ||
25267 | ||
25268 | ||
25269 | ||
25270 | ||
25271 | ||
25272 | template<typename _CharT, typename _Traits> | |
25273 | class basic_ios : public ios_base | |
25274 | { | |
25275 | public: | |
25276 | ||
25277 | ||
25278 | ||
25279 | ||
25280 | ||
25281 | ||
25282 | typedef _CharT char_type; | |
25283 | typedef typename _Traits::int_type int_type; | |
25284 | typedef typename _Traits::pos_type pos_type; | |
25285 | typedef typename _Traits::off_type off_type; | |
25286 | typedef _Traits traits_type; | |
25287 | # 78 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25288 | typedef ctype<_CharT> __ctype_type; | |
25289 | typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > | |
25290 | __num_put_type; | |
25291 | typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > | |
25292 | __num_get_type; | |
25293 | ||
25294 | ||
25295 | ||
25296 | protected: | |
25297 | basic_ostream<_CharT, _Traits>* _M_tie; | |
25298 | mutable char_type _M_fill; | |
25299 | mutable bool _M_fill_init; | |
25300 | basic_streambuf<_CharT, _Traits>* _M_streambuf; | |
25301 | ||
25302 | ||
25303 | const __ctype_type* _M_ctype; | |
25304 | ||
25305 | const __num_put_type* _M_num_put; | |
25306 | ||
25307 | const __num_get_type* _M_num_get; | |
25308 | ||
25309 | public: | |
25310 | ||
25311 | ||
25312 | ||
25313 | ||
25314 | ||
25315 | ||
25316 | ||
25317 | operator void*() const | |
25318 | { return this->fail() ? 0 : const_cast<basic_ios*>(this); } | |
25319 | ||
25320 | bool | |
25321 | operator!() const | |
25322 | { return this->fail(); } | |
25323 | # 122 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25324 | iostate | |
25325 | rdstate() const | |
25326 | { return _M_streambuf_state; } | |
25327 | # 133 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25328 | void | |
25329 | clear(iostate __state = goodbit); | |
25330 | ||
25331 | ||
25332 | ||
25333 | ||
25334 | ||
25335 | ||
25336 | ||
25337 | void | |
25338 | setstate(iostate __state) | |
25339 | { this->clear(this->rdstate() | __state); } | |
25340 | ||
25341 | ||
25342 | ||
25343 | ||
25344 | void | |
25345 | _M_setstate(iostate __state) | |
25346 | { | |
25347 | ||
25348 | ||
25349 | _M_streambuf_state |= __state; | |
25350 | if (this->exceptions() & __state) | |
25351 | throw; | |
25352 | } | |
25353 | ||
25354 | ||
25355 | ||
25356 | ||
25357 | ||
25358 | ||
25359 | ||
25360 | bool | |
25361 | good() const | |
25362 | { return this->rdstate() == 0; } | |
25363 | ||
25364 | ||
25365 | ||
25366 | ||
25367 | ||
25368 | ||
25369 | ||
25370 | bool | |
25371 | eof() const | |
25372 | { return (this->rdstate() & eofbit) != 0; } | |
25373 | # 186 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25374 | bool | |
25375 | fail() const | |
25376 | { return (this->rdstate() & (badbit | failbit)) != 0; } | |
25377 | ||
25378 | ||
25379 | ||
25380 | ||
25381 | ||
25382 | ||
25383 | ||
25384 | bool | |
25385 | bad() const | |
25386 | { return (this->rdstate() & badbit) != 0; } | |
25387 | # 207 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25388 | iostate | |
25389 | exceptions() const | |
25390 | { return _M_exception; } | |
25391 | # 242 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25392 | void | |
25393 | exceptions(iostate __except) | |
25394 | { | |
25395 | _M_exception = __except; | |
25396 | this->clear(_M_streambuf_state); | |
25397 | } | |
25398 | ||
25399 | ||
25400 | ||
25401 | ||
25402 | ||
25403 | ||
25404 | ||
25405 | explicit | |
25406 | basic_ios(basic_streambuf<_CharT, _Traits>* __sb) | |
25407 | : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), | |
25408 | _M_ctype(0), _M_num_put(0), _M_num_get(0) | |
25409 | { this->init(__sb); } | |
25410 | ||
25411 | ||
25412 | ||
25413 | ||
25414 | ||
25415 | ||
25416 | ||
25417 | virtual | |
25418 | ~basic_ios() { } | |
25419 | # 280 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25420 | basic_ostream<_CharT, _Traits>* | |
25421 | tie() const | |
25422 | { return _M_tie; } | |
25423 | # 292 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25424 | basic_ostream<_CharT, _Traits>* | |
25425 | tie(basic_ostream<_CharT, _Traits>* __tiestr) | |
25426 | { | |
25427 | basic_ostream<_CharT, _Traits>* __old = _M_tie; | |
25428 | _M_tie = __tiestr; | |
25429 | return __old; | |
25430 | } | |
25431 | ||
25432 | ||
25433 | ||
25434 | ||
25435 | ||
25436 | ||
25437 | ||
25438 | basic_streambuf<_CharT, _Traits>* | |
25439 | rdbuf() const | |
25440 | { return _M_streambuf; } | |
25441 | # 332 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25442 | basic_streambuf<_CharT, _Traits>* | |
25443 | rdbuf(basic_streambuf<_CharT, _Traits>* __sb); | |
25444 | # 346 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25445 | basic_ios& | |
25446 | copyfmt(const basic_ios& __rhs); | |
25447 | ||
25448 | ||
25449 | ||
25450 | ||
25451 | ||
25452 | ||
25453 | ||
25454 | char_type | |
25455 | fill() const | |
25456 | { | |
25457 | if (!_M_fill_init) | |
25458 | { | |
25459 | _M_fill = this->widen(' '); | |
25460 | _M_fill_init = true; | |
25461 | } | |
25462 | return _M_fill; | |
25463 | } | |
25464 | # 375 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25465 | char_type | |
25466 | fill(char_type __ch) | |
25467 | { | |
25468 | char_type __old = this->fill(); | |
25469 | _M_fill = __ch; | |
25470 | return __old; | |
25471 | } | |
25472 | # 395 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25473 | locale | |
25474 | imbue(const locale& __loc); | |
25475 | # 415 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25476 | char | |
25477 | narrow(char_type __c, char __dfault) const; | |
25478 | # 433 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 3 | |
25479 | char_type | |
25480 | widen(char __c) const; | |
25481 | ||
25482 | protected: | |
25483 | ||
25484 | ||
25485 | ||
25486 | ||
25487 | ||
25488 | ||
25489 | ||
25490 | basic_ios() | |
25491 | : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), | |
25492 | _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) | |
25493 | { } | |
25494 | ||
25495 | ||
25496 | ||
25497 | ||
25498 | ||
25499 | ||
25500 | ||
25501 | void | |
25502 | init(basic_streambuf<_CharT, _Traits>* __sb); | |
25503 | ||
25504 | void | |
25505 | _M_cache_locale(const locale& __loc); | |
25506 | }; | |
25507 | } | |
25508 | ||
25509 | ||
25510 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.tcc" 1 3 | |
25511 | # 38 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.tcc" 3 | |
25512 | ||
25513 | # 39 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.tcc" 3 | |
25514 | ||
25515 | namespace std | |
25516 | { | |
25517 | template<typename _CharT, typename _Traits> | |
25518 | void | |
25519 | basic_ios<_CharT, _Traits>::clear(iostate __state) | |
25520 | { | |
25521 | if (this->rdbuf()) | |
25522 | _M_streambuf_state = __state; | |
25523 | else | |
25524 | _M_streambuf_state = __state | badbit; | |
25525 | if (this->exceptions() & this->rdstate()) | |
25526 | __throw_ios_failure(("basic_ios::clear")); | |
25527 | } | |
25528 | ||
25529 | template<typename _CharT, typename _Traits> | |
25530 | basic_streambuf<_CharT, _Traits>* | |
25531 | basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) | |
25532 | { | |
25533 | basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; | |
25534 | _M_streambuf = __sb; | |
25535 | this->clear(); | |
25536 | return __old; | |
25537 | } | |
25538 | ||
25539 | template<typename _CharT, typename _Traits> | |
25540 | basic_ios<_CharT, _Traits>& | |
25541 | basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) | |
25542 | { | |
25543 | ||
25544 | ||
25545 | if (this != &__rhs) | |
25546 | { | |
25547 | ||
25548 | ||
25549 | ||
25550 | ||
25551 | _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? | |
25552 | _M_local_word : new _Words[__rhs._M_word_size]; | |
25553 | ||
25554 | ||
25555 | _Callback_list* __cb = __rhs._M_callbacks; | |
25556 | if (__cb) | |
25557 | __cb->_M_add_reference(); | |
25558 | _M_call_callbacks(erase_event); | |
25559 | if (_M_word != _M_local_word) | |
25560 | { | |
25561 | delete [] _M_word; | |
25562 | _M_word = 0; | |
25563 | } | |
25564 | _M_dispose_callbacks(); | |
25565 | ||
25566 | ||
25567 | _M_callbacks = __cb; | |
25568 | for (int __i = 0; __i < __rhs._M_word_size; ++__i) | |
25569 | __words[__i] = __rhs._M_word[__i]; | |
25570 | _M_word = __words; | |
25571 | _M_word_size = __rhs._M_word_size; | |
25572 | ||
25573 | this->flags(__rhs.flags()); | |
25574 | this->width(__rhs.width()); | |
25575 | this->precision(__rhs.precision()); | |
25576 | this->tie(__rhs.tie()); | |
25577 | this->fill(__rhs.fill()); | |
25578 | _M_ios_locale = __rhs.getloc(); | |
25579 | _M_cache_locale(_M_ios_locale); | |
25580 | ||
25581 | _M_call_callbacks(copyfmt_event); | |
25582 | ||
25583 | ||
25584 | this->exceptions(__rhs.exceptions()); | |
25585 | } | |
25586 | return *this; | |
25587 | } | |
25588 | ||
25589 | template<typename _CharT, typename _Traits> | |
25590 | char | |
25591 | basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const | |
25592 | { return __check_facet(_M_ctype).narrow(__c, __dfault); } | |
25593 | ||
25594 | template<typename _CharT, typename _Traits> | |
25595 | _CharT | |
25596 | basic_ios<_CharT, _Traits>::widen(char __c) const | |
25597 | { return __check_facet(_M_ctype).widen(__c); } | |
25598 | ||
25599 | ||
25600 | template<typename _CharT, typename _Traits> | |
25601 | locale | |
25602 | basic_ios<_CharT, _Traits>::imbue(const locale& __loc) | |
25603 | { | |
25604 | locale __old(this->getloc()); | |
25605 | ios_base::imbue(__loc); | |
25606 | _M_cache_locale(__loc); | |
25607 | if (this->rdbuf() != 0) | |
25608 | this->rdbuf()->pubimbue(__loc); | |
25609 | return __old; | |
25610 | } | |
25611 | ||
25612 | template<typename _CharT, typename _Traits> | |
25613 | void | |
25614 | basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) | |
25615 | { | |
25616 | ||
25617 | ios_base::_M_init(); | |
25618 | ||
25619 | ||
25620 | _M_cache_locale(_M_ios_locale); | |
25621 | # 159 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.tcc" 3 | |
25622 | _M_fill = _CharT(); | |
25623 | _M_fill_init = false; | |
25624 | ||
25625 | _M_tie = 0; | |
25626 | _M_exception = goodbit; | |
25627 | _M_streambuf = __sb; | |
25628 | _M_streambuf_state = __sb ? goodbit : badbit; | |
25629 | } | |
25630 | ||
25631 | template<typename _CharT, typename _Traits> | |
25632 | void | |
25633 | basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) | |
25634 | { | |
25635 | if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) | |
25636 | _M_ctype = &use_facet<__ctype_type>(__loc); | |
25637 | else | |
25638 | _M_ctype = 0; | |
25639 | ||
25640 | if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) | |
25641 | _M_num_put = &use_facet<__num_put_type>(__loc); | |
25642 | else | |
25643 | _M_num_put = 0; | |
25644 | ||
25645 | if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) | |
25646 | _M_num_get = &use_facet<__num_get_type>(__loc); | |
25647 | else | |
25648 | _M_num_get = 0; | |
25649 | } | |
25650 | ||
25651 | ||
25652 | ||
25653 | ||
25654 | ||
25655 | extern template class basic_ios<char>; | |
25656 | ||
25657 | ||
25658 | ||
25659 | ||
25660 | ||
25661 | } | |
25662 | # 465 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/basic_ios.h" 2 3 | |
25663 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ios" 2 3 | |
25664 | # 45 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 2 3 | |
25665 | ||
25666 | namespace std | |
25667 | { | |
25668 | # 56 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25669 | template<typename _CharT, typename _Traits> | |
25670 | class basic_ostream : virtual public basic_ios<_CharT, _Traits> | |
25671 | { | |
25672 | public: | |
25673 | ||
25674 | typedef _CharT char_type; | |
25675 | typedef typename _Traits::int_type int_type; | |
25676 | typedef typename _Traits::pos_type pos_type; | |
25677 | typedef typename _Traits::off_type off_type; | |
25678 | typedef _Traits traits_type; | |
25679 | ||
25680 | ||
25681 | typedef basic_streambuf<_CharT, _Traits> __streambuf_type; | |
25682 | typedef basic_ios<_CharT, _Traits> __ios_type; | |
25683 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
25684 | typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > | |
25685 | __num_put_type; | |
25686 | typedef ctype<_CharT> __ctype_type; | |
25687 | ||
25688 | template<typename _CharT2, typename _Traits2> | |
25689 | friend basic_ostream<_CharT2, _Traits2>& | |
25690 | operator<<(basic_ostream<_CharT2, _Traits2>&, _CharT2); | |
25691 | ||
25692 | template<typename _Traits2> | |
25693 | friend basic_ostream<char, _Traits2>& | |
25694 | operator<<(basic_ostream<char, _Traits2>&, char); | |
25695 | ||
25696 | template<typename _CharT2, typename _Traits2> | |
25697 | friend basic_ostream<_CharT2, _Traits2>& | |
25698 | operator<<(basic_ostream<_CharT2, _Traits2>&, const _CharT2*); | |
25699 | ||
25700 | template<typename _Traits2> | |
25701 | friend basic_ostream<char, _Traits2>& | |
25702 | operator<<(basic_ostream<char, _Traits2>&, const char*); | |
25703 | ||
25704 | template<typename _CharT2, typename _Traits2> | |
25705 | friend basic_ostream<_CharT2, _Traits2>& | |
25706 | operator<<(basic_ostream<_CharT2, _Traits2>&, const char*); | |
25707 | # 103 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25708 | explicit | |
25709 | basic_ostream(__streambuf_type* __sb) | |
25710 | { this->init(__sb); } | |
25711 | ||
25712 | ||
25713 | ||
25714 | ||
25715 | ||
25716 | ||
25717 | virtual | |
25718 | ~basic_ostream() { } | |
25719 | ||
25720 | ||
25721 | class sentry; | |
25722 | friend class sentry; | |
25723 | # 129 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25724 | inline __ostream_type& | |
25725 | operator<<(__ostream_type& (*__pf)(__ostream_type&)); | |
25726 | ||
25727 | inline __ostream_type& | |
25728 | operator<<(__ios_type& (*__pf)(__ios_type&)); | |
25729 | ||
25730 | inline __ostream_type& | |
25731 | operator<<(ios_base& (*__pf) (ios_base&)); | |
25732 | # 166 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25733 | __ostream_type& | |
25734 | operator<<(long __n); | |
25735 | ||
25736 | __ostream_type& | |
25737 | operator<<(unsigned long __n); | |
25738 | ||
25739 | __ostream_type& | |
25740 | operator<<(bool __n); | |
25741 | ||
25742 | __ostream_type& | |
25743 | operator<<(short __n); | |
25744 | ||
25745 | __ostream_type& | |
25746 | operator<<(unsigned short __n); | |
25747 | ||
25748 | __ostream_type& | |
25749 | operator<<(int __n); | |
25750 | ||
25751 | __ostream_type& | |
25752 | operator<<(unsigned int __n); | |
25753 | ||
25754 | ||
25755 | __ostream_type& | |
25756 | operator<<(long long __n); | |
25757 | ||
25758 | __ostream_type& | |
25759 | operator<<(unsigned long long __n); | |
25760 | ||
25761 | ||
25762 | __ostream_type& | |
25763 | operator<<(double __f); | |
25764 | ||
25765 | __ostream_type& | |
25766 | operator<<(float __f); | |
25767 | ||
25768 | __ostream_type& | |
25769 | operator<<(long double __f); | |
25770 | ||
25771 | __ostream_type& | |
25772 | operator<<(const void* __p); | |
25773 | # 228 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25774 | __ostream_type& | |
25775 | operator<<(__streambuf_type* __sb); | |
25776 | # 261 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25777 | __ostream_type& | |
25778 | put(char_type __c); | |
25779 | ||
25780 | ||
25781 | void | |
25782 | _M_write(const char_type* __s, streamsize __n) | |
25783 | { | |
25784 | streamsize __put = this->rdbuf()->sputn(__s, __n); | |
25785 | if (__put != __n) | |
25786 | this->setstate(ios_base::badbit); | |
25787 | } | |
25788 | # 289 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25789 | __ostream_type& | |
25790 | write(const char_type* __s, streamsize __n); | |
25791 | # 302 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25792 | __ostream_type& | |
25793 | flush(); | |
25794 | # 313 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25795 | pos_type | |
25796 | tellp(); | |
25797 | # 324 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25798 | __ostream_type& | |
25799 | seekp(pos_type); | |
25800 | # 336 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25801 | __ostream_type& | |
25802 | seekp(off_type, ios_base::seekdir); | |
25803 | ||
25804 | protected: | |
25805 | explicit | |
25806 | basic_ostream() { } | |
25807 | }; | |
25808 | # 354 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25809 | template <typename _CharT, typename _Traits> | |
25810 | class basic_ostream<_CharT, _Traits>::sentry | |
25811 | { | |
25812 | ||
25813 | bool _M_ok; | |
25814 | basic_ostream<_CharT,_Traits>& _M_os; | |
25815 | ||
25816 | public: | |
25817 | # 373 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25818 | explicit | |
25819 | sentry(basic_ostream<_CharT,_Traits>& __os); | |
25820 | # 383 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25821 | ~sentry() | |
25822 | { | |
25823 | ||
25824 | if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception()) | |
25825 | { | |
25826 | ||
25827 | if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) | |
25828 | _M_os.setstate(ios_base::badbit); | |
25829 | } | |
25830 | } | |
25831 | # 401 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25832 | operator bool() const | |
25833 | { return _M_ok; } | |
25834 | }; | |
25835 | # 422 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25836 | template<typename _CharT, typename _Traits> | |
25837 | basic_ostream<_CharT, _Traits>& | |
25838 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c); | |
25839 | ||
25840 | template<typename _CharT, typename _Traits> | |
25841 | basic_ostream<_CharT, _Traits>& | |
25842 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | |
25843 | { return (__out << __out.widen(__c)); } | |
25844 | ||
25845 | ||
25846 | template <class _Traits> | |
25847 | basic_ostream<char, _Traits>& | |
25848 | operator<<(basic_ostream<char, _Traits>& __out, char __c); | |
25849 | ||
25850 | ||
25851 | template<class _Traits> | |
25852 | basic_ostream<char, _Traits>& | |
25853 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | |
25854 | { return (__out << static_cast<char>(__c)); } | |
25855 | ||
25856 | template<class _Traits> | |
25857 | basic_ostream<char, _Traits>& | |
25858 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | |
25859 | { return (__out << static_cast<char>(__c)); } | |
25860 | # 462 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25861 | template<typename _CharT, typename _Traits> | |
25862 | basic_ostream<_CharT, _Traits>& | |
25863 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s); | |
25864 | ||
25865 | template<typename _CharT, typename _Traits> | |
25866 | basic_ostream<_CharT, _Traits> & | |
25867 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); | |
25868 | ||
25869 | ||
25870 | template<class _Traits> | |
25871 | basic_ostream<char, _Traits>& | |
25872 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s); | |
25873 | ||
25874 | ||
25875 | template<class _Traits> | |
25876 | basic_ostream<char, _Traits>& | |
25877 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | |
25878 | { return (__out << reinterpret_cast<const char*>(__s)); } | |
25879 | ||
25880 | template<class _Traits> | |
25881 | basic_ostream<char, _Traits> & | |
25882 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | |
25883 | { return (__out << reinterpret_cast<const char*>(__s)); } | |
25884 | # 496 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 3 | |
25885 | template<typename _CharT, typename _Traits> | |
25886 | basic_ostream<_CharT, _Traits>& | |
25887 | endl(basic_ostream<_CharT, _Traits>& __os) | |
25888 | { return flush(__os.put(__os.widen('\n'))); } | |
25889 | ||
25890 | ||
25891 | ||
25892 | ||
25893 | ||
25894 | ||
25895 | ||
25896 | template<typename _CharT, typename _Traits> | |
25897 | basic_ostream<_CharT, _Traits>& | |
25898 | ends(basic_ostream<_CharT, _Traits>& __os) | |
25899 | { return __os.put(_CharT()); } | |
25900 | ||
25901 | ||
25902 | ||
25903 | ||
25904 | ||
25905 | ||
25906 | template<typename _CharT, typename _Traits> | |
25907 | basic_ostream<_CharT, _Traits>& | |
25908 | flush(basic_ostream<_CharT, _Traits>& __os) | |
25909 | { return __os.flush(); } | |
25910 | ||
25911 | } | |
25912 | ||
25913 | ||
25914 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ostream.tcc" 1 3 | |
25915 | # 43 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ostream.tcc" 3 | |
25916 | ||
25917 | # 44 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ostream.tcc" 3 | |
25918 | ||
25919 | ||
25920 | ||
25921 | namespace std | |
25922 | { | |
25923 | template<typename _CharT, typename _Traits> | |
25924 | basic_ostream<_CharT, _Traits>::sentry:: | |
25925 | sentry(basic_ostream<_CharT, _Traits>& __os) | |
25926 | : _M_ok(false), _M_os(__os) | |
25927 | { | |
25928 | ||
25929 | if (__os.tie() && __os.good()) | |
25930 | __os.tie()->flush(); | |
25931 | ||
25932 | if (__os.good()) | |
25933 | _M_ok = true; | |
25934 | else | |
25935 | __os.setstate(ios_base::failbit); | |
25936 | } | |
25937 | ||
25938 | template<typename _CharT, typename _Traits> | |
25939 | basic_ostream<_CharT, _Traits>& | |
25940 | basic_ostream<_CharT, _Traits>:: | |
25941 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | |
25942 | { | |
25943 | ||
25944 | ||
25945 | ||
25946 | return __pf(*this); | |
25947 | } | |
25948 | ||
25949 | template<typename _CharT, typename _Traits> | |
25950 | basic_ostream<_CharT, _Traits>& | |
25951 | basic_ostream<_CharT, _Traits>:: | |
25952 | operator<<(__ios_type& (*__pf)(__ios_type&)) | |
25953 | { | |
25954 | ||
25955 | ||
25956 | ||
25957 | __pf(*this); | |
25958 | return *this; | |
25959 | } | |
25960 | ||
25961 | template<typename _CharT, typename _Traits> | |
25962 | basic_ostream<_CharT, _Traits>& | |
25963 | basic_ostream<_CharT, _Traits>:: | |
25964 | operator<<(ios_base& (*__pf)(ios_base&)) | |
25965 | { | |
25966 | ||
25967 | ||
25968 | ||
25969 | __pf(*this); | |
25970 | return *this; | |
25971 | } | |
25972 | ||
25973 | template<typename _CharT, typename _Traits> | |
25974 | basic_ostream<_CharT, _Traits>& | |
25975 | basic_ostream<_CharT, _Traits>:: | |
25976 | operator<<(bool __n) | |
25977 | { | |
25978 | sentry __cerb(*this); | |
25979 | if (__cerb) | |
25980 | { | |
25981 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
25982 | try | |
25983 | { | |
25984 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
25985 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
25986 | __err |= ios_base::badbit; | |
25987 | } | |
25988 | catch(...) | |
25989 | { this->_M_setstate(ios_base::badbit); } | |
25990 | if (__err) | |
25991 | this->setstate(__err); | |
25992 | } | |
25993 | return *this; | |
25994 | } | |
25995 | ||
25996 | template<typename _CharT, typename _Traits> | |
25997 | basic_ostream<_CharT, _Traits>& | |
25998 | basic_ostream<_CharT, _Traits>:: | |
25999 | operator<<(short __n) | |
26000 | { | |
26001 | sentry __cerb(*this); | |
26002 | if (__cerb) | |
26003 | { | |
26004 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26005 | try | |
26006 | { | |
26007 | ||
26008 | ||
26009 | long __l; | |
26010 | const ios_base::fmtflags __fmt = (this->flags() | |
26011 | & ios_base::basefield); | |
26012 | if (__fmt == ios_base::oct || __fmt == ios_base::hex) | |
26013 | __l = static_cast<long>(static_cast<unsigned short>(__n)); | |
26014 | else | |
26015 | __l = static_cast<long>(__n); | |
26016 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26017 | if (__np.put(*this, *this, this->fill(), __l).failed()) | |
26018 | __err |= ios_base::badbit; | |
26019 | } | |
26020 | catch(...) | |
26021 | { this->_M_setstate(ios_base::badbit); } | |
26022 | if (__err) | |
26023 | this->setstate(__err); | |
26024 | } | |
26025 | return *this; | |
26026 | } | |
26027 | ||
26028 | template<typename _CharT, typename _Traits> | |
26029 | basic_ostream<_CharT, _Traits>& | |
26030 | basic_ostream<_CharT, _Traits>:: | |
26031 | operator<<(unsigned short __n) | |
26032 | { | |
26033 | sentry __cerb(*this); | |
26034 | if (__cerb) | |
26035 | { | |
26036 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26037 | try | |
26038 | { | |
26039 | ||
26040 | ||
26041 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26042 | if (__np.put(*this, *this, this->fill(), | |
26043 | static_cast<unsigned long>(__n)).failed()) | |
26044 | __err |= ios_base::badbit; | |
26045 | } | |
26046 | catch(...) | |
26047 | { this->_M_setstate(ios_base::badbit); } | |
26048 | if (__err) | |
26049 | this->setstate(__err); | |
26050 | } | |
26051 | return *this; | |
26052 | } | |
26053 | ||
26054 | template<typename _CharT, typename _Traits> | |
26055 | basic_ostream<_CharT, _Traits>& | |
26056 | basic_ostream<_CharT, _Traits>:: | |
26057 | operator<<(int __n) | |
26058 | { | |
26059 | sentry __cerb(*this); | |
26060 | if (__cerb) | |
26061 | { | |
26062 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26063 | try | |
26064 | { | |
26065 | ||
26066 | ||
26067 | long __l; | |
26068 | const ios_base::fmtflags __fmt = (this->flags() | |
26069 | & ios_base::basefield); | |
26070 | if (__fmt == ios_base::oct || __fmt == ios_base::hex) | |
26071 | __l = static_cast<long>(static_cast<unsigned int>(__n)); | |
26072 | else | |
26073 | __l = static_cast<long>(__n); | |
26074 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26075 | if (__np.put(*this, *this, this->fill(), __l).failed()) | |
26076 | __err |= ios_base::badbit; | |
26077 | } | |
26078 | catch(...) | |
26079 | { this->_M_setstate(ios_base::badbit); } | |
26080 | if (__err) | |
26081 | this->setstate(__err); | |
26082 | } | |
26083 | return *this; | |
26084 | } | |
26085 | ||
26086 | template<typename _CharT, typename _Traits> | |
26087 | basic_ostream<_CharT, _Traits>& | |
26088 | basic_ostream<_CharT, _Traits>:: | |
26089 | operator<<(unsigned int __n) | |
26090 | { | |
26091 | sentry __cerb(*this); | |
26092 | if (__cerb) | |
26093 | { | |
26094 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26095 | try | |
26096 | { | |
26097 | ||
26098 | ||
26099 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26100 | if (__np.put(*this, *this, this->fill(), | |
26101 | static_cast<unsigned long>(__n)).failed()) | |
26102 | __err |= ios_base::badbit; | |
26103 | } | |
26104 | catch(...) | |
26105 | { this->_M_setstate(ios_base::badbit); } | |
26106 | if (__err) | |
26107 | this->setstate(__err); | |
26108 | } | |
26109 | return *this; | |
26110 | } | |
26111 | ||
26112 | template<typename _CharT, typename _Traits> | |
26113 | basic_ostream<_CharT, _Traits>& | |
26114 | basic_ostream<_CharT, _Traits>:: | |
26115 | operator<<(long __n) | |
26116 | { | |
26117 | sentry __cerb(*this); | |
26118 | if (__cerb) | |
26119 | { | |
26120 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26121 | try | |
26122 | { | |
26123 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26124 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
26125 | __err |= ios_base::badbit; | |
26126 | } | |
26127 | catch(...) | |
26128 | { this->_M_setstate(ios_base::badbit); } | |
26129 | if (__err) | |
26130 | this->setstate(__err); | |
26131 | } | |
26132 | return *this; | |
26133 | } | |
26134 | ||
26135 | template<typename _CharT, typename _Traits> | |
26136 | basic_ostream<_CharT, _Traits>& | |
26137 | basic_ostream<_CharT, _Traits>:: | |
26138 | operator<<(unsigned long __n) | |
26139 | { | |
26140 | sentry __cerb(*this); | |
26141 | if (__cerb) | |
26142 | { | |
26143 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26144 | try | |
26145 | { | |
26146 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26147 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
26148 | __err |= ios_base::badbit; | |
26149 | } | |
26150 | catch(...) | |
26151 | { this->_M_setstate(ios_base::badbit); } | |
26152 | if (__err) | |
26153 | this->setstate(__err); | |
26154 | } | |
26155 | return *this; | |
26156 | } | |
26157 | ||
26158 | ||
26159 | template<typename _CharT, typename _Traits> | |
26160 | basic_ostream<_CharT, _Traits>& | |
26161 | basic_ostream<_CharT, _Traits>:: | |
26162 | operator<<(long long __n) | |
26163 | { | |
26164 | sentry __cerb(*this); | |
26165 | if (__cerb) | |
26166 | { | |
26167 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26168 | try | |
26169 | { | |
26170 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26171 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
26172 | __err |= ios_base::badbit; | |
26173 | } | |
26174 | catch(...) | |
26175 | { this->_M_setstate(ios_base::badbit); } | |
26176 | if (__err) | |
26177 | this->setstate(__err); | |
26178 | } | |
26179 | return *this; | |
26180 | } | |
26181 | ||
26182 | template<typename _CharT, typename _Traits> | |
26183 | basic_ostream<_CharT, _Traits>& | |
26184 | basic_ostream<_CharT, _Traits>:: | |
26185 | operator<<(unsigned long long __n) | |
26186 | { | |
26187 | sentry __cerb(*this); | |
26188 | if (__cerb) | |
26189 | { | |
26190 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26191 | try | |
26192 | { | |
26193 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26194 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
26195 | __err |= ios_base::badbit; | |
26196 | } | |
26197 | catch(...) | |
26198 | { this->_M_setstate(ios_base::badbit); } | |
26199 | if (__err) | |
26200 | this->setstate(__err); | |
26201 | } | |
26202 | return *this; | |
26203 | } | |
26204 | ||
26205 | ||
26206 | template<typename _CharT, typename _Traits> | |
26207 | basic_ostream<_CharT, _Traits>& | |
26208 | basic_ostream<_CharT, _Traits>:: | |
26209 | operator<<(float __n) | |
26210 | { | |
26211 | sentry __cerb(*this); | |
26212 | if (__cerb) | |
26213 | { | |
26214 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26215 | try | |
26216 | { | |
26217 | ||
26218 | ||
26219 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26220 | if (__np.put(*this, *this, this->fill(), | |
26221 | static_cast<double>(__n)).failed()) | |
26222 | __err |= ios_base::badbit; | |
26223 | } | |
26224 | catch(...) | |
26225 | { this->_M_setstate(ios_base::badbit); } | |
26226 | if (__err) | |
26227 | this->setstate(__err); | |
26228 | } | |
26229 | return *this; | |
26230 | } | |
26231 | ||
26232 | template<typename _CharT, typename _Traits> | |
26233 | basic_ostream<_CharT, _Traits>& | |
26234 | basic_ostream<_CharT, _Traits>:: | |
26235 | operator<<(double __n) | |
26236 | { | |
26237 | sentry __cerb(*this); | |
26238 | if (__cerb) | |
26239 | { | |
26240 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26241 | try | |
26242 | { | |
26243 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26244 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
26245 | __err |= ios_base::badbit; | |
26246 | } | |
26247 | catch(...) | |
26248 | { this->_M_setstate(ios_base::badbit); } | |
26249 | if (__err) | |
26250 | this->setstate(__err); | |
26251 | } | |
26252 | return *this; | |
26253 | } | |
26254 | ||
26255 | template<typename _CharT, typename _Traits> | |
26256 | basic_ostream<_CharT, _Traits>& | |
26257 | basic_ostream<_CharT, _Traits>:: | |
26258 | operator<<(long double __n) | |
26259 | { | |
26260 | sentry __cerb(*this); | |
26261 | if (__cerb) | |
26262 | { | |
26263 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26264 | try | |
26265 | { | |
26266 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26267 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
26268 | __err |= ios_base::badbit; | |
26269 | } | |
26270 | catch(...) | |
26271 | { this->_M_setstate(ios_base::badbit); } | |
26272 | if (__err) | |
26273 | this->setstate(__err); | |
26274 | } | |
26275 | return *this; | |
26276 | } | |
26277 | ||
26278 | template<typename _CharT, typename _Traits> | |
26279 | basic_ostream<_CharT, _Traits>& | |
26280 | basic_ostream<_CharT, _Traits>:: | |
26281 | operator<<(const void* __n) | |
26282 | { | |
26283 | sentry __cerb(*this); | |
26284 | if (__cerb) | |
26285 | { | |
26286 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26287 | try | |
26288 | { | |
26289 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
26290 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
26291 | __err |= ios_base::badbit; | |
26292 | } | |
26293 | catch(...) | |
26294 | { this->_M_setstate(ios_base::badbit); } | |
26295 | if (__err) | |
26296 | this->setstate(__err); | |
26297 | } | |
26298 | return *this; | |
26299 | } | |
26300 | ||
26301 | template<typename _CharT, typename _Traits> | |
26302 | basic_ostream<_CharT, _Traits>& | |
26303 | basic_ostream<_CharT, _Traits>:: | |
26304 | operator<<(__streambuf_type* __sbin) | |
26305 | { | |
26306 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26307 | sentry __cerb(*this); | |
26308 | if (__cerb && __sbin) | |
26309 | { | |
26310 | try | |
26311 | { | |
26312 | if (!__copy_streambufs(__sbin, this->rdbuf())) | |
26313 | __err |= ios_base::failbit; | |
26314 | } | |
26315 | catch(...) | |
26316 | { this->_M_setstate(ios_base::failbit); } | |
26317 | } | |
26318 | else if (!__sbin) | |
26319 | __err |= ios_base::badbit; | |
26320 | if (__err) | |
26321 | this->setstate(__err); | |
26322 | return *this; | |
26323 | } | |
26324 | ||
26325 | template<typename _CharT, typename _Traits> | |
26326 | basic_ostream<_CharT, _Traits>& | |
26327 | basic_ostream<_CharT, _Traits>:: | |
26328 | put(char_type __c) | |
26329 | { | |
26330 | ||
26331 | ||
26332 | ||
26333 | ||
26334 | ||
26335 | ||
26336 | sentry __cerb(*this); | |
26337 | if (__cerb) | |
26338 | { | |
26339 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26340 | try | |
26341 | { | |
26342 | const int_type __put = this->rdbuf()->sputc(__c); | |
26343 | if (traits_type::eq_int_type(__put, traits_type::eof())) | |
26344 | __err |= ios_base::badbit; | |
26345 | } | |
26346 | catch (...) | |
26347 | { this->_M_setstate(ios_base::badbit); } | |
26348 | if (__err) | |
26349 | this->setstate(__err); | |
26350 | } | |
26351 | return *this; | |
26352 | } | |
26353 | ||
26354 | template<typename _CharT, typename _Traits> | |
26355 | basic_ostream<_CharT, _Traits>& | |
26356 | basic_ostream<_CharT, _Traits>:: | |
26357 | write(const _CharT* __s, streamsize __n) | |
26358 | { | |
26359 | ||
26360 | ||
26361 | ||
26362 | ||
26363 | ||
26364 | ||
26365 | ||
26366 | sentry __cerb(*this); | |
26367 | if (__cerb) | |
26368 | { | |
26369 | try | |
26370 | { _M_write(__s, __n); } | |
26371 | catch (...) | |
26372 | { this->_M_setstate(ios_base::badbit); } | |
26373 | } | |
26374 | return *this; | |
26375 | } | |
26376 | ||
26377 | template<typename _CharT, typename _Traits> | |
26378 | basic_ostream<_CharT, _Traits>& | |
26379 | basic_ostream<_CharT, _Traits>:: | |
26380 | flush() | |
26381 | { | |
26382 | ||
26383 | ||
26384 | ||
26385 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26386 | try | |
26387 | { | |
26388 | if (this->rdbuf() && this->rdbuf()->pubsync() == -1) | |
26389 | __err |= ios_base::badbit; | |
26390 | } | |
26391 | catch(...) | |
26392 | { this->_M_setstate(ios_base::badbit); } | |
26393 | if (__err) | |
26394 | this->setstate(__err); | |
26395 | return *this; | |
26396 | } | |
26397 | ||
26398 | template<typename _CharT, typename _Traits> | |
26399 | typename basic_ostream<_CharT, _Traits>::pos_type | |
26400 | basic_ostream<_CharT, _Traits>:: | |
26401 | tellp() | |
26402 | { | |
26403 | pos_type __ret = pos_type(-1); | |
26404 | try | |
26405 | { | |
26406 | if (!this->fail()) | |
26407 | __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); | |
26408 | } | |
26409 | catch(...) | |
26410 | { this->_M_setstate(ios_base::badbit); } | |
26411 | return __ret; | |
26412 | } | |
26413 | ||
26414 | template<typename _CharT, typename _Traits> | |
26415 | basic_ostream<_CharT, _Traits>& | |
26416 | basic_ostream<_CharT, _Traits>:: | |
26417 | seekp(pos_type __pos) | |
26418 | { | |
26419 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26420 | try | |
26421 | { | |
26422 | if (!this->fail()) | |
26423 | { | |
26424 | ||
26425 | ||
26426 | const pos_type __p = this->rdbuf()->pubseekpos(__pos, | |
26427 | ios_base::out); | |
26428 | ||
26429 | ||
26430 | if (__p == pos_type(off_type(-1))) | |
26431 | __err |= ios_base::failbit; | |
26432 | } | |
26433 | } | |
26434 | catch(...) | |
26435 | { this->_M_setstate(ios_base::badbit); } | |
26436 | if (__err) | |
26437 | this->setstate(__err); | |
26438 | return *this; | |
26439 | } | |
26440 | ||
26441 | template<typename _CharT, typename _Traits> | |
26442 | basic_ostream<_CharT, _Traits>& | |
26443 | basic_ostream<_CharT, _Traits>:: | |
26444 | seekp(off_type __off, ios_base::seekdir __dir) | |
26445 | { | |
26446 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
26447 | try | |
26448 | { | |
26449 | if (!this->fail()) | |
26450 | { | |
26451 | ||
26452 | ||
26453 | const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, | |
26454 | ios_base::out); | |
26455 | ||
26456 | ||
26457 | if (__p == pos_type(off_type(-1))) | |
26458 | __err |= ios_base::failbit; | |
26459 | } | |
26460 | } | |
26461 | catch(...) | |
26462 | { this->_M_setstate(ios_base::badbit); } | |
26463 | if (__err) | |
26464 | this->setstate(__err); | |
26465 | return *this; | |
26466 | } | |
26467 | ||
26468 | ||
26469 | template<typename _CharT, typename _Traits> | |
26470 | basic_ostream<_CharT, _Traits>& | |
26471 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | |
26472 | { | |
26473 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
26474 | typename __ostream_type::sentry __cerb(__out); | |
26475 | if (__cerb) | |
26476 | { | |
26477 | try | |
26478 | { | |
26479 | const streamsize __w = __out.width(); | |
26480 | streamsize __len = 1; | |
26481 | _CharT* __cs = &__c; | |
26482 | if (__w > __len) | |
26483 | { | |
26484 | __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
26485 | * __w)); | |
26486 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
26487 | &__c, __w, __len, false); | |
26488 | __len = __w; | |
26489 | } | |
26490 | __out._M_write(__cs, __len); | |
26491 | __out.width(0); | |
26492 | } | |
26493 | catch(...) | |
26494 | { __out._M_setstate(ios_base::badbit); } | |
26495 | } | |
26496 | return __out; | |
26497 | } | |
26498 | ||
26499 | ||
26500 | template <class _Traits> | |
26501 | basic_ostream<char, _Traits>& | |
26502 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | |
26503 | { | |
26504 | typedef basic_ostream<char, _Traits> __ostream_type; | |
26505 | typename __ostream_type::sentry __cerb(__out); | |
26506 | if (__cerb) | |
26507 | { | |
26508 | try | |
26509 | { | |
26510 | const streamsize __w = __out.width(); | |
26511 | streamsize __len = 1; | |
26512 | char* __cs = &__c; | |
26513 | if (__w > __len) | |
26514 | { | |
26515 | __cs = static_cast<char*>(__builtin_alloca(__w)); | |
26516 | __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
26517 | &__c, __w, __len, false); | |
26518 | __len = __w; | |
26519 | } | |
26520 | __out._M_write(__cs, __len); | |
26521 | __out.width(0); | |
26522 | } | |
26523 | catch(...) | |
26524 | { __out._M_setstate(ios_base::badbit); } | |
26525 | } | |
26526 | return __out; | |
26527 | } | |
26528 | ||
26529 | template<typename _CharT, typename _Traits> | |
26530 | basic_ostream<_CharT, _Traits>& | |
26531 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | |
26532 | { | |
26533 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
26534 | typename __ostream_type::sentry __cerb(__out); | |
26535 | if (__cerb && __s) | |
26536 | { | |
26537 | try | |
26538 | { | |
26539 | const streamsize __w = __out.width(); | |
26540 | streamsize __len = static_cast<streamsize>(_Traits::length(__s)); | |
26541 | if (__w > __len) | |
26542 | { | |
26543 | _CharT* __cs = (static_cast< | |
26544 | _CharT*>(__builtin_alloca(sizeof(_CharT) | |
26545 | * __w))); | |
26546 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
26547 | __s, __w, __len, false); | |
26548 | __s = __cs; | |
26549 | __len = __w; | |
26550 | } | |
26551 | __out._M_write(__s, __len); | |
26552 | __out.width(0); | |
26553 | } | |
26554 | catch(...) | |
26555 | { __out._M_setstate(ios_base::badbit); } | |
26556 | } | |
26557 | else if (!__s) | |
26558 | __out.setstate(ios_base::badbit); | |
26559 | return __out; | |
26560 | } | |
26561 | ||
26562 | template<typename _CharT, typename _Traits> | |
26563 | basic_ostream<_CharT, _Traits>& | |
26564 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | |
26565 | { | |
26566 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
26567 | ||
26568 | ||
26569 | ||
26570 | typedef char_traits<char> __traits_type; | |
26571 | typename __ostream_type::sentry __cerb(__out); | |
26572 | if (__cerb && __s) | |
26573 | { | |
26574 | size_t __clen = __traits_type::length(__s); | |
26575 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
26576 | * __clen)); | |
26577 | for (size_t __i = 0; __i < __clen; ++__i) | |
26578 | __ws[__i] = __out.widen(__s[__i]); | |
26579 | _CharT* __str = __ws; | |
26580 | ||
26581 | try | |
26582 | { | |
26583 | const streamsize __w = __out.width(); | |
26584 | streamsize __len = static_cast<streamsize>(__clen); | |
26585 | if (__w > __len) | |
26586 | { | |
26587 | _CharT* __cs = (static_cast< | |
26588 | _CharT*>(__builtin_alloca(sizeof(_CharT) | |
26589 | * __w))); | |
26590 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
26591 | __ws, __w, __len, false); | |
26592 | __str = __cs; | |
26593 | __len = __w; | |
26594 | } | |
26595 | __out._M_write(__str, __len); | |
26596 | __out.width(0); | |
26597 | } | |
26598 | catch(...) | |
26599 | { __out._M_setstate(ios_base::badbit); } | |
26600 | } | |
26601 | else if (!__s) | |
26602 | __out.setstate(ios_base::badbit); | |
26603 | return __out; | |
26604 | } | |
26605 | ||
26606 | ||
26607 | template<class _Traits> | |
26608 | basic_ostream<char, _Traits>& | |
26609 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | |
26610 | { | |
26611 | typedef basic_ostream<char, _Traits> __ostream_type; | |
26612 | typename __ostream_type::sentry __cerb(__out); | |
26613 | if (__cerb && __s) | |
26614 | { | |
26615 | try | |
26616 | { | |
26617 | const streamsize __w = __out.width(); | |
26618 | streamsize __len = static_cast<streamsize>(_Traits::length(__s)); | |
26619 | if (__w > __len) | |
26620 | { | |
26621 | char* __cs = static_cast<char*>(__builtin_alloca(__w)); | |
26622 | __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
26623 | __s, __w, __len, false); | |
26624 | __s = __cs; | |
26625 | __len = __w; | |
26626 | } | |
26627 | __out._M_write(__s, __len); | |
26628 | __out.width(0); | |
26629 | } | |
26630 | catch(...) | |
26631 | { __out._M_setstate(ios_base::badbit); } | |
26632 | } | |
26633 | else if (!__s) | |
26634 | __out.setstate(ios_base::badbit); | |
26635 | return __out; | |
26636 | } | |
26637 | ||
26638 | ||
26639 | template<typename _CharT, typename _Traits, typename _Alloc> | |
26640 | basic_ostream<_CharT, _Traits>& | |
26641 | operator<<(basic_ostream<_CharT, _Traits>& __out, | |
26642 | const basic_string<_CharT, _Traits, _Alloc>& __str) | |
26643 | { | |
26644 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
26645 | typename __ostream_type::sentry __cerb(__out); | |
26646 | if (__cerb) | |
26647 | { | |
26648 | const streamsize __w = __out.width(); | |
26649 | streamsize __len = static_cast<streamsize>(__str.size()); | |
26650 | const _CharT* __s = __str.data(); | |
26651 | ||
26652 | ||
26653 | ||
26654 | if (__w > __len) | |
26655 | { | |
26656 | _CharT* __cs = (static_cast< | |
26657 | _CharT*>(__builtin_alloca(sizeof(_CharT) * __w))); | |
26658 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s, | |
26659 | __w, __len, false); | |
26660 | __s = __cs; | |
26661 | __len = __w; | |
26662 | } | |
26663 | __out._M_write(__s, __len); | |
26664 | __out.width(0); | |
26665 | } | |
26666 | return __out; | |
26667 | } | |
26668 | ||
26669 | ||
26670 | ||
26671 | ||
26672 | ||
26673 | extern template class basic_ostream<char>; | |
26674 | extern template ostream& endl(ostream&); | |
26675 | extern template ostream& ends(ostream&); | |
26676 | extern template ostream& flush(ostream&); | |
26677 | extern template ostream& operator<<(ostream&, char); | |
26678 | extern template ostream& operator<<(ostream&, unsigned char); | |
26679 | extern template ostream& operator<<(ostream&, signed char); | |
26680 | extern template ostream& operator<<(ostream&, const char*); | |
26681 | extern template ostream& operator<<(ostream&, const unsigned char*); | |
26682 | extern template ostream& operator<<(ostream&, const signed char*); | |
26683 | # 821 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/bits/ostream.tcc" 3 | |
26684 | } | |
26685 | # 526 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/ostream" 2 3 | |
26686 | # 61 "./boost/format/detail/compat_workarounds.hpp" 2 | |
26687 | ||
26688 | ||
26689 | ||
26690 | ||
26691 | namespace boost { | |
26692 | namespace io { | |
26693 | ||
26694 | ||
26695 | template<class Tr> | |
26696 | class CompatTraits | |
26697 | { | |
26698 | public: | |
26699 | typedef Tr compatible_type; | |
26700 | }; | |
26701 | ||
26702 | ||
26703 | template<class Alloc> | |
26704 | class CompatAlloc | |
26705 | { | |
26706 | public: | |
26707 | typedef Alloc compatible_type; | |
26708 | }; | |
26709 | ||
26710 | } | |
26711 | } | |
26712 | # 28 "./boost/format.hpp" 2 | |
26713 | ||
26714 | ||
26715 | ||
26716 | ||
26717 | ||
26718 | ||
26719 | # 1 "./boost/format/format_fwd.hpp" 1 | |
26720 | # 21 "./boost/format/format_fwd.hpp" | |
26721 | namespace boost { | |
26722 | ||
26723 | template <class Ch, | |
26724 | ||
26725 | ||
26726 | class Tr = ::std:: char_traits<Ch>, class Alloc = std::allocator<Ch> > | |
26727 | ||
26728 | ||
26729 | ||
26730 | class basic_format; | |
26731 | ||
26732 | typedef basic_format<char > format; | |
26733 | ||
26734 | ||
26735 | ||
26736 | ||
26737 | ||
26738 | ||
26739 | namespace io { | |
26740 | enum format_error_bits { bad_format_string_bit = 1, | |
26741 | too_few_args_bit = 2, too_many_args_bit = 4, | |
26742 | out_of_range_bit = 8, | |
26743 | all_error_bits = 255, no_error_bits=0 }; | |
26744 | ||
26745 | } | |
26746 | ||
26747 | } | |
26748 | # 35 "./boost/format.hpp" 2 | |
26749 | # 1 "./boost/format/internals_fwd.hpp" 1 | |
26750 | # 20 "./boost/format/internals_fwd.hpp" | |
26751 | namespace boost { | |
26752 | namespace io { | |
26753 | ||
26754 | namespace detail { | |
26755 | template<class Ch, class Tr> struct stream_format_state; | |
26756 | template<class Ch, class Tr, class Alloc> struct format_item; | |
26757 | ||
26758 | ||
26759 | ||
26760 | ||
26761 | ||
26762 | template<class Ch, class Tr, class Alloc, class T> | |
26763 | basic_format<Ch, Tr, Alloc>& | |
26764 | modify_item_body (basic_format<Ch, Tr, Alloc>& self, | |
26765 | int itemN, T manipulator); | |
26766 | ||
26767 | template<class Ch, class Tr, class Alloc, class T> | |
26768 | basic_format<Ch, Tr, Alloc>& | |
26769 | bind_arg_body (basic_format<Ch, Tr, Alloc>& self, | |
26770 | int argN, const T& val); | |
26771 | ||
26772 | ||
26773 | template<class Ch, class Tr, class T> | |
26774 | void apply_manip_body (stream_format_state<Ch, Tr>& self, | |
26775 | T manipulator); | |
26776 | ||
26777 | ||
26778 | template<class Ch, class Tr, class Alloc, class T> | |
26779 | void distribute (basic_format<Ch,Tr, Alloc>& self, T x); | |
26780 | ||
26781 | template<class Ch, class Tr, class Alloc, class T> | |
26782 | basic_format<Ch, Tr, Alloc>& | |
26783 | feed (basic_format<Ch,Tr, Alloc>& self, T x); | |
26784 | ||
26785 | } | |
26786 | ||
26787 | } | |
26788 | } | |
26789 | # 36 "./boost/format.hpp" 2 | |
26790 | ||
26791 | ||
26792 | # 1 "./boost/format/internals.hpp" 1 | |
26793 | # 19 "./boost/format/internals.hpp" | |
26794 | # 1 "./boost/assert.hpp" 1 | |
26795 | # 36 "./boost/assert.hpp" | |
26796 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 1 3 4 | |
26797 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 3 4 | |
26798 | extern "C" { | |
26799 | ||
26800 | ||
26801 | extern void __assert (const char *, const char *, int, const char *); | |
26802 | ||
26803 | } | |
26804 | # 37 "./boost/assert.hpp" 2 | |
26805 | # 20 "./boost/format/internals.hpp" 2 | |
26806 | # 1 "./boost/optional.hpp" 1 | |
26807 | # 15 "./boost/optional.hpp" | |
26808 | # 1 "./boost/optional/optional.hpp" 1 | |
26809 | # 19 "./boost/optional/optional.hpp" | |
26810 | # 1 "./boost/assert.hpp" 1 | |
26811 | # 36 "./boost/assert.hpp" | |
26812 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 1 3 4 | |
26813 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 3 4 | |
26814 | extern "C" { | |
26815 | ||
26816 | ||
26817 | extern void __assert (const char *, const char *, int, const char *); | |
26818 | ||
26819 | } | |
26820 | # 37 "./boost/assert.hpp" 2 | |
26821 | # 20 "./boost/optional/optional.hpp" 2 | |
26822 | # 1 "./boost/type.hpp" 1 | |
26823 | # 9 "./boost/type.hpp" | |
26824 | namespace boost { | |
26825 | ||
26826 | ||
26827 | ||
26828 | template <class T> | |
26829 | struct type {}; | |
26830 | ||
26831 | } | |
26832 | # 21 "./boost/optional/optional.hpp" 2 | |
26833 | # 1 "./boost/type_traits/alignment_of.hpp" 1 | |
26834 | # 16 "./boost/type_traits/alignment_of.hpp" | |
26835 | # 1 "./boost/type_traits/detail/size_t_trait_def.hpp" 1 | |
26836 | # 14 "./boost/type_traits/detail/size_t_trait_def.hpp" | |
26837 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
26838 | # 10 "./boost/type_traits/detail/template_arity_spec.hpp" | |
26839 | # 1 "./boost/mpl/int.hpp" 1 | |
26840 | # 17 "./boost/mpl/int.hpp" | |
26841 | # 1 "./boost/mpl/int_fwd.hpp" 1 | |
26842 | # 17 "./boost/mpl/int_fwd.hpp" | |
26843 | # 1 "./boost/mpl/aux_/adl_barrier.hpp" 1 | |
26844 | # 17 "./boost/mpl/aux_/adl_barrier.hpp" | |
26845 | # 1 "./boost/mpl/aux_/config/adl.hpp" 1 | |
26846 | # 17 "./boost/mpl/aux_/config/adl.hpp" | |
26847 | # 1 "./boost/mpl/aux_/config/msvc.hpp" 1 | |
26848 | # 18 "./boost/mpl/aux_/config/adl.hpp" 2 | |
26849 | # 1 "./boost/mpl/aux_/config/intel.hpp" 1 | |
26850 | # 19 "./boost/mpl/aux_/config/adl.hpp" 2 | |
26851 | # 1 "./boost/mpl/aux_/config/gcc.hpp" 1 | |
26852 | # 20 "./boost/mpl/aux_/config/adl.hpp" 2 | |
26853 | # 1 "./boost/mpl/aux_/config/workaround.hpp" 1 | |
26854 | # 21 "./boost/mpl/aux_/config/adl.hpp" 2 | |
26855 | # 18 "./boost/mpl/aux_/adl_barrier.hpp" 2 | |
26856 | # 33 "./boost/mpl/aux_/adl_barrier.hpp" | |
26857 | namespace mpl_ { namespace aux {} } | |
26858 | namespace boost { namespace mpl { using namespace mpl_; | |
26859 | namespace aux { using namespace mpl_::aux; } | |
26860 | }} | |
26861 | # 18 "./boost/mpl/int_fwd.hpp" 2 | |
26862 | # 1 "./boost/mpl/aux_/nttp_decl.hpp" 1 | |
26863 | # 17 "./boost/mpl/aux_/nttp_decl.hpp" | |
26864 | # 1 "./boost/mpl/aux_/config/nttp.hpp" 1 | |
26865 | # 18 "./boost/mpl/aux_/nttp_decl.hpp" 2 | |
26866 | # 19 "./boost/mpl/int_fwd.hpp" 2 | |
26867 | ||
26868 | namespace mpl_ { | |
26869 | ||
26870 | template< int N > struct int_; | |
26871 | ||
26872 | } | |
26873 | namespace boost { namespace mpl { using ::mpl_::int_; } } | |
26874 | # 18 "./boost/mpl/int.hpp" 2 | |
26875 | ||
26876 | ||
26877 | # 1 "./boost/mpl/aux_/integral_wrapper.hpp" 1 | |
26878 | # 16 "./boost/mpl/aux_/integral_wrapper.hpp" | |
26879 | # 1 "./boost/mpl/integral_c_tag.hpp" 1 | |
26880 | # 19 "./boost/mpl/integral_c_tag.hpp" | |
26881 | # 1 "./boost/mpl/aux_/config/static_constant.hpp" 1 | |
26882 | # 20 "./boost/mpl/integral_c_tag.hpp" 2 | |
26883 | ||
26884 | namespace mpl_ { | |
26885 | struct integral_c_tag { static const int value = 0; }; | |
26886 | } | |
26887 | namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } | |
26888 | # 17 "./boost/mpl/aux_/integral_wrapper.hpp" 2 | |
26889 | # 1 "./boost/mpl/aux_/static_cast.hpp" 1 | |
26890 | # 18 "./boost/mpl/aux_/integral_wrapper.hpp" 2 | |
26891 | ||
26892 | ||
26893 | ||
26894 | ||
26895 | # 1 "./boost/preprocessor/cat.hpp" 1 | |
26896 | # 17 "./boost/preprocessor/cat.hpp" | |
26897 | # 1 "./boost/preprocessor/config/config.hpp" 1 | |
26898 | # 18 "./boost/preprocessor/cat.hpp" 2 | |
26899 | # 23 "./boost/mpl/aux_/integral_wrapper.hpp" 2 | |
26900 | # 40 "./boost/mpl/aux_/integral_wrapper.hpp" | |
26901 | namespace mpl_ { | |
26902 | ||
26903 | template< int N > | |
26904 | struct int_ | |
26905 | { | |
26906 | static const int value = N; | |
26907 | ||
26908 | ||
26909 | ||
26910 | ||
26911 | ||
26912 | typedef int_ type; | |
26913 | ||
26914 | typedef int value_type; | |
26915 | typedef integral_c_tag tag; | |
26916 | # 72 "./boost/mpl/aux_/integral_wrapper.hpp" | |
26917 | typedef mpl_::int_< static_cast<int>((value + 1)) > next; | |
26918 | typedef mpl_::int_< static_cast<int>((value - 1)) > prior; | |
26919 | ||
26920 | ||
26921 | ||
26922 | ||
26923 | ||
26924 | ||
26925 | operator int() const { return static_cast<int>(this->value); } | |
26926 | }; | |
26927 | ||
26928 | ||
26929 | template< int N > | |
26930 | int const mpl_::int_< N >::value; | |
26931 | ||
26932 | ||
26933 | } | |
26934 | # 21 "./boost/mpl/int.hpp" 2 | |
26935 | # 11 "./boost/type_traits/detail/template_arity_spec.hpp" 2 | |
26936 | # 1 "./boost/mpl/aux_/template_arity_fwd.hpp" 1 | |
26937 | # 17 "./boost/mpl/aux_/template_arity_fwd.hpp" | |
26938 | namespace boost { namespace mpl { namespace aux { | |
26939 | ||
26940 | template< typename F > struct template_arity; | |
26941 | ||
26942 | }}} | |
26943 | # 12 "./boost/type_traits/detail/template_arity_spec.hpp" 2 | |
26944 | # 1 "./boost/mpl/aux_/preprocessor/params.hpp" 1 | |
26945 | # 17 "./boost/mpl/aux_/preprocessor/params.hpp" | |
26946 | # 1 "./boost/mpl/aux_/config/preprocessor.hpp" 1 | |
26947 | # 18 "./boost/mpl/aux_/preprocessor/params.hpp" 2 | |
26948 | # 45 "./boost/mpl/aux_/preprocessor/params.hpp" | |
26949 | # 1 "./boost/preprocessor/comma_if.hpp" 1 | |
26950 | # 15 "./boost/preprocessor/comma_if.hpp" | |
26951 | # 1 "./boost/preprocessor/punctuation/comma_if.hpp" 1 | |
26952 | # 18 "./boost/preprocessor/punctuation/comma_if.hpp" | |
26953 | # 1 "./boost/preprocessor/control/if.hpp" 1 | |
26954 | # 18 "./boost/preprocessor/control/if.hpp" | |
26955 | # 1 "./boost/preprocessor/control/iif.hpp" 1 | |
26956 | # 19 "./boost/preprocessor/control/if.hpp" 2 | |
26957 | # 1 "./boost/preprocessor/logical/bool.hpp" 1 | |
26958 | # 20 "./boost/preprocessor/control/if.hpp" 2 | |
26959 | # 19 "./boost/preprocessor/punctuation/comma_if.hpp" 2 | |
26960 | # 1 "./boost/preprocessor/facilities/empty.hpp" 1 | |
26961 | # 20 "./boost/preprocessor/punctuation/comma_if.hpp" 2 | |
26962 | # 1 "./boost/preprocessor/punctuation/comma.hpp" 1 | |
26963 | # 21 "./boost/preprocessor/punctuation/comma_if.hpp" 2 | |
26964 | # 16 "./boost/preprocessor/comma_if.hpp" 2 | |
26965 | # 46 "./boost/mpl/aux_/preprocessor/params.hpp" 2 | |
26966 | # 1 "./boost/preprocessor/repeat.hpp" 1 | |
26967 | # 15 "./boost/preprocessor/repeat.hpp" | |
26968 | # 1 "./boost/preprocessor/repetition/repeat.hpp" 1 | |
26969 | # 19 "./boost/preprocessor/repetition/repeat.hpp" | |
26970 | # 1 "./boost/preprocessor/debug/error.hpp" 1 | |
26971 | # 20 "./boost/preprocessor/repetition/repeat.hpp" 2 | |
26972 | # 1 "./boost/preprocessor/detail/auto_rec.hpp" 1 | |
26973 | # 21 "./boost/preprocessor/repetition/repeat.hpp" 2 | |
26974 | # 1 "./boost/preprocessor/tuple/eat.hpp" 1 | |
26975 | # 22 "./boost/preprocessor/repetition/repeat.hpp" 2 | |
26976 | # 16 "./boost/preprocessor/repeat.hpp" 2 | |
26977 | # 47 "./boost/mpl/aux_/preprocessor/params.hpp" 2 | |
26978 | # 1 "./boost/preprocessor/inc.hpp" 1 | |
26979 | # 15 "./boost/preprocessor/inc.hpp" | |
26980 | # 1 "./boost/preprocessor/arithmetic/inc.hpp" 1 | |
26981 | # 16 "./boost/preprocessor/inc.hpp" 2 | |
26982 | # 48 "./boost/mpl/aux_/preprocessor/params.hpp" 2 | |
26983 | # 13 "./boost/type_traits/detail/template_arity_spec.hpp" 2 | |
26984 | # 1 "./boost/mpl/aux_/config/lambda.hpp" 1 | |
26985 | # 17 "./boost/mpl/aux_/config/lambda.hpp" | |
26986 | # 1 "./boost/mpl/aux_/config/ttp.hpp" 1 | |
26987 | # 18 "./boost/mpl/aux_/config/lambda.hpp" 2 | |
26988 | # 1 "./boost/mpl/aux_/config/ctps.hpp" 1 | |
26989 | # 19 "./boost/mpl/aux_/config/lambda.hpp" 2 | |
26990 | # 14 "./boost/type_traits/detail/template_arity_spec.hpp" 2 | |
26991 | # 1 "./boost/mpl/aux_/config/overload_resolution.hpp" 1 | |
26992 | # 15 "./boost/type_traits/detail/template_arity_spec.hpp" 2 | |
26993 | # 15 "./boost/type_traits/detail/size_t_trait_def.hpp" 2 | |
26994 | # 1 "./boost/type_traits/integral_constant.hpp" 1 | |
26995 | # 10 "./boost/type_traits/integral_constant.hpp" | |
26996 | # 1 "./boost/mpl/bool.hpp" 1 | |
26997 | # 17 "./boost/mpl/bool.hpp" | |
26998 | # 1 "./boost/mpl/bool_fwd.hpp" 1 | |
26999 | # 19 "./boost/mpl/bool_fwd.hpp" | |
27000 | namespace mpl_ { | |
27001 | ||
27002 | template< bool C_ > struct bool_; | |
27003 | ||
27004 | ||
27005 | typedef bool_<true> true_; | |
27006 | typedef bool_<false> false_; | |
27007 | ||
27008 | } | |
27009 | ||
27010 | namespace boost { namespace mpl { using ::mpl_::bool_; } } | |
27011 | namespace boost { namespace mpl { using ::mpl_::true_; } } | |
27012 | namespace boost { namespace mpl { using ::mpl_::false_; } } | |
27013 | # 18 "./boost/mpl/bool.hpp" 2 | |
27014 | ||
27015 | ||
27016 | ||
27017 | namespace mpl_ { | |
27018 | ||
27019 | template< bool C_ > struct bool_ | |
27020 | { | |
27021 | static const bool value = C_; | |
27022 | typedef integral_c_tag tag; | |
27023 | typedef bool_ type; | |
27024 | typedef bool value_type; | |
27025 | operator bool() const { return this->value; } | |
27026 | }; | |
27027 | ||
27028 | ||
27029 | template< bool C_ > | |
27030 | bool const bool_<C_>::value; | |
27031 | ||
27032 | ||
27033 | } | |
27034 | # 11 "./boost/type_traits/integral_constant.hpp" 2 | |
27035 | # 1 "./boost/mpl/integral_c.hpp" 1 | |
27036 | # 17 "./boost/mpl/integral_c.hpp" | |
27037 | # 1 "./boost/mpl/integral_c_fwd.hpp" 1 | |
27038 | # 20 "./boost/mpl/integral_c_fwd.hpp" | |
27039 | namespace mpl_ { | |
27040 | ||
27041 | ||
27042 | ||
27043 | ||
27044 | ||
27045 | template< typename T, T N > struct integral_c; | |
27046 | ||
27047 | ||
27048 | } | |
27049 | namespace boost { namespace mpl { using ::mpl_::integral_c; } } | |
27050 | # 18 "./boost/mpl/integral_c.hpp" 2 | |
27051 | # 32 "./boost/mpl/integral_c.hpp" | |
27052 | # 1 "./boost/mpl/aux_/integral_wrapper.hpp" 1 | |
27053 | # 40 "./boost/mpl/aux_/integral_wrapper.hpp" | |
27054 | namespace mpl_ { | |
27055 | ||
27056 | template< typename T, T N > | |
27057 | struct integral_c | |
27058 | { | |
27059 | static const T value = N; | |
27060 | ||
27061 | ||
27062 | ||
27063 | ||
27064 | ||
27065 | typedef integral_c type; | |
27066 | ||
27067 | typedef T value_type; | |
27068 | typedef integral_c_tag tag; | |
27069 | # 72 "./boost/mpl/aux_/integral_wrapper.hpp" | |
27070 | typedef integral_c< T, static_cast<T>((value + 1)) > next; | |
27071 | typedef integral_c< T, static_cast<T>((value - 1)) > prior; | |
27072 | ||
27073 | ||
27074 | ||
27075 | ||
27076 | ||
27077 | ||
27078 | operator T() const { return static_cast<T>(this->value); } | |
27079 | }; | |
27080 | ||
27081 | ||
27082 | template< typename T, T N > | |
27083 | T const integral_c< T, N >::value; | |
27084 | ||
27085 | ||
27086 | } | |
27087 | # 33 "./boost/mpl/integral_c.hpp" 2 | |
27088 | ||
27089 | ||
27090 | ||
27091 | ||
27092 | namespace mpl_ { | |
27093 | ||
27094 | template< bool C > | |
27095 | struct integral_c<bool, C> | |
27096 | { | |
27097 | static const bool value = C; | |
27098 | typedef integral_c_tag tag; | |
27099 | typedef integral_c type; | |
27100 | typedef bool value_type; | |
27101 | operator bool() const { return this->value; } | |
27102 | }; | |
27103 | } | |
27104 | # 12 "./boost/type_traits/integral_constant.hpp" 2 | |
27105 | ||
27106 | namespace boost{ | |
27107 | ||
27108 | ||
27109 | ||
27110 | ||
27111 | template <class T, T val> | |
27112 | ||
27113 | struct integral_constant : public mpl::integral_c<T, val> | |
27114 | { | |
27115 | typedef integral_constant<T,val> type; | |
27116 | }; | |
27117 | ||
27118 | template<> struct integral_constant<bool,true> : public mpl::true_ | |
27119 | { | |
27120 | ||
27121 | ||
27122 | ||
27123 | ||
27124 | ||
27125 | ||
27126 | ||
27127 | typedef integral_constant<bool,true> type; | |
27128 | }; | |
27129 | template<> struct integral_constant<bool,false> : public mpl::false_ | |
27130 | { | |
27131 | ||
27132 | ||
27133 | ||
27134 | ||
27135 | ||
27136 | ||
27137 | ||
27138 | typedef integral_constant<bool,false> type; | |
27139 | }; | |
27140 | ||
27141 | typedef integral_constant<bool,true> true_type; | |
27142 | typedef integral_constant<bool,false> false_type; | |
27143 | ||
27144 | } | |
27145 | # 16 "./boost/type_traits/detail/size_t_trait_def.hpp" 2 | |
27146 | # 1 "./boost/mpl/aux_/lambda_support.hpp" 1 | |
27147 | # 17 "./boost/type_traits/detail/size_t_trait_def.hpp" 2 | |
27148 | # 1 "./boost/mpl/size_t.hpp" 1 | |
27149 | # 17 "./boost/mpl/size_t.hpp" | |
27150 | # 1 "./boost/mpl/size_t_fwd.hpp" 1 | |
27151 | # 21 "./boost/mpl/size_t_fwd.hpp" | |
27152 | namespace mpl_ { | |
27153 | ||
27154 | template< std::size_t N > struct size_t; | |
27155 | ||
27156 | } | |
27157 | namespace boost { namespace mpl { using ::mpl_::size_t; } } | |
27158 | # 18 "./boost/mpl/size_t.hpp" 2 | |
27159 | ||
27160 | ||
27161 | ||
27162 | ||
27163 | ||
27164 | # 1 "./boost/mpl/aux_/integral_wrapper.hpp" 1 | |
27165 | # 40 "./boost/mpl/aux_/integral_wrapper.hpp" | |
27166 | namespace mpl_ { | |
27167 | ||
27168 | template< std::size_t N > | |
27169 | struct size_t | |
27170 | { | |
27171 | static const std::size_t value = N; | |
27172 | ||
27173 | ||
27174 | ||
27175 | ||
27176 | ||
27177 | typedef size_t type; | |
27178 | ||
27179 | typedef std::size_t value_type; | |
27180 | typedef integral_c_tag tag; | |
27181 | # 72 "./boost/mpl/aux_/integral_wrapper.hpp" | |
27182 | typedef mpl_::size_t< static_cast<std::size_t>((value + 1)) > next; | |
27183 | typedef mpl_::size_t< static_cast<std::size_t>((value - 1)) > prior; | |
27184 | ||
27185 | ||
27186 | ||
27187 | ||
27188 | ||
27189 | ||
27190 | operator std::size_t() const { return static_cast<std::size_t>(this->value); } | |
27191 | }; | |
27192 | ||
27193 | ||
27194 | template< std::size_t N > | |
27195 | std::size_t const mpl_::size_t< N >::value; | |
27196 | ||
27197 | ||
27198 | } | |
27199 | # 24 "./boost/mpl/size_t.hpp" 2 | |
27200 | # 18 "./boost/type_traits/detail/size_t_trait_def.hpp" 2 | |
27201 | # 17 "./boost/type_traits/alignment_of.hpp" 2 | |
27202 | # 26 "./boost/type_traits/alignment_of.hpp" | |
27203 | namespace boost { | |
27204 | ||
27205 | template <typename T> struct alignment_of; | |
27206 | ||
27207 | ||
27208 | namespace detail { | |
27209 | ||
27210 | template <typename T> | |
27211 | struct alignment_of_hack | |
27212 | { | |
27213 | char c; | |
27214 | T t; | |
27215 | alignment_of_hack(); | |
27216 | }; | |
27217 | ||
27218 | ||
27219 | template <unsigned A, unsigned S> | |
27220 | struct alignment_logic | |
27221 | { | |
27222 | static const std::size_t value = A < S ? A : S; | |
27223 | }; | |
27224 | ||
27225 | ||
27226 | template< typename T > | |
27227 | struct alignment_of_impl | |
27228 | { | |
27229 | static const std::size_t value = (::boost::detail::alignment_logic< sizeof(::boost::detail::alignment_of_hack<T>) - sizeof(T), sizeof(T) >::value); | |
27230 | ||
27231 | ||
27232 | ||
27233 | ||
27234 | }; | |
27235 | ||
27236 | } | |
27237 | ||
27238 | template< typename T > struct alignment_of : ::boost::integral_constant<std::size_t,::boost::detail::alignment_of_impl<T>::value> { }; | |
27239 | ||
27240 | ||
27241 | ||
27242 | ||
27243 | template <typename T> | |
27244 | struct alignment_of<T&> | |
27245 | : alignment_of<T*> | |
27246 | { | |
27247 | }; | |
27248 | # 81 "./boost/type_traits/alignment_of.hpp" | |
27249 | template<> struct alignment_of<void> : ::boost::integral_constant<std::size_t,0> { }; | |
27250 | ||
27251 | template<> struct alignment_of<void const> : ::boost::integral_constant<std::size_t,0> { }; | |
27252 | template<> struct alignment_of<void volatile> : ::boost::integral_constant<std::size_t,0> { }; | |
27253 | template<> struct alignment_of<void const volatile> : ::boost::integral_constant<std::size_t,0> { }; | |
27254 | ||
27255 | ||
27256 | } | |
27257 | # 97 "./boost/type_traits/alignment_of.hpp" | |
27258 | # 1 "./boost/type_traits/detail/size_t_trait_undef.hpp" 1 | |
27259 | # 98 "./boost/type_traits/alignment_of.hpp" 2 | |
27260 | # 22 "./boost/optional/optional.hpp" 2 | |
27261 | # 1 "./boost/type_traits/type_with_alignment.hpp" 1 | |
27262 | # 11 "./boost/type_traits/type_with_alignment.hpp" | |
27263 | # 1 "./boost/mpl/if.hpp" 1 | |
27264 | # 17 "./boost/mpl/if.hpp" | |
27265 | # 1 "./boost/mpl/aux_/value_wknd.hpp" 1 | |
27266 | # 18 "./boost/mpl/aux_/value_wknd.hpp" | |
27267 | # 1 "./boost/mpl/aux_/config/integral.hpp" 1 | |
27268 | # 19 "./boost/mpl/aux_/value_wknd.hpp" 2 | |
27269 | # 1 "./boost/mpl/aux_/config/eti.hpp" 1 | |
27270 | # 20 "./boost/mpl/aux_/value_wknd.hpp" 2 | |
27271 | # 73 "./boost/mpl/aux_/value_wknd.hpp" | |
27272 | namespace boost { namespace mpl { namespace aux { | |
27273 | ||
27274 | template< typename T > struct value_type_wknd | |
27275 | { | |
27276 | typedef typename T::value_type type; | |
27277 | }; | |
27278 | # 87 "./boost/mpl/aux_/value_wknd.hpp" | |
27279 | }}} | |
27280 | # 18 "./boost/mpl/if.hpp" 2 | |
27281 | ||
27282 | # 1 "./boost/mpl/aux_/na_spec.hpp" 1 | |
27283 | # 18 "./boost/mpl/aux_/na_spec.hpp" | |
27284 | # 1 "./boost/mpl/lambda_fwd.hpp" 1 | |
27285 | # 17 "./boost/mpl/lambda_fwd.hpp" | |
27286 | # 1 "./boost/mpl/void_fwd.hpp" 1 | |
27287 | # 19 "./boost/mpl/void_fwd.hpp" | |
27288 | namespace mpl_ { | |
27289 | ||
27290 | struct void_; | |
27291 | ||
27292 | } | |
27293 | namespace boost { namespace mpl { using ::mpl_::void_; } } | |
27294 | # 18 "./boost/mpl/lambda_fwd.hpp" 2 | |
27295 | # 1 "./boost/mpl/aux_/na.hpp" 1 | |
27296 | # 18 "./boost/mpl/aux_/na.hpp" | |
27297 | # 1 "./boost/mpl/aux_/na_fwd.hpp" 1 | |
27298 | # 19 "./boost/mpl/aux_/na_fwd.hpp" | |
27299 | namespace mpl_ { | |
27300 | ||
27301 | ||
27302 | struct na | |
27303 | { | |
27304 | typedef na type; | |
27305 | enum { value = 0 }; | |
27306 | }; | |
27307 | ||
27308 | } | |
27309 | namespace boost { namespace mpl { using ::mpl_::na; } } | |
27310 | # 19 "./boost/mpl/aux_/na.hpp" 2 | |
27311 | ||
27312 | ||
27313 | ||
27314 | namespace boost { namespace mpl { | |
27315 | ||
27316 | template< typename T > | |
27317 | struct is_na | |
27318 | : false_ | |
27319 | { | |
27320 | ||
27321 | ||
27322 | ||
27323 | }; | |
27324 | ||
27325 | template<> | |
27326 | struct is_na<na> | |
27327 | : true_ | |
27328 | { | |
27329 | ||
27330 | ||
27331 | ||
27332 | }; | |
27333 | ||
27334 | template< typename T > | |
27335 | struct is_not_na | |
27336 | : true_ | |
27337 | { | |
27338 | ||
27339 | ||
27340 | ||
27341 | }; | |
27342 | ||
27343 | template<> | |
27344 | struct is_not_na<na> | |
27345 | : false_ | |
27346 | { | |
27347 | ||
27348 | ||
27349 | ||
27350 | }; | |
27351 | ||
27352 | ||
27353 | template< typename T, typename U > struct if_na | |
27354 | { | |
27355 | typedef T type; | |
27356 | }; | |
27357 | ||
27358 | template< typename U > struct if_na<na,U> | |
27359 | { | |
27360 | typedef U type; | |
27361 | }; | |
27362 | # 93 "./boost/mpl/aux_/na.hpp" | |
27363 | }} | |
27364 | # 19 "./boost/mpl/lambda_fwd.hpp" 2 | |
27365 | ||
27366 | ||
27367 | ||
27368 | ||
27369 | ||
27370 | # 1 "./boost/mpl/aux_/lambda_arity_param.hpp" 1 | |
27371 | # 25 "./boost/mpl/lambda_fwd.hpp" 2 | |
27372 | ||
27373 | ||
27374 | namespace boost { namespace mpl { | |
27375 | ||
27376 | template< | |
27377 | typename T = na | |
27378 | , typename Tag = void_ | |
27379 | , typename Arity = int_< aux::template_arity<T>::value > | |
27380 | ||
27381 | ||
27382 | > | |
27383 | struct lambda; | |
27384 | ||
27385 | }} | |
27386 | # 19 "./boost/mpl/aux_/na_spec.hpp" 2 | |
27387 | ||
27388 | ||
27389 | ||
27390 | # 1 "./boost/mpl/aux_/arity.hpp" 1 | |
27391 | # 17 "./boost/mpl/aux_/arity.hpp" | |
27392 | # 1 "./boost/mpl/aux_/config/dtp.hpp" 1 | |
27393 | # 18 "./boost/mpl/aux_/arity.hpp" 2 | |
27394 | # 23 "./boost/mpl/aux_/na_spec.hpp" 2 | |
27395 | ||
27396 | ||
27397 | ||
27398 | ||
27399 | # 1 "./boost/mpl/aux_/preprocessor/enum.hpp" 1 | |
27400 | # 28 "./boost/mpl/aux_/na_spec.hpp" 2 | |
27401 | # 1 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 | |
27402 | # 17 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" | |
27403 | # 1 "./boost/mpl/limits/arity.hpp" 1 | |
27404 | # 18 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 | |
27405 | ||
27406 | ||
27407 | ||
27408 | ||
27409 | # 1 "./boost/preprocessor/logical/and.hpp" 1 | |
27410 | # 19 "./boost/preprocessor/logical/and.hpp" | |
27411 | # 1 "./boost/preprocessor/logical/bitand.hpp" 1 | |
27412 | # 20 "./boost/preprocessor/logical/and.hpp" 2 | |
27413 | # 23 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 | |
27414 | # 1 "./boost/preprocessor/identity.hpp" 1 | |
27415 | # 15 "./boost/preprocessor/identity.hpp" | |
27416 | # 1 "./boost/preprocessor/facilities/identity.hpp" 1 | |
27417 | # 16 "./boost/preprocessor/identity.hpp" 2 | |
27418 | # 24 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 | |
27419 | # 1 "./boost/preprocessor/empty.hpp" 1 | |
27420 | # 25 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 | |
27421 | # 66 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" | |
27422 | # 1 "./boost/preprocessor/arithmetic/add.hpp" 1 | |
27423 | # 17 "./boost/preprocessor/arithmetic/add.hpp" | |
27424 | # 1 "./boost/preprocessor/arithmetic/dec.hpp" 1 | |
27425 | # 18 "./boost/preprocessor/arithmetic/add.hpp" 2 | |
27426 | ||
27427 | ||
27428 | # 1 "./boost/preprocessor/control/while.hpp" 1 | |
27429 | # 20 "./boost/preprocessor/control/while.hpp" | |
27430 | # 1 "./boost/preprocessor/detail/auto_rec.hpp" 1 | |
27431 | # 21 "./boost/preprocessor/control/while.hpp" 2 | |
27432 | # 1 "./boost/preprocessor/list/fold_left.hpp" 1 | |
27433 | # 18 "./boost/preprocessor/list/fold_left.hpp" | |
27434 | # 1 "./boost/preprocessor/control/while.hpp" 1 | |
27435 | # 19 "./boost/preprocessor/list/fold_left.hpp" 2 | |
27436 | ||
27437 | # 1 "./boost/preprocessor/detail/auto_rec.hpp" 1 | |
27438 | # 21 "./boost/preprocessor/list/fold_left.hpp" 2 | |
27439 | # 41 "./boost/preprocessor/list/fold_left.hpp" | |
27440 | # 1 "./boost/preprocessor/list/detail/fold_left.hpp" 1 | |
27441 | # 17 "./boost/preprocessor/list/detail/fold_left.hpp" | |
27442 | # 1 "./boost/preprocessor/control/expr_iif.hpp" 1 | |
27443 | # 18 "./boost/preprocessor/list/detail/fold_left.hpp" 2 | |
27444 | ||
27445 | # 1 "./boost/preprocessor/list/adt.hpp" 1 | |
27446 | # 18 "./boost/preprocessor/list/adt.hpp" | |
27447 | # 1 "./boost/preprocessor/detail/is_binary.hpp" 1 | |
27448 | # 16 "./boost/preprocessor/detail/is_binary.hpp" | |
27449 | # 1 "./boost/preprocessor/detail/check.hpp" 1 | |
27450 | # 17 "./boost/preprocessor/detail/is_binary.hpp" 2 | |
27451 | # 19 "./boost/preprocessor/list/adt.hpp" 2 | |
27452 | # 1 "./boost/preprocessor/logical/compl.hpp" 1 | |
27453 | # 20 "./boost/preprocessor/list/adt.hpp" 2 | |
27454 | # 20 "./boost/preprocessor/list/detail/fold_left.hpp" 2 | |
27455 | # 42 "./boost/preprocessor/list/fold_left.hpp" 2 | |
27456 | # 22 "./boost/preprocessor/control/while.hpp" 2 | |
27457 | # 1 "./boost/preprocessor/list/fold_right.hpp" 1 | |
27458 | # 20 "./boost/preprocessor/list/fold_right.hpp" | |
27459 | # 1 "./boost/preprocessor/detail/auto_rec.hpp" 1 | |
27460 | # 21 "./boost/preprocessor/list/fold_right.hpp" 2 | |
27461 | # 37 "./boost/preprocessor/list/fold_right.hpp" | |
27462 | # 1 "./boost/preprocessor/list/detail/fold_right.hpp" 1 | |
27463 | # 18 "./boost/preprocessor/list/detail/fold_right.hpp" | |
27464 | # 1 "./boost/preprocessor/list/reverse.hpp" 1 | |
27465 | # 19 "./boost/preprocessor/list/detail/fold_right.hpp" 2 | |
27466 | # 38 "./boost/preprocessor/list/fold_right.hpp" 2 | |
27467 | # 23 "./boost/preprocessor/control/while.hpp" 2 | |
27468 | # 48 "./boost/preprocessor/control/while.hpp" | |
27469 | # 1 "./boost/preprocessor/control/detail/while.hpp" 1 | |
27470 | # 49 "./boost/preprocessor/control/while.hpp" 2 | |
27471 | # 21 "./boost/preprocessor/arithmetic/add.hpp" 2 | |
27472 | # 1 "./boost/preprocessor/tuple/elem.hpp" 1 | |
27473 | # 22 "./boost/preprocessor/arithmetic/add.hpp" 2 | |
27474 | # 67 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 | |
27475 | # 1 "./boost/preprocessor/arithmetic/sub.hpp" 1 | |
27476 | # 68 "./boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 | |
27477 | # 29 "./boost/mpl/aux_/na_spec.hpp" 2 | |
27478 | # 20 "./boost/mpl/if.hpp" 2 | |
27479 | ||
27480 | ||
27481 | ||
27482 | ||
27483 | ||
27484 | namespace boost { namespace mpl { | |
27485 | ||
27486 | ||
27487 | ||
27488 | template< | |
27489 | bool C | |
27490 | , typename T1 | |
27491 | , typename T2 | |
27492 | > | |
27493 | struct if_c | |
27494 | { | |
27495 | typedef T1 type; | |
27496 | }; | |
27497 | ||
27498 | template< | |
27499 | typename T1 | |
27500 | , typename T2 | |
27501 | > | |
27502 | struct if_c<false,T1,T2> | |
27503 | { | |
27504 | typedef T2 type; | |
27505 | }; | |
27506 | ||
27507 | ||
27508 | ||
27509 | template< | |
27510 | typename T1 = na | |
27511 | , typename T2 = na | |
27512 | , typename T3 = na | |
27513 | > | |
27514 | struct if_ | |
27515 | { | |
27516 | private: | |
27517 | ||
27518 | typedef if_c< | |
27519 | ||
27520 | ||
27521 | ||
27522 | static_cast<bool>(T1::value) | |
27523 | ||
27524 | , T2 | |
27525 | , T3 | |
27526 | > almost_type_; | |
27527 | ||
27528 | public: | |
27529 | typedef typename almost_type_::type type; | |
27530 | ||
27531 | ||
27532 | }; | |
27533 | # 131 "./boost/mpl/if.hpp" | |
27534 | template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } | |
27535 | ||
27536 | }} | |
27537 | # 12 "./boost/type_traits/type_with_alignment.hpp" 2 | |
27538 | # 1 "./boost/preprocessor/list/for_each_i.hpp" 1 | |
27539 | # 20 "./boost/preprocessor/list/for_each_i.hpp" | |
27540 | # 1 "./boost/preprocessor/repetition/for.hpp" 1 | |
27541 | # 19 "./boost/preprocessor/repetition/for.hpp" | |
27542 | # 1 "./boost/preprocessor/detail/auto_rec.hpp" 1 | |
27543 | # 20 "./boost/preprocessor/repetition/for.hpp" 2 | |
27544 | # 42 "./boost/preprocessor/repetition/for.hpp" | |
27545 | # 1 "./boost/preprocessor/repetition/detail/for.hpp" 1 | |
27546 | # 43 "./boost/preprocessor/repetition/for.hpp" 2 | |
27547 | # 21 "./boost/preprocessor/list/for_each_i.hpp" 2 | |
27548 | ||
27549 | # 1 "./boost/preprocessor/tuple/rem.hpp" 1 | |
27550 | # 23 "./boost/preprocessor/list/for_each_i.hpp" 2 | |
27551 | # 13 "./boost/type_traits/type_with_alignment.hpp" 2 | |
27552 | # 1 "./boost/preprocessor/tuple/to_list.hpp" 1 | |
27553 | # 14 "./boost/type_traits/type_with_alignment.hpp" 2 | |
27554 | ||
27555 | # 1 "./boost/preprocessor/list/transform.hpp" 1 | |
27556 | # 16 "./boost/type_traits/type_with_alignment.hpp" 2 | |
27557 | # 1 "./boost/preprocessor/list/append.hpp" 1 | |
27558 | # 17 "./boost/type_traits/type_with_alignment.hpp" 2 | |
27559 | # 1 "./boost/type_traits/alignment_of.hpp" 1 | |
27560 | # 18 "./boost/type_traits/type_with_alignment.hpp" 2 | |
27561 | # 1 "./boost/type_traits/is_pod.hpp" 1 | |
27562 | # 12 "./boost/type_traits/is_pod.hpp" | |
27563 | # 1 "./boost/type_traits/config.hpp" 1 | |
27564 | # 13 "./boost/type_traits/is_pod.hpp" 2 | |
27565 | # 1 "./boost/type_traits/is_void.hpp" 1 | |
27566 | # 15 "./boost/type_traits/is_void.hpp" | |
27567 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
27568 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
27569 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
27570 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
27571 | # 16 "./boost/type_traits/is_void.hpp" 2 | |
27572 | ||
27573 | namespace boost { | |
27574 | ||
27575 | ||
27576 | template< typename T > struct is_void : ::boost::integral_constant<bool,false> { }; | |
27577 | template<> struct is_void< void > : ::boost::integral_constant<bool,true> { }; | |
27578 | ||
27579 | ||
27580 | template<> struct is_void< void const > : ::boost::integral_constant<bool,true> { }; | |
27581 | template<> struct is_void< void volatile > : ::boost::integral_constant<bool,true> { }; | |
27582 | template<> struct is_void< void const volatile > : ::boost::integral_constant<bool,true> { }; | |
27583 | ||
27584 | ||
27585 | } | |
27586 | ||
27587 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
27588 | # 32 "./boost/type_traits/is_void.hpp" 2 | |
27589 | # 14 "./boost/type_traits/is_pod.hpp" 2 | |
27590 | # 1 "./boost/type_traits/is_scalar.hpp" 1 | |
27591 | # 12 "./boost/type_traits/is_scalar.hpp" | |
27592 | # 1 "./boost/type_traits/is_arithmetic.hpp" 1 | |
27593 | # 12 "./boost/type_traits/is_arithmetic.hpp" | |
27594 | # 1 "./boost/type_traits/is_integral.hpp" 1 | |
27595 | # 15 "./boost/type_traits/is_integral.hpp" | |
27596 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
27597 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
27598 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
27599 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
27600 | # 16 "./boost/type_traits/is_integral.hpp" 2 | |
27601 | ||
27602 | namespace boost { | |
27603 | ||
27604 | ||
27605 | ||
27606 | ||
27607 | template< typename T > struct is_integral : ::boost::integral_constant<bool,false> { }; | |
27608 | ||
27609 | template<> struct is_integral< unsigned char > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned char const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned char volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned char const volatile > : ::boost::integral_constant<bool,true> { }; | |
27610 | template<> struct is_integral< unsigned short > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned short const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned short volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned short const volatile > : ::boost::integral_constant<bool,true> { }; | |
27611 | template<> struct is_integral< unsigned int > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned int const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned int volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned int const volatile > : ::boost::integral_constant<bool,true> { }; | |
27612 | template<> struct is_integral< unsigned long > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned long const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned long volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned long const volatile > : ::boost::integral_constant<bool,true> { }; | |
27613 | ||
27614 | template<> struct is_integral< signed char > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed char const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed char volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed char const volatile > : ::boost::integral_constant<bool,true> { }; | |
27615 | template<> struct is_integral< signed short > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed short const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed short volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed short const volatile > : ::boost::integral_constant<bool,true> { }; | |
27616 | template<> struct is_integral< signed int > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed int const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed int volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed int const volatile > : ::boost::integral_constant<bool,true> { }; | |
27617 | template<> struct is_integral< signed long > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed long const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed long volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed long const volatile > : ::boost::integral_constant<bool,true> { }; | |
27618 | ||
27619 | template<> struct is_integral< bool > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< bool const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< bool volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< bool const volatile > : ::boost::integral_constant<bool,true> { }; | |
27620 | template<> struct is_integral< char > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< char const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< char volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< char const volatile > : ::boost::integral_constant<bool,true> { }; | |
27621 | ||
27622 | ||
27623 | ||
27624 | ||
27625 | ||
27626 | template<> struct is_integral< wchar_t > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< wchar_t const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< wchar_t volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< wchar_t const volatile > : ::boost::integral_constant<bool,true> { }; | |
27627 | # 62 "./boost/type_traits/is_integral.hpp" | |
27628 | template<> struct is_integral< ::boost::ulong_long_type > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::ulong_long_type const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::ulong_long_type volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : ::boost::integral_constant<bool,true> { }; | |
27629 | template<> struct is_integral< ::boost::long_long_type > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::long_long_type const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::long_long_type volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::long_long_type const volatile > : ::boost::integral_constant<bool,true> { }; | |
27630 | ||
27631 | ||
27632 | ||
27633 | ||
27634 | ||
27635 | } | |
27636 | ||
27637 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
27638 | # 72 "./boost/type_traits/is_integral.hpp" 2 | |
27639 | # 13 "./boost/type_traits/is_arithmetic.hpp" 2 | |
27640 | # 1 "./boost/type_traits/is_float.hpp" 1 | |
27641 | # 13 "./boost/type_traits/is_float.hpp" | |
27642 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
27643 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
27644 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
27645 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
27646 | # 14 "./boost/type_traits/is_float.hpp" 2 | |
27647 | ||
27648 | namespace boost { | |
27649 | ||
27650 | ||
27651 | template< typename T > struct is_float : ::boost::integral_constant<bool,false> { }; | |
27652 | template<> struct is_float< float > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< float const > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< float volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< float const volatile > : ::boost::integral_constant<bool,true> { }; | |
27653 | template<> struct is_float< double > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< double const > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< double volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< double const volatile > : ::boost::integral_constant<bool,true> { }; | |
27654 | template<> struct is_float< long double > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< long double const > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< long double volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< long double const volatile > : ::boost::integral_constant<bool,true> { }; | |
27655 | ||
27656 | } | |
27657 | ||
27658 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
27659 | # 26 "./boost/type_traits/is_float.hpp" 2 | |
27660 | # 14 "./boost/type_traits/is_arithmetic.hpp" 2 | |
27661 | # 1 "./boost/type_traits/detail/ice_or.hpp" 1 | |
27662 | # 13 "./boost/type_traits/detail/ice_or.hpp" | |
27663 | namespace boost { | |
27664 | namespace type_traits { | |
27665 | ||
27666 | template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false> | |
27667 | struct ice_or; | |
27668 | ||
27669 | template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7> | |
27670 | struct ice_or | |
27671 | { | |
27672 | static const bool value = true; | |
27673 | }; | |
27674 | ||
27675 | template <> | |
27676 | struct ice_or<false, false, false, false, false, false, false> | |
27677 | { | |
27678 | static const bool value = false; | |
27679 | }; | |
27680 | ||
27681 | } | |
27682 | } | |
27683 | # 15 "./boost/type_traits/is_arithmetic.hpp" 2 | |
27684 | ||
27685 | ||
27686 | ||
27687 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
27688 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
27689 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
27690 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
27691 | # 19 "./boost/type_traits/is_arithmetic.hpp" 2 | |
27692 | ||
27693 | namespace boost { | |
27694 | ||
27695 | namespace detail { | |
27696 | ||
27697 | template< typename T > | |
27698 | struct is_arithmetic_impl | |
27699 | { | |
27700 | static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral<T>::value, ::boost::is_float<T>::value >::value); | |
27701 | ||
27702 | ||
27703 | ||
27704 | ||
27705 | }; | |
27706 | ||
27707 | } | |
27708 | ||
27709 | ||
27710 | template< typename T > struct is_arithmetic : ::boost::integral_constant<bool,::boost::detail::is_arithmetic_impl<T>::value> { }; | |
27711 | ||
27712 | } | |
27713 | ||
27714 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
27715 | # 42 "./boost/type_traits/is_arithmetic.hpp" 2 | |
27716 | # 13 "./boost/type_traits/is_scalar.hpp" 2 | |
27717 | # 1 "./boost/type_traits/is_enum.hpp" 1 | |
27718 | # 14 "./boost/type_traits/is_enum.hpp" | |
27719 | # 1 "./boost/type_traits/add_reference.hpp" 1 | |
27720 | # 12 "./boost/type_traits/add_reference.hpp" | |
27721 | # 1 "./boost/type_traits/is_reference.hpp" 1 | |
27722 | # 32 "./boost/type_traits/is_reference.hpp" | |
27723 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
27724 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
27725 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
27726 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
27727 | # 33 "./boost/type_traits/is_reference.hpp" 2 | |
27728 | ||
27729 | namespace boost { | |
27730 | ||
27731 | ||
27732 | ||
27733 | template< typename T > struct is_reference : ::boost::integral_constant<bool,false> { }; | |
27734 | template< typename T > struct is_reference< T& > : ::boost::integral_constant<bool,true> { }; | |
27735 | # 111 "./boost/type_traits/is_reference.hpp" | |
27736 | } | |
27737 | ||
27738 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
27739 | # 114 "./boost/type_traits/is_reference.hpp" 2 | |
27740 | # 13 "./boost/type_traits/add_reference.hpp" 2 | |
27741 | ||
27742 | ||
27743 | ||
27744 | ||
27745 | # 1 "./boost/type_traits/detail/type_trait_def.hpp" 1 | |
27746 | # 14 "./boost/type_traits/detail/type_trait_def.hpp" | |
27747 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
27748 | # 15 "./boost/type_traits/detail/type_trait_def.hpp" 2 | |
27749 | # 18 "./boost/type_traits/add_reference.hpp" 2 | |
27750 | ||
27751 | namespace boost { | |
27752 | ||
27753 | namespace detail { | |
27754 | # 55 "./boost/type_traits/add_reference.hpp" | |
27755 | template <typename T> | |
27756 | struct add_reference_impl | |
27757 | { | |
27758 | typedef T& type; | |
27759 | }; | |
27760 | ||
27761 | ||
27762 | template< typename T > struct add_reference_impl<T&> { typedef T& type; }; | |
27763 | ||
27764 | ||
27765 | ||
27766 | ||
27767 | ||
27768 | template<> struct add_reference_impl<void> { typedef void type; }; | |
27769 | ||
27770 | template<> struct add_reference_impl<void const> { typedef void const type; }; | |
27771 | template<> struct add_reference_impl<void volatile> { typedef void volatile type; }; | |
27772 | template<> struct add_reference_impl<void const volatile> { typedef void const volatile type; }; | |
27773 | ||
27774 | ||
27775 | } | |
27776 | ||
27777 | template< typename T > struct add_reference { typedef typename boost::detail::add_reference_impl<T>::type type; }; | |
27778 | ||
27779 | ||
27780 | ||
27781 | ||
27782 | ||
27783 | ||
27784 | ||
27785 | } | |
27786 | ||
27787 | # 1 "./boost/type_traits/detail/type_trait_undef.hpp" 1 | |
27788 | # 88 "./boost/type_traits/add_reference.hpp" 2 | |
27789 | # 15 "./boost/type_traits/is_enum.hpp" 2 | |
27790 | ||
27791 | ||
27792 | # 1 "./boost/type_traits/is_convertible.hpp" 1 | |
27793 | # 15 "./boost/type_traits/is_convertible.hpp" | |
27794 | # 1 "./boost/type_traits/detail/yes_no_type.hpp" 1 | |
27795 | # 14 "./boost/type_traits/detail/yes_no_type.hpp" | |
27796 | namespace boost { | |
27797 | namespace type_traits { | |
27798 | ||
27799 | typedef char yes_type; | |
27800 | struct no_type | |
27801 | { | |
27802 | char padding[8]; | |
27803 | }; | |
27804 | ||
27805 | } | |
27806 | } | |
27807 | # 16 "./boost/type_traits/is_convertible.hpp" 2 | |
27808 | ||
27809 | # 1 "./boost/type_traits/is_array.hpp" 1 | |
27810 | # 27 "./boost/type_traits/is_array.hpp" | |
27811 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
27812 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
27813 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
27814 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
27815 | # 28 "./boost/type_traits/is_array.hpp" 2 | |
27816 | ||
27817 | namespace boost { | |
27818 | ||
27819 | ||
27820 | ||
27821 | template< typename T > struct is_array : ::boost::integral_constant<bool,false> { }; | |
27822 | ||
27823 | template< typename T, std::size_t N > struct is_array< T[N] > : ::boost::integral_constant<bool,true> { }; | |
27824 | template< typename T, std::size_t N > struct is_array< T const[N] > : ::boost::integral_constant<bool,true> { }; | |
27825 | template< typename T, std::size_t N > struct is_array< T volatile[N] > : ::boost::integral_constant<bool,true> { }; | |
27826 | template< typename T, std::size_t N > struct is_array< T const volatile[N] > : ::boost::integral_constant<bool,true> { }; | |
27827 | ||
27828 | template< typename T > struct is_array< T[] > : ::boost::integral_constant<bool,true> { }; | |
27829 | template< typename T > struct is_array< T const[] > : ::boost::integral_constant<bool,true> { }; | |
27830 | template< typename T > struct is_array< T volatile[] > : ::boost::integral_constant<bool,true> { }; | |
27831 | template< typename T > struct is_array< T const volatile[] > : ::boost::integral_constant<bool,true> { }; | |
27832 | # 86 "./boost/type_traits/is_array.hpp" | |
27833 | } | |
27834 | ||
27835 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
27836 | # 89 "./boost/type_traits/is_array.hpp" 2 | |
27837 | # 18 "./boost/type_traits/is_convertible.hpp" 2 | |
27838 | ||
27839 | # 1 "./boost/type_traits/ice.hpp" 1 | |
27840 | # 16 "./boost/type_traits/ice.hpp" | |
27841 | # 1 "./boost/type_traits/detail/ice_and.hpp" 1 | |
27842 | # 14 "./boost/type_traits/detail/ice_and.hpp" | |
27843 | namespace boost { | |
27844 | namespace type_traits { | |
27845 | ||
27846 | template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true, bool b6 = true, bool b7 = true> | |
27847 | struct ice_and; | |
27848 | ||
27849 | template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7> | |
27850 | struct ice_and | |
27851 | { | |
27852 | static const bool value = false; | |
27853 | }; | |
27854 | ||
27855 | template <> | |
27856 | struct ice_and<true, true, true, true, true, true, true> | |
27857 | { | |
27858 | static const bool value = true; | |
27859 | }; | |
27860 | ||
27861 | } | |
27862 | } | |
27863 | # 17 "./boost/type_traits/ice.hpp" 2 | |
27864 | # 1 "./boost/type_traits/detail/ice_not.hpp" 1 | |
27865 | # 13 "./boost/type_traits/detail/ice_not.hpp" | |
27866 | namespace boost { | |
27867 | namespace type_traits { | |
27868 | ||
27869 | template <bool b> | |
27870 | struct ice_not | |
27871 | { | |
27872 | static const bool value = true; | |
27873 | }; | |
27874 | ||
27875 | template <> | |
27876 | struct ice_not<true> | |
27877 | { | |
27878 | static const bool value = false; | |
27879 | }; | |
27880 | ||
27881 | } | |
27882 | } | |
27883 | # 18 "./boost/type_traits/ice.hpp" 2 | |
27884 | # 1 "./boost/type_traits/detail/ice_eq.hpp" 1 | |
27885 | # 13 "./boost/type_traits/detail/ice_eq.hpp" | |
27886 | namespace boost { | |
27887 | namespace type_traits { | |
27888 | ||
27889 | template <int b1, int b2> | |
27890 | struct ice_eq | |
27891 | { | |
27892 | static const bool value = (b1 == b2); | |
27893 | }; | |
27894 | ||
27895 | template <int b1, int b2> | |
27896 | struct ice_ne | |
27897 | { | |
27898 | static const bool value = (b1 != b2); | |
27899 | }; | |
27900 | ||
27901 | ||
27902 | template <int b1, int b2> bool const ice_eq<b1,b2>::value; | |
27903 | template <int b1, int b2> bool const ice_ne<b1,b2>::value; | |
27904 | ||
27905 | ||
27906 | } | |
27907 | } | |
27908 | # 19 "./boost/type_traits/ice.hpp" 2 | |
27909 | # 20 "./boost/type_traits/is_convertible.hpp" 2 | |
27910 | ||
27911 | ||
27912 | ||
27913 | # 1 "./boost/type_traits/is_abstract.hpp" 1 | |
27914 | # 51 "./boost/type_traits/is_abstract.hpp" | |
27915 | # 1 "./boost/static_assert.hpp" 1 | |
27916 | # 35 "./boost/static_assert.hpp" | |
27917 | namespace boost{ | |
27918 | ||
27919 | ||
27920 | template <bool x> struct STATIC_ASSERTION_FAILURE; | |
27921 | ||
27922 | template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; }; | |
27923 | ||
27924 | ||
27925 | template<int x> struct static_assert_test{}; | |
27926 | ||
27927 | } | |
27928 | # 52 "./boost/type_traits/is_abstract.hpp" 2 | |
27929 | ||
27930 | # 1 "./boost/type_traits/is_class.hpp" 1 | |
27931 | # 14 "./boost/type_traits/is_class.hpp" | |
27932 | # 1 "./boost/type_traits/is_union.hpp" 1 | |
27933 | # 14 "./boost/type_traits/is_union.hpp" | |
27934 | # 1 "./boost/type_traits/remove_cv.hpp" 1 | |
27935 | # 14 "./boost/type_traits/remove_cv.hpp" | |
27936 | # 1 "./boost/type_traits/broken_compiler_spec.hpp" 1 | |
27937 | # 95 "./boost/type_traits/broken_compiler_spec.hpp" | |
27938 | ||
27939 | ||
27940 | ||
27941 | ||
27942 | ||
27943 | ||
27944 | ||
27945 | ||
27946 | ||
27947 | ||
27948 | ||
27949 | ||
27950 | ||
27951 | ||
27952 | ||
27953 | # 15 "./boost/type_traits/remove_cv.hpp" 2 | |
27954 | # 1 "./boost/type_traits/detail/cv_traits_impl.hpp" 1 | |
27955 | # 23 "./boost/type_traits/detail/cv_traits_impl.hpp" | |
27956 | namespace boost { | |
27957 | namespace detail { | |
27958 | ||
27959 | ||
27960 | ||
27961 | ||
27962 | ||
27963 | ||
27964 | ||
27965 | template <typename T> struct cv_traits_imp {}; | |
27966 | ||
27967 | template <typename T> | |
27968 | struct cv_traits_imp<T*> | |
27969 | { | |
27970 | static const bool is_const = false; | |
27971 | static const bool is_volatile = false; | |
27972 | typedef T unqualified_type; | |
27973 | }; | |
27974 | ||
27975 | template <typename T> | |
27976 | struct cv_traits_imp<const T*> | |
27977 | { | |
27978 | static const bool is_const = true; | |
27979 | static const bool is_volatile = false; | |
27980 | typedef T unqualified_type; | |
27981 | }; | |
27982 | ||
27983 | template <typename T> | |
27984 | struct cv_traits_imp<volatile T*> | |
27985 | { | |
27986 | static const bool is_const = false; | |
27987 | static const bool is_volatile = true; | |
27988 | typedef T unqualified_type; | |
27989 | }; | |
27990 | ||
27991 | template <typename T> | |
27992 | struct cv_traits_imp<const volatile T*> | |
27993 | { | |
27994 | static const bool is_const = true; | |
27995 | static const bool is_volatile = true; | |
27996 | typedef T unqualified_type; | |
27997 | }; | |
27998 | # 92 "./boost/type_traits/detail/cv_traits_impl.hpp" | |
27999 | } | |
28000 | } | |
28001 | # 16 "./boost/type_traits/remove_cv.hpp" 2 | |
28002 | # 26 "./boost/type_traits/remove_cv.hpp" | |
28003 | # 1 "./boost/type_traits/detail/type_trait_def.hpp" 1 | |
28004 | # 14 "./boost/type_traits/detail/type_trait_def.hpp" | |
28005 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
28006 | # 15 "./boost/type_traits/detail/type_trait_def.hpp" 2 | |
28007 | # 27 "./boost/type_traits/remove_cv.hpp" 2 | |
28008 | ||
28009 | namespace boost { | |
28010 | ||
28011 | ||
28012 | ||
28013 | ||
28014 | template< typename T > struct remove_cv { typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type; }; | |
28015 | template< typename T > struct remove_cv<T&> { typedef T& type; }; | |
28016 | ||
28017 | template< typename T, std::size_t N > struct remove_cv<T const[N]> { typedef T type[N]; }; | |
28018 | template< typename T, std::size_t N > struct remove_cv<T volatile[N]> { typedef T type[N]; }; | |
28019 | template< typename T, std::size_t N > struct remove_cv<T const volatile[N]> { typedef T type[N]; }; | |
28020 | # 57 "./boost/type_traits/remove_cv.hpp" | |
28021 | } | |
28022 | ||
28023 | # 1 "./boost/type_traits/detail/type_trait_undef.hpp" 1 | |
28024 | # 60 "./boost/type_traits/remove_cv.hpp" 2 | |
28025 | # 15 "./boost/type_traits/is_union.hpp" 2 | |
28026 | ||
28027 | # 1 "./boost/type_traits/intrinsics.hpp" 1 | |
28028 | # 17 "./boost/type_traits/is_union.hpp" 2 | |
28029 | ||
28030 | ||
28031 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
28032 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
28033 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
28034 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
28035 | # 20 "./boost/type_traits/is_union.hpp" 2 | |
28036 | ||
28037 | namespace boost { | |
28038 | ||
28039 | namespace detail { | |
28040 | # 36 "./boost/type_traits/is_union.hpp" | |
28041 | template <typename T> struct is_union_impl | |
28042 | { | |
28043 | static const bool value = false; | |
28044 | }; | |
28045 | ||
28046 | } | |
28047 | ||
28048 | template< typename T > struct is_union : ::boost::integral_constant<bool,::boost::detail::is_union_impl<T>::value> { }; | |
28049 | ||
28050 | } | |
28051 | ||
28052 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
28053 | # 48 "./boost/type_traits/is_union.hpp" 2 | |
28054 | # 15 "./boost/type_traits/is_class.hpp" 2 | |
28055 | # 33 "./boost/type_traits/is_class.hpp" | |
28056 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
28057 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
28058 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
28059 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
28060 | # 34 "./boost/type_traits/is_class.hpp" 2 | |
28061 | ||
28062 | namespace boost { | |
28063 | ||
28064 | namespace detail { | |
28065 | # 53 "./boost/type_traits/is_class.hpp" | |
28066 | template <class U> ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); | |
28067 | template <class U> ::boost::type_traits::no_type is_class_tester(...); | |
28068 | ||
28069 | template <typename T> | |
28070 | struct is_class_impl | |
28071 | { | |
28072 | ||
28073 | static const bool value = (::boost::type_traits::ice_and< sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type), ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value >::value); | |
28074 | ||
28075 | ||
28076 | ||
28077 | ||
28078 | ||
28079 | }; | |
28080 | # 115 "./boost/type_traits/is_class.hpp" | |
28081 | } | |
28082 | ||
28083 | ||
28084 | ||
28085 | ||
28086 | ||
28087 | template< typename T > struct is_class : ::boost::integral_constant<bool,::boost::detail::is_class_impl<T>::value> { }; | |
28088 | ||
28089 | ||
28090 | } | |
28091 | ||
28092 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
28093 | # 127 "./boost/type_traits/is_class.hpp" 2 | |
28094 | # 54 "./boost/type_traits/is_abstract.hpp" 2 | |
28095 | ||
28096 | ||
28097 | ||
28098 | ||
28099 | ||
28100 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
28101 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
28102 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
28103 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
28104 | # 60 "./boost/type_traits/is_abstract.hpp" 2 | |
28105 | ||
28106 | ||
28107 | namespace boost { | |
28108 | namespace detail{ | |
28109 | ||
28110 | ||
28111 | template<class T> | |
28112 | struct is_abstract_imp2 | |
28113 | { | |
28114 | ||
28115 | ||
28116 | ||
28117 | ||
28118 | template<class U> | |
28119 | static type_traits::no_type check_sig(U (*)[1]); | |
28120 | template<class U> | |
28121 | static type_traits::yes_type check_sig(...); | |
28122 | ||
28123 | ||
28124 | ||
28125 | ||
28126 | typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( sizeof(T) != 0 ) >)> boost_static_assert_typedef_81; | |
28127 | ||
28128 | ||
28129 | ||
28130 | ||
28131 | static const unsigned s1 = sizeof(is_abstract_imp2<T>::template check_sig<T>(0)); | |
28132 | # 98 "./boost/type_traits/is_abstract.hpp" | |
28133 | static const bool value = (s1 == sizeof(type_traits::yes_type)); | |
28134 | ||
28135 | }; | |
28136 | ||
28137 | template <bool v> | |
28138 | struct is_abstract_select | |
28139 | { | |
28140 | template <class T> | |
28141 | struct rebind | |
28142 | { | |
28143 | typedef is_abstract_imp2<T> type; | |
28144 | }; | |
28145 | }; | |
28146 | template <> | |
28147 | struct is_abstract_select<false> | |
28148 | { | |
28149 | template <class T> | |
28150 | struct rebind | |
28151 | { | |
28152 | typedef false_type type; | |
28153 | }; | |
28154 | }; | |
28155 | ||
28156 | template <class T> | |
28157 | struct is_abstract_imp | |
28158 | { | |
28159 | typedef is_abstract_select< ::boost::is_class<T>::value> selector; | |
28160 | typedef typename selector::template rebind<T> binder; | |
28161 | typedef typename binder::type type; | |
28162 | ||
28163 | static const bool value = type::value; | |
28164 | }; | |
28165 | ||
28166 | ||
28167 | } | |
28168 | ||
28169 | ||
28170 | template< typename T > struct is_abstract : ::boost::integral_constant<bool,::boost::detail::is_abstract_imp<T>::value> { }; | |
28171 | ||
28172 | ||
28173 | ||
28174 | ||
28175 | } | |
28176 | ||
28177 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
28178 | # 143 "./boost/type_traits/is_abstract.hpp" 2 | |
28179 | # 24 "./boost/type_traits/is_convertible.hpp" 2 | |
28180 | # 32 "./boost/type_traits/is_convertible.hpp" | |
28181 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
28182 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
28183 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
28184 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
28185 | # 33 "./boost/type_traits/is_convertible.hpp" 2 | |
28186 | ||
28187 | namespace boost { | |
28188 | # 46 "./boost/type_traits/is_convertible.hpp" | |
28189 | namespace detail { | |
28190 | # 113 "./boost/type_traits/is_convertible.hpp" | |
28191 | struct any_conversion | |
28192 | { | |
28193 | template <typename T> any_conversion(const volatile T&); | |
28194 | template <typename T> any_conversion(T&); | |
28195 | }; | |
28196 | ||
28197 | template <typename T> struct checker | |
28198 | { | |
28199 | static boost::type_traits::no_type _m_check(any_conversion ...); | |
28200 | static boost::type_traits::yes_type _m_check(T, int); | |
28201 | }; | |
28202 | ||
28203 | template <typename From, typename To> | |
28204 | struct is_convertible_basic_impl | |
28205 | { | |
28206 | static From _m_from; | |
28207 | static bool const value = sizeof( detail::checker<To>::_m_check(_m_from, 0) ) | |
28208 | == sizeof(::boost::type_traits::yes_type); | |
28209 | }; | |
28210 | # 285 "./boost/type_traits/is_convertible.hpp" | |
28211 | template <typename From, typename To> | |
28212 | struct is_convertible_impl | |
28213 | { | |
28214 | typedef typename add_reference<From>::type ref_type; | |
28215 | static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl<ref_type,To>::value, ::boost::is_void<To>::value >::value, ::boost::type_traits::ice_not< ::boost::is_array<To>::value >::value >::value); | |
28216 | # 300 "./boost/type_traits/is_convertible.hpp" | |
28217 | }; | |
28218 | ||
28219 | ||
28220 | template <bool trivial1, bool trivial2, bool abstract_target> | |
28221 | struct is_convertible_impl_select | |
28222 | { | |
28223 | template <class From, class To> | |
28224 | struct rebind | |
28225 | { | |
28226 | typedef is_convertible_impl<From, To> type; | |
28227 | }; | |
28228 | }; | |
28229 | ||
28230 | template <> | |
28231 | struct is_convertible_impl_select<true, true, false> | |
28232 | { | |
28233 | template <class From, class To> | |
28234 | struct rebind | |
28235 | { | |
28236 | typedef true_type type; | |
28237 | }; | |
28238 | }; | |
28239 | ||
28240 | template <> | |
28241 | struct is_convertible_impl_select<false, false, true> | |
28242 | { | |
28243 | template <class From, class To> | |
28244 | struct rebind | |
28245 | { | |
28246 | typedef false_type type; | |
28247 | }; | |
28248 | }; | |
28249 | ||
28250 | template <> | |
28251 | struct is_convertible_impl_select<true, false, true> | |
28252 | { | |
28253 | template <class From, class To> | |
28254 | struct rebind | |
28255 | { | |
28256 | typedef false_type type; | |
28257 | }; | |
28258 | }; | |
28259 | ||
28260 | template <typename From, typename To> | |
28261 | struct is_convertible_impl_dispatch_base | |
28262 | { | |
28263 | ||
28264 | typedef is_convertible_impl_select< | |
28265 | ::boost::is_arithmetic<From>::value, | |
28266 | ::boost::is_arithmetic<To>::value, | |
28267 | ||
28268 | ::boost::is_abstract<To>::value | |
28269 | ||
28270 | ||
28271 | ||
28272 | > selector; | |
28273 | ||
28274 | ||
28275 | ||
28276 | typedef typename selector::template rebind<From, To> isc_binder; | |
28277 | typedef typename isc_binder::type type; | |
28278 | }; | |
28279 | ||
28280 | template <typename From, typename To> | |
28281 | struct is_convertible_impl_dispatch | |
28282 | : public is_convertible_impl_dispatch_base<From, To>::type | |
28283 | {}; | |
28284 | # 388 "./boost/type_traits/is_convertible.hpp" | |
28285 | template<> struct is_convertible_impl< void,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { static const bool value = (true); }; | |
28286 | # 398 "./boost/type_traits/is_convertible.hpp" | |
28287 | template< typename To > struct is_convertible_impl< void,To > { static const bool value = (false); }; | |
28288 | template< typename From > struct is_convertible_impl< From,void > { static const bool value = (true); }; | |
28289 | ||
28290 | template< typename To > struct is_convertible_impl< void const,To > { static const bool value = (false); }; | |
28291 | template< typename To > struct is_convertible_impl< void volatile,To > { static const bool value = (false); }; | |
28292 | template< typename To > struct is_convertible_impl< void const volatile,To > { static const bool value = (false); }; | |
28293 | template< typename From > struct is_convertible_impl< From,void const > { static const bool value = (true); }; | |
28294 | template< typename From > struct is_convertible_impl< From,void volatile > { static const bool value = (true); }; | |
28295 | template< typename From > struct is_convertible_impl< From,void const volatile > { static const bool value = (true); }; | |
28296 | ||
28297 | ||
28298 | ||
28299 | } | |
28300 | ||
28301 | template< typename From, typename To > struct is_convertible : ::boost::integral_constant<bool,(::boost::detail::is_convertible_impl_dispatch<From,To>::value)> { }; | |
28302 | ||
28303 | } | |
28304 | ||
28305 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
28306 | # 417 "./boost/type_traits/is_convertible.hpp" 2 | |
28307 | # 18 "./boost/type_traits/is_enum.hpp" 2 | |
28308 | ||
28309 | ||
28310 | # 1 "./boost/type_traits/is_function.hpp" 1 | |
28311 | # 15 "./boost/type_traits/is_function.hpp" | |
28312 | # 1 "./boost/type_traits/detail/false_result.hpp" 1 | |
28313 | # 14 "./boost/type_traits/detail/false_result.hpp" | |
28314 | namespace boost { | |
28315 | namespace type_traits { | |
28316 | ||
28317 | ||
28318 | struct false_result | |
28319 | { | |
28320 | template <typename T> struct result_ | |
28321 | { | |
28322 | static const bool value = false; | |
28323 | }; | |
28324 | }; | |
28325 | ||
28326 | }} | |
28327 | # 16 "./boost/type_traits/is_function.hpp" 2 | |
28328 | ||
28329 | ||
28330 | ||
28331 | # 1 "./boost/type_traits/detail/is_function_ptr_helper.hpp" 1 | |
28332 | # 26 "./boost/type_traits/detail/is_function_ptr_helper.hpp" | |
28333 | namespace boost { | |
28334 | namespace type_traits { | |
28335 | ||
28336 | template <class R> | |
28337 | struct is_function_ptr_helper | |
28338 | { | |
28339 | static const bool value = false; | |
28340 | }; | |
28341 | ||
28342 | ||
28343 | ||
28344 | ||
28345 | template <class R > | |
28346 | struct is_function_ptr_helper<R (*)()> { static const bool value = true; }; | |
28347 | ||
28348 | template <class R > | |
28349 | struct is_function_ptr_helper<R (*)( ...)> { static const bool value = true; }; | |
28350 | ||
28351 | template <class R , class T0> | |
28352 | struct is_function_ptr_helper<R (*)( T0)> { static const bool value = true; }; | |
28353 | ||
28354 | template <class R , class T0> | |
28355 | struct is_function_ptr_helper<R (*)( T0 ...)> { static const bool value = true; }; | |
28356 | ||
28357 | template <class R , class T0 , class T1> | |
28358 | struct is_function_ptr_helper<R (*)( T0 , T1)> { static const bool value = true; }; | |
28359 | ||
28360 | template <class R , class T0 , class T1> | |
28361 | struct is_function_ptr_helper<R (*)( T0 , T1 ...)> { static const bool value = true; }; | |
28362 | ||
28363 | template <class R , class T0 , class T1 , class T2> | |
28364 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2)> { static const bool value = true; }; | |
28365 | ||
28366 | template <class R , class T0 , class T1 , class T2> | |
28367 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 ...)> { static const bool value = true; }; | |
28368 | ||
28369 | template <class R , class T0 , class T1 , class T2 , class T3> | |
28370 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3)> { static const bool value = true; }; | |
28371 | ||
28372 | template <class R , class T0 , class T1 , class T2 , class T3> | |
28373 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 ...)> { static const bool value = true; }; | |
28374 | ||
28375 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4> | |
28376 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4)> { static const bool value = true; }; | |
28377 | ||
28378 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4> | |
28379 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 ...)> { static const bool value = true; }; | |
28380 | ||
28381 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28382 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5)> { static const bool value = true; }; | |
28383 | ||
28384 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28385 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)> { static const bool value = true; }; | |
28386 | ||
28387 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28388 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)> { static const bool value = true; }; | |
28389 | ||
28390 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28391 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)> { static const bool value = true; }; | |
28392 | ||
28393 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28394 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)> { static const bool value = true; }; | |
28395 | ||
28396 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28397 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)> { static const bool value = true; }; | |
28398 | ||
28399 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28400 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)> { static const bool value = true; }; | |
28401 | ||
28402 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28403 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)> { static const bool value = true; }; | |
28404 | ||
28405 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28406 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)> { static const bool value = true; }; | |
28407 | ||
28408 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28409 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)> { static const bool value = true; }; | |
28410 | ||
28411 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28412 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)> { static const bool value = true; }; | |
28413 | ||
28414 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28415 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)> { static const bool value = true; }; | |
28416 | ||
28417 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
28418 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)> { static const bool value = true; }; | |
28419 | ||
28420 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
28421 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)> { static const bool value = true; }; | |
28422 | ||
28423 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
28424 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)> { static const bool value = true; }; | |
28425 | ||
28426 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
28427 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)> { static const bool value = true; }; | |
28428 | ||
28429 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
28430 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)> { static const bool value = true; }; | |
28431 | ||
28432 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
28433 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)> { static const bool value = true; }; | |
28434 | ||
28435 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
28436 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)> { static const bool value = true; }; | |
28437 | ||
28438 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
28439 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)> { static const bool value = true; }; | |
28440 | ||
28441 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
28442 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)> { static const bool value = true; }; | |
28443 | ||
28444 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
28445 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)> { static const bool value = true; }; | |
28446 | ||
28447 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
28448 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)> { static const bool value = true; }; | |
28449 | ||
28450 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
28451 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)> { static const bool value = true; }; | |
28452 | ||
28453 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
28454 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)> { static const bool value = true; }; | |
28455 | ||
28456 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
28457 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)> { static const bool value = true; }; | |
28458 | ||
28459 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
28460 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)> { static const bool value = true; }; | |
28461 | ||
28462 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
28463 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)> { static const bool value = true; }; | |
28464 | ||
28465 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
28466 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)> { static const bool value = true; }; | |
28467 | ||
28468 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
28469 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)> { static const bool value = true; }; | |
28470 | ||
28471 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
28472 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)> { static const bool value = true; }; | |
28473 | ||
28474 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
28475 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)> { static const bool value = true; }; | |
28476 | ||
28477 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
28478 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)> { static const bool value = true; }; | |
28479 | ||
28480 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
28481 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)> { static const bool value = true; }; | |
28482 | ||
28483 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
28484 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)> { static const bool value = true; }; | |
28485 | ||
28486 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
28487 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)> { static const bool value = true; }; | |
28488 | ||
28489 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
28490 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)> { static const bool value = true; }; | |
28491 | ||
28492 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
28493 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)> { static const bool value = true; }; | |
28494 | ||
28495 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
28496 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)> { static const bool value = true; }; | |
28497 | ||
28498 | template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
28499 | struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)> { static const bool value = true; }; | |
28500 | # 203 "./boost/type_traits/detail/is_function_ptr_helper.hpp" | |
28501 | } | |
28502 | } | |
28503 | # 20 "./boost/type_traits/is_function.hpp" 2 | |
28504 | ||
28505 | ||
28506 | ||
28507 | ||
28508 | ||
28509 | ||
28510 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
28511 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
28512 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
28513 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
28514 | # 27 "./boost/type_traits/is_function.hpp" 2 | |
28515 | ||
28516 | ||
28517 | ||
28518 | ||
28519 | ||
28520 | ||
28521 | ||
28522 | namespace boost { | |
28523 | namespace detail { | |
28524 | ||
28525 | ||
28526 | template<bool is_ref = true> | |
28527 | struct is_function_chooser | |
28528 | : ::boost::type_traits::false_result | |
28529 | { | |
28530 | }; | |
28531 | ||
28532 | template <> | |
28533 | struct is_function_chooser<false> | |
28534 | { | |
28535 | template< typename T > struct result_ | |
28536 | : ::boost::type_traits::is_function_ptr_helper<T*> | |
28537 | { | |
28538 | }; | |
28539 | }; | |
28540 | ||
28541 | template <typename T> | |
28542 | struct is_function_impl | |
28543 | : is_function_chooser< ::boost::is_reference<T>::value > | |
28544 | ::template result_<T> | |
28545 | { | |
28546 | }; | |
28547 | # 87 "./boost/type_traits/is_function.hpp" | |
28548 | } | |
28549 | ||
28550 | template< typename T > struct is_function : ::boost::integral_constant<bool,::boost::detail::is_function_impl<T>::value> { }; | |
28551 | ||
28552 | } | |
28553 | ||
28554 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
28555 | # 94 "./boost/type_traits/is_function.hpp" 2 | |
28556 | # 21 "./boost/type_traits/is_enum.hpp" 2 | |
28557 | # 30 "./boost/type_traits/is_enum.hpp" | |
28558 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
28559 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
28560 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
28561 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
28562 | # 31 "./boost/type_traits/is_enum.hpp" 2 | |
28563 | ||
28564 | namespace boost { | |
28565 | ||
28566 | ||
28567 | ||
28568 | namespace detail { | |
28569 | ||
28570 | ||
28571 | ||
28572 | template <typename T> | |
28573 | struct is_class_or_union | |
28574 | { | |
28575 | static const bool value = (::boost::type_traits::ice_or< ::boost::is_class<T>::value , ::boost::is_union<T>::value >::value); | |
28576 | ||
28577 | ||
28578 | ||
28579 | ||
28580 | }; | |
28581 | # 75 "./boost/type_traits/is_enum.hpp" | |
28582 | struct int_convertible | |
28583 | { | |
28584 | int_convertible(int); | |
28585 | }; | |
28586 | ||
28587 | ||
28588 | ||
28589 | template <bool is_typename_arithmetic_or_reference = true> | |
28590 | struct is_enum_helper | |
28591 | { | |
28592 | template <typename T> struct type | |
28593 | { | |
28594 | static const bool value = false; | |
28595 | }; | |
28596 | }; | |
28597 | ||
28598 | template <> | |
28599 | struct is_enum_helper<false> | |
28600 | { | |
28601 | template <typename T> struct type | |
28602 | : ::boost::is_convertible<typename boost::add_reference<T>::type,::boost::detail::int_convertible> | |
28603 | { | |
28604 | }; | |
28605 | }; | |
28606 | ||
28607 | template <typename T> struct is_enum_impl | |
28608 | { | |
28609 | # 112 "./boost/type_traits/is_enum.hpp" | |
28610 | static const bool selector = (::boost::type_traits::ice_or< ::boost::is_arithmetic<T>::value , ::boost::is_reference<T>::value , ::boost::is_function<T>::value , is_class_or_union<T>::value , is_array<T>::value >::value); | |
28611 | # 149 "./boost/type_traits/is_enum.hpp" | |
28612 | typedef ::boost::detail::is_enum_helper<selector> se_t; | |
28613 | ||
28614 | ||
28615 | typedef typename se_t::template type<T> helper; | |
28616 | static const bool value = helper::value; | |
28617 | }; | |
28618 | ||
28619 | ||
28620 | template<> struct is_enum_impl< void > { static const bool value = (false); }; | |
28621 | ||
28622 | template<> struct is_enum_impl< void const > { static const bool value = (false); }; | |
28623 | template<> struct is_enum_impl< void volatile > { static const bool value = (false); }; | |
28624 | template<> struct is_enum_impl< void const volatile > { static const bool value = (false); }; | |
28625 | ||
28626 | ||
28627 | } | |
28628 | ||
28629 | template< typename T > struct is_enum : ::boost::integral_constant<bool,::boost::detail::is_enum_impl<T>::value> { }; | |
28630 | # 176 "./boost/type_traits/is_enum.hpp" | |
28631 | } | |
28632 | ||
28633 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
28634 | # 179 "./boost/type_traits/is_enum.hpp" 2 | |
28635 | # 14 "./boost/type_traits/is_scalar.hpp" 2 | |
28636 | # 1 "./boost/type_traits/is_pointer.hpp" 1 | |
28637 | # 24 "./boost/type_traits/is_pointer.hpp" | |
28638 | # 1 "./boost/type_traits/is_member_pointer.hpp" 1 | |
28639 | # 28 "./boost/type_traits/is_member_pointer.hpp" | |
28640 | # 1 "./boost/type_traits/is_member_function_pointer.hpp" 1 | |
28641 | # 24 "./boost/type_traits/is_member_function_pointer.hpp" | |
28642 | # 1 "./boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 1 | |
28643 | # 25 "./boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" | |
28644 | namespace boost { | |
28645 | namespace type_traits { | |
28646 | ||
28647 | template <typename T> | |
28648 | struct is_mem_fun_pointer_impl | |
28649 | { | |
28650 | static const bool value = false; | |
28651 | }; | |
28652 | ||
28653 | ||
28654 | ||
28655 | ||
28656 | ||
28657 | template <class R, class T > | |
28658 | struct is_mem_fun_pointer_impl<R (T::*)() > { static const bool value = true; }; | |
28659 | ||
28660 | template <class R, class T > | |
28661 | struct is_mem_fun_pointer_impl<R (T::*)( ...) > { static const bool value = true; }; | |
28662 | ||
28663 | ||
28664 | ||
28665 | template <class R, class T > | |
28666 | struct is_mem_fun_pointer_impl<R (T::*)() const > { static const bool value = true; }; | |
28667 | ||
28668 | template <class R, class T > | |
28669 | struct is_mem_fun_pointer_impl<R (T::*)() volatile > { static const bool value = true; }; | |
28670 | ||
28671 | template <class R, class T > | |
28672 | struct is_mem_fun_pointer_impl<R (T::*)() const volatile > { static const bool value = true; }; | |
28673 | ||
28674 | ||
28675 | template <class R, class T > | |
28676 | struct is_mem_fun_pointer_impl<R (T::*)( ...) const > { static const bool value = true; }; | |
28677 | ||
28678 | template <class R, class T > | |
28679 | struct is_mem_fun_pointer_impl<R (T::*)( ...) volatile > { static const bool value = true; }; | |
28680 | ||
28681 | template <class R, class T > | |
28682 | struct is_mem_fun_pointer_impl<R (T::*)( ...) const volatile > { static const bool value = true; }; | |
28683 | ||
28684 | ||
28685 | template <class R, class T , class T0> | |
28686 | struct is_mem_fun_pointer_impl<R (T::*)( T0) > { static const bool value = true; }; | |
28687 | ||
28688 | template <class R, class T , class T0> | |
28689 | struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) > { static const bool value = true; }; | |
28690 | ||
28691 | ||
28692 | ||
28693 | template <class R, class T , class T0> | |
28694 | struct is_mem_fun_pointer_impl<R (T::*)( T0) const > { static const bool value = true; }; | |
28695 | ||
28696 | template <class R, class T , class T0> | |
28697 | struct is_mem_fun_pointer_impl<R (T::*)( T0) volatile > { static const bool value = true; }; | |
28698 | ||
28699 | template <class R, class T , class T0> | |
28700 | struct is_mem_fun_pointer_impl<R (T::*)( T0) const volatile > { static const bool value = true; }; | |
28701 | ||
28702 | ||
28703 | template <class R, class T , class T0> | |
28704 | struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) const > { static const bool value = true; }; | |
28705 | ||
28706 | template <class R, class T , class T0> | |
28707 | struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) volatile > { static const bool value = true; }; | |
28708 | ||
28709 | template <class R, class T , class T0> | |
28710 | struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) const volatile > { static const bool value = true; }; | |
28711 | ||
28712 | ||
28713 | template <class R, class T , class T0 , class T1> | |
28714 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) > { static const bool value = true; }; | |
28715 | ||
28716 | template <class R, class T , class T0 , class T1> | |
28717 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) > { static const bool value = true; }; | |
28718 | ||
28719 | ||
28720 | ||
28721 | template <class R, class T , class T0 , class T1> | |
28722 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) const > { static const bool value = true; }; | |
28723 | ||
28724 | template <class R, class T , class T0 , class T1> | |
28725 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) volatile > { static const bool value = true; }; | |
28726 | ||
28727 | template <class R, class T , class T0 , class T1> | |
28728 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) const volatile > { static const bool value = true; }; | |
28729 | ||
28730 | ||
28731 | template <class R, class T , class T0 , class T1> | |
28732 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) const > { static const bool value = true; }; | |
28733 | ||
28734 | template <class R, class T , class T0 , class T1> | |
28735 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) volatile > { static const bool value = true; }; | |
28736 | ||
28737 | template <class R, class T , class T0 , class T1> | |
28738 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) const volatile > { static const bool value = true; }; | |
28739 | ||
28740 | ||
28741 | template <class R, class T , class T0 , class T1 , class T2> | |
28742 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) > { static const bool value = true; }; | |
28743 | ||
28744 | template <class R, class T , class T0 , class T1 , class T2> | |
28745 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) > { static const bool value = true; }; | |
28746 | ||
28747 | ||
28748 | ||
28749 | template <class R, class T , class T0 , class T1 , class T2> | |
28750 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) const > { static const bool value = true; }; | |
28751 | ||
28752 | template <class R, class T , class T0 , class T1 , class T2> | |
28753 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) volatile > { static const bool value = true; }; | |
28754 | ||
28755 | template <class R, class T , class T0 , class T1 , class T2> | |
28756 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) const volatile > { static const bool value = true; }; | |
28757 | ||
28758 | ||
28759 | template <class R, class T , class T0 , class T1 , class T2> | |
28760 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) const > { static const bool value = true; }; | |
28761 | ||
28762 | template <class R, class T , class T0 , class T1 , class T2> | |
28763 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) volatile > { static const bool value = true; }; | |
28764 | ||
28765 | template <class R, class T , class T0 , class T1 , class T2> | |
28766 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) const volatile > { static const bool value = true; }; | |
28767 | ||
28768 | ||
28769 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28770 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) > { static const bool value = true; }; | |
28771 | ||
28772 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28773 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) > { static const bool value = true; }; | |
28774 | ||
28775 | ||
28776 | ||
28777 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28778 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) const > { static const bool value = true; }; | |
28779 | ||
28780 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28781 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) volatile > { static const bool value = true; }; | |
28782 | ||
28783 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28784 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) const volatile > { static const bool value = true; }; | |
28785 | ||
28786 | ||
28787 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28788 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) const > { static const bool value = true; }; | |
28789 | ||
28790 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28791 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) volatile > { static const bool value = true; }; | |
28792 | ||
28793 | template <class R, class T , class T0 , class T1 , class T2 , class T3> | |
28794 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) const volatile > { static const bool value = true; }; | |
28795 | ||
28796 | ||
28797 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28798 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) > { static const bool value = true; }; | |
28799 | ||
28800 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28801 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) > { static const bool value = true; }; | |
28802 | ||
28803 | ||
28804 | ||
28805 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28806 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) const > { static const bool value = true; }; | |
28807 | ||
28808 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28809 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) volatile > { static const bool value = true; }; | |
28810 | ||
28811 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28812 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) const volatile > { static const bool value = true; }; | |
28813 | ||
28814 | ||
28815 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28816 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) const > { static const bool value = true; }; | |
28817 | ||
28818 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28819 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) volatile > { static const bool value = true; }; | |
28820 | ||
28821 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4> | |
28822 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) const volatile > { static const bool value = true; }; | |
28823 | ||
28824 | ||
28825 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28826 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) > { static const bool value = true; }; | |
28827 | ||
28828 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28829 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) > { static const bool value = true; }; | |
28830 | ||
28831 | ||
28832 | ||
28833 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28834 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) const > { static const bool value = true; }; | |
28835 | ||
28836 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28837 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) volatile > { static const bool value = true; }; | |
28838 | ||
28839 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28840 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile > { static const bool value = true; }; | |
28841 | ||
28842 | ||
28843 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28844 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const > { static const bool value = true; }; | |
28845 | ||
28846 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28847 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile > { static const bool value = true; }; | |
28848 | ||
28849 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> | |
28850 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile > { static const bool value = true; }; | |
28851 | ||
28852 | ||
28853 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28854 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) > { static const bool value = true; }; | |
28855 | ||
28856 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28857 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) > { static const bool value = true; }; | |
28858 | ||
28859 | ||
28860 | ||
28861 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28862 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const > { static const bool value = true; }; | |
28863 | ||
28864 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28865 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile > { static const bool value = true; }; | |
28866 | ||
28867 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28868 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile > { static const bool value = true; }; | |
28869 | ||
28870 | ||
28871 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28872 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const > { static const bool value = true; }; | |
28873 | ||
28874 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28875 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile > { static const bool value = true; }; | |
28876 | ||
28877 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> | |
28878 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile > { static const bool value = true; }; | |
28879 | ||
28880 | ||
28881 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28882 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) > { static const bool value = true; }; | |
28883 | ||
28884 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28885 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) > { static const bool value = true; }; | |
28886 | ||
28887 | ||
28888 | ||
28889 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28890 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const > { static const bool value = true; }; | |
28891 | ||
28892 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28893 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile > { static const bool value = true; }; | |
28894 | ||
28895 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28896 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile > { static const bool value = true; }; | |
28897 | ||
28898 | ||
28899 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28900 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const > { static const bool value = true; }; | |
28901 | ||
28902 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28903 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile > { static const bool value = true; }; | |
28904 | ||
28905 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> | |
28906 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile > { static const bool value = true; }; | |
28907 | ||
28908 | ||
28909 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28910 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) > { static const bool value = true; }; | |
28911 | ||
28912 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28913 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) > { static const bool value = true; }; | |
28914 | ||
28915 | ||
28916 | ||
28917 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28918 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const > { static const bool value = true; }; | |
28919 | ||
28920 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28921 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile > { static const bool value = true; }; | |
28922 | ||
28923 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28924 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile > { static const bool value = true; }; | |
28925 | ||
28926 | ||
28927 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28928 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const > { static const bool value = true; }; | |
28929 | ||
28930 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28931 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile > { static const bool value = true; }; | |
28932 | ||
28933 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> | |
28934 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile > { static const bool value = true; }; | |
28935 | ||
28936 | ||
28937 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28938 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) > { static const bool value = true; }; | |
28939 | ||
28940 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28941 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) > { static const bool value = true; }; | |
28942 | ||
28943 | ||
28944 | ||
28945 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28946 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const > { static const bool value = true; }; | |
28947 | ||
28948 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28949 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile > { static const bool value = true; }; | |
28950 | ||
28951 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28952 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile > { static const bool value = true; }; | |
28953 | ||
28954 | ||
28955 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28956 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const > { static const bool value = true; }; | |
28957 | ||
28958 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28959 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile > { static const bool value = true; }; | |
28960 | ||
28961 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> | |
28962 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile > { static const bool value = true; }; | |
28963 | ||
28964 | ||
28965 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28966 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) > { static const bool value = true; }; | |
28967 | ||
28968 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28969 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) > { static const bool value = true; }; | |
28970 | ||
28971 | ||
28972 | ||
28973 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28974 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const > { static const bool value = true; }; | |
28975 | ||
28976 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28977 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile > { static const bool value = true; }; | |
28978 | ||
28979 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28980 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile > { static const bool value = true; }; | |
28981 | ||
28982 | ||
28983 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28984 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const > { static const bool value = true; }; | |
28985 | ||
28986 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28987 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile > { static const bool value = true; }; | |
28988 | ||
28989 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> | |
28990 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile > { static const bool value = true; }; | |
28991 | ||
28992 | ||
28993 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
28994 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) > { static const bool value = true; }; | |
28995 | ||
28996 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
28997 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) > { static const bool value = true; }; | |
28998 | ||
28999 | ||
29000 | ||
29001 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
29002 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const > { static const bool value = true; }; | |
29003 | ||
29004 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
29005 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile > { static const bool value = true; }; | |
29006 | ||
29007 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
29008 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile > { static const bool value = true; }; | |
29009 | ||
29010 | ||
29011 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
29012 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const > { static const bool value = true; }; | |
29013 | ||
29014 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
29015 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile > { static const bool value = true; }; | |
29016 | ||
29017 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> | |
29018 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile > { static const bool value = true; }; | |
29019 | ||
29020 | ||
29021 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29022 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) > { static const bool value = true; }; | |
29023 | ||
29024 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29025 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) > { static const bool value = true; }; | |
29026 | ||
29027 | ||
29028 | ||
29029 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29030 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const > { static const bool value = true; }; | |
29031 | ||
29032 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29033 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile > { static const bool value = true; }; | |
29034 | ||
29035 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29036 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile > { static const bool value = true; }; | |
29037 | ||
29038 | ||
29039 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29040 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const > { static const bool value = true; }; | |
29041 | ||
29042 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29043 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile > { static const bool value = true; }; | |
29044 | ||
29045 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> | |
29046 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile > { static const bool value = true; }; | |
29047 | ||
29048 | ||
29049 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29050 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) > { static const bool value = true; }; | |
29051 | ||
29052 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29053 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) > { static const bool value = true; }; | |
29054 | ||
29055 | ||
29056 | ||
29057 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29058 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const > { static const bool value = true; }; | |
29059 | ||
29060 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29061 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile > { static const bool value = true; }; | |
29062 | ||
29063 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29064 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile > { static const bool value = true; }; | |
29065 | ||
29066 | ||
29067 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29068 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const > { static const bool value = true; }; | |
29069 | ||
29070 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29071 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile > { static const bool value = true; }; | |
29072 | ||
29073 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> | |
29074 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile > { static const bool value = true; }; | |
29075 | ||
29076 | ||
29077 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29078 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) > { static const bool value = true; }; | |
29079 | ||
29080 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29081 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) > { static const bool value = true; }; | |
29082 | ||
29083 | ||
29084 | ||
29085 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29086 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const > { static const bool value = true; }; | |
29087 | ||
29088 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29089 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile > { static const bool value = true; }; | |
29090 | ||
29091 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29092 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile > { static const bool value = true; }; | |
29093 | ||
29094 | ||
29095 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29096 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const > { static const bool value = true; }; | |
29097 | ||
29098 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29099 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile > { static const bool value = true; }; | |
29100 | ||
29101 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> | |
29102 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile > { static const bool value = true; }; | |
29103 | ||
29104 | ||
29105 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29106 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) > { static const bool value = true; }; | |
29107 | ||
29108 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29109 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) > { static const bool value = true; }; | |
29110 | ||
29111 | ||
29112 | ||
29113 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29114 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const > { static const bool value = true; }; | |
29115 | ||
29116 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29117 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile > { static const bool value = true; }; | |
29118 | ||
29119 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29120 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile > { static const bool value = true; }; | |
29121 | ||
29122 | ||
29123 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29124 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const > { static const bool value = true; }; | |
29125 | ||
29126 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29127 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile > { static const bool value = true; }; | |
29128 | ||
29129 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15> | |
29130 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile > { static const bool value = true; }; | |
29131 | ||
29132 | ||
29133 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29134 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) > { static const bool value = true; }; | |
29135 | ||
29136 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29137 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) > { static const bool value = true; }; | |
29138 | ||
29139 | ||
29140 | ||
29141 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29142 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const > { static const bool value = true; }; | |
29143 | ||
29144 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29145 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile > { static const bool value = true; }; | |
29146 | ||
29147 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29148 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile > { static const bool value = true; }; | |
29149 | ||
29150 | ||
29151 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29152 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const > { static const bool value = true; }; | |
29153 | ||
29154 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29155 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile > { static const bool value = true; }; | |
29156 | ||
29157 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16> | |
29158 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile > { static const bool value = true; }; | |
29159 | ||
29160 | ||
29161 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29162 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) > { static const bool value = true; }; | |
29163 | ||
29164 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29165 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) > { static const bool value = true; }; | |
29166 | ||
29167 | ||
29168 | ||
29169 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29170 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const > { static const bool value = true; }; | |
29171 | ||
29172 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29173 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile > { static const bool value = true; }; | |
29174 | ||
29175 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29176 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile > { static const bool value = true; }; | |
29177 | ||
29178 | ||
29179 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29180 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const > { static const bool value = true; }; | |
29181 | ||
29182 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29183 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile > { static const bool value = true; }; | |
29184 | ||
29185 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17> | |
29186 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile > { static const bool value = true; }; | |
29187 | ||
29188 | ||
29189 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29190 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) > { static const bool value = true; }; | |
29191 | ||
29192 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29193 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) > { static const bool value = true; }; | |
29194 | ||
29195 | ||
29196 | ||
29197 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29198 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const > { static const bool value = true; }; | |
29199 | ||
29200 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29201 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile > { static const bool value = true; }; | |
29202 | ||
29203 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29204 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile > { static const bool value = true; }; | |
29205 | ||
29206 | ||
29207 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29208 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const > { static const bool value = true; }; | |
29209 | ||
29210 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29211 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile > { static const bool value = true; }; | |
29212 | ||
29213 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18> | |
29214 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile > { static const bool value = true; }; | |
29215 | ||
29216 | ||
29217 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29218 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) > { static const bool value = true; }; | |
29219 | ||
29220 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29221 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) > { static const bool value = true; }; | |
29222 | ||
29223 | ||
29224 | ||
29225 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29226 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const > { static const bool value = true; }; | |
29227 | ||
29228 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29229 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile > { static const bool value = true; }; | |
29230 | ||
29231 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29232 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile > { static const bool value = true; }; | |
29233 | ||
29234 | ||
29235 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29236 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const > { static const bool value = true; }; | |
29237 | ||
29238 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29239 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile > { static const bool value = true; }; | |
29240 | ||
29241 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19> | |
29242 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile > { static const bool value = true; }; | |
29243 | ||
29244 | ||
29245 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29246 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) > { static const bool value = true; }; | |
29247 | ||
29248 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29249 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) > { static const bool value = true; }; | |
29250 | ||
29251 | ||
29252 | ||
29253 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29254 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const > { static const bool value = true; }; | |
29255 | ||
29256 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29257 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile > { static const bool value = true; }; | |
29258 | ||
29259 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29260 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile > { static const bool value = true; }; | |
29261 | ||
29262 | ||
29263 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29264 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const > { static const bool value = true; }; | |
29265 | ||
29266 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29267 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile > { static const bool value = true; }; | |
29268 | ||
29269 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20> | |
29270 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile > { static const bool value = true; }; | |
29271 | ||
29272 | ||
29273 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29274 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) > { static const bool value = true; }; | |
29275 | ||
29276 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29277 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) > { static const bool value = true; }; | |
29278 | ||
29279 | ||
29280 | ||
29281 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29282 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const > { static const bool value = true; }; | |
29283 | ||
29284 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29285 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile > { static const bool value = true; }; | |
29286 | ||
29287 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29288 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile > { static const bool value = true; }; | |
29289 | ||
29290 | ||
29291 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29292 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const > { static const bool value = true; }; | |
29293 | ||
29294 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29295 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile > { static const bool value = true; }; | |
29296 | ||
29297 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21> | |
29298 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile > { static const bool value = true; }; | |
29299 | ||
29300 | ||
29301 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29302 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) > { static const bool value = true; }; | |
29303 | ||
29304 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29305 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) > { static const bool value = true; }; | |
29306 | ||
29307 | ||
29308 | ||
29309 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29310 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const > { static const bool value = true; }; | |
29311 | ||
29312 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29313 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile > { static const bool value = true; }; | |
29314 | ||
29315 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29316 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile > { static const bool value = true; }; | |
29317 | ||
29318 | ||
29319 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29320 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const > { static const bool value = true; }; | |
29321 | ||
29322 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29323 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile > { static const bool value = true; }; | |
29324 | ||
29325 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22> | |
29326 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile > { static const bool value = true; }; | |
29327 | ||
29328 | ||
29329 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29330 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) > { static const bool value = true; }; | |
29331 | ||
29332 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29333 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) > { static const bool value = true; }; | |
29334 | ||
29335 | ||
29336 | ||
29337 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29338 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const > { static const bool value = true; }; | |
29339 | ||
29340 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29341 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile > { static const bool value = true; }; | |
29342 | ||
29343 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29344 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile > { static const bool value = true; }; | |
29345 | ||
29346 | ||
29347 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29348 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const > { static const bool value = true; }; | |
29349 | ||
29350 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29351 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile > { static const bool value = true; }; | |
29352 | ||
29353 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23> | |
29354 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile > { static const bool value = true; }; | |
29355 | ||
29356 | ||
29357 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29358 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) > { static const bool value = true; }; | |
29359 | ||
29360 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29361 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) > { static const bool value = true; }; | |
29362 | ||
29363 | ||
29364 | ||
29365 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29366 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const > { static const bool value = true; }; | |
29367 | ||
29368 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29369 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile > { static const bool value = true; }; | |
29370 | ||
29371 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29372 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile > { static const bool value = true; }; | |
29373 | ||
29374 | ||
29375 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29376 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const > { static const bool value = true; }; | |
29377 | ||
29378 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29379 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile > { static const bool value = true; }; | |
29380 | ||
29381 | template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24> | |
29382 | struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile > { static const bool value = true; }; | |
29383 | # 776 "./boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" | |
29384 | } | |
29385 | } | |
29386 | # 25 "./boost/type_traits/is_member_function_pointer.hpp" 2 | |
29387 | # 36 "./boost/type_traits/is_member_function_pointer.hpp" | |
29388 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29389 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29390 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29391 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29392 | # 37 "./boost/type_traits/is_member_function_pointer.hpp" 2 | |
29393 | ||
29394 | namespace boost { | |
29395 | ||
29396 | ||
29397 | ||
29398 | template< typename T > struct is_member_function_pointer : ::boost::integral_constant<bool,::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value> { }; | |
29399 | # 130 "./boost/type_traits/is_member_function_pointer.hpp" | |
29400 | } | |
29401 | ||
29402 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29403 | # 133 "./boost/type_traits/is_member_function_pointer.hpp" 2 | |
29404 | # 29 "./boost/type_traits/is_member_pointer.hpp" 2 | |
29405 | # 39 "./boost/type_traits/is_member_pointer.hpp" | |
29406 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29407 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29408 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29409 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29410 | # 40 "./boost/type_traits/is_member_pointer.hpp" 2 | |
29411 | ||
29412 | namespace boost { | |
29413 | ||
29414 | ||
29415 | ||
29416 | ||
29417 | ||
29418 | ||
29419 | template< typename T > struct is_member_pointer : ::boost::integral_constant<bool,::boost::is_member_function_pointer<T>::value> { }; | |
29420 | template< typename T, typename U > struct is_member_pointer< U T::* > : ::boost::integral_constant<bool,true> { }; | |
29421 | ||
29422 | ||
29423 | template< typename T, typename U > struct is_member_pointer< U T::*const > : ::boost::integral_constant<bool,true> { }; | |
29424 | template< typename T, typename U > struct is_member_pointer< U T::*volatile > : ::boost::integral_constant<bool,true> { }; | |
29425 | template< typename T, typename U > struct is_member_pointer< U T::*const volatile > : ::boost::integral_constant<bool,true> { }; | |
29426 | # 110 "./boost/type_traits/is_member_pointer.hpp" | |
29427 | } | |
29428 | ||
29429 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29430 | # 113 "./boost/type_traits/is_member_pointer.hpp" 2 | |
29431 | # 25 "./boost/type_traits/is_pointer.hpp" 2 | |
29432 | # 41 "./boost/type_traits/is_pointer.hpp" | |
29433 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29434 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29435 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29436 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29437 | # 42 "./boost/type_traits/is_pointer.hpp" 2 | |
29438 | ||
29439 | namespace boost { | |
29440 | ||
29441 | ||
29442 | ||
29443 | namespace detail { | |
29444 | ||
29445 | template< typename T > struct is_pointer_helper | |
29446 | { | |
29447 | static const bool value = false; | |
29448 | }; | |
29449 | # 61 "./boost/type_traits/is_pointer.hpp" | |
29450 | template< typename T > struct is_pointer_helper<T*> { static const bool value = true; }; | |
29451 | ||
29452 | ||
29453 | ||
29454 | template< typename T > | |
29455 | struct is_pointer_impl | |
29456 | { | |
29457 | # 78 "./boost/type_traits/is_pointer.hpp" | |
29458 | static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper<typename remove_cv<T>::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value >::value); | |
29459 | # 87 "./boost/type_traits/is_pointer.hpp" | |
29460 | }; | |
29461 | ||
29462 | } | |
29463 | ||
29464 | template< typename T > struct is_pointer : ::boost::integral_constant<bool,::boost::detail::is_pointer_impl<T>::value> { }; | |
29465 | # 156 "./boost/type_traits/is_pointer.hpp" | |
29466 | } | |
29467 | ||
29468 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29469 | # 159 "./boost/type_traits/is_pointer.hpp" 2 | |
29470 | # 15 "./boost/type_traits/is_scalar.hpp" 2 | |
29471 | ||
29472 | ||
29473 | ||
29474 | ||
29475 | ||
29476 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29477 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29478 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29479 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29480 | # 21 "./boost/type_traits/is_scalar.hpp" 2 | |
29481 | ||
29482 | namespace boost { | |
29483 | ||
29484 | namespace detail { | |
29485 | ||
29486 | template <typename T> | |
29487 | struct is_scalar_impl | |
29488 | { | |
29489 | static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic<T>::value, ::boost::is_enum<T>::value, ::boost::is_pointer<T>::value, ::boost::is_member_pointer<T>::value >::value); | |
29490 | ||
29491 | ||
29492 | ||
29493 | ||
29494 | ||
29495 | ||
29496 | }; | |
29497 | ||
29498 | ||
29499 | ||
29500 | template <> struct is_scalar_impl<void>{ static const bool value = false; }; | |
29501 | ||
29502 | template <> struct is_scalar_impl<void const>{ static const bool value = false; }; | |
29503 | template <> struct is_scalar_impl<void volatile>{ static const bool value = false; }; | |
29504 | template <> struct is_scalar_impl<void const volatile>{ static const bool value = false; }; | |
29505 | ||
29506 | ||
29507 | } | |
29508 | ||
29509 | template< typename T > struct is_scalar : ::boost::integral_constant<bool,::boost::detail::is_scalar_impl<T>::value> { }; | |
29510 | ||
29511 | } | |
29512 | ||
29513 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29514 | # 54 "./boost/type_traits/is_scalar.hpp" 2 | |
29515 | # 15 "./boost/type_traits/is_pod.hpp" 2 | |
29516 | ||
29517 | ||
29518 | ||
29519 | ||
29520 | ||
29521 | ||
29522 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29523 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29524 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29525 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29526 | # 22 "./boost/type_traits/is_pod.hpp" 2 | |
29527 | ||
29528 | namespace boost { | |
29529 | ||
29530 | ||
29531 | template< typename T > struct is_POD; | |
29532 | ||
29533 | namespace detail { | |
29534 | ||
29535 | ||
29536 | ||
29537 | template <typename T> struct is_pod_impl | |
29538 | { | |
29539 | static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar<T>::value, ::boost::is_void<T>::value, false >::value); | |
29540 | ||
29541 | ||
29542 | ||
29543 | ||
29544 | ||
29545 | ||
29546 | }; | |
29547 | ||
29548 | ||
29549 | template <typename T, std::size_t sz> | |
29550 | struct is_pod_impl<T[sz]> | |
29551 | : is_pod_impl<T> | |
29552 | { | |
29553 | }; | |
29554 | # 118 "./boost/type_traits/is_pod.hpp" | |
29555 | template<> struct is_pod_impl< void > { static const bool value = (true); }; | |
29556 | ||
29557 | ||
29558 | template<> struct is_pod_impl< void const > { static const bool value = (true); }; | |
29559 | template<> struct is_pod_impl< void volatile > { static const bool value = (true); }; | |
29560 | template<> struct is_pod_impl< void const volatile > { static const bool value = (true); }; | |
29561 | ||
29562 | ||
29563 | } | |
29564 | ||
29565 | template< typename T > struct is_POD : ::boost::integral_constant<bool,::boost::detail::is_pod_impl<T>::value> { }; | |
29566 | template< typename T > struct is_pod : ::boost::integral_constant<bool,::boost::detail::is_pod_impl<T>::value> { }; | |
29567 | ||
29568 | } | |
29569 | ||
29570 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29571 | # 134 "./boost/type_traits/is_pod.hpp" 2 | |
29572 | # 19 "./boost/type_traits/type_with_alignment.hpp" 2 | |
29573 | ||
29574 | ||
29575 | ||
29576 | ||
29577 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29578 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29579 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29580 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29581 | # 24 "./boost/type_traits/type_with_alignment.hpp" 2 | |
29582 | # 32 "./boost/type_traits/type_with_alignment.hpp" | |
29583 | namespace boost { | |
29584 | ||
29585 | ||
29586 | ||
29587 | namespace detail { | |
29588 | ||
29589 | class alignment_dummy; | |
29590 | typedef void (*function_ptr)(); | |
29591 | typedef int (alignment_dummy::*member_ptr); | |
29592 | typedef int (alignment_dummy::*member_function_ptr)(); | |
29593 | # 101 "./boost/type_traits/type_with_alignment.hpp" | |
29594 | template <bool found, std::size_t target, class TestType> | |
29595 | struct lower_alignment_helper | |
29596 | { | |
29597 | typedef char type; | |
29598 | enum { value = true }; | |
29599 | }; | |
29600 | ||
29601 | template <std::size_t target, class TestType> | |
29602 | struct lower_alignment_helper<false,target,TestType> | |
29603 | { | |
29604 | enum { value = (alignment_of<TestType>::value == target) }; | |
29605 | typedef typename mpl::if_c<value, TestType, char>::type type; | |
29606 | }; | |
29607 | # 127 "./boost/type_traits/type_with_alignment.hpp" | |
29608 | template <typename T> | |
29609 | struct has_one_T | |
29610 | { | |
29611 | T data; | |
29612 | }; | |
29613 | ||
29614 | template <std::size_t target> | |
29615 | union lower_alignment | |
29616 | { | |
29617 | enum { found0 = false }; | |
29618 | ||
29619 | typename lower_alignment_helper< found0,target,char >::type t0; enum { found1 = lower_alignment_helper<found0,target,char >::value }; typename lower_alignment_helper< found1,target,short >::type t1; enum { found2 = lower_alignment_helper<found1,target,short >::value }; typename lower_alignment_helper< found2,target,int >::type t2; enum { found3 = lower_alignment_helper<found2,target,int >::value }; typename lower_alignment_helper< found3,target,long >::type t3; enum { found4 = lower_alignment_helper<found3,target,long >::value }; typename lower_alignment_helper< found4,target,::boost::long_long_type >::type t4; enum { found5 = lower_alignment_helper<found4,target,::boost::long_long_type >::value }; typename lower_alignment_helper< found5,target,float >::type t5; enum { found6 = lower_alignment_helper<found5,target,float >::value }; typename lower_alignment_helper< found6,target,double >::type t6; enum { found7 = lower_alignment_helper<found6,target,double >::value }; typename lower_alignment_helper< found7,target,long double >::type t7; enum { found8 = lower_alignment_helper<found7,target,long double >::value }; typename lower_alignment_helper< found8,target,void* >::type t8; enum { found9 = lower_alignment_helper<found8,target,void* >::value }; typename lower_alignment_helper< found9,target,function_ptr >::type t9; enum { found10 = lower_alignment_helper<found9,target,function_ptr >::value }; typename lower_alignment_helper< found10,target,member_ptr >::type t10; enum { found11 = lower_alignment_helper<found10,target,member_ptr >::value }; typename lower_alignment_helper< found11,target,member_function_ptr >::type t11; enum { found12 = lower_alignment_helper<found11,target,member_function_ptr >::value }; typename lower_alignment_helper< found12,target,boost::detail::has_one_T< char > >::type t12; enum { found13 = lower_alignment_helper<found12,target,boost::detail::has_one_T< char > >::value }; typename lower_alignment_helper< found13,target,boost::detail::has_one_T< short > >::type t13; enum { found14 = lower_alignment_helper<found13,target,boost::detail::has_one_T< short > >::value }; typename lower_alignment_helper< found14,target,boost::detail::has_one_T< int > >::type t14; enum { found15 = lower_alignment_helper<found14,target,boost::detail::has_one_T< int > >::value }; typename lower_alignment_helper< found15,target,boost::detail::has_one_T< long > >::type t15; enum { found16 = lower_alignment_helper<found15,target,boost::detail::has_one_T< long > >::value }; typename lower_alignment_helper< found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::type t16; enum { found17 = lower_alignment_helper<found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::value }; typename lower_alignment_helper< found17,target,boost::detail::has_one_T< float > >::type t17; enum { found18 = lower_alignment_helper<found17,target,boost::detail::has_one_T< float > >::value }; typename lower_alignment_helper< found18,target,boost::detail::has_one_T< double > >::type t18; enum { found19 = lower_alignment_helper<found18,target,boost::detail::has_one_T< double > >::value }; typename lower_alignment_helper< found19,target,boost::detail::has_one_T< long double > >::type t19; enum { found20 = lower_alignment_helper<found19,target,boost::detail::has_one_T< long double > >::value }; typename lower_alignment_helper< found20,target,boost::detail::has_one_T< void* > >::type t20; enum { found21 = lower_alignment_helper<found20,target,boost::detail::has_one_T< void* > >::value }; typename lower_alignment_helper< found21,target,boost::detail::has_one_T< function_ptr > >::type t21; enum { found22 = lower_alignment_helper<found21,target,boost::detail::has_one_T< function_ptr > >::value }; typename lower_alignment_helper< found22,target,boost::detail::has_one_T< member_ptr > >::type t22; enum { found23 = lower_alignment_helper<found22,target,boost::detail::has_one_T< member_ptr > >::value }; typename lower_alignment_helper< found23,target,boost::detail::has_one_T< member_function_ptr > >::type t23; enum { found24 = lower_alignment_helper<found23,target,boost::detail::has_one_T< member_function_ptr > >::value }; | |
29620 | ||
29621 | ||
29622 | ||
29623 | ||
29624 | }; | |
29625 | ||
29626 | union max_align | |
29627 | { | |
29628 | char t0; short t1; int t2; long t3; ::boost::long_long_type t4; float t5; double t6; long double t7; void* t8; function_ptr t9; member_ptr t10; member_function_ptr t11; boost::detail::has_one_T< char > t12; boost::detail::has_one_T< short > t13; boost::detail::has_one_T< int > t14; boost::detail::has_one_T< long > t15; boost::detail::has_one_T< ::boost::long_long_type > t16; boost::detail::has_one_T< float > t17; boost::detail::has_one_T< double > t18; boost::detail::has_one_T< long double > t19; boost::detail::has_one_T< void* > t20; boost::detail::has_one_T< function_ptr > t21; boost::detail::has_one_T< member_ptr > t22; boost::detail::has_one_T< member_function_ptr > t23; | |
29629 | ||
29630 | ||
29631 | ||
29632 | ||
29633 | }; | |
29634 | # 161 "./boost/type_traits/type_with_alignment.hpp" | |
29635 | template<std::size_t TAlign, std::size_t Align> | |
29636 | struct is_aligned | |
29637 | { | |
29638 | static const bool value = (TAlign >= Align) & (TAlign % Align == 0); | |
29639 | ||
29640 | ||
29641 | }; | |
29642 | # 180 "./boost/type_traits/type_with_alignment.hpp" | |
29643 | } | |
29644 | ||
29645 | ||
29646 | template<std::size_t Align> | |
29647 | struct is_pod< ::boost::detail::lower_alignment<Align> > | |
29648 | { | |
29649 | static const std::size_t value = true; | |
29650 | }; | |
29651 | ||
29652 | ||
29653 | ||
29654 | ||
29655 | template <std::size_t Align> | |
29656 | class type_with_alignment | |
29657 | { | |
29658 | typedef ::boost::detail::lower_alignment<Align> t1; | |
29659 | typedef typename mpl::if_c< | |
29660 | ::boost::detail::is_aligned< ::boost::alignment_of<t1>::value,Align >::value | |
29661 | , t1 | |
29662 | , ::boost::detail::max_align | |
29663 | >::type align_t; | |
29664 | ||
29665 | static const std::size_t found = alignment_of<align_t>::value; | |
29666 | ||
29667 | typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( found >= Align ) >)> boost_static_assert_typedef_204; | |
29668 | typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( found % Align == 0 ) >)> boost_static_assert_typedef_205; | |
29669 | ||
29670 | public: | |
29671 | typedef align_t type; | |
29672 | }; | |
29673 | ||
29674 | ||
29675 | namespace align { | |
29676 | struct __attribute__((__aligned__(2))) a2 {}; | |
29677 | struct __attribute__((__aligned__(4))) a4 {}; | |
29678 | struct __attribute__((__aligned__(8))) a8 {}; | |
29679 | struct __attribute__((__aligned__(16))) a16 {}; | |
29680 | struct __attribute__((__aligned__(32))) a32 {}; | |
29681 | } | |
29682 | ||
29683 | template<> class type_with_alignment<1> { public: typedef char type; }; | |
29684 | template<> class type_with_alignment<2> { public: typedef align::a2 type; }; | |
29685 | template<> class type_with_alignment<4> { public: typedef align::a4 type; }; | |
29686 | template<> class type_with_alignment<8> { public: typedef align::a8 type; }; | |
29687 | template<> class type_with_alignment<16> { public: typedef align::a16 type; }; | |
29688 | template<> class type_with_alignment<32> { public: typedef align::a32 type; }; | |
29689 | ||
29690 | namespace detail { | |
29691 | template<> struct is_pod_impl< ::boost::align::a2 > { static const bool value = (true); }; | |
29692 | template<> struct is_pod_impl< ::boost::align::a4 > { static const bool value = (true); }; | |
29693 | template<> struct is_pod_impl< ::boost::align::a8 > { static const bool value = (true); }; | |
29694 | template<> struct is_pod_impl< ::boost::align::a16 > { static const bool value = (true); }; | |
29695 | template<> struct is_pod_impl< ::boost::align::a32 > { static const bool value = (true); }; | |
29696 | } | |
29697 | # 278 "./boost/type_traits/type_with_alignment.hpp" | |
29698 | } | |
29699 | ||
29700 | ||
29701 | ||
29702 | ||
29703 | ||
29704 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29705 | # 285 "./boost/type_traits/type_with_alignment.hpp" 2 | |
29706 | # 23 "./boost/optional/optional.hpp" 2 | |
29707 | # 1 "./boost/type_traits/remove_reference.hpp" 1 | |
29708 | # 21 "./boost/type_traits/remove_reference.hpp" | |
29709 | # 1 "./boost/type_traits/detail/type_trait_def.hpp" 1 | |
29710 | # 14 "./boost/type_traits/detail/type_trait_def.hpp" | |
29711 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29712 | # 15 "./boost/type_traits/detail/type_trait_def.hpp" 2 | |
29713 | # 22 "./boost/type_traits/remove_reference.hpp" 2 | |
29714 | ||
29715 | namespace boost { | |
29716 | ||
29717 | ||
29718 | ||
29719 | template< typename T > struct remove_reference { typedef T type; }; | |
29720 | template< typename T > struct remove_reference<T&> { typedef T type; }; | |
29721 | # 46 "./boost/type_traits/remove_reference.hpp" | |
29722 | } | |
29723 | ||
29724 | # 1 "./boost/type_traits/detail/type_trait_undef.hpp" 1 | |
29725 | # 49 "./boost/type_traits/remove_reference.hpp" 2 | |
29726 | # 24 "./boost/optional/optional.hpp" 2 | |
29727 | ||
29728 | ||
29729 | ||
29730 | # 1 "./boost/mpl/not.hpp" 1 | |
29731 | # 19 "./boost/mpl/not.hpp" | |
29732 | # 1 "./boost/mpl/aux_/nested_type_wknd.hpp" 1 | |
29733 | # 25 "./boost/mpl/aux_/nested_type_wknd.hpp" | |
29734 | namespace boost { namespace mpl { namespace aux { | |
29735 | template< typename T > struct nested_type_wknd | |
29736 | : T::type | |
29737 | { | |
29738 | }; | |
29739 | }}} | |
29740 | # 20 "./boost/mpl/not.hpp" 2 | |
29741 | ||
29742 | ||
29743 | ||
29744 | namespace boost { namespace mpl { | |
29745 | ||
29746 | namespace aux { | |
29747 | ||
29748 | template< long C_ > | |
29749 | struct not_impl | |
29750 | : bool_<!C_> | |
29751 | { | |
29752 | }; | |
29753 | ||
29754 | } | |
29755 | ||
29756 | ||
29757 | template< | |
29758 | typename T = na | |
29759 | > | |
29760 | struct not_ | |
29761 | : aux::not_impl< | |
29762 | ::boost::mpl::aux::nested_type_wknd<T>::value | |
29763 | > | |
29764 | { | |
29765 | ||
29766 | }; | |
29767 | ||
29768 | template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; } | |
29769 | ||
29770 | }} | |
29771 | # 28 "./boost/optional/optional.hpp" 2 | |
29772 | # 1 "./boost/detail/reference_content.hpp" 1 | |
29773 | # 20 "./boost/detail/reference_content.hpp" | |
29774 | # 1 "./boost/type_traits/has_nothrow_copy.hpp" 1 | |
29775 | # 12 "./boost/type_traits/has_nothrow_copy.hpp" | |
29776 | # 1 "./boost/type_traits/has_trivial_copy.hpp" 1 | |
29777 | # 14 "./boost/type_traits/has_trivial_copy.hpp" | |
29778 | # 1 "./boost/type_traits/is_volatile.hpp" 1 | |
29779 | # 40 "./boost/type_traits/is_volatile.hpp" | |
29780 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29781 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29782 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29783 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29784 | # 41 "./boost/type_traits/is_volatile.hpp" 2 | |
29785 | ||
29786 | namespace boost { | |
29787 | ||
29788 | ||
29789 | ||
29790 | ||
29791 | ||
29792 | ||
29793 | ||
29794 | template< typename T > struct is_volatile : ::boost::integral_constant<bool,::boost::detail::cv_traits_imp<T*>::is_volatile> { }; | |
29795 | ||
29796 | template< typename T > struct is_volatile< T& > : ::boost::integral_constant<bool,false> { }; | |
29797 | # 127 "./boost/type_traits/is_volatile.hpp" | |
29798 | } | |
29799 | ||
29800 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29801 | # 130 "./boost/type_traits/is_volatile.hpp" 2 | |
29802 | # 15 "./boost/type_traits/has_trivial_copy.hpp" 2 | |
29803 | ||
29804 | ||
29805 | ||
29806 | ||
29807 | ||
29808 | ||
29809 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29810 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29811 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29812 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29813 | # 22 "./boost/type_traits/has_trivial_copy.hpp" 2 | |
29814 | ||
29815 | namespace boost { | |
29816 | ||
29817 | namespace detail { | |
29818 | ||
29819 | template <typename T> | |
29820 | struct has_trivial_copy_impl | |
29821 | { | |
29822 | static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod<T>::value, false >::value, ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value >::value); | |
29823 | ||
29824 | ||
29825 | ||
29826 | ||
29827 | ||
29828 | ||
29829 | ||
29830 | }; | |
29831 | ||
29832 | } | |
29833 | ||
29834 | template< typename T > struct has_trivial_copy : ::boost::integral_constant<bool,::boost::detail::has_trivial_copy_impl<T>::value> { }; | |
29835 | template< typename T > struct has_trivial_copy_constructor : ::boost::integral_constant<bool,::boost::detail::has_trivial_copy_impl<T>::value> { }; | |
29836 | ||
29837 | } | |
29838 | ||
29839 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29840 | # 48 "./boost/type_traits/has_trivial_copy.hpp" 2 | |
29841 | # 13 "./boost/type_traits/has_nothrow_copy.hpp" 2 | |
29842 | ||
29843 | ||
29844 | # 1 "./boost/type_traits/detail/bool_trait_def.hpp" 1 | |
29845 | # 14 "./boost/type_traits/detail/bool_trait_def.hpp" | |
29846 | # 1 "./boost/type_traits/detail/template_arity_spec.hpp" 1 | |
29847 | # 15 "./boost/type_traits/detail/bool_trait_def.hpp" 2 | |
29848 | # 16 "./boost/type_traits/has_nothrow_copy.hpp" 2 | |
29849 | ||
29850 | namespace boost { | |
29851 | ||
29852 | namespace detail{ | |
29853 | ||
29854 | template <class T> | |
29855 | struct has_nothrow_copy_imp{ | |
29856 | static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_copy<T>::value, false >::value); | |
29857 | ||
29858 | ||
29859 | ||
29860 | ||
29861 | }; | |
29862 | ||
29863 | } | |
29864 | ||
29865 | template< typename T > struct has_nothrow_copy : ::boost::integral_constant<bool,::boost::detail::has_nothrow_copy_imp<T>::value> { }; | |
29866 | template< typename T > struct has_nothrow_copy_constructor : ::boost::integral_constant<bool,::boost::detail::has_nothrow_copy_imp<T>::value> { }; | |
29867 | ||
29868 | } | |
29869 | ||
29870 | # 1 "./boost/type_traits/detail/bool_trait_undef.hpp" 1 | |
29871 | # 38 "./boost/type_traits/has_nothrow_copy.hpp" 2 | |
29872 | # 21 "./boost/detail/reference_content.hpp" 2 | |
29873 | ||
29874 | ||
29875 | ||
29876 | ||
29877 | ||
29878 | # 1 "./boost/mpl/void.hpp" 1 | |
29879 | # 23 "./boost/mpl/void.hpp" | |
29880 | namespace mpl_ { | |
29881 | ||
29882 | ||
29883 | ||
29884 | ||
29885 | ||
29886 | struct void_ { typedef void_ type; }; | |
29887 | ||
29888 | } | |
29889 | ||
29890 | namespace boost { namespace mpl { | |
29891 | ||
29892 | template< typename T > | |
29893 | struct is_void_ | |
29894 | : false_ | |
29895 | { | |
29896 | ||
29897 | ||
29898 | ||
29899 | }; | |
29900 | ||
29901 | template<> | |
29902 | struct is_void_<void_> | |
29903 | : true_ | |
29904 | { | |
29905 | ||
29906 | ||
29907 | ||
29908 | }; | |
29909 | ||
29910 | template< typename T > | |
29911 | struct is_not_void_ | |
29912 | : true_ | |
29913 | { | |
29914 | ||
29915 | ||
29916 | ||
29917 | }; | |
29918 | ||
29919 | template<> | |
29920 | struct is_not_void_<void_> | |
29921 | : false_ | |
29922 | { | |
29923 | ||
29924 | ||
29925 | ||
29926 | }; | |
29927 | ||
29928 | template<> struct is_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_void_< T1 > { }; }; template< typename Tag > struct lambda< is_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_void_< na > result_; typedef is_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_void_< na > > : int_<-1> { }; } | |
29929 | template<> struct is_not_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_not_void_< T1 > { }; }; template< typename Tag > struct lambda< is_not_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_not_void_< na > result_; typedef is_not_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_not_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_not_void_< na > > : int_<-1> { }; } | |
29930 | ||
29931 | }} | |
29932 | # 27 "./boost/detail/reference_content.hpp" 2 | |
29933 | ||
29934 | namespace boost { | |
29935 | ||
29936 | namespace detail { | |
29937 | ||
29938 | ||
29939 | ||
29940 | ||
29941 | ||
29942 | ||
29943 | template <typename RefT> | |
29944 | class reference_content | |
29945 | { | |
29946 | private: | |
29947 | ||
29948 | RefT content_; | |
29949 | ||
29950 | public: | |
29951 | ||
29952 | ~reference_content() | |
29953 | { | |
29954 | } | |
29955 | ||
29956 | reference_content(RefT r) | |
29957 | : content_( r ) | |
29958 | { | |
29959 | } | |
29960 | ||
29961 | reference_content(const reference_content& operand) | |
29962 | : content_( operand.content_ ) | |
29963 | { | |
29964 | } | |
29965 | ||
29966 | private: | |
29967 | ||
29968 | reference_content& operator=(const reference_content&); | |
29969 | ||
29970 | public: | |
29971 | ||
29972 | RefT get() const | |
29973 | { | |
29974 | return content_; | |
29975 | } | |
29976 | ||
29977 | }; | |
29978 | ||
29979 | ||
29980 | ||
29981 | ||
29982 | ||
29983 | ||
29984 | ||
29985 | template <typename T = mpl::void_> struct make_reference_content; | |
29986 | ||
29987 | ||
29988 | ||
29989 | template <typename T> | |
29990 | struct make_reference_content | |
29991 | { | |
29992 | typedef T type; | |
29993 | }; | |
29994 | ||
29995 | template <typename T> | |
29996 | struct make_reference_content< T& > | |
29997 | { | |
29998 | typedef reference_content<T&> type; | |
29999 | }; | |
30000 | # 109 "./boost/detail/reference_content.hpp" | |
30001 | template <> | |
30002 | struct make_reference_content< mpl::void_ > | |
30003 | { | |
30004 | template <typename T> | |
30005 | struct apply | |
30006 | : make_reference_content<T> | |
30007 | { | |
30008 | }; | |
30009 | ||
30010 | typedef mpl::void_ type; | |
30011 | }; | |
30012 | ||
30013 | } | |
30014 | ||
30015 | ||
30016 | ||
30017 | ||
30018 | ||
30019 | ||
30020 | ||
30021 | template <typename T> | |
30022 | struct has_nothrow_copy< | |
30023 | ::boost::detail::reference_content< T& > | |
30024 | > | |
30025 | : mpl::true_ | |
30026 | { | |
30027 | }; | |
30028 | ||
30029 | ||
30030 | ||
30031 | } | |
30032 | # 29 "./boost/optional/optional.hpp" 2 | |
30033 | # 1 "./boost/none.hpp" 1 | |
30034 | # 15 "./boost/none.hpp" | |
30035 | # 1 "./boost/none_t.hpp" 1 | |
30036 | # 15 "./boost/none_t.hpp" | |
30037 | namespace boost { | |
30038 | ||
30039 | namespace detail { struct none_helper{}; } | |
30040 | ||
30041 | typedef int detail::none_helper::*none_t ; | |
30042 | ||
30043 | } | |
30044 | # 16 "./boost/none.hpp" 2 | |
30045 | ||
30046 | ||
30047 | ||
30048 | ||
30049 | ||
30050 | namespace boost { | |
30051 | ||
30052 | none_t const none = ((none_t)0) ; | |
30053 | ||
30054 | } | |
30055 | # 30 "./boost/optional/optional.hpp" 2 | |
30056 | # 1 "./boost/utility/compare_pointees.hpp" 1 | |
30057 | # 15 "./boost/utility/compare_pointees.hpp" | |
30058 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/functional" 1 3 | |
30059 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/functional" 3 | |
30060 | ||
30061 | # 52 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/functional" 3 | |
30062 | # 16 "./boost/utility/compare_pointees.hpp" 2 | |
30063 | ||
30064 | namespace boost { | |
30065 | # 28 "./boost/utility/compare_pointees.hpp" | |
30066 | template<class OptionalPointee> | |
30067 | inline | |
30068 | bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y ) | |
30069 | { | |
30070 | return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ; | |
30071 | } | |
30072 | ||
30073 | template<class OptionalPointee> | |
30074 | struct equal_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool> | |
30075 | { | |
30076 | bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const | |
30077 | { return equal_pointees(x,y) ; } | |
30078 | } ; | |
30079 | # 51 "./boost/utility/compare_pointees.hpp" | |
30080 | template<class OptionalPointee> | |
30081 | inline | |
30082 | bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) | |
30083 | { | |
30084 | return !y ? false : ( !x ? true : (*x) < (*y) ) ; | |
30085 | } | |
30086 | ||
30087 | template<class OptionalPointee> | |
30088 | struct less_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool> | |
30089 | { | |
30090 | bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const | |
30091 | { return less_pointees(x,y) ; } | |
30092 | } ; | |
30093 | ||
30094 | } | |
30095 | # 31 "./boost/optional/optional.hpp" 2 | |
30096 | ||
30097 | # 1 "./boost/optional/optional_fwd.hpp" 1 | |
30098 | # 15 "./boost/optional/optional_fwd.hpp" | |
30099 | namespace boost { | |
30100 | ||
30101 | template<class T> class optional ; | |
30102 | ||
30103 | } | |
30104 | # 33 "./boost/optional/optional.hpp" 2 | |
30105 | # 83 "./boost/optional/optional.hpp" | |
30106 | namespace boost_optional_detail | |
30107 | { | |
30108 | template <class T, class Factory> | |
30109 | void construct(Factory const& factory, void* address) | |
30110 | { | |
30111 | factory.template apply<T>(address); | |
30112 | } | |
30113 | } | |
30114 | ||
30115 | ||
30116 | namespace boost { | |
30117 | ||
30118 | class in_place_factory_base ; | |
30119 | class typed_in_place_factory_base ; | |
30120 | ||
30121 | namespace optional_detail { | |
30122 | ||
30123 | ||
30124 | ||
30125 | ||
30126 | ||
30127 | template <class T> | |
30128 | class aligned_storage | |
30129 | { | |
30130 | ||
30131 | union dummy_u | |
30132 | { | |
30133 | char data[ sizeof(T) ]; | |
30134 | typename type_with_alignment< | |
30135 | ::boost::alignment_of<T>::value >::type aligner_; | |
30136 | } dummy_ ; | |
30137 | ||
30138 | public: | |
30139 | ||
30140 | void const* address() const { return &dummy_.data[0]; } | |
30141 | void * address() { return &dummy_.data[0]; } | |
30142 | } ; | |
30143 | ||
30144 | template<class T> | |
30145 | struct types_when_isnt_ref | |
30146 | { | |
30147 | typedef T const& reference_const_type ; | |
30148 | typedef T & reference_type ; | |
30149 | typedef T const* pointer_const_type ; | |
30150 | typedef T * pointer_type ; | |
30151 | typedef T const& argument_type ; | |
30152 | } ; | |
30153 | template<class T> | |
30154 | struct types_when_is_ref | |
30155 | { | |
30156 | typedef typename remove_reference<T>::type raw_type ; | |
30157 | ||
30158 | typedef raw_type& reference_const_type ; | |
30159 | typedef raw_type& reference_type ; | |
30160 | typedef raw_type* pointer_const_type ; | |
30161 | typedef raw_type* pointer_type ; | |
30162 | typedef raw_type& argument_type ; | |
30163 | } ; | |
30164 | ||
30165 | struct optional_tag {} ; | |
30166 | ||
30167 | template<class T> | |
30168 | class optional_base : public optional_tag | |
30169 | { | |
30170 | private : | |
30171 | ||
30172 | typedef | |
30173 | ||
30174 | typename | |
30175 | ||
30176 | ::boost::detail::make_reference_content<T>::type internal_type ; | |
30177 | ||
30178 | typedef aligned_storage<internal_type> storage_type ; | |
30179 | ||
30180 | typedef types_when_isnt_ref<T> types_when_not_ref ; | |
30181 | typedef types_when_is_ref<T> types_when_ref ; | |
30182 | ||
30183 | typedef optional_base<T> this_type ; | |
30184 | ||
30185 | protected : | |
30186 | ||
30187 | typedef T value_type ; | |
30188 | ||
30189 | typedef mpl::true_ is_reference_tag ; | |
30190 | typedef mpl::false_ is_not_reference_tag ; | |
30191 | ||
30192 | typedef typename is_reference<T>::type is_reference_predicate ; | |
30193 | ||
30194 | typedef typename mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ; | |
30195 | ||
30196 | typedef bool (this_type::*unspecified_bool_type)() const; | |
30197 | ||
30198 | typedef typename types::reference_type reference_type ; | |
30199 | typedef typename types::reference_const_type reference_const_type ; | |
30200 | typedef typename types::pointer_type pointer_type ; | |
30201 | typedef typename types::pointer_const_type pointer_const_type ; | |
30202 | typedef typename types::argument_type argument_type ; | |
30203 | ||
30204 | ||
30205 | ||
30206 | optional_base() | |
30207 | : | |
30208 | m_initialized(false) {} | |
30209 | ||
30210 | ||
30211 | ||
30212 | optional_base ( none_t ) | |
30213 | : | |
30214 | m_initialized(false) {} | |
30215 | ||
30216 | ||
30217 | ||
30218 | optional_base ( argument_type val ) | |
30219 | : | |
30220 | m_initialized(false) | |
30221 | { | |
30222 | construct(val); | |
30223 | } | |
30224 | ||
30225 | ||
30226 | ||
30227 | optional_base ( bool cond, argument_type val ) | |
30228 | : | |
30229 | m_initialized(false) | |
30230 | { | |
30231 | if ( cond ) | |
30232 | construct(val); | |
30233 | } | |
30234 | ||
30235 | ||
30236 | ||
30237 | optional_base ( optional_base const& rhs ) | |
30238 | : | |
30239 | m_initialized(false) | |
30240 | { | |
30241 | if ( rhs.is_initialized() ) | |
30242 | construct(rhs.get_impl()); | |
30243 | } | |
30244 | ||
30245 | ||
30246 | ||
30247 | ||
30248 | ||
30249 | template<class Expr> | |
30250 | explicit optional_base ( Expr const& expr, Expr const* tag ) | |
30251 | : | |
30252 | m_initialized(false) | |
30253 | { | |
30254 | construct(expr,tag); | |
30255 | } | |
30256 | ||
30257 | ||
30258 | ||
30259 | ||
30260 | ~optional_base() { destroy() ; } | |
30261 | ||
30262 | ||
30263 | void assign ( optional_base const& rhs ) | |
30264 | { | |
30265 | if (is_initialized()) | |
30266 | { | |
30267 | if ( rhs.is_initialized() ) | |
30268 | assign_value(rhs.get_impl(), is_reference_predicate() ); | |
30269 | else destroy(); | |
30270 | } | |
30271 | else | |
30272 | { | |
30273 | if ( rhs.is_initialized() ) | |
30274 | construct(rhs.get_impl()); | |
30275 | } | |
30276 | } | |
30277 | ||
30278 | ||
30279 | template<class U> | |
30280 | void assign ( optional<U> const& rhs ) | |
30281 | { | |
30282 | if (is_initialized()) | |
30283 | { | |
30284 | if ( rhs.is_initialized() ) | |
30285 | assign_value(static_cast<value_type>(rhs.get()), is_reference_predicate() ); | |
30286 | else destroy(); | |
30287 | } | |
30288 | else | |
30289 | { | |
30290 | if ( rhs.is_initialized() ) | |
30291 | construct(static_cast<value_type>(rhs.get())); | |
30292 | } | |
30293 | } | |
30294 | ||
30295 | ||
30296 | void assign ( argument_type val ) | |
30297 | { | |
30298 | if (is_initialized()) | |
30299 | assign_value(val, is_reference_predicate() ); | |
30300 | else construct(val); | |
30301 | } | |
30302 | ||
30303 | ||
30304 | ||
30305 | void assign ( none_t ) { destroy(); } | |
30306 | ||
30307 | ||
30308 | template<class Expr> | |
30309 | void assign_expr ( Expr const& expr, Expr const* tag ) | |
30310 | { | |
30311 | if (is_initialized()) | |
30312 | assign_expr_to_initialized(expr,tag); | |
30313 | else construct(expr,tag); | |
30314 | } | |
30315 | ||
30316 | ||
30317 | public : | |
30318 | ||
30319 | ||
30320 | ||
30321 | void reset() { destroy(); } | |
30322 | ||
30323 | ||
30324 | void reset ( argument_type val ) { assign(val); } | |
30325 | ||
30326 | ||
30327 | ||
30328 | ||
30329 | pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } | |
30330 | pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } | |
30331 | ||
30332 | bool is_initialized() const { return m_initialized ; } | |
30333 | ||
30334 | protected : | |
30335 | ||
30336 | void construct ( argument_type val ) | |
30337 | { | |
30338 | new (m_storage.address()) internal_type(val) ; | |
30339 | m_initialized = true ; | |
30340 | } | |
30341 | ||
30342 | ||
30343 | ||
30344 | template<class Expr> | |
30345 | void construct ( Expr const& factory, in_place_factory_base const* ) | |
30346 | { | |
30347 | typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( ::boost::mpl::not_<is_reference_predicate>::value ) >)> boost_static_assert_typedef_324 ; | |
30348 | boost_optional_detail::construct<value_type>(factory, m_storage.address()); | |
30349 | m_initialized = true ; | |
30350 | } | |
30351 | ||
30352 | ||
30353 | template<class Expr> | |
30354 | void construct ( Expr const& factory, typed_in_place_factory_base const* ) | |
30355 | { | |
30356 | typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( ::boost::mpl::not_<is_reference_predicate>::value ) >)> boost_static_assert_typedef_333 ; | |
30357 | factory.apply(m_storage.address()) ; | |
30358 | m_initialized = true ; | |
30359 | } | |
30360 | ||
30361 | template<class Expr> | |
30362 | void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag ) | |
30363 | { | |
30364 | destroy(); | |
30365 | construct(factory,tag); | |
30366 | } | |
30367 | ||
30368 | ||
30369 | template<class Expr> | |
30370 | void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag ) | |
30371 | { | |
30372 | destroy(); | |
30373 | construct(factory,tag); | |
30374 | } | |
30375 | ||
30376 | ||
30377 | ||
30378 | ||
30379 | ||
30380 | ||
30381 | template<class Expr> | |
30382 | void construct ( Expr const& expr, void const* ) | |
30383 | { | |
30384 | new (m_storage.address()) internal_type(expr) ; | |
30385 | m_initialized = true ; | |
30386 | } | |
30387 | ||
30388 | ||
30389 | ||
30390 | ||
30391 | ||
30392 | template<class Expr> | |
30393 | void assign_expr_to_initialized ( Expr const& expr, void const* ) | |
30394 | { | |
30395 | assign_value(expr, is_reference_predicate()); | |
30396 | } | |
30397 | # 402 "./boost/optional/optional.hpp" | |
30398 | void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; } | |
30399 | void assign_value ( argument_type val, is_reference_tag ) { construct(val); } | |
30400 | ||
30401 | void destroy() | |
30402 | { | |
30403 | if ( m_initialized ) | |
30404 | destroy_impl(is_reference_predicate()) ; | |
30405 | } | |
30406 | ||
30407 | unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; } | |
30408 | ||
30409 | reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; } | |
30410 | reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; } | |
30411 | ||
30412 | pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; } | |
30413 | pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; } | |
30414 | ||
30415 | private : | |
30416 | ||
30417 | ||
30418 | internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); } | |
30419 | internal_type * get_object() { return static_cast<internal_type *> (m_storage.address()); } | |
30420 | ||
30421 | ||
30422 | reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; } | |
30423 | reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; } | |
30424 | reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; } | |
30425 | reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; } | |
30426 | ||
30427 | ||
30428 | ||
30429 | ||
30430 | void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } | |
30431 | ||
30432 | ||
30433 | void destroy_impl ( is_reference_tag ) { m_initialized = false ; } | |
30434 | ||
30435 | ||
30436 | ||
30437 | ||
30438 | pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; } | |
30439 | pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; } | |
30440 | pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; } | |
30441 | pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; } | |
30442 | ||
30443 | bool m_initialized ; | |
30444 | storage_type m_storage ; | |
30445 | } ; | |
30446 | ||
30447 | } | |
30448 | ||
30449 | template<class T> | |
30450 | class optional : public optional_detail::optional_base<T> | |
30451 | { | |
30452 | typedef optional_detail::optional_base<T> base ; | |
30453 | ||
30454 | typedef typename base::unspecified_bool_type unspecified_bool_type ; | |
30455 | ||
30456 | public : | |
30457 | ||
30458 | typedef optional<T> this_type ; | |
30459 | ||
30460 | typedef typename base::value_type value_type ; | |
30461 | typedef typename base::reference_type reference_type ; | |
30462 | typedef typename base::reference_const_type reference_const_type ; | |
30463 | typedef typename base::pointer_type pointer_type ; | |
30464 | typedef typename base::pointer_const_type pointer_const_type ; | |
30465 | typedef typename base::argument_type argument_type ; | |
30466 | ||
30467 | ||
30468 | ||
30469 | optional() : base() {} | |
30470 | ||
30471 | ||
30472 | ||
30473 | optional( none_t none_ ) : base(none_) {} | |
30474 | ||
30475 | ||
30476 | ||
30477 | optional ( argument_type val ) : base(val) {} | |
30478 | ||
30479 | ||
30480 | ||
30481 | optional ( bool cond, argument_type val ) : base(cond,val) {} | |
30482 | ||
30483 | ||
30484 | ||
30485 | ||
30486 | ||
30487 | ||
30488 | ||
30489 | template<class U> | |
30490 | explicit optional ( optional<U> const& rhs ) | |
30491 | : | |
30492 | base() | |
30493 | { | |
30494 | if ( rhs.is_initialized() ) | |
30495 | this->construct(rhs.get()); | |
30496 | } | |
30497 | # 513 "./boost/optional/optional.hpp" | |
30498 | template<class Expr> | |
30499 | explicit optional ( Expr const& expr ) : base(expr,&expr) {} | |
30500 | ||
30501 | ||
30502 | ||
30503 | ||
30504 | optional ( optional const& rhs ) : base(rhs) {} | |
30505 | ||
30506 | ||
30507 | ~optional() {} | |
30508 | ||
30509 | ||
30510 | ||
30511 | ||
30512 | template<class Expr> | |
30513 | optional& operator= ( Expr expr ) | |
30514 | { | |
30515 | this->assign_expr(expr,&expr); | |
30516 | return *this ; | |
30517 | } | |
30518 | ||
30519 | ||
30520 | ||
30521 | ||
30522 | ||
30523 | ||
30524 | ||
30525 | template<class U> | |
30526 | optional& operator= ( optional<U> const& rhs ) | |
30527 | { | |
30528 | this->assign(rhs); | |
30529 | return *this ; | |
30530 | } | |
30531 | ||
30532 | ||
30533 | ||
30534 | ||
30535 | ||
30536 | optional& operator= ( optional const& rhs ) | |
30537 | { | |
30538 | this->assign( rhs ) ; | |
30539 | return *this ; | |
30540 | } | |
30541 | ||
30542 | ||
30543 | ||
30544 | optional& operator= ( argument_type val ) | |
30545 | { | |
30546 | this->assign( val ) ; | |
30547 | return *this ; | |
30548 | } | |
30549 | ||
30550 | ||
30551 | ||
30552 | ||
30553 | optional& operator= ( none_t none_ ) | |
30554 | { | |
30555 | this->assign( none_ ) ; | |
30556 | return *this ; | |
30557 | } | |
30558 | ||
30559 | ||
30560 | ||
30561 | ||
30562 | reference_const_type get() const { (static_cast<void> ((this->is_initialized()) ? 0 : (__assert ("this->is_initialized()", "./boost/optional/optional.hpp", 577, __PRETTY_FUNCTION__), 0))) ; return this->get_impl(); } | |
30563 | reference_type get() { (static_cast<void> ((this->is_initialized()) ? 0 : (__assert ("this->is_initialized()", "./boost/optional/optional.hpp", 578, __PRETTY_FUNCTION__), 0))) ; return this->get_impl(); } | |
30564 | ||
30565 | ||
30566 | reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } | |
30567 | reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } | |
30568 | ||
30569 | ||
30570 | ||
30571 | ||
30572 | pointer_const_type operator->() const { (static_cast<void> ((this->is_initialized()) ? 0 : (__assert ("this->is_initialized()", "./boost/optional/optional.hpp", 587, __PRETTY_FUNCTION__), 0))) ; return this->get_ptr_impl() ; } | |
30573 | pointer_type operator->() { (static_cast<void> ((this->is_initialized()) ? 0 : (__assert ("this->is_initialized()", "./boost/optional/optional.hpp", 588, __PRETTY_FUNCTION__), 0))) ; return this->get_ptr_impl() ; } | |
30574 | ||
30575 | ||
30576 | ||
30577 | ||
30578 | reference_const_type operator *() const { return this->get() ; } | |
30579 | reference_type operator *() { return this->get() ; } | |
30580 | ||
30581 | ||
30582 | ||
30583 | operator unspecified_bool_type() const { return this->safe_bool() ; } | |
30584 | ||
30585 | ||
30586 | ||
30587 | bool operator!() const { return !this->is_initialized() ; } | |
30588 | } ; | |
30589 | ||
30590 | ||
30591 | template<class T> | |
30592 | inline | |
30593 | optional<T> make_optional ( T const& v ) | |
30594 | { | |
30595 | return optional<T>(v); | |
30596 | } | |
30597 | ||
30598 | ||
30599 | template<class T> | |
30600 | inline | |
30601 | optional<T> make_optional ( bool cond, T const& v ) | |
30602 | { | |
30603 | return optional<T>(cond,v); | |
30604 | } | |
30605 | ||
30606 | ||
30607 | ||
30608 | template<class T> | |
30609 | inline | |
30610 | typename optional<T>::reference_const_type | |
30611 | get ( optional<T> const& opt ) | |
30612 | { | |
30613 | return opt.get() ; | |
30614 | } | |
30615 | ||
30616 | template<class T> | |
30617 | inline | |
30618 | typename optional<T>::reference_type | |
30619 | get ( optional<T>& opt ) | |
30620 | { | |
30621 | return opt.get() ; | |
30622 | } | |
30623 | ||
30624 | ||
30625 | ||
30626 | template<class T> | |
30627 | inline | |
30628 | typename optional<T>::pointer_const_type | |
30629 | get ( optional<T> const* opt ) | |
30630 | { | |
30631 | return opt->get_ptr() ; | |
30632 | } | |
30633 | ||
30634 | template<class T> | |
30635 | inline | |
30636 | typename optional<T>::pointer_type | |
30637 | get ( optional<T>* opt ) | |
30638 | { | |
30639 | return opt->get_ptr() ; | |
30640 | } | |
30641 | ||
30642 | ||
30643 | ||
30644 | template<class T> | |
30645 | inline | |
30646 | typename optional<T>::reference_const_type | |
30647 | get_optional_value_or ( optional<T> const& opt, typename optional<T>::reference_const_type v ) | |
30648 | { | |
30649 | return opt.get_value_or(v) ; | |
30650 | } | |
30651 | ||
30652 | template<class T> | |
30653 | inline | |
30654 | typename optional<T>::reference_type | |
30655 | get_optional_value_or ( optional<T>& opt, typename optional<T>::reference_type v ) | |
30656 | { | |
30657 | return opt.get_value_or(v) ; | |
30658 | } | |
30659 | ||
30660 | ||
30661 | ||
30662 | template<class T> | |
30663 | inline | |
30664 | typename optional<T>::pointer_const_type | |
30665 | get_pointer ( optional<T> const& opt ) | |
30666 | { | |
30667 | return opt.get_ptr() ; | |
30668 | } | |
30669 | ||
30670 | template<class T> | |
30671 | inline | |
30672 | typename optional<T>::pointer_type | |
30673 | get_pointer ( optional<T>& opt ) | |
30674 | { | |
30675 | return opt.get_ptr() ; | |
30676 | } | |
30677 | # 701 "./boost/optional/optional.hpp" | |
30678 | template<class T> | |
30679 | inline | |
30680 | bool operator == ( optional<T> const& x, optional<T> const& y ) | |
30681 | { return equal_pointees(x,y); } | |
30682 | ||
30683 | template<class T> | |
30684 | inline | |
30685 | bool operator < ( optional<T> const& x, optional<T> const& y ) | |
30686 | { return less_pointees(x,y); } | |
30687 | ||
30688 | template<class T> | |
30689 | inline | |
30690 | bool operator != ( optional<T> const& x, optional<T> const& y ) | |
30691 | { return !( x == y ) ; } | |
30692 | ||
30693 | template<class T> | |
30694 | inline | |
30695 | bool operator > ( optional<T> const& x, optional<T> const& y ) | |
30696 | { return y < x ; } | |
30697 | ||
30698 | template<class T> | |
30699 | inline | |
30700 | bool operator <= ( optional<T> const& x, optional<T> const& y ) | |
30701 | { return !( y < x ) ; } | |
30702 | ||
30703 | template<class T> | |
30704 | inline | |
30705 | bool operator >= ( optional<T> const& x, optional<T> const& y ) | |
30706 | { return !( x < y ) ; } | |
30707 | ||
30708 | ||
30709 | ||
30710 | ||
30711 | ||
30712 | template<class T> | |
30713 | inline | |
30714 | bool operator == ( optional<T> const& x, T const& y ) | |
30715 | { return equal_pointees(x, optional<T>(y)); } | |
30716 | ||
30717 | template<class T> | |
30718 | inline | |
30719 | bool operator < ( optional<T> const& x, T const& y ) | |
30720 | { return less_pointees(x, optional<T>(y)); } | |
30721 | ||
30722 | template<class T> | |
30723 | inline | |
30724 | bool operator != ( optional<T> const& x, T const& y ) | |
30725 | { return !( x == y ) ; } | |
30726 | ||
30727 | template<class T> | |
30728 | inline | |
30729 | bool operator > ( optional<T> const& x, T const& y ) | |
30730 | { return y < x ; } | |
30731 | ||
30732 | template<class T> | |
30733 | inline | |
30734 | bool operator <= ( optional<T> const& x, T const& y ) | |
30735 | { return !( y < x ) ; } | |
30736 | ||
30737 | template<class T> | |
30738 | inline | |
30739 | bool operator >= ( optional<T> const& x, T const& y ) | |
30740 | { return !( x < y ) ; } | |
30741 | ||
30742 | ||
30743 | ||
30744 | ||
30745 | ||
30746 | template<class T> | |
30747 | inline | |
30748 | bool operator == ( T const& x, optional<T> const& y ) | |
30749 | { return equal_pointees( optional<T>(x), y ); } | |
30750 | ||
30751 | template<class T> | |
30752 | inline | |
30753 | bool operator < ( T const& x, optional<T> const& y ) | |
30754 | { return less_pointees( optional<T>(x), y ); } | |
30755 | ||
30756 | template<class T> | |
30757 | inline | |
30758 | bool operator != ( T const& x, optional<T> const& y ) | |
30759 | { return !( x == y ) ; } | |
30760 | ||
30761 | template<class T> | |
30762 | inline | |
30763 | bool operator > ( T const& x, optional<T> const& y ) | |
30764 | { return y < x ; } | |
30765 | ||
30766 | template<class T> | |
30767 | inline | |
30768 | bool operator <= ( T const& x, optional<T> const& y ) | |
30769 | { return !( y < x ) ; } | |
30770 | ||
30771 | template<class T> | |
30772 | inline | |
30773 | bool operator >= ( T const& x, optional<T> const& y ) | |
30774 | { return !( x < y ) ; } | |
30775 | ||
30776 | ||
30777 | ||
30778 | ||
30779 | ||
30780 | ||
30781 | template<class T> | |
30782 | inline | |
30783 | bool operator == ( optional<T> const& x, none_t ) | |
30784 | { return equal_pointees(x, optional<T>() ); } | |
30785 | ||
30786 | template<class T> | |
30787 | inline | |
30788 | bool operator < ( optional<T> const& x, none_t ) | |
30789 | { return less_pointees(x,optional<T>() ); } | |
30790 | ||
30791 | template<class T> | |
30792 | inline | |
30793 | bool operator != ( optional<T> const& x, none_t y ) | |
30794 | { return !( x == y ) ; } | |
30795 | ||
30796 | template<class T> | |
30797 | inline | |
30798 | bool operator > ( optional<T> const& x, none_t y ) | |
30799 | { return y < x ; } | |
30800 | ||
30801 | template<class T> | |
30802 | inline | |
30803 | bool operator <= ( optional<T> const& x, none_t y ) | |
30804 | { return !( y < x ) ; } | |
30805 | ||
30806 | template<class T> | |
30807 | inline | |
30808 | bool operator >= ( optional<T> const& x, none_t y ) | |
30809 | { return !( x < y ) ; } | |
30810 | ||
30811 | ||
30812 | ||
30813 | ||
30814 | ||
30815 | template<class T> | |
30816 | inline | |
30817 | bool operator == ( none_t x, optional<T> const& y ) | |
30818 | { return equal_pointees(optional<T>() ,y); } | |
30819 | ||
30820 | template<class T> | |
30821 | inline | |
30822 | bool operator < ( none_t x, optional<T> const& y ) | |
30823 | { return less_pointees(optional<T>() ,y); } | |
30824 | ||
30825 | template<class T> | |
30826 | inline | |
30827 | bool operator != ( none_t x, optional<T> const& y ) | |
30828 | { return !( x == y ) ; } | |
30829 | ||
30830 | template<class T> | |
30831 | inline | |
30832 | bool operator > ( none_t x, optional<T> const& y ) | |
30833 | { return y < x ; } | |
30834 | ||
30835 | template<class T> | |
30836 | inline | |
30837 | bool operator <= ( none_t x, optional<T> const& y ) | |
30838 | { return !( y < x ) ; } | |
30839 | ||
30840 | template<class T> | |
30841 | inline | |
30842 | bool operator >= ( none_t x, optional<T> const& y ) | |
30843 | { return !( x < y ) ; } | |
30844 | ||
30845 | ||
30846 | ||
30847 | ||
30848 | ||
30849 | namespace optional_detail { | |
30850 | # 886 "./boost/optional/optional.hpp" | |
30851 | template<class T> | |
30852 | inline | |
30853 | void optional_swap ( optional<T>& x, optional<T>& y ) | |
30854 | { | |
30855 | if ( !x && !!y ) | |
30856 | { | |
30857 | x.reset(*y); | |
30858 | y.reset(); | |
30859 | } | |
30860 | else if ( !!x && !y ) | |
30861 | { | |
30862 | y.reset(*x); | |
30863 | x.reset(); | |
30864 | } | |
30865 | else if ( !!x && !!y ) | |
30866 | { | |
30867 | ||
30868 | ||
30869 | ||
30870 | using std::swap ; | |
30871 | ||
30872 | swap(*x,*y); | |
30873 | } | |
30874 | } | |
30875 | ||
30876 | } | |
30877 | ||
30878 | template<class T> inline void swap ( optional<T>& x, optional<T>& y ) | |
30879 | { | |
30880 | optional_detail::optional_swap(x,y); | |
30881 | } | |
30882 | ||
30883 | ||
30884 | } | |
30885 | # 16 "./boost/optional.hpp" 2 | |
30886 | # 21 "./boost/format/internals.hpp" 2 | |
30887 | # 1 "./boost/limits.hpp" 1 | |
30888 | # 22 "./boost/format/internals.hpp" 2 | |
30889 | ||
30890 | # 1 "./boost/format/alt_sstream.hpp" 1 | |
30891 | # 20 "./boost/format/alt_sstream.hpp" | |
30892 | # 1 "./boost/utility/base_from_member.hpp" 1 | |
30893 | # 14 "./boost/utility/base_from_member.hpp" | |
30894 | # 1 "./boost/preprocessor/repetition/enum_binary_params.hpp" 1 | |
30895 | # 15 "./boost/utility/base_from_member.hpp" 2 | |
30896 | # 1 "./boost/preprocessor/repetition/enum_params.hpp" 1 | |
30897 | # 16 "./boost/utility/base_from_member.hpp" 2 | |
30898 | # 1 "./boost/preprocessor/repetition/repeat_from_to.hpp" 1 | |
30899 | # 23 "./boost/preprocessor/repetition/repeat_from_to.hpp" | |
30900 | # 1 "./boost/preprocessor/detail/auto_rec.hpp" 1 | |
30901 | # 24 "./boost/preprocessor/repetition/repeat_from_to.hpp" 2 | |
30902 | # 17 "./boost/utility/base_from_member.hpp" 2 | |
30903 | # 53 "./boost/utility/base_from_member.hpp" | |
30904 | namespace boost | |
30905 | { | |
30906 | # 65 "./boost/utility/base_from_member.hpp" | |
30907 | template < typename MemberType, int UniqueID = 0 > | |
30908 | class base_from_member | |
30909 | { | |
30910 | protected: | |
30911 | MemberType member; | |
30912 | ||
30913 | base_from_member() | |
30914 | : member() | |
30915 | {} | |
30916 | ||
30917 | template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {} template < typename T0 , typename T1 > explicit base_from_member( T0 x0 , T1 x1 ) : member( x0 , x1 ) {} template < typename T0 , typename T1 , typename T2 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 ) : member( x0 , x1 , x2 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 ) : member( x0 , x1 , x2 , x3 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 ) : member( x0 , x1 , x2 , x3 , x4 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 ) : member( x0 , x1 , x2 , x3 , x4 , x5 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 , T9 x9 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 ) {} | |
30918 | ||
30919 | ||
30920 | }; | |
30921 | ||
30922 | } | |
30923 | # 21 "./boost/format/alt_sstream.hpp" 2 | |
30924 | # 1 "./boost/shared_ptr.hpp" 1 | |
30925 | # 25 "./boost/shared_ptr.hpp" | |
30926 | # 1 "./boost/assert.hpp" 1 | |
30927 | # 36 "./boost/assert.hpp" | |
30928 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 1 3 4 | |
30929 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 3 4 | |
30930 | extern "C" { | |
30931 | ||
30932 | ||
30933 | extern void __assert (const char *, const char *, int, const char *); | |
30934 | ||
30935 | } | |
30936 | # 37 "./boost/assert.hpp" 2 | |
30937 | # 26 "./boost/shared_ptr.hpp" 2 | |
30938 | # 1 "./boost/checked_delete.hpp" 1 | |
30939 | # 24 "./boost/checked_delete.hpp" | |
30940 | namespace boost | |
30941 | { | |
30942 | ||
30943 | ||
30944 | ||
30945 | template<class T> inline void checked_delete(T * x) | |
30946 | { | |
30947 | ||
30948 | typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; | |
30949 | (void) sizeof(type_must_be_complete); | |
30950 | delete x; | |
30951 | } | |
30952 | ||
30953 | template<class T> inline void checked_array_delete(T * x) | |
30954 | { | |
30955 | typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; | |
30956 | (void) sizeof(type_must_be_complete); | |
30957 | delete [] x; | |
30958 | } | |
30959 | ||
30960 | template<class T> struct checked_deleter | |
30961 | { | |
30962 | typedef void result_type; | |
30963 | typedef T * argument_type; | |
30964 | ||
30965 | void operator()(T * x) const | |
30966 | { | |
30967 | ||
30968 | boost::checked_delete(x); | |
30969 | } | |
30970 | }; | |
30971 | ||
30972 | template<class T> struct checked_array_deleter | |
30973 | { | |
30974 | typedef void result_type; | |
30975 | typedef T * argument_type; | |
30976 | ||
30977 | void operator()(T * x) const | |
30978 | { | |
30979 | boost::checked_array_delete(x); | |
30980 | } | |
30981 | }; | |
30982 | ||
30983 | } | |
30984 | # 27 "./boost/shared_ptr.hpp" 2 | |
30985 | # 1 "./boost/throw_exception.hpp" 1 | |
30986 | # 28 "./boost/throw_exception.hpp" | |
30987 | namespace boost | |
30988 | { | |
30989 | ||
30990 | ||
30991 | ||
30992 | ||
30993 | ||
30994 | ||
30995 | ||
30996 | template<class E> inline void throw_exception(E const & e) | |
30997 | { | |
30998 | throw e; | |
30999 | } | |
31000 | ||
31001 | ||
31002 | ||
31003 | } | |
31004 | # 28 "./boost/shared_ptr.hpp" 2 | |
31005 | # 1 "./boost/detail/shared_count.hpp" 1 | |
31006 | # 28 "./boost/detail/shared_count.hpp" | |
31007 | # 1 "./boost/detail/bad_weak_ptr.hpp" 1 | |
31008 | # 26 "./boost/detail/bad_weak_ptr.hpp" | |
31009 | namespace boost | |
31010 | { | |
31011 | # 39 "./boost/detail/bad_weak_ptr.hpp" | |
31012 | class bad_weak_ptr: public std::exception | |
31013 | { | |
31014 | public: | |
31015 | ||
31016 | virtual char const * what() const throw() | |
31017 | { | |
31018 | return "tr1::bad_weak_ptr"; | |
31019 | } | |
31020 | }; | |
31021 | ||
31022 | ||
31023 | ||
31024 | ||
31025 | ||
31026 | } | |
31027 | # 29 "./boost/detail/shared_count.hpp" 2 | |
31028 | # 1 "./boost/detail/sp_counted_base.hpp" 1 | |
31029 | # 56 "./boost/detail/sp_counted_base.hpp" | |
31030 | # 1 "./boost/detail/sp_counted_base_sync.hpp" 1 | |
31031 | # 18 "./boost/detail/sp_counted_base_sync.hpp" | |
31032 | # 1 "./boost/detail/sp_typeinfo.hpp" 1 | |
31033 | # 59 "./boost/detail/sp_typeinfo.hpp" | |
31034 | namespace boost | |
31035 | { | |
31036 | ||
31037 | namespace detail | |
31038 | { | |
31039 | ||
31040 | ||
31041 | ||
31042 | ||
31043 | ||
31044 | ||
31045 | ||
31046 | typedef std::type_info sp_typeinfo; | |
31047 | ||
31048 | ||
31049 | ||
31050 | } | |
31051 | ||
31052 | } | |
31053 | # 19 "./boost/detail/sp_counted_base_sync.hpp" 2 | |
31054 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/limits.h" 1 3 4 | |
31055 | # 20 "./boost/detail/sp_counted_base_sync.hpp" 2 | |
31056 | ||
31057 | namespace boost | |
31058 | { | |
31059 | ||
31060 | namespace detail | |
31061 | { | |
31062 | ||
31063 | ||
31064 | ||
31065 | typedef int sp_int32_t; | |
31066 | ||
31067 | ||
31068 | ||
31069 | ||
31070 | ||
31071 | ||
31072 | ||
31073 | inline void atomic_increment( sp_int32_t * pw ) | |
31074 | { | |
31075 | __sync_fetch_and_add( pw, 1 ); | |
31076 | } | |
31077 | ||
31078 | inline sp_int32_t atomic_decrement( sp_int32_t * pw ) | |
31079 | { | |
31080 | return __sync_fetch_and_add( pw, -1 ); | |
31081 | } | |
31082 | ||
31083 | inline sp_int32_t atomic_conditional_increment( sp_int32_t * pw ) | |
31084 | { | |
31085 | ||
31086 | ||
31087 | ||
31088 | ||
31089 | sp_int32_t r = *pw; | |
31090 | ||
31091 | for( ;; ) | |
31092 | { | |
31093 | if( r == 0 ) | |
31094 | { | |
31095 | return r; | |
31096 | } | |
31097 | ||
31098 | sp_int32_t r2 = __sync_val_compare_and_swap( pw, r, r + 1 ); | |
31099 | ||
31100 | if( r2 == r ) | |
31101 | { | |
31102 | return r; | |
31103 | } | |
31104 | else | |
31105 | { | |
31106 | r = r2; | |
31107 | } | |
31108 | } | |
31109 | } | |
31110 | ||
31111 | class sp_counted_base | |
31112 | { | |
31113 | private: | |
31114 | ||
31115 | sp_counted_base( sp_counted_base const & ); | |
31116 | sp_counted_base & operator= ( sp_counted_base const & ); | |
31117 | ||
31118 | sp_int32_t use_count_; | |
31119 | sp_int32_t weak_count_; | |
31120 | ||
31121 | public: | |
31122 | ||
31123 | sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) | |
31124 | { | |
31125 | } | |
31126 | ||
31127 | virtual ~sp_counted_base() | |
31128 | { | |
31129 | } | |
31130 | ||
31131 | ||
31132 | ||
31133 | ||
31134 | virtual void dispose() = 0; | |
31135 | ||
31136 | ||
31137 | ||
31138 | virtual void destroy() | |
31139 | { | |
31140 | delete this; | |
31141 | } | |
31142 | ||
31143 | virtual void * get_deleter( sp_typeinfo const & ti ) = 0; | |
31144 | ||
31145 | void add_ref_copy() | |
31146 | { | |
31147 | atomic_increment( &use_count_ ); | |
31148 | } | |
31149 | ||
31150 | bool add_ref_lock() | |
31151 | { | |
31152 | return atomic_conditional_increment( &use_count_ ) != 0; | |
31153 | } | |
31154 | ||
31155 | void release() | |
31156 | { | |
31157 | if( atomic_decrement( &use_count_ ) == 1 ) | |
31158 | { | |
31159 | dispose(); | |
31160 | weak_release(); | |
31161 | } | |
31162 | } | |
31163 | ||
31164 | void weak_add_ref() | |
31165 | { | |
31166 | atomic_increment( &weak_count_ ); | |
31167 | } | |
31168 | ||
31169 | void weak_release() | |
31170 | { | |
31171 | if( atomic_decrement( &weak_count_ ) == 1 ) | |
31172 | { | |
31173 | destroy(); | |
31174 | } | |
31175 | } | |
31176 | ||
31177 | long use_count() const | |
31178 | { | |
31179 | return const_cast< sp_int32_t const volatile & >( use_count_ ); | |
31180 | } | |
31181 | }; | |
31182 | ||
31183 | } | |
31184 | ||
31185 | } | |
31186 | # 57 "./boost/detail/sp_counted_base.hpp" 2 | |
31187 | # 30 "./boost/detail/shared_count.hpp" 2 | |
31188 | # 1 "./boost/detail/sp_counted_impl.hpp" 1 | |
31189 | # 40 "./boost/detail/sp_counted_impl.hpp" | |
31190 | namespace boost | |
31191 | { | |
31192 | # 50 "./boost/detail/sp_counted_impl.hpp" | |
31193 | namespace detail | |
31194 | { | |
31195 | ||
31196 | template<class X> class sp_counted_impl_p: public sp_counted_base | |
31197 | { | |
31198 | private: | |
31199 | ||
31200 | X * px_; | |
31201 | ||
31202 | sp_counted_impl_p( sp_counted_impl_p const & ); | |
31203 | sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); | |
31204 | ||
31205 | typedef sp_counted_impl_p<X> this_type; | |
31206 | ||
31207 | public: | |
31208 | ||
31209 | explicit sp_counted_impl_p( X * px ): px_( px ) | |
31210 | { | |
31211 | ||
31212 | ||
31213 | ||
31214 | } | |
31215 | ||
31216 | virtual void dispose() | |
31217 | { | |
31218 | ||
31219 | ||
31220 | ||
31221 | boost::checked_delete( px_ ); | |
31222 | } | |
31223 | ||
31224 | virtual void * get_deleter( detail::sp_typeinfo const & ) | |
31225 | { | |
31226 | return 0; | |
31227 | } | |
31228 | # 113 "./boost/detail/sp_counted_impl.hpp" | |
31229 | }; | |
31230 | # 122 "./boost/detail/sp_counted_impl.hpp" | |
31231 | template<class P, class D> class sp_counted_impl_pd: public sp_counted_base | |
31232 | { | |
31233 | private: | |
31234 | ||
31235 | P ptr; | |
31236 | D del; | |
31237 | ||
31238 | sp_counted_impl_pd( sp_counted_impl_pd const & ); | |
31239 | sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); | |
31240 | ||
31241 | typedef sp_counted_impl_pd<P, D> this_type; | |
31242 | ||
31243 | public: | |
31244 | ||
31245 | ||
31246 | ||
31247 | sp_counted_impl_pd( P p, D d ): ptr(p), del(d) | |
31248 | { | |
31249 | } | |
31250 | ||
31251 | virtual void dispose() | |
31252 | { | |
31253 | del( ptr ); | |
31254 | } | |
31255 | ||
31256 | virtual void * get_deleter( detail::sp_typeinfo const & ti ) | |
31257 | { | |
31258 | return ti == typeid(D)? &reinterpret_cast<char&>( del ): 0; | |
31259 | } | |
31260 | # 179 "./boost/detail/sp_counted_impl.hpp" | |
31261 | }; | |
31262 | ||
31263 | template<class P, class D, class A> class sp_counted_impl_pda: public sp_counted_base | |
31264 | { | |
31265 | private: | |
31266 | ||
31267 | P p_; | |
31268 | D d_; | |
31269 | A a_; | |
31270 | ||
31271 | sp_counted_impl_pda( sp_counted_impl_pda const & ); | |
31272 | sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); | |
31273 | ||
31274 | typedef sp_counted_impl_pda<P, D, A> this_type; | |
31275 | ||
31276 | public: | |
31277 | ||
31278 | ||
31279 | ||
31280 | sp_counted_impl_pda( P p, D d, A a ): p_( p ), d_( d ), a_( a ) | |
31281 | { | |
31282 | } | |
31283 | ||
31284 | virtual void dispose() | |
31285 | { | |
31286 | d_( p_ ); | |
31287 | } | |
31288 | ||
31289 | virtual void destroy() | |
31290 | { | |
31291 | typedef typename A::template rebind< this_type >::other A2; | |
31292 | ||
31293 | A2 a2( a_ ); | |
31294 | ||
31295 | this->~this_type(); | |
31296 | a2.deallocate( this, 1 ); | |
31297 | } | |
31298 | ||
31299 | virtual void * get_deleter( detail::sp_typeinfo const & ti ) | |
31300 | { | |
31301 | return ti == typeid(D)? &reinterpret_cast<char&>( d_ ): 0; | |
31302 | } | |
31303 | }; | |
31304 | ||
31305 | ||
31306 | ||
31307 | ||
31308 | ||
31309 | } | |
31310 | ||
31311 | } | |
31312 | # 31 "./boost/detail/shared_count.hpp" 2 | |
31313 | ||
31314 | ||
31315 | ||
31316 | ||
31317 | ||
31318 | namespace boost | |
31319 | { | |
31320 | ||
31321 | namespace detail | |
31322 | { | |
31323 | # 49 "./boost/detail/shared_count.hpp" | |
31324 | class weak_count; | |
31325 | ||
31326 | class shared_count | |
31327 | { | |
31328 | private: | |
31329 | ||
31330 | sp_counted_base * pi_; | |
31331 | ||
31332 | ||
31333 | ||
31334 | ||
31335 | ||
31336 | friend class weak_count; | |
31337 | ||
31338 | public: | |
31339 | ||
31340 | shared_count(): pi_(0) | |
31341 | ||
31342 | ||
31343 | ||
31344 | { | |
31345 | } | |
31346 | ||
31347 | template<class Y> explicit shared_count( Y * p ): pi_( 0 ) | |
31348 | ||
31349 | ||
31350 | ||
31351 | { | |
31352 | ||
31353 | ||
31354 | try | |
31355 | { | |
31356 | pi_ = new sp_counted_impl_p<Y>( p ); | |
31357 | } | |
31358 | catch(...) | |
31359 | { | |
31360 | boost::checked_delete( p ); | |
31361 | throw; | |
31362 | } | |
31363 | # 100 "./boost/detail/shared_count.hpp" | |
31364 | } | |
31365 | ||
31366 | template<class P, class D> shared_count(P p, D d): pi_(0) | |
31367 | ||
31368 | ||
31369 | ||
31370 | { | |
31371 | ||
31372 | ||
31373 | try | |
31374 | { | |
31375 | pi_ = new sp_counted_impl_pd<P, D>(p, d); | |
31376 | } | |
31377 | catch(...) | |
31378 | { | |
31379 | d(p); | |
31380 | throw; | |
31381 | } | |
31382 | # 130 "./boost/detail/shared_count.hpp" | |
31383 | } | |
31384 | ||
31385 | template<class P, class D, class A> shared_count( P p, D d, A a ): pi_( 0 ) | |
31386 | ||
31387 | ||
31388 | ||
31389 | { | |
31390 | typedef sp_counted_impl_pda<P, D, A> impl_type; | |
31391 | typedef typename A::template rebind< impl_type >::other A2; | |
31392 | ||
31393 | A2 a2( a ); | |
31394 | ||
31395 | ||
31396 | ||
31397 | try | |
31398 | { | |
31399 | pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); | |
31400 | new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); | |
31401 | } | |
31402 | catch(...) | |
31403 | { | |
31404 | d( p ); | |
31405 | ||
31406 | if( pi_ != 0 ) | |
31407 | { | |
31408 | a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); | |
31409 | } | |
31410 | ||
31411 | throw; | |
31412 | } | |
31413 | # 176 "./boost/detail/shared_count.hpp" | |
31414 | } | |
31415 | ||
31416 | ||
31417 | ||
31418 | ||
31419 | ||
31420 | template<class Y> | |
31421 | explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) ) | |
31422 | ||
31423 | ||
31424 | ||
31425 | { | |
31426 | # 197 "./boost/detail/shared_count.hpp" | |
31427 | r.release(); | |
31428 | } | |
31429 | ||
31430 | ||
31431 | ||
31432 | ~shared_count() | |
31433 | { | |
31434 | if( pi_ != 0 ) pi_->release(); | |
31435 | ||
31436 | ||
31437 | ||
31438 | } | |
31439 | ||
31440 | shared_count(shared_count const & r): pi_(r.pi_) | |
31441 | ||
31442 | ||
31443 | ||
31444 | { | |
31445 | if( pi_ != 0 ) pi_->add_ref_copy(); | |
31446 | } | |
31447 | ||
31448 | explicit shared_count(weak_count const & r); | |
31449 | ||
31450 | shared_count & operator= (shared_count const & r) | |
31451 | { | |
31452 | sp_counted_base * tmp = r.pi_; | |
31453 | ||
31454 | if( tmp != pi_ ) | |
31455 | { | |
31456 | if( tmp != 0 ) tmp->add_ref_copy(); | |
31457 | if( pi_ != 0 ) pi_->release(); | |
31458 | pi_ = tmp; | |
31459 | } | |
31460 | ||
31461 | return *this; | |
31462 | } | |
31463 | ||
31464 | void swap(shared_count & r) | |
31465 | { | |
31466 | sp_counted_base * tmp = r.pi_; | |
31467 | r.pi_ = pi_; | |
31468 | pi_ = tmp; | |
31469 | } | |
31470 | ||
31471 | long use_count() const | |
31472 | { | |
31473 | return pi_ != 0? pi_->use_count(): 0; | |
31474 | } | |
31475 | ||
31476 | bool unique() const | |
31477 | { | |
31478 | return use_count() == 1; | |
31479 | } | |
31480 | ||
31481 | friend inline bool operator==(shared_count const & a, shared_count const & b) | |
31482 | { | |
31483 | return a.pi_ == b.pi_; | |
31484 | } | |
31485 | ||
31486 | friend inline bool operator<(shared_count const & a, shared_count const & b) | |
31487 | { | |
31488 | return std::less<sp_counted_base *>()( a.pi_, b.pi_ ); | |
31489 | } | |
31490 | ||
31491 | void * get_deleter( sp_typeinfo const & ti ) const | |
31492 | { | |
31493 | return pi_? pi_->get_deleter( ti ): 0; | |
31494 | } | |
31495 | }; | |
31496 | ||
31497 | ||
31498 | class weak_count | |
31499 | { | |
31500 | private: | |
31501 | ||
31502 | sp_counted_base * pi_; | |
31503 | ||
31504 | ||
31505 | ||
31506 | ||
31507 | ||
31508 | friend class shared_count; | |
31509 | ||
31510 | public: | |
31511 | ||
31512 | weak_count(): pi_(0) | |
31513 | ||
31514 | ||
31515 | ||
31516 | { | |
31517 | } | |
31518 | ||
31519 | weak_count(shared_count const & r): pi_(r.pi_) | |
31520 | ||
31521 | ||
31522 | ||
31523 | { | |
31524 | if(pi_ != 0) pi_->weak_add_ref(); | |
31525 | } | |
31526 | ||
31527 | weak_count(weak_count const & r): pi_(r.pi_) | |
31528 | ||
31529 | ||
31530 | ||
31531 | { | |
31532 | if(pi_ != 0) pi_->weak_add_ref(); | |
31533 | } | |
31534 | ||
31535 | ~weak_count() | |
31536 | { | |
31537 | if(pi_ != 0) pi_->weak_release(); | |
31538 | ||
31539 | ||
31540 | ||
31541 | } | |
31542 | ||
31543 | weak_count & operator= (shared_count const & r) | |
31544 | { | |
31545 | sp_counted_base * tmp = r.pi_; | |
31546 | if(tmp != 0) tmp->weak_add_ref(); | |
31547 | if(pi_ != 0) pi_->weak_release(); | |
31548 | pi_ = tmp; | |
31549 | ||
31550 | return *this; | |
31551 | } | |
31552 | ||
31553 | weak_count & operator= (weak_count const & r) | |
31554 | { | |
31555 | sp_counted_base * tmp = r.pi_; | |
31556 | if(tmp != 0) tmp->weak_add_ref(); | |
31557 | if(pi_ != 0) pi_->weak_release(); | |
31558 | pi_ = tmp; | |
31559 | ||
31560 | return *this; | |
31561 | } | |
31562 | ||
31563 | void swap(weak_count & r) | |
31564 | { | |
31565 | sp_counted_base * tmp = r.pi_; | |
31566 | r.pi_ = pi_; | |
31567 | pi_ = tmp; | |
31568 | } | |
31569 | ||
31570 | long use_count() const | |
31571 | { | |
31572 | return pi_ != 0? pi_->use_count(): 0; | |
31573 | } | |
31574 | ||
31575 | friend inline bool operator==(weak_count const & a, weak_count const & b) | |
31576 | { | |
31577 | return a.pi_ == b.pi_; | |
31578 | } | |
31579 | ||
31580 | friend inline bool operator<(weak_count const & a, weak_count const & b) | |
31581 | { | |
31582 | return std::less<sp_counted_base *>()(a.pi_, b.pi_); | |
31583 | } | |
31584 | }; | |
31585 | ||
31586 | inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) | |
31587 | ||
31588 | ||
31589 | ||
31590 | { | |
31591 | if( pi_ == 0 || !pi_->add_ref_lock() ) | |
31592 | { | |
31593 | boost::throw_exception( boost::bad_weak_ptr() ); | |
31594 | } | |
31595 | } | |
31596 | ||
31597 | } | |
31598 | ||
31599 | } | |
31600 | # 29 "./boost/shared_ptr.hpp" 2 | |
31601 | # 41 "./boost/shared_ptr.hpp" | |
31602 | namespace boost | |
31603 | { | |
31604 | ||
31605 | template<class T> class weak_ptr; | |
31606 | template<class T> class enable_shared_from_this; | |
31607 | ||
31608 | namespace detail | |
31609 | { | |
31610 | ||
31611 | struct static_cast_tag {}; | |
31612 | struct const_cast_tag {}; | |
31613 | struct dynamic_cast_tag {}; | |
31614 | struct polymorphic_cast_tag {}; | |
31615 | ||
31616 | template<class T> struct shared_ptr_traits | |
31617 | { | |
31618 | typedef T & reference; | |
31619 | }; | |
31620 | ||
31621 | template<> struct shared_ptr_traits<void> | |
31622 | { | |
31623 | typedef void reference; | |
31624 | }; | |
31625 | ||
31626 | ||
31627 | ||
31628 | template<> struct shared_ptr_traits<void const> | |
31629 | { | |
31630 | typedef void reference; | |
31631 | }; | |
31632 | ||
31633 | template<> struct shared_ptr_traits<void volatile> | |
31634 | { | |
31635 | typedef void reference; | |
31636 | }; | |
31637 | ||
31638 | template<> struct shared_ptr_traits<void const volatile> | |
31639 | { | |
31640 | typedef void reference; | |
31641 | }; | |
31642 | ||
31643 | ||
31644 | ||
31645 | ||
31646 | ||
31647 | template<class T, class Y> void sp_enable_shared_from_this( shared_count const & pn, boost::enable_shared_from_this<T> const * pe, Y const * px ) | |
31648 | { | |
31649 | if(pe != 0) pe->_internal_weak_this._internal_assign(const_cast<Y*>(px), pn); | |
31650 | } | |
31651 | # 111 "./boost/shared_ptr.hpp" | |
31652 | inline void sp_enable_shared_from_this( shared_count const & , ... ) | |
31653 | { | |
31654 | } | |
31655 | # 125 "./boost/shared_ptr.hpp" | |
31656 | template< class T, class R > struct sp_enable_if_auto_ptr | |
31657 | { | |
31658 | }; | |
31659 | ||
31660 | template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > | |
31661 | { | |
31662 | typedef R type; | |
31663 | }; | |
31664 | ||
31665 | ||
31666 | ||
31667 | } | |
31668 | # 147 "./boost/shared_ptr.hpp" | |
31669 | template<class T> class shared_ptr | |
31670 | { | |
31671 | private: | |
31672 | ||
31673 | ||
31674 | typedef shared_ptr<T> this_type; | |
31675 | ||
31676 | public: | |
31677 | ||
31678 | typedef T element_type; | |
31679 | typedef T value_type; | |
31680 | typedef T * pointer; | |
31681 | typedef typename boost::detail::shared_ptr_traits<T>::reference reference; | |
31682 | ||
31683 | shared_ptr(): px(0), pn() | |
31684 | { | |
31685 | } | |
31686 | ||
31687 | template<class Y> | |
31688 | explicit shared_ptr( Y * p ): px( p ), pn( p ) | |
31689 | { | |
31690 | boost::detail::sp_enable_shared_from_this( pn, p, p ); | |
31691 | } | |
31692 | ||
31693 | ||
31694 | ||
31695 | ||
31696 | ||
31697 | ||
31698 | ||
31699 | template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d) | |
31700 | { | |
31701 | boost::detail::sp_enable_shared_from_this( pn, p, p ); | |
31702 | } | |
31703 | ||
31704 | ||
31705 | ||
31706 | template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) | |
31707 | { | |
31708 | boost::detail::sp_enable_shared_from_this( pn, p, p ); | |
31709 | } | |
31710 | ||
31711 | ||
31712 | ||
31713 | ||
31714 | ||
31715 | ||
31716 | shared_ptr & operator=(shared_ptr const & r) | |
31717 | { | |
31718 | px = r.px; | |
31719 | pn = r.pn; | |
31720 | return *this; | |
31721 | } | |
31722 | ||
31723 | ||
31724 | ||
31725 | template<class Y> | |
31726 | explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) | |
31727 | { | |
31728 | ||
31729 | px = r.px; | |
31730 | } | |
31731 | ||
31732 | template<class Y> | |
31733 | shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) | |
31734 | { | |
31735 | } | |
31736 | ||
31737 | ||
31738 | template< class Y > | |
31739 | shared_ptr( shared_ptr<Y> const & r, T * p ): px( p ), pn( r.pn ) | |
31740 | { | |
31741 | } | |
31742 | ||
31743 | template<class Y> | |
31744 | shared_ptr(shared_ptr<Y> const & r, boost::detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn) | |
31745 | { | |
31746 | } | |
31747 | ||
31748 | template<class Y> | |
31749 | shared_ptr(shared_ptr<Y> const & r, boost::detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn) | |
31750 | { | |
31751 | } | |
31752 | ||
31753 | template<class Y> | |
31754 | shared_ptr(shared_ptr<Y> const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) | |
31755 | { | |
31756 | if(px == 0) | |
31757 | { | |
31758 | pn = boost::detail::shared_count(); | |
31759 | } | |
31760 | } | |
31761 | ||
31762 | template<class Y> | |
31763 | shared_ptr(shared_ptr<Y> const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) | |
31764 | { | |
31765 | if(px == 0) | |
31766 | { | |
31767 | boost::throw_exception(std::bad_cast()); | |
31768 | } | |
31769 | } | |
31770 | ||
31771 | ||
31772 | ||
31773 | template<class Y> | |
31774 | explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn() | |
31775 | { | |
31776 | Y * tmp = r.get(); | |
31777 | pn = boost::detail::shared_count(r); | |
31778 | boost::detail::sp_enable_shared_from_this( pn, tmp, tmp ); | |
31779 | } | |
31780 | ||
31781 | ||
31782 | ||
31783 | template<class Ap> | |
31784 | shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn() | |
31785 | { | |
31786 | typename Ap::element_type * tmp = r.get(); | |
31787 | pn = boost::detail::shared_count( r ); | |
31788 | boost::detail::sp_enable_shared_from_this( pn, tmp, tmp ); | |
31789 | } | |
31790 | # 276 "./boost/shared_ptr.hpp" | |
31791 | template<class Y> | |
31792 | shared_ptr & operator=(shared_ptr<Y> const & r) | |
31793 | { | |
31794 | px = r.px; | |
31795 | pn = r.pn; | |
31796 | return *this; | |
31797 | } | |
31798 | ||
31799 | ||
31800 | ||
31801 | ||
31802 | ||
31803 | template<class Y> | |
31804 | shared_ptr & operator=( std::auto_ptr<Y> & r ) | |
31805 | { | |
31806 | this_type(r).swap(*this); | |
31807 | return *this; | |
31808 | } | |
31809 | ||
31810 | ||
31811 | ||
31812 | template<class Ap> | |
31813 | typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) | |
31814 | { | |
31815 | this_type( r ).swap( *this ); | |
31816 | return *this; | |
31817 | } | |
31818 | # 341 "./boost/shared_ptr.hpp" | |
31819 | void reset() | |
31820 | { | |
31821 | this_type().swap(*this); | |
31822 | } | |
31823 | ||
31824 | template<class Y> void reset(Y * p) | |
31825 | { | |
31826 | (static_cast<void> ((p == 0 || p != px) ? 0 : (__assert ("p == 0 || p != px", "./boost/shared_ptr.hpp", 348, __PRETTY_FUNCTION__), 0))); | |
31827 | this_type(p).swap(*this); | |
31828 | } | |
31829 | ||
31830 | template<class Y, class D> void reset( Y * p, D d ) | |
31831 | { | |
31832 | this_type( p, d ).swap( *this ); | |
31833 | } | |
31834 | ||
31835 | template<class Y, class D, class A> void reset( Y * p, D d, A a ) | |
31836 | { | |
31837 | this_type( p, d, a ).swap( *this ); | |
31838 | } | |
31839 | ||
31840 | template<class Y> void reset( shared_ptr<Y> const & r, T * p ) | |
31841 | { | |
31842 | this_type( r, p ).swap( *this ); | |
31843 | } | |
31844 | ||
31845 | reference operator* () const | |
31846 | { | |
31847 | (static_cast<void> ((px != 0) ? 0 : (__assert ("px != 0", "./boost/shared_ptr.hpp", 369, __PRETTY_FUNCTION__), 0))); | |
31848 | return *px; | |
31849 | } | |
31850 | ||
31851 | T * operator-> () const | |
31852 | { | |
31853 | (static_cast<void> ((px != 0) ? 0 : (__assert ("px != 0", "./boost/shared_ptr.hpp", 375, __PRETTY_FUNCTION__), 0))); | |
31854 | return px; | |
31855 | } | |
31856 | ||
31857 | T * get() const | |
31858 | { | |
31859 | return px; | |
31860 | } | |
31861 | # 420 "./boost/shared_ptr.hpp" | |
31862 | typedef T * this_type::*unspecified_bool_type; | |
31863 | ||
31864 | operator unspecified_bool_type() const | |
31865 | { | |
31866 | return px == 0? 0: &this_type::px; | |
31867 | } | |
31868 | ||
31869 | ||
31870 | ||
31871 | ||
31872 | ||
31873 | bool operator! () const | |
31874 | { | |
31875 | return px == 0; | |
31876 | } | |
31877 | ||
31878 | bool unique() const | |
31879 | { | |
31880 | return pn.unique(); | |
31881 | } | |
31882 | ||
31883 | long use_count() const | |
31884 | { | |
31885 | return pn.use_count(); | |
31886 | } | |
31887 | ||
31888 | void swap(shared_ptr<T> & other) | |
31889 | { | |
31890 | std::swap(px, other.px); | |
31891 | pn.swap(other.pn); | |
31892 | } | |
31893 | ||
31894 | template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const | |
31895 | { | |
31896 | return pn < rhs.pn; | |
31897 | } | |
31898 | ||
31899 | void * _internal_get_deleter( detail::sp_typeinfo const & ti ) const | |
31900 | { | |
31901 | return pn.get_deleter( ti ); | |
31902 | } | |
31903 | ||
31904 | ||
31905 | ||
31906 | ||
31907 | ||
31908 | ||
31909 | private: | |
31910 | ||
31911 | template<class Y> friend class shared_ptr; | |
31912 | template<class Y> friend class weak_ptr; | |
31913 | ||
31914 | ||
31915 | ||
31916 | ||
31917 | T * px; | |
31918 | boost::detail::shared_count pn; | |
31919 | ||
31920 | }; | |
31921 | ||
31922 | template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) | |
31923 | { | |
31924 | return a.get() == b.get(); | |
31925 | } | |
31926 | ||
31927 | template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) | |
31928 | { | |
31929 | return a.get() != b.get(); | |
31930 | } | |
31931 | # 501 "./boost/shared_ptr.hpp" | |
31932 | template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) | |
31933 | { | |
31934 | return a._internal_less(b); | |
31935 | } | |
31936 | ||
31937 | template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) | |
31938 | { | |
31939 | a.swap(b); | |
31940 | } | |
31941 | ||
31942 | template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r) | |
31943 | { | |
31944 | return shared_ptr<T>(r, boost::detail::static_cast_tag()); | |
31945 | } | |
31946 | ||
31947 | template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r) | |
31948 | { | |
31949 | return shared_ptr<T>(r, boost::detail::const_cast_tag()); | |
31950 | } | |
31951 | ||
31952 | template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r) | |
31953 | { | |
31954 | return shared_ptr<T>(r, boost::detail::dynamic_cast_tag()); | |
31955 | } | |
31956 | ||
31957 | ||
31958 | ||
31959 | template<class T, class U> shared_ptr<T> shared_static_cast(shared_ptr<U> const & r) | |
31960 | { | |
31961 | return shared_ptr<T>(r, boost::detail::static_cast_tag()); | |
31962 | } | |
31963 | ||
31964 | template<class T, class U> shared_ptr<T> shared_dynamic_cast(shared_ptr<U> const & r) | |
31965 | { | |
31966 | return shared_ptr<T>(r, boost::detail::dynamic_cast_tag()); | |
31967 | } | |
31968 | ||
31969 | template<class T, class U> shared_ptr<T> shared_polymorphic_cast(shared_ptr<U> const & r) | |
31970 | { | |
31971 | return shared_ptr<T>(r, boost::detail::polymorphic_cast_tag()); | |
31972 | } | |
31973 | ||
31974 | template<class T, class U> shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r) | |
31975 | { | |
31976 | (static_cast<void> ((dynamic_cast<T *>(r.get()) == r.get()) ? 0 : (__assert ("dynamic_cast<T *>(r.get()) == r.get()", "./boost/shared_ptr.hpp", 545, __PRETTY_FUNCTION__), 0))); | |
31977 | return shared_static_cast<T>(r); | |
31978 | } | |
31979 | ||
31980 | ||
31981 | ||
31982 | template<class T> inline T * get_pointer(shared_ptr<T> const & p) | |
31983 | { | |
31984 | return p.get(); | |
31985 | } | |
31986 | # 576 "./boost/shared_ptr.hpp" | |
31987 | template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p) | |
31988 | ||
31989 | { | |
31990 | os << p.get(); | |
31991 | return os; | |
31992 | } | |
31993 | # 604 "./boost/shared_ptr.hpp" | |
31994 | template<class D, class T> D * get_deleter(shared_ptr<T> const & p) | |
31995 | { | |
31996 | return static_cast<D *>(p._internal_get_deleter(typeid(D))); | |
31997 | } | |
31998 | ||
31999 | ||
32000 | ||
32001 | } | |
32002 | # 22 "./boost/format/alt_sstream.hpp" 2 | |
32003 | # 1 "./boost/assert.hpp" 1 | |
32004 | # 36 "./boost/assert.hpp" | |
32005 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 1 3 4 | |
32006 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 3 4 | |
32007 | extern "C" { | |
32008 | ||
32009 | ||
32010 | extern void __assert (const char *, const char *, int, const char *); | |
32011 | ||
32012 | } | |
32013 | # 37 "./boost/assert.hpp" 2 | |
32014 | # 23 "./boost/format/alt_sstream.hpp" 2 | |
32015 | ||
32016 | namespace boost { | |
32017 | namespace io { | |
32018 | ||
32019 | template<class Ch, class Tr=::std::char_traits<Ch>, | |
32020 | class Alloc=::std::allocator<Ch> > | |
32021 | class basic_altstringbuf; | |
32022 | ||
32023 | template<class Ch, class Tr =::std::char_traits<Ch>, | |
32024 | class Alloc=::std::allocator<Ch> > | |
32025 | class basic_oaltstringstream; | |
32026 | ||
32027 | ||
32028 | template<class Ch, class Tr, class Alloc> | |
32029 | class basic_altstringbuf | |
32030 | : public ::std::basic_streambuf<Ch, Tr> | |
32031 | { | |
32032 | typedef ::std::basic_streambuf<Ch, Tr> streambuf_t; | |
32033 | typedef typename CompatAlloc<Alloc>::compatible_type compat_allocator_type; | |
32034 | typedef typename CompatTraits<Tr>::compatible_type compat_traits_type; | |
32035 | public: | |
32036 | typedef Ch char_type; | |
32037 | typedef Tr traits_type; | |
32038 | typedef typename compat_traits_type::int_type int_type; | |
32039 | typedef typename compat_traits_type::pos_type pos_type; | |
32040 | typedef typename compat_traits_type::off_type off_type; | |
32041 | typedef Alloc allocator_type; | |
32042 | typedef ::std::basic_string<Ch, Tr, Alloc> string_type; | |
32043 | typedef typename string_type::size_type size_type; | |
32044 | ||
32045 | typedef ::std::streamsize streamsize; | |
32046 | ||
32047 | ||
32048 | explicit basic_altstringbuf(std::ios_base::openmode mode | |
32049 | = std::ios_base::in | std::ios_base::out) | |
32050 | : putend_(__null), is_allocated_(false), mode_(mode) | |
32051 | {} | |
32052 | explicit basic_altstringbuf(const string_type& s, | |
32053 | ::std::ios_base::openmode mode | |
32054 | = ::std::ios_base::in | ::std::ios_base::out) | |
32055 | : putend_(__null), is_allocated_(false), mode_(mode) | |
32056 | { dealloc(); str(s); } | |
32057 | virtual ~basic_altstringbuf() | |
32058 | { dealloc(); } | |
32059 | using streambuf_t::pbase; | |
32060 | using streambuf_t::pptr; | |
32061 | using streambuf_t::epptr; | |
32062 | using streambuf_t::eback; | |
32063 | using streambuf_t::gptr; | |
32064 | using streambuf_t::egptr; | |
32065 | ||
32066 | void clear_buffer(); | |
32067 | void str(const string_type& s); | |
32068 | ||
32069 | ||
32070 | Ch * begin() const; | |
32071 | size_type size() const; | |
32072 | size_type cur_size() const; | |
32073 | Ch * pend() const | |
32074 | { return ((putend_ < pptr()) ? pptr() : putend_); } | |
32075 | size_type pcount() const | |
32076 | { return static_cast<size_type>( pptr() - pbase()) ;} | |
32077 | ||
32078 | ||
32079 | string_type str() const | |
32080 | { return string_type(begin(), size()); } | |
32081 | string_type cur_str() const | |
32082 | { return string_type(begin(), cur_size()); } | |
32083 | protected: | |
32084 | explicit basic_altstringbuf (basic_altstringbuf * s, | |
32085 | ::std::ios_base::openmode mode | |
32086 | = ::std::ios_base::in | ::std::ios_base::out) | |
32087 | : putend_(__null), is_allocated_(false), mode_(mode) | |
32088 | { dealloc(); str(s); } | |
32089 | ||
32090 | virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, | |
32091 | ::std::ios_base::openmode which | |
32092 | = ::std::ios_base::in | ::std::ios_base::out); | |
32093 | virtual pos_type seekpos (pos_type pos, | |
32094 | ::std::ios_base::openmode which | |
32095 | = ::std::ios_base::in | ::std::ios_base::out); | |
32096 | virtual int_type underflow(); | |
32097 | virtual int_type pbackfail(int_type meta = compat_traits_type::eof()); | |
32098 | virtual int_type overflow(int_type meta = compat_traits_type::eof()); | |
32099 | void dealloc(); | |
32100 | private: | |
32101 | enum { alloc_min = 256}; | |
32102 | ||
32103 | Ch *putend_; | |
32104 | bool is_allocated_; | |
32105 | ::std::ios_base::openmode mode_; | |
32106 | compat_allocator_type alloc_; | |
32107 | }; | |
32108 | ||
32109 | ||
32110 | ||
32111 | template <class Ch, class Tr, class Alloc> | |
32112 | class basic_oaltstringstream | |
32113 | : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, | |
32114 | public ::std::basic_ostream<Ch, Tr> | |
32115 | { | |
32116 | class No_Op { | |
32117 | ||
32118 | public: | |
32119 | template<class T> | |
32120 | const T & operator()(const T & arg) { return arg; } | |
32121 | }; | |
32122 | typedef ::std::basic_ostream<Ch, Tr> stream_t; | |
32123 | typedef boost::base_from_member<boost::shared_ptr< | |
32124 | basic_altstringbuf<Ch,Tr, Alloc> > > | |
32125 | pbase_type; | |
32126 | typedef ::std::basic_string<Ch, Tr, Alloc> string_type; | |
32127 | typedef typename string_type::size_type size_type; | |
32128 | typedef basic_altstringbuf<Ch, Tr, Alloc> stringbuf_t; | |
32129 | public: | |
32130 | typedef Alloc allocator_type; | |
32131 | basic_oaltstringstream() | |
32132 | : pbase_type(new stringbuf_t), stream_t(rdbuf()) | |
32133 | { } | |
32134 | basic_oaltstringstream(::boost::shared_ptr<stringbuf_t> buf) | |
32135 | : pbase_type(buf), stream_t(rdbuf()) | |
32136 | { } | |
32137 | basic_oaltstringstream(stringbuf_t * buf) | |
32138 | : pbase_type(buf, No_Op() ), stream_t(rdbuf()) | |
32139 | { } | |
32140 | stringbuf_t * rdbuf() const | |
32141 | { return pbase_type::member.get(); } | |
32142 | void clear_buffer() | |
32143 | { rdbuf()->clear_buffer(); } | |
32144 | ||
32145 | ||
32146 | Ch * begin() const | |
32147 | { return rdbuf()->begin(); } | |
32148 | size_type size() const | |
32149 | { return rdbuf()->size(); } | |
32150 | size_type cur_size() const | |
32151 | { return rdbuf()->cur_size(); } | |
32152 | ||
32153 | ||
32154 | string_type str() const | |
32155 | { return rdbuf()->str(); } | |
32156 | string_type cur_str() const | |
32157 | { return rdbuf()->cur_str(); } | |
32158 | void str(const string_type& s) | |
32159 | { rdbuf()->str(s); } | |
32160 | }; | |
32161 | ||
32162 | } | |
32163 | } | |
32164 | ||
32165 | # 1 "./boost/format/alt_sstream_impl.hpp" 1 | |
32166 | # 16 "./boost/format/alt_sstream_impl.hpp" | |
32167 | namespace boost { | |
32168 | namespace io { | |
32169 | ||
32170 | ||
32171 | template<class Ch, class Tr, class Alloc> | |
32172 | void basic_altstringbuf<Ch, Tr, Alloc>:: | |
32173 | clear_buffer () { | |
32174 | const Ch * p = pptr(); | |
32175 | const Ch * b = pbase(); | |
32176 | if(p != __null && p != b) { | |
32177 | seekpos(0, ::std::ios_base::out); | |
32178 | } | |
32179 | p = gptr(); | |
32180 | b = eback(); | |
32181 | if(p != __null && p != b) { | |
32182 | seekpos(0, ::std::ios_base::in); | |
32183 | } | |
32184 | } | |
32185 | ||
32186 | template<class Ch, class Tr, class Alloc> | |
32187 | void basic_altstringbuf<Ch, Tr, Alloc>:: | |
32188 | str (const string_type& s) { | |
32189 | size_type sz=s.size(); | |
32190 | if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) { | |
32191 | Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); | |
32192 | ||
32193 | dealloc(); | |
32194 | sz = s.copy(new_ptr, sz); | |
32195 | putend_ = new_ptr + sz; | |
32196 | if(mode_ & ::std::ios_base::in) | |
32197 | streambuf_t::setg(new_ptr, new_ptr, new_ptr + sz); | |
32198 | if(mode_ & ::std::ios_base::out) { | |
32199 | streambuf_t::setp(new_ptr, new_ptr + sz); | |
32200 | if(mode_ & (::std::ios_base::app | ::std::ios_base::ate)) | |
32201 | streambuf_t::pbump(static_cast<int>(sz)); | |
32202 | if(gptr() == __null) | |
32203 | streambuf_t::setg(new_ptr, __null, new_ptr); | |
32204 | } | |
32205 | is_allocated_ = true; | |
32206 | } | |
32207 | else | |
32208 | dealloc(); | |
32209 | } | |
32210 | template<class Ch, class Tr, class Alloc> | |
32211 | Ch* basic_altstringbuf<Ch, Tr, Alloc>:: | |
32212 | begin () const { | |
32213 | if(mode_ & ::std::ios_base::out && pptr() != __null) | |
32214 | return pbase(); | |
32215 | else if(mode_ & ::std::ios_base::in && gptr() != __null) | |
32216 | return eback(); | |
32217 | return __null; | |
32218 | } | |
32219 | ||
32220 | template<class Ch, class Tr, class Alloc> | |
32221 | typename std::basic_string<Ch,Tr,Alloc>::size_type | |
32222 | basic_altstringbuf<Ch, Tr, Alloc>:: | |
32223 | size () const { | |
32224 | if(mode_ & ::std::ios_base::out && pptr()) | |
32225 | return static_cast<size_type>(pend() - pbase()); | |
32226 | else if(mode_ & ::std::ios_base::in && gptr()) | |
32227 | return static_cast<size_type>(egptr() - eback()); | |
32228 | else | |
32229 | return 0; | |
32230 | } | |
32231 | ||
32232 | template<class Ch, class Tr, class Alloc> | |
32233 | typename std::basic_string<Ch,Tr,Alloc>::size_type | |
32234 | basic_altstringbuf<Ch, Tr, Alloc>:: | |
32235 | cur_size () const { | |
32236 | if(mode_ & ::std::ios_base::out && pptr()) | |
32237 | return static_cast<streamsize>( pptr() - pbase()); | |
32238 | else if(mode_ & ::std::ios_base::in && gptr()) | |
32239 | return static_cast<streamsize>( gptr() - eback()); | |
32240 | else | |
32241 | return 0; | |
32242 | } | |
32243 | ||
32244 | template<class Ch, class Tr, class Alloc> | |
32245 | typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type | |
32246 | basic_altstringbuf<Ch, Tr, Alloc>:: | |
32247 | seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { | |
32248 | if(pptr() != __null && putend_ < pptr()) | |
32249 | putend_ = pptr(); | |
32250 | if(which & ::std::ios_base::in && gptr() != __null) { | |
32251 | ||
32252 | if(way == ::std::ios_base::end) | |
32253 | off += static_cast<off_type>(putend_ - gptr()); | |
32254 | else if(way == ::std::ios_base::beg) | |
32255 | off += static_cast<off_type>(eback() - gptr()); | |
32256 | else if(way != ::std::ios_base::cur || (which & ::std::ios_base::out) ) | |
32257 | ||
32258 | return pos_type(off_type(-1)); | |
32259 | if(eback() <= off+gptr() && off+gptr() <= putend_ ) { | |
32260 | ||
32261 | streambuf_t::gbump(static_cast<int>(off)); | |
32262 | if(which & ::std::ios_base::out && pptr() != __null) | |
32263 | ||
32264 | streambuf_t::pbump(static_cast<int>(gptr()-pptr())); | |
32265 | } | |
32266 | else | |
32267 | off = off_type(-1); | |
32268 | } | |
32269 | else if(which & ::std::ios_base::out && pptr() != __null) { | |
32270 | ||
32271 | if(way == ::std::ios_base::end) | |
32272 | off += static_cast<off_type>(putend_ - pptr()); | |
32273 | else if(way == ::std::ios_base::beg) | |
32274 | off += static_cast<off_type>(pbase() - pptr()); | |
32275 | else if(way != ::std::ios_base::beg) | |
32276 | return pos_type(off_type(-1)); | |
32277 | if(pbase() <= off+pptr() && off+pptr() <= putend_) | |
32278 | ||
32279 | streambuf_t::pbump(static_cast<int>(off)); | |
32280 | else | |
32281 | off = off_type(-1); | |
32282 | } | |
32283 | else | |
32284 | off = off_type(-1); | |
32285 | return (pos_type(off)); | |
32286 | } | |
32287 | ||
32288 | ||
32289 | ||
32290 | template<class Ch, class Tr, class Alloc> | |
32291 | typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type | |
32292 | basic_altstringbuf<Ch, Tr, Alloc>:: | |
32293 | seekpos (pos_type pos, ::std::ios_base::openmode which) { | |
32294 | off_type off = off_type(pos); | |
32295 | if(pptr() != __null && putend_ < pptr()) | |
32296 | putend_ = pptr(); | |
32297 | if(off != off_type(-1)) { | |
32298 | if(which & ::std::ios_base::in && gptr() != __null) { | |
32299 | ||
32300 | if(0 <= off && off <= putend_ - eback()) { | |
32301 | streambuf_t::gbump(static_cast<int>(eback() - gptr() + off)); | |
32302 | if(which & ::std::ios_base::out && pptr() != __null) { | |
32303 | ||
32304 | streambuf_t::pbump(static_cast<int>(gptr()-pptr())); | |
32305 | } | |
32306 | } | |
32307 | else | |
32308 | off = off_type(-1); | |
32309 | } | |
32310 | else if(which & ::std::ios_base::out && pptr() != __null) { | |
32311 | ||
32312 | if(0 <= off && off <= putend_ - eback()) | |
32313 | streambuf_t::pbump(static_cast<int>(eback() - pptr() + off)); | |
32314 | else | |
32315 | off = off_type(-1); | |
32316 | } | |
32317 | else | |
32318 | off = off_type(-1); | |
32319 | return (pos_type(off)); | |
32320 | } | |
32321 | else { | |
32322 | (static_cast<void> ((0) ? 0 : (__assert ("0", "./boost/format/alt_sstream_impl.hpp", 171, __PRETTY_FUNCTION__), 0))); | |
32323 | return pos_type(off_type(-1)); | |
32324 | } | |
32325 | } | |
32326 | ||
32327 | ||
32328 | ||
32329 | template<class Ch, class Tr, class Alloc> | |
32330 | typename basic_altstringbuf<Ch, Tr, Alloc>::int_type | |
32331 | basic_altstringbuf<Ch, Tr, Alloc>:: | |
32332 | underflow () { | |
32333 | if(gptr() == __null) | |
32334 | return (compat_traits_type::eof()); | |
32335 | else if(gptr() < egptr()) | |
32336 | return (compat_traits_type::to_int_type(*gptr())); | |
32337 | else if(mode_ & ::std::ios_base::in && pptr() != __null | |
32338 | && (gptr() < pptr() || gptr() < putend_) ) | |
32339 | { | |
32340 | if(putend_ < pptr()) | |
32341 | putend_ = pptr(); | |
32342 | streambuf_t::setg(eback(), gptr(), putend_); | |
32343 | return (compat_traits_type::to_int_type(*gptr())); | |
32344 | } | |
32345 | else | |
32346 | return (compat_traits_type::eof()); | |
32347 | } | |
32348 | ||
32349 | ||
32350 | ||
32351 | template<class Ch, class Tr, class Alloc> | |
32352 | typename basic_altstringbuf<Ch, Tr, Alloc>::int_type | |
32353 | basic_altstringbuf<Ch, Tr, Alloc>:: | |
32354 | pbackfail (int_type meta) { | |
32355 | if(gptr() != __null && (eback() < gptr()) | |
32356 | && (mode_ & (::std::ios_base::out) | |
32357 | || compat_traits_type::eq_int_type(compat_traits_type::eof(), meta) | |
32358 | || compat_traits_type::eq(compat_traits_type::to_char_type(meta), gptr()[-1]) ) ) { | |
32359 | streambuf_t::gbump(-1); | |
32360 | if(!compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) | |
32361 | ||
32362 | *gptr() = compat_traits_type::to_char_type(meta); | |
32363 | return (compat_traits_type::not_eof(meta)); | |
32364 | } | |
32365 | else | |
32366 | return (compat_traits_type::eof()); | |
32367 | } | |
32368 | ||
32369 | ||
32370 | ||
32371 | template<class Ch, class Tr, class Alloc> | |
32372 | typename basic_altstringbuf<Ch, Tr, Alloc>::int_type | |
32373 | basic_altstringbuf<Ch, Tr, Alloc>:: | |
32374 | overflow (int_type meta) { | |
32375 | ||
32376 | ||
32377 | ||
32378 | ||
32379 | if(compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) | |
32380 | return compat_traits_type::not_eof(meta); | |
32381 | else if(pptr() != __null && pptr() < epptr()) { | |
32382 | streambuf_t::sputc(compat_traits_type::to_char_type(meta)); | |
32383 | return meta; | |
32384 | } | |
32385 | else if(! (mode_ & ::std::ios_base::out)) | |
32386 | ||
32387 | return compat_traits_type::eof(); | |
32388 | else { | |
32389 | std::size_t prev_size = pptr() == __null ? 0 : epptr() - eback(); | |
32390 | std::size_t new_size = prev_size; | |
32391 | ||
32392 | std::size_t add_size = new_size / 2; | |
32393 | if(add_size < alloc_min) | |
32394 | add_size = alloc_min; | |
32395 | Ch * newptr = __null, *oldptr = eback(); | |
32396 | ||
32397 | ||
32398 | while (0 < add_size && ((std::numeric_limits<std::size_t>::max)() | |
32399 | - add_size < new_size) ) | |
32400 | add_size /= 2; | |
32401 | if(0 < add_size) { | |
32402 | new_size += add_size; | |
32403 | newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); | |
32404 | } | |
32405 | ||
32406 | if(0 < prev_size) | |
32407 | compat_traits_type::copy(newptr, oldptr, prev_size); | |
32408 | if(is_allocated_) | |
32409 | alloc_.deallocate(oldptr, prev_size); | |
32410 | is_allocated_=true; | |
32411 | ||
32412 | if(prev_size == 0) { | |
32413 | putend_ = newptr; | |
32414 | streambuf_t::setp(newptr, newptr + new_size); | |
32415 | if(mode_ & ::std::ios_base::in) | |
32416 | streambuf_t::setg(newptr, newptr, newptr + 1); | |
32417 | else | |
32418 | streambuf_t::setg(newptr, 0, newptr); | |
32419 | } | |
32420 | else { | |
32421 | putend_ = putend_ - oldptr + newptr; | |
32422 | int pptr_count = static_cast<int>(pptr()-pbase()); | |
32423 | int gptr_count = static_cast<int>(gptr()-eback()); | |
32424 | streambuf_t::setp(pbase() - oldptr + newptr, newptr + new_size); | |
32425 | streambuf_t::pbump(pptr_count); | |
32426 | if(mode_ & ::std::ios_base::in) | |
32427 | streambuf_t::setg(newptr, newptr + gptr_count, pptr() + 1); | |
32428 | else | |
32429 | streambuf_t::setg(newptr, 0, newptr); | |
32430 | } | |
32431 | streambuf_t::sputc(compat_traits_type::to_char_type(meta)); | |
32432 | return meta; | |
32433 | } | |
32434 | ||
32435 | ||
32436 | ||
32437 | } | |
32438 | ||
32439 | ||
32440 | template<class Ch, class Tr, class Alloc> | |
32441 | void basic_altstringbuf<Ch, Tr, Alloc>:: dealloc() { | |
32442 | if(is_allocated_) | |
32443 | alloc_.deallocate(eback(), (pptr() != __null ? epptr() : egptr()) - eback()); | |
32444 | is_allocated_ = false; | |
32445 | streambuf_t::setg(0, 0, 0); | |
32446 | streambuf_t::setp(0, 0); | |
32447 | putend_ = __null; | |
32448 | } | |
32449 | ||
32450 | } | |
32451 | } | |
32452 | # 174 "./boost/format/alt_sstream.hpp" 2 | |
32453 | # 24 "./boost/format/internals.hpp" 2 | |
32454 | ||
32455 | namespace boost { | |
32456 | namespace io { | |
32457 | namespace detail { | |
32458 | ||
32459 | ||
32460 | ||
32461 | ||
32462 | ||
32463 | template<class Ch, class Tr> | |
32464 | struct stream_format_state | |
32465 | { | |
32466 | typedef ::std:: basic_ios<Ch, Tr> basic_ios; | |
32467 | ||
32468 | stream_format_state(Ch fill) { reset(fill); } | |
32469 | ||
32470 | ||
32471 | void reset(Ch fill); | |
32472 | void set_by_stream(const basic_ios& os); | |
32473 | void apply_on(basic_ios & os, | |
32474 | boost::io::detail::locale_t * loc_default = 0) const; | |
32475 | template<class T> | |
32476 | void apply_manip(T manipulator) | |
32477 | { apply_manip_body<Ch, Tr, T>( *this, manipulator) ; } | |
32478 | ||
32479 | ||
32480 | std::streamsize width_; | |
32481 | std::streamsize precision_; | |
32482 | Ch fill_; | |
32483 | std::ios_base::fmtflags flags_; | |
32484 | std::ios_base::iostate rdstate_; | |
32485 | std::ios_base::iostate exceptions_; | |
32486 | boost::optional<boost::io::detail::locale_t> loc_; | |
32487 | }; | |
32488 | ||
32489 | ||
32490 | ||
32491 | ||
32492 | ||
32493 | template<class Ch, class Tr, class Alloc> | |
32494 | struct format_item | |
32495 | { | |
32496 | enum pad_values { zeropad = 1, spacepad =2, centered=4, tabulation = 8 }; | |
32497 | ||
32498 | ||
32499 | ||
32500 | enum arg_values { argN_no_posit = -1, | |
32501 | argN_tabulation = -2, | |
32502 | argN_ignored = -3 | |
32503 | }; | |
32504 | typedef ::std:: basic_ios<Ch, Tr> basic_ios; | |
32505 | typedef detail::stream_format_state<Ch, Tr> stream_format_state; | |
32506 | typedef ::std::basic_string<Ch, Tr, Alloc> string_type; | |
32507 | ||
32508 | format_item(Ch fill) :argN_(argN_no_posit), fmtstate_(fill), | |
32509 | truncate_(max_streamsize()), pad_scheme_(0) {} | |
32510 | void reset(Ch fill); | |
32511 | void compute_states(); | |
32512 | ||
32513 | static std::streamsize max_streamsize() { | |
32514 | return (std::numeric_limits<std::streamsize>::max)(); | |
32515 | } | |
32516 | ||
32517 | ||
32518 | int argN_; | |
32519 | ||
32520 | string_type res_; | |
32521 | string_type appendix_; | |
32522 | ||
32523 | stream_format_state fmtstate_; | |
32524 | ||
32525 | std::streamsize truncate_; | |
32526 | unsigned int pad_scheme_; | |
32527 | }; | |
32528 | ||
32529 | ||
32530 | ||
32531 | ||
32532 | ||
32533 | ||
32534 | template<class Ch, class Tr> | |
32535 | void stream_format_state<Ch,Tr>:: apply_on (basic_ios & os, | |
32536 | boost::io::detail::locale_t * loc_default) const { | |
32537 | ||
32538 | if(width_ != -1) | |
32539 | os.width(width_); | |
32540 | if(precision_ != -1) | |
32541 | os.precision(precision_); | |
32542 | if(fill_ != 0) | |
32543 | os.fill(fill_); | |
32544 | os.flags(flags_); | |
32545 | os.clear(rdstate_); | |
32546 | os.exceptions(exceptions_); | |
32547 | ||
32548 | if(loc_) | |
32549 | os.imbue(loc_.get()); | |
32550 | else if(loc_default) | |
32551 | os.imbue(*loc_default); | |
32552 | ||
32553 | ||
32554 | ||
32555 | } | |
32556 | ||
32557 | template<class Ch, class Tr> | |
32558 | void stream_format_state<Ch,Tr>:: set_by_stream(const basic_ios& os) { | |
32559 | ||
32560 | flags_ = os.flags(); | |
32561 | width_ = os.width(); | |
32562 | precision_ = os.precision(); | |
32563 | fill_ = os.fill(); | |
32564 | rdstate_ = os.rdstate(); | |
32565 | exceptions_ = os.exceptions(); | |
32566 | } | |
32567 | ||
32568 | ||
32569 | template<class Ch, class Tr, class T> | |
32570 | void apply_manip_body( stream_format_state<Ch, Tr>& self, | |
32571 | T manipulator) { | |
32572 | ||
32573 | basic_oaltstringstream<Ch, Tr> ss; | |
32574 | self.apply_on( ss ); | |
32575 | ss << manipulator; | |
32576 | self.set_by_stream( ss ); | |
32577 | } | |
32578 | ||
32579 | template<class Ch, class Tr> inline | |
32580 | void stream_format_state<Ch,Tr>:: reset(Ch fill) { | |
32581 | ||
32582 | width_=0; precision_=6; | |
32583 | fill_=fill; | |
32584 | flags_ = std::ios_base::dec | std::ios_base::skipws; | |
32585 | ||
32586 | exceptions_ = std::ios_base::goodbit; | |
32587 | rdstate_ = std::ios_base::goodbit; | |
32588 | } | |
32589 | ||
32590 | ||
32591 | ||
32592 | ||
32593 | template<class Ch, class Tr, class Alloc> | |
32594 | void format_item<Ch, Tr, Alloc>:: | |
32595 | reset (Ch fill) { | |
32596 | argN_=argN_no_posit; truncate_ = max_streamsize(); pad_scheme_ =0; | |
32597 | res_.resize(0); appendix_.resize(0); | |
32598 | fmtstate_.reset(fill); | |
32599 | } | |
32600 | ||
32601 | template<class Ch, class Tr, class Alloc> | |
32602 | void format_item<Ch, Tr, Alloc>:: | |
32603 | compute_states() { | |
32604 | ||
32605 | ||
32606 | if(pad_scheme_ & zeropad) { | |
32607 | ||
32608 | if(fmtstate_.flags_ & std::ios_base::left) { | |
32609 | (static_cast<void> ((!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))) ? 0 : (__assert ("!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))", "./boost/format/internals.hpp", 179, __PRETTY_FUNCTION__), 0))); | |
32610 | ||
32611 | pad_scheme_ = pad_scheme_ & (~zeropad); | |
32612 | } | |
32613 | else { | |
32614 | pad_scheme_ &= ~spacepad; | |
32615 | fmtstate_.fill_='0'; | |
32616 | fmtstate_.flags_ = (fmtstate_.flags_ & ~std::ios_base::adjustfield) | |
32617 | | std::ios_base::internal; | |
32618 | ||
32619 | } | |
32620 | } | |
32621 | if(pad_scheme_ & spacepad) { | |
32622 | if(fmtstate_.flags_ & std::ios_base::showpos) | |
32623 | pad_scheme_ &= ~spacepad; | |
32624 | } | |
32625 | } | |
32626 | ||
32627 | ||
32628 | } } } | |
32629 | # 39 "./boost/format.hpp" 2 | |
32630 | ||
32631 | ||
32632 | # 1 "./boost/format/format_class.hpp" 1 | |
32633 | # 27 "./boost/format/format_class.hpp" | |
32634 | namespace boost { | |
32635 | ||
32636 | template<class Ch, class Tr, class Alloc> | |
32637 | class basic_format | |
32638 | { | |
32639 | typedef typename io::CompatTraits<Tr>::compatible_type compat_traits; | |
32640 | public: | |
32641 | typedef Ch CharT; | |
32642 | typedef std::basic_string<Ch, Tr, Alloc> string_type; | |
32643 | typedef typename string_type::size_type size_type; | |
32644 | typedef io::detail::format_item<Ch, Tr, Alloc> format_item_t; | |
32645 | typedef io::basic_altstringbuf<Ch, Tr, Alloc> internal_streambuf_t; | |
32646 | ||
32647 | ||
32648 | explicit basic_format(const Ch* str=__null); | |
32649 | explicit basic_format(const string_type& s); | |
32650 | basic_format(const basic_format& x); | |
32651 | basic_format& operator= (const basic_format& x); | |
32652 | void swap(basic_format& x); | |
32653 | ||
32654 | ||
32655 | explicit basic_format(const Ch* str, const std::locale & loc); | |
32656 | explicit basic_format(const string_type& s, const std::locale & loc); | |
32657 | ||
32658 | io::detail::locale_t getloc() const; | |
32659 | ||
32660 | basic_format& clear(); | |
32661 | basic_format& clear_binds(); | |
32662 | basic_format& parse(const string_type&); | |
32663 | ||
32664 | ||
32665 | size_type size() const; | |
32666 | string_type str() const; | |
32667 | ||
32668 | ||
32669 | template<class T> | |
32670 | basic_format& operator%(const T& x) | |
32671 | { return io::detail::feed<CharT, Tr, Alloc, const T&>(*this,x); } | |
32672 | ||
32673 | ||
32674 | template<class T> basic_format& operator%(T& x) | |
32675 | { return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); } | |
32676 | ||
32677 | ||
32678 | ||
32679 | template<class T> | |
32680 | basic_format& bind_arg(int argN, const T& val) | |
32681 | { return io::detail::bind_arg_body(*this, argN, val); } | |
32682 | basic_format& clear_bind(int argN); | |
32683 | template<class T> | |
32684 | basic_format& modify_item(int itemN, T manipulator) | |
32685 | { return io::detail::modify_item_body<Ch,Tr, Alloc, T> (*this, itemN, manipulator);} | |
32686 | ||
32687 | ||
32688 | unsigned char exceptions() const; | |
32689 | unsigned char exceptions(unsigned char newexcept); | |
32690 | # 91 "./boost/format/format_class.hpp" | |
32691 | template<class Ch2, class Tr2, class Alloc2> | |
32692 | friend std::basic_ostream<Ch2, Tr2> & | |
32693 | operator<<( std::basic_ostream<Ch2, Tr2> & , | |
32694 | const basic_format<Ch2, Tr2, Alloc2>& ); | |
32695 | ||
32696 | ||
32697 | ||
32698 | ||
32699 | ||
32700 | ||
32701 | ||
32702 | template<class Ch2, class Tr2, class Alloc2, class T> | |
32703 | friend basic_format<Ch2, Tr2, Alloc2>& | |
32704 | io::detail::feed (basic_format<Ch2, Tr2, Alloc2>&, T); | |
32705 | ||
32706 | template<class Ch2, class Tr2, class Alloc2, class T> friend | |
32707 | void io::detail::distribute (basic_format<Ch2, Tr2, Alloc2>&, T); | |
32708 | ||
32709 | template<class Ch2, class Tr2, class Alloc2, class T> friend | |
32710 | basic_format<Ch2, Tr2, Alloc2>& | |
32711 | io::detail::modify_item_body (basic_format<Ch2, Tr2, Alloc2>&, int, T); | |
32712 | ||
32713 | template<class Ch2, class Tr2, class Alloc2, class T> friend | |
32714 | basic_format<Ch2, Tr2, Alloc2>& | |
32715 | io::detail::bind_arg_body (basic_format<Ch2, Tr2, Alloc2>&, int, const T&); | |
32716 | ||
32717 | private: | |
32718 | ||
32719 | typedef io::detail::stream_format_state<Ch, Tr> stream_format_state; | |
32720 | ||
32721 | enum style_values { ordered = 1, | |
32722 | special_needs = 4 }; | |
32723 | ||
32724 | void make_or_reuse_data(std::size_t nbitems); | |
32725 | ||
32726 | ||
32727 | std::vector<format_item_t> items_; | |
32728 | std::vector<bool> bound_; | |
32729 | ||
32730 | int style_; | |
32731 | int cur_arg_; | |
32732 | int num_args_; | |
32733 | mutable bool dumped_; | |
32734 | string_type prefix_; | |
32735 | unsigned char exceptions_; | |
32736 | internal_streambuf_t buf_; | |
32737 | boost::optional<io::detail::locale_t> loc_; | |
32738 | }; | |
32739 | ||
32740 | } | |
32741 | # 42 "./boost/format.hpp" 2 | |
32742 | ||
32743 | ||
32744 | # 1 "./boost/format/exceptions.hpp" 1 | |
32745 | # 20 "./boost/format/exceptions.hpp" | |
32746 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/stdexcept" 1 3 | |
32747 | # 41 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/stdexcept" 3 | |
32748 | ||
32749 | # 42 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/include/c++/stdexcept" 3 | |
32750 | ||
32751 | ||
32752 | ||
32753 | ||
32754 | namespace std | |
32755 | { | |
32756 | ||
32757 | ||
32758 | ||
32759 | ||
32760 | ||
32761 | class logic_error : public exception | |
32762 | { | |
32763 | string _M_msg; | |
32764 | ||
32765 | public: | |
32766 | ||
32767 | explicit | |
32768 | logic_error(const string& __arg); | |
32769 | ||
32770 | virtual | |
32771 | ~logic_error() throw(); | |
32772 | ||
32773 | ||
32774 | ||
32775 | virtual const char* | |
32776 | what() const throw(); | |
32777 | }; | |
32778 | ||
32779 | ||
32780 | ||
32781 | class domain_error : public logic_error | |
32782 | { | |
32783 | public: | |
32784 | explicit domain_error(const string& __arg); | |
32785 | }; | |
32786 | ||
32787 | ||
32788 | class invalid_argument : public logic_error | |
32789 | { | |
32790 | public: | |
32791 | explicit invalid_argument(const string& __arg); | |
32792 | }; | |
32793 | ||
32794 | ||
32795 | ||
32796 | class length_error : public logic_error | |
32797 | { | |
32798 | public: | |
32799 | explicit length_error(const string& __arg); | |
32800 | }; | |
32801 | ||
32802 | ||
32803 | ||
32804 | class out_of_range : public logic_error | |
32805 | { | |
32806 | public: | |
32807 | explicit out_of_range(const string& __arg); | |
32808 | }; | |
32809 | ||
32810 | ||
32811 | ||
32812 | ||
32813 | ||
32814 | ||
32815 | class runtime_error : public exception | |
32816 | { | |
32817 | string _M_msg; | |
32818 | ||
32819 | public: | |
32820 | ||
32821 | explicit | |
32822 | runtime_error(const string& __arg); | |
32823 | ||
32824 | virtual | |
32825 | ~runtime_error() throw(); | |
32826 | ||
32827 | ||
32828 | ||
32829 | virtual const char* | |
32830 | what() const throw(); | |
32831 | }; | |
32832 | ||
32833 | ||
32834 | class range_error : public runtime_error | |
32835 | { | |
32836 | public: | |
32837 | explicit range_error(const string& __arg); | |
32838 | }; | |
32839 | ||
32840 | ||
32841 | class overflow_error : public runtime_error | |
32842 | { | |
32843 | public: | |
32844 | explicit overflow_error(const string& __arg); | |
32845 | }; | |
32846 | ||
32847 | ||
32848 | class underflow_error : public runtime_error | |
32849 | { | |
32850 | public: | |
32851 | explicit underflow_error(const string& __arg); | |
32852 | }; | |
32853 | } | |
32854 | # 21 "./boost/format/exceptions.hpp" 2 | |
32855 | ||
32856 | ||
32857 | namespace boost { | |
32858 | ||
32859 | namespace io { | |
32860 | ||
32861 | ||
32862 | ||
32863 | class format_error : public std::exception | |
32864 | { | |
32865 | public: | |
32866 | format_error() {} | |
32867 | virtual const char *what() const throw() { | |
32868 | return "boost::format_error: " | |
32869 | "format generic failure"; | |
32870 | } | |
32871 | }; | |
32872 | ||
32873 | class bad_format_string : public format_error | |
32874 | { | |
32875 | std::size_t pos_, next_; | |
32876 | public: | |
32877 | bad_format_string(std::size_t pos, std::size_t size) | |
32878 | : pos_(pos), next_(size) {} | |
32879 | std::size_t get_pos() const { return pos_; } | |
32880 | std::size_t get_next() const { return next_; } | |
32881 | virtual const char *what() const throw() { | |
32882 | return "boost::bad_format_string: format-string is ill-formed"; | |
32883 | } | |
32884 | }; | |
32885 | ||
32886 | class too_few_args : public format_error | |
32887 | { | |
32888 | std::size_t cur_, expected_; | |
32889 | public: | |
32890 | too_few_args(std::size_t cur, std::size_t expected) | |
32891 | : cur_(cur), expected_(expected) {} | |
32892 | std::size_t get_cur() const { return cur_; } | |
32893 | std::size_t get_expected() const { return expected_; } | |
32894 | virtual const char *what() const throw() { | |
32895 | return "boost::too_few_args: " | |
32896 | "format-string referred to more arguments than were passed"; | |
32897 | } | |
32898 | }; | |
32899 | ||
32900 | class too_many_args : public format_error | |
32901 | { | |
32902 | std::size_t cur_, expected_; | |
32903 | public: | |
32904 | too_many_args(std::size_t cur, std::size_t expected) | |
32905 | : cur_(cur), expected_(expected) {} | |
32906 | std::size_t get_cur() const { return cur_; } | |
32907 | std::size_t get_expected() const { return expected_; } | |
32908 | virtual const char *what() const throw() { | |
32909 | return "boost::too_many_args: " | |
32910 | "format-string referred to less arguments than were passed"; | |
32911 | } | |
32912 | }; | |
32913 | ||
32914 | ||
32915 | class out_of_range : public format_error | |
32916 | { | |
32917 | int index_, beg_, end_; | |
32918 | public: | |
32919 | out_of_range(int index, int beg, int end) | |
32920 | : index_(index), beg_(beg), end_(end) {} | |
32921 | int get_index() const { return index_; } | |
32922 | int get_beg() const { return beg_; } | |
32923 | int get_end() const { return end_; } | |
32924 | virtual const char *what() const throw() { | |
32925 | return "boost::out_of_range: " | |
32926 | "tried to refer to an argument (or item) number which" | |
32927 | " is out of range, according to the format string"; | |
32928 | } | |
32929 | }; | |
32930 | ||
32931 | ||
32932 | } | |
32933 | ||
32934 | } | |
32935 | # 45 "./boost/format.hpp" 2 | |
32936 | ||
32937 | ||
32938 | # 1 "./boost/format/format_implementation.hpp" 1 | |
32939 | # 19 "./boost/format/format_implementation.hpp" | |
32940 | # 1 "./boost/assert.hpp" 1 | |
32941 | # 36 "./boost/assert.hpp" | |
32942 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 1 3 4 | |
32943 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 3 4 | |
32944 | extern "C" { | |
32945 | ||
32946 | ||
32947 | extern void __assert (const char *, const char *, int, const char *); | |
32948 | ||
32949 | } | |
32950 | # 37 "./boost/assert.hpp" 2 | |
32951 | # 20 "./boost/format/format_implementation.hpp" 2 | |
32952 | ||
32953 | ||
32954 | ||
32955 | namespace boost { | |
32956 | ||
32957 | ||
32958 | ||
32959 | template< class Ch, class Tr, class Alloc> | |
32960 | basic_format<Ch, Tr, Alloc>:: basic_format(const Ch* s) | |
32961 | : style_(0), cur_arg_(0), num_args_(0), dumped_(false), | |
32962 | exceptions_(io::all_error_bits) | |
32963 | { | |
32964 | if( s) | |
32965 | parse( s ); | |
32966 | } | |
32967 | ||
32968 | ||
32969 | template< class Ch, class Tr, class Alloc> | |
32970 | basic_format<Ch, Tr, Alloc>:: basic_format(const Ch* s, const std::locale & loc) | |
32971 | : style_(0), cur_arg_(0), num_args_(0), dumped_(false), | |
32972 | loc_(loc), exceptions_(io::all_error_bits) | |
32973 | { | |
32974 | if(s) parse( s ); | |
32975 | } | |
32976 | ||
32977 | template< class Ch, class Tr, class Alloc> | |
32978 | basic_format<Ch, Tr, Alloc>:: basic_format(const string_type& s, const std::locale & loc) | |
32979 | : style_(0), cur_arg_(0), num_args_(0), dumped_(false), | |
32980 | loc_(loc), exceptions_(io::all_error_bits) | |
32981 | { | |
32982 | parse(s); | |
32983 | } | |
32984 | ||
32985 | template< class Ch, class Tr, class Alloc> | |
32986 | io::detail::locale_t basic_format<Ch, Tr, Alloc>:: | |
32987 | getloc() const { | |
32988 | return loc_ ? loc_.get() : io::detail::locale_t(); | |
32989 | } | |
32990 | ||
32991 | template< class Ch, class Tr, class Alloc> | |
32992 | basic_format<Ch, Tr, Alloc>:: basic_format(const string_type& s) | |
32993 | : style_(0), cur_arg_(0), num_args_(0), dumped_(false), | |
32994 | exceptions_(io::all_error_bits) | |
32995 | { | |
32996 | parse(s); | |
32997 | } | |
32998 | ||
32999 | template< class Ch, class Tr, class Alloc> | |
33000 | basic_format<Ch, Tr, Alloc>:: basic_format(const basic_format& x) | |
33001 | : items_(x.items_), bound_(x.bound_), style_(x.style_), | |
33002 | cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(false), | |
33003 | prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_) | |
33004 | { | |
33005 | } | |
33006 | ||
33007 | template< class Ch, class Tr, class Alloc> | |
33008 | basic_format<Ch, Tr, Alloc>& basic_format<Ch, Tr, Alloc>:: | |
33009 | operator= (const basic_format& x) { | |
33010 | if(this == &x) | |
33011 | return *this; | |
33012 | (basic_format<Ch, Tr, Alloc>(x)).swap(*this); | |
33013 | return *this; | |
33014 | } | |
33015 | template< class Ch, class Tr, class Alloc> | |
33016 | void basic_format<Ch, Tr, Alloc>:: | |
33017 | swap (basic_format & x) { | |
33018 | std::swap(exceptions_, x.exceptions_); | |
33019 | std::swap(style_, x.style_); | |
33020 | std::swap(cur_arg_, x.cur_arg_); | |
33021 | std::swap(num_args_, x.num_args_); | |
33022 | std::swap(dumped_, x.dumped_); | |
33023 | ||
33024 | items_.swap(x.items_); | |
33025 | prefix_.swap(x.prefix_); | |
33026 | bound_.swap(x.bound_); | |
33027 | } | |
33028 | ||
33029 | template< class Ch, class Tr, class Alloc> | |
33030 | unsigned char basic_format<Ch,Tr, Alloc>:: exceptions() const { | |
33031 | return exceptions_; | |
33032 | } | |
33033 | ||
33034 | template< class Ch, class Tr, class Alloc> | |
33035 | unsigned char basic_format<Ch,Tr, Alloc>:: exceptions(unsigned char newexcept) { | |
33036 | unsigned char swp = exceptions_; | |
33037 | exceptions_ = newexcept; | |
33038 | return swp; | |
33039 | } | |
33040 | ||
33041 | template<class Ch, class Tr, class Alloc> | |
33042 | void basic_format<Ch, Tr, Alloc>:: | |
33043 | make_or_reuse_data (std::size_t nbitems) { | |
33044 | ||
33045 | Ch fill = ( std::use_facet< std::ctype<Ch> >(getloc()) ). widen(' '); | |
33046 | ||
33047 | ||
33048 | ||
33049 | if(items_.size() == 0) | |
33050 | items_.assign( nbitems, format_item_t(fill) ); | |
33051 | else { | |
33052 | if(nbitems>items_.size()) | |
33053 | items_.resize(nbitems, format_item_t(fill)); | |
33054 | bound_.resize(0); | |
33055 | for(std::size_t i=0; i < nbitems; ++i) | |
33056 | items_[i].reset(fill); | |
33057 | } | |
33058 | prefix_.resize(0); | |
33059 | } | |
33060 | ||
33061 | template< class Ch, class Tr, class Alloc> | |
33062 | basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>:: | |
33063 | clear () { | |
33064 | ||
33065 | ||
33066 | ||
33067 | (static_cast<void> ((bound_.size()==0 || num_args_ == static_cast<int>(bound_.size())) ? 0 : (__assert ("bound_.size()==0 || num_args_ == static_cast<int>(bound_.size())", "./boost/format/format_implementation.hpp", 135, __PRETTY_FUNCTION__), 0))); | |
33068 | ||
33069 | for(unsigned long i=0; i<items_.size(); ++i) { | |
33070 | ||
33071 | if( bound_.size()==0 || items_[i].argN_<0 || !bound_[ items_[i].argN_ ] ) | |
33072 | items_[i].res_.resize(0); | |
33073 | } | |
33074 | cur_arg_=0; dumped_=false; | |
33075 | ||
33076 | if(bound_.size() != 0) { | |
33077 | for(; cur_arg_ < num_args_ && bound_[cur_arg_]; ++cur_arg_) | |
33078 | {} | |
33079 | } | |
33080 | return *this; | |
33081 | } | |
33082 | ||
33083 | template< class Ch, class Tr, class Alloc> | |
33084 | basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>:: | |
33085 | clear_binds () { | |
33086 | ||
33087 | bound_.resize(0); | |
33088 | clear(); | |
33089 | return *this; | |
33090 | } | |
33091 | ||
33092 | template< class Ch, class Tr, class Alloc> | |
33093 | basic_format<Ch,Tr, Alloc>& basic_format<Ch,Tr, Alloc>:: | |
33094 | clear_bind (int argN) { | |
33095 | ||
33096 | if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] ) { | |
33097 | if( exceptions() & io::out_of_range_bit) | |
33098 | boost::throw_exception(io::out_of_range(argN, 1, num_args_+1 ) ); | |
33099 | else return *this; | |
33100 | } | |
33101 | bound_[argN-1]=false; | |
33102 | clear(); | |
33103 | return *this; | |
33104 | } | |
33105 | ||
33106 | template< class Ch, class Tr, class Alloc> | |
33107 | typename basic_format<Ch, Tr, Alloc>::string_type | |
33108 | basic_format<Ch,Tr, Alloc>:: | |
33109 | str () const { | |
33110 | if(items_.size()==0) | |
33111 | return prefix_; | |
33112 | if( cur_arg_ < num_args_) | |
33113 | if( exceptions() & io::too_few_args_bit ) | |
33114 | ||
33115 | boost::throw_exception(io::too_few_args(cur_arg_, num_args_)); | |
33116 | ||
33117 | unsigned long i; | |
33118 | string_type res; | |
33119 | res.reserve(size()); | |
33120 | res += prefix_; | |
33121 | for(i=0; i < items_.size(); ++i) { | |
33122 | const format_item_t& item = items_[i]; | |
33123 | res += item.res_; | |
33124 | if( item.argN_ == format_item_t::argN_tabulation) { | |
33125 | (static_cast<void> ((item.pad_scheme_ & format_item_t::tabulation) ? 0 : (__assert ("item.pad_scheme_ & format_item_t::tabulation", "./boost/format/format_implementation.hpp", 193, __PRETTY_FUNCTION__), 0))); | |
33126 | if( static_cast<size_type>(item.fmtstate_.width_) > res.size() ) | |
33127 | res.append( static_cast<size_type>(item.fmtstate_.width_) - res.size(), | |
33128 | item.fmtstate_.fill_ ); | |
33129 | } | |
33130 | res += item.appendix_; | |
33131 | } | |
33132 | dumped_=true; | |
33133 | return res; | |
33134 | } | |
33135 | template< class Ch, class Tr, class Alloc> | |
33136 | typename std::basic_string<Ch, Tr, Alloc>::size_type basic_format<Ch,Tr, Alloc>:: | |
33137 | size () const { | |
33138 | ||
33139 | ||
33140 | ||
33141 | ||
33142 | ||
33143 | ||
33144 | ||
33145 | using std::max; | |
33146 | size_type sz = prefix_.size(); | |
33147 | unsigned long i; | |
33148 | for(i=0; i < items_.size(); ++i) { | |
33149 | const format_item_t& item = items_[i]; | |
33150 | sz += item.res_.size(); | |
33151 | if( item.argN_ == format_item_t::argN_tabulation) | |
33152 | sz = max (sz, | |
33153 | static_cast<size_type>(item.fmtstate_.width_) ); | |
33154 | sz += item.appendix_.size(); | |
33155 | } | |
33156 | return sz; | |
33157 | ||
33158 | ||
33159 | ||
33160 | } | |
33161 | ||
33162 | namespace io { | |
33163 | namespace detail { | |
33164 | ||
33165 | template<class Ch, class Tr, class Alloc, class T> | |
33166 | basic_format<Ch, Tr, Alloc>& | |
33167 | bind_arg_body (basic_format<Ch, Tr, Alloc>& self, int argN, const T& val) { | |
33168 | ||
33169 | ||
33170 | if(self.dumped_) | |
33171 | self.clear(); | |
33172 | if(argN<1 || argN > self.num_args_) { | |
33173 | if( self.exceptions() & io::out_of_range_bit ) | |
33174 | boost::throw_exception(io::out_of_range(argN, 1, self.num_args_+1 ) ); | |
33175 | else return self; | |
33176 | } | |
33177 | if(self.bound_.size()==0) | |
33178 | self.bound_.assign(self.num_args_,false); | |
33179 | else | |
33180 | (static_cast<void> ((self.num_args_ == static_cast<signed int>(self.bound_.size())) ? 0 : (__assert ("self.num_args_ == static_cast<signed int>(self.bound_.size())", "./boost/format/format_implementation.hpp", 248, __PRETTY_FUNCTION__), 0))); | |
33181 | int o_cur_arg = self.cur_arg_; | |
33182 | self.cur_arg_ = argN-1; | |
33183 | ||
33184 | self.bound_[self.cur_arg_]=false; | |
33185 | self.operator%(val); | |
33186 | ||
33187 | ||
33188 | ||
33189 | self.cur_arg_ = o_cur_arg; | |
33190 | self.bound_[argN-1]=true; | |
33191 | if(self.cur_arg_ == argN-1 ) { | |
33192 | ||
33193 | while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) | |
33194 | ++self.cur_arg_; | |
33195 | } | |
33196 | ||
33197 | (static_cast<void> ((self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]) ? 0 : (__assert ("self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]", "./boost/format/format_implementation.hpp", 265, __PRETTY_FUNCTION__), 0))); | |
33198 | return self; | |
33199 | } | |
33200 | ||
33201 | template<class Ch, class Tr, class Alloc, class T> basic_format<Ch, Tr, Alloc>& | |
33202 | modify_item_body (basic_format<Ch, Tr, Alloc>& self, int itemN, T manipulator) { | |
33203 | ||
33204 | ||
33205 | if(itemN<1 || itemN > static_cast<signed int>(self.items_.size() )) { | |
33206 | if( self.exceptions() & io::out_of_range_bit ) | |
33207 | boost::throw_exception(io::out_of_range(itemN, 1, static_cast<int>(self.items_.size()) )); | |
33208 | else return self; | |
33209 | } | |
33210 | self.items_[itemN-1].fmtstate_. template apply_manip<T> ( manipulator ); | |
33211 | return self; | |
33212 | } | |
33213 | ||
33214 | } | |
33215 | } | |
33216 | } | |
33217 | # 48 "./boost/format.hpp" 2 | |
33218 | # 1 "./boost/format/group.hpp" 1 | |
33219 | # 29 "./boost/format/group.hpp" | |
33220 | namespace boost { | |
33221 | namespace io { | |
33222 | ||
33223 | ||
33224 | namespace detail { | |
33225 | ||
33226 | ||
33227 | ||
33228 | struct group0 | |
33229 | { | |
33230 | group0() {} | |
33231 | }; | |
33232 | ||
33233 | template <class Ch, class Tr> | |
33234 | inline | |
33235 | ::std:: basic_ostream<Ch, Tr>& | |
33236 | operator << ( ::std:: basic_ostream<Ch, Tr>& os, | |
33237 | const group0& ) | |
33238 | { | |
33239 | return os; | |
33240 | } | |
33241 | ||
33242 | template <class T1> | |
33243 | struct group1 | |
33244 | { | |
33245 | T1 a1_; | |
33246 | group1(T1 a1) | |
33247 | : a1_(a1) | |
33248 | {} | |
33249 | private: | |
33250 | group1& operator=(const group1&); | |
33251 | }; | |
33252 | ||
33253 | template <class Ch, class Tr, class T1> | |
33254 | inline | |
33255 | ::std:: basic_ostream<Ch, Tr>& | |
33256 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33257 | const group1<T1>& x) | |
33258 | { | |
33259 | os << x.a1_; | |
33260 | return os; | |
33261 | } | |
33262 | ||
33263 | ||
33264 | ||
33265 | ||
33266 | template <class T1,class T2> | |
33267 | struct group2 | |
33268 | { | |
33269 | T1 a1_; | |
33270 | T2 a2_; | |
33271 | group2(T1 a1,T2 a2) | |
33272 | : a1_(a1),a2_(a2) | |
33273 | {} | |
33274 | private: | |
33275 | group2& operator=(const group2&); | |
33276 | }; | |
33277 | ||
33278 | template <class Ch, class Tr, class T1,class T2> | |
33279 | inline | |
33280 | ::std:: basic_ostream<Ch, Tr>& | |
33281 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33282 | const group2<T1,T2>& x) | |
33283 | { | |
33284 | os << x.a1_<< x.a2_; | |
33285 | return os; | |
33286 | } | |
33287 | ||
33288 | template <class T1,class T2,class T3> | |
33289 | struct group3 | |
33290 | { | |
33291 | T1 a1_; | |
33292 | T2 a2_; | |
33293 | T3 a3_; | |
33294 | group3(T1 a1,T2 a2,T3 a3) | |
33295 | : a1_(a1),a2_(a2),a3_(a3) | |
33296 | {} | |
33297 | private: | |
33298 | group3& operator=(const group3&); | |
33299 | }; | |
33300 | ||
33301 | template <class Ch, class Tr, class T1,class T2,class T3> | |
33302 | inline | |
33303 | ::std:: basic_ostream<Ch, Tr>& | |
33304 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33305 | const group3<T1,T2,T3>& x) | |
33306 | { | |
33307 | os << x.a1_<< x.a2_<< x.a3_; | |
33308 | return os; | |
33309 | } | |
33310 | ||
33311 | template <class T1,class T2,class T3,class T4> | |
33312 | struct group4 | |
33313 | { | |
33314 | T1 a1_; | |
33315 | T2 a2_; | |
33316 | T3 a3_; | |
33317 | T4 a4_; | |
33318 | group4(T1 a1,T2 a2,T3 a3,T4 a4) | |
33319 | : a1_(a1),a2_(a2),a3_(a3),a4_(a4) | |
33320 | {} | |
33321 | private: | |
33322 | group4& operator=(const group4&); | |
33323 | }; | |
33324 | ||
33325 | template <class Ch, class Tr, class T1,class T2,class T3,class T4> | |
33326 | inline | |
33327 | ::std:: basic_ostream<Ch, Tr>& | |
33328 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33329 | const group4<T1,T2,T3,T4>& x) | |
33330 | { | |
33331 | os << x.a1_<< x.a2_<< x.a3_<< x.a4_; | |
33332 | return os; | |
33333 | } | |
33334 | ||
33335 | template <class T1,class T2,class T3,class T4,class T5> | |
33336 | struct group5 | |
33337 | { | |
33338 | T1 a1_; | |
33339 | T2 a2_; | |
33340 | T3 a3_; | |
33341 | T4 a4_; | |
33342 | T5 a5_; | |
33343 | group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) | |
33344 | : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5) | |
33345 | {} | |
33346 | }; | |
33347 | ||
33348 | template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5> | |
33349 | inline | |
33350 | ::std:: basic_ostream<Ch, Tr>& | |
33351 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33352 | const group5<T1,T2,T3,T4,T5>& x) | |
33353 | { | |
33354 | os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_; | |
33355 | return os; | |
33356 | } | |
33357 | ||
33358 | template <class T1,class T2,class T3,class T4,class T5,class T6> | |
33359 | struct group6 | |
33360 | { | |
33361 | T1 a1_; | |
33362 | T2 a2_; | |
33363 | T3 a3_; | |
33364 | T4 a4_; | |
33365 | T5 a5_; | |
33366 | T6 a6_; | |
33367 | group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) | |
33368 | : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6) | |
33369 | {} | |
33370 | }; | |
33371 | ||
33372 | template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6> | |
33373 | inline | |
33374 | ::std:: basic_ostream<Ch, Tr>& | |
33375 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33376 | const group6<T1,T2,T3,T4,T5,T6>& x) | |
33377 | { | |
33378 | os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_; | |
33379 | return os; | |
33380 | } | |
33381 | ||
33382 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> | |
33383 | struct group7 | |
33384 | { | |
33385 | T1 a1_; | |
33386 | T2 a2_; | |
33387 | T3 a3_; | |
33388 | T4 a4_; | |
33389 | T5 a5_; | |
33390 | T6 a6_; | |
33391 | T7 a7_; | |
33392 | group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) | |
33393 | : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7) | |
33394 | {} | |
33395 | }; | |
33396 | ||
33397 | template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7> | |
33398 | inline | |
33399 | ::std:: basic_ostream<Ch, Tr>& | |
33400 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33401 | const group7<T1,T2,T3,T4,T5,T6,T7>& x) | |
33402 | { | |
33403 | os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_; | |
33404 | return os; | |
33405 | } | |
33406 | ||
33407 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> | |
33408 | struct group8 | |
33409 | { | |
33410 | T1 a1_; | |
33411 | T2 a2_; | |
33412 | T3 a3_; | |
33413 | T4 a4_; | |
33414 | T5 a5_; | |
33415 | T6 a6_; | |
33416 | T7 a7_; | |
33417 | T8 a8_; | |
33418 | group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) | |
33419 | : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8) | |
33420 | {} | |
33421 | }; | |
33422 | ||
33423 | template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> | |
33424 | inline | |
33425 | ::std:: basic_ostream<Ch, Tr>& | |
33426 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33427 | const group8<T1,T2,T3,T4,T5,T6,T7,T8>& x) | |
33428 | { | |
33429 | os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_; | |
33430 | return os; | |
33431 | } | |
33432 | ||
33433 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> | |
33434 | struct group9 | |
33435 | { | |
33436 | T1 a1_; | |
33437 | T2 a2_; | |
33438 | T3 a3_; | |
33439 | T4 a4_; | |
33440 | T5 a5_; | |
33441 | T6 a6_; | |
33442 | T7 a7_; | |
33443 | T8 a8_; | |
33444 | T9 a9_; | |
33445 | group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) | |
33446 | : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9) | |
33447 | {} | |
33448 | }; | |
33449 | ||
33450 | template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> | |
33451 | inline | |
33452 | ::std:: basic_ostream<Ch, Tr>& | |
33453 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33454 | const group9<T1,T2,T3,T4,T5,T6,T7,T8,T9>& x) | |
33455 | { | |
33456 | os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_; | |
33457 | return os; | |
33458 | } | |
33459 | ||
33460 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> | |
33461 | struct group10 | |
33462 | { | |
33463 | T1 a1_; | |
33464 | T2 a2_; | |
33465 | T3 a3_; | |
33466 | T4 a4_; | |
33467 | T5 a5_; | |
33468 | T6 a6_; | |
33469 | T7 a7_; | |
33470 | T8 a8_; | |
33471 | T9 a9_; | |
33472 | T10 a10_; | |
33473 | group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10) | |
33474 | : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10) | |
33475 | {} | |
33476 | }; | |
33477 | ||
33478 | template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> | |
33479 | inline | |
33480 | ::std:: basic_ostream<Ch, Tr>& | |
33481 | operator << (::std:: basic_ostream<Ch, Tr>& os, | |
33482 | const group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>& x) | |
33483 | { | |
33484 | os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_; | |
33485 | return os; | |
33486 | } | |
33487 | ||
33488 | ||
33489 | ||
33490 | ||
33491 | template <class T1,class T2> | |
33492 | inline | |
33493 | group1<T1> | |
33494 | group_head( group2<T1,T2> const& x) | |
33495 | { | |
33496 | return group1<T1> (x.a1_); | |
33497 | } | |
33498 | ||
33499 | template <class T1,class T2> | |
33500 | inline | |
33501 | group1<T2> | |
33502 | group_last( group2<T1,T2> const& x) | |
33503 | { | |
33504 | return group1<T2> (x.a2_); | |
33505 | } | |
33506 | ||
33507 | ||
33508 | ||
33509 | template <class T1,class T2,class T3> | |
33510 | inline | |
33511 | group2<T1,T2> | |
33512 | group_head( group3<T1,T2,T3> const& x) | |
33513 | { | |
33514 | return group2<T1,T2> (x.a1_,x.a2_); | |
33515 | } | |
33516 | ||
33517 | template <class T1,class T2,class T3> | |
33518 | inline | |
33519 | group1<T3> | |
33520 | group_last( group3<T1,T2,T3> const& x) | |
33521 | { | |
33522 | return group1<T3> (x.a3_); | |
33523 | } | |
33524 | ||
33525 | ||
33526 | ||
33527 | template <class T1,class T2,class T3,class T4> | |
33528 | inline | |
33529 | group3<T1,T2,T3> | |
33530 | group_head( group4<T1,T2,T3,T4> const& x) | |
33531 | { | |
33532 | return group3<T1,T2,T3> (x.a1_,x.a2_,x.a3_); | |
33533 | } | |
33534 | ||
33535 | template <class T1,class T2,class T3,class T4> | |
33536 | inline | |
33537 | group1<T4> | |
33538 | group_last( group4<T1,T2,T3,T4> const& x) | |
33539 | { | |
33540 | return group1<T4> (x.a4_); | |
33541 | } | |
33542 | ||
33543 | ||
33544 | ||
33545 | template <class T1,class T2,class T3,class T4,class T5> | |
33546 | inline | |
33547 | group4<T1,T2,T3,T4> | |
33548 | group_head( group5<T1,T2,T3,T4,T5> const& x) | |
33549 | { | |
33550 | return group4<T1,T2,T3,T4> (x.a1_,x.a2_,x.a3_,x.a4_); | |
33551 | } | |
33552 | ||
33553 | template <class T1,class T2,class T3,class T4,class T5> | |
33554 | inline | |
33555 | group1<T5> | |
33556 | group_last( group5<T1,T2,T3,T4,T5> const& x) | |
33557 | { | |
33558 | return group1<T5> (x.a5_); | |
33559 | } | |
33560 | ||
33561 | ||
33562 | ||
33563 | template <class T1,class T2,class T3,class T4,class T5,class T6> | |
33564 | inline | |
33565 | group5<T1,T2,T3,T4,T5> | |
33566 | group_head( group6<T1,T2,T3,T4,T5,T6> const& x) | |
33567 | { | |
33568 | return group5<T1,T2,T3,T4,T5> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_); | |
33569 | } | |
33570 | ||
33571 | template <class T1,class T2,class T3,class T4,class T5,class T6> | |
33572 | inline | |
33573 | group1<T6> | |
33574 | group_last( group6<T1,T2,T3,T4,T5,T6> const& x) | |
33575 | { | |
33576 | return group1<T6> (x.a6_); | |
33577 | } | |
33578 | ||
33579 | ||
33580 | ||
33581 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> | |
33582 | inline | |
33583 | group6<T1,T2,T3,T4,T5,T6> | |
33584 | group_head( group7<T1,T2,T3,T4,T5,T6,T7> const& x) | |
33585 | { | |
33586 | return group6<T1,T2,T3,T4,T5,T6> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_); | |
33587 | } | |
33588 | ||
33589 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> | |
33590 | inline | |
33591 | group1<T7> | |
33592 | group_last( group7<T1,T2,T3,T4,T5,T6,T7> const& x) | |
33593 | { | |
33594 | return group1<T7> (x.a7_); | |
33595 | } | |
33596 | ||
33597 | ||
33598 | ||
33599 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> | |
33600 | inline | |
33601 | group7<T1,T2,T3,T4,T5,T6,T7> | |
33602 | group_head( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x) | |
33603 | { | |
33604 | return group7<T1,T2,T3,T4,T5,T6,T7> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_); | |
33605 | } | |
33606 | ||
33607 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> | |
33608 | inline | |
33609 | group1<T8> | |
33610 | group_last( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x) | |
33611 | { | |
33612 | return group1<T8> (x.a8_); | |
33613 | } | |
33614 | ||
33615 | ||
33616 | ||
33617 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> | |
33618 | inline | |
33619 | group8<T1,T2,T3,T4,T5,T6,T7,T8> | |
33620 | group_head( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x) | |
33621 | { | |
33622 | return group8<T1,T2,T3,T4,T5,T6,T7,T8> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_); | |
33623 | } | |
33624 | ||
33625 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> | |
33626 | inline | |
33627 | group1<T9> | |
33628 | group_last( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x) | |
33629 | { | |
33630 | return group1<T9> (x.a9_); | |
33631 | } | |
33632 | ||
33633 | ||
33634 | ||
33635 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> | |
33636 | inline | |
33637 | group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> | |
33638 | group_head( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x) | |
33639 | { | |
33640 | return group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_); | |
33641 | } | |
33642 | ||
33643 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> | |
33644 | inline | |
33645 | group1<T10> | |
33646 | group_last( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x) | |
33647 | { | |
33648 | return group1<T10> (x.a10_); | |
33649 | } | |
33650 | ||
33651 | ||
33652 | ||
33653 | ||
33654 | ||
33655 | } | |
33656 | ||
33657 | ||
33658 | ||
33659 | ||
33660 | ||
33661 | ||
33662 | inline detail::group1< detail::group0 > | |
33663 | group() { return detail::group1< detail::group0 > ( detail::group0() ); } | |
33664 | ||
33665 | template <class T1, class Var> | |
33666 | inline | |
33667 | detail::group1< detail::group2<T1, Var const&> > | |
33668 | group(T1 a1, Var const& var) | |
33669 | { | |
33670 | return detail::group1< detail::group2<T1, Var const&> > | |
33671 | ( detail::group2<T1, Var const&> | |
33672 | (a1, var) | |
33673 | ); | |
33674 | } | |
33675 | ||
33676 | template <class T1,class T2, class Var> | |
33677 | inline | |
33678 | detail::group1< detail::group3<T1,T2, Var const&> > | |
33679 | group(T1 a1,T2 a2, Var const& var) | |
33680 | { | |
33681 | return detail::group1< detail::group3<T1,T2, Var const&> > | |
33682 | ( detail::group3<T1,T2, Var const&> | |
33683 | (a1,a2, var) | |
33684 | ); | |
33685 | } | |
33686 | ||
33687 | template <class T1,class T2,class T3, class Var> | |
33688 | inline | |
33689 | detail::group1< detail::group4<T1,T2,T3, Var const&> > | |
33690 | group(T1 a1,T2 a2,T3 a3, Var const& var) | |
33691 | { | |
33692 | return detail::group1< detail::group4<T1,T2,T3, Var const&> > | |
33693 | ( detail::group4<T1,T2,T3, Var const&> | |
33694 | (a1,a2,a3, var) | |
33695 | ); | |
33696 | } | |
33697 | ||
33698 | template <class T1,class T2,class T3,class T4, class Var> | |
33699 | inline | |
33700 | detail::group1< detail::group5<T1,T2,T3,T4, Var const&> > | |
33701 | group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var) | |
33702 | { | |
33703 | return detail::group1< detail::group5<T1,T2,T3,T4, Var const&> > | |
33704 | ( detail::group5<T1,T2,T3,T4, Var const&> | |
33705 | (a1,a2,a3,a4, var) | |
33706 | ); | |
33707 | } | |
33708 | ||
33709 | template <class T1,class T2,class T3,class T4,class T5, class Var> | |
33710 | inline | |
33711 | detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> > | |
33712 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var) | |
33713 | { | |
33714 | return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> > | |
33715 | ( detail::group6<T1,T2,T3,T4,T5, Var const&> | |
33716 | (a1,a2,a3,a4,a5, var) | |
33717 | ); | |
33718 | } | |
33719 | ||
33720 | template <class T1,class T2,class T3,class T4,class T5,class T6, class Var> | |
33721 | inline | |
33722 | detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> > | |
33723 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var) | |
33724 | { | |
33725 | return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> > | |
33726 | ( detail::group7<T1,T2,T3,T4,T5,T6, Var const&> | |
33727 | (a1,a2,a3,a4,a5,a6, var) | |
33728 | ); | |
33729 | } | |
33730 | ||
33731 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var> | |
33732 | inline | |
33733 | detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> > | |
33734 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var) | |
33735 | { | |
33736 | return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> > | |
33737 | ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> | |
33738 | (a1,a2,a3,a4,a5,a6,a7, var) | |
33739 | ); | |
33740 | } | |
33741 | ||
33742 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var> | |
33743 | inline | |
33744 | detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> > | |
33745 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var) | |
33746 | { | |
33747 | return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> > | |
33748 | ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> | |
33749 | (a1,a2,a3,a4,a5,a6,a7,a8, var) | |
33750 | ); | |
33751 | } | |
33752 | ||
33753 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var> | |
33754 | inline | |
33755 | detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> > | |
33756 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var) | |
33757 | { | |
33758 | return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> > | |
33759 | ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> | |
33760 | (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) | |
33761 | ); | |
33762 | } | |
33763 | ||
33764 | ||
33765 | ||
33766 | ||
33767 | template <class T1, class Var> | |
33768 | inline | |
33769 | detail::group1< detail::group2<T1, Var&> > | |
33770 | group(T1 a1, Var& var) | |
33771 | { | |
33772 | return detail::group1< detail::group2<T1, Var&> > | |
33773 | ( detail::group2<T1, Var&> | |
33774 | (a1, var) | |
33775 | ); | |
33776 | } | |
33777 | ||
33778 | template <class T1,class T2, class Var> | |
33779 | inline | |
33780 | detail::group1< detail::group3<T1,T2, Var&> > | |
33781 | group(T1 a1,T2 a2, Var& var) | |
33782 | { | |
33783 | return detail::group1< detail::group3<T1,T2, Var&> > | |
33784 | ( detail::group3<T1,T2, Var&> | |
33785 | (a1,a2, var) | |
33786 | ); | |
33787 | } | |
33788 | ||
33789 | template <class T1,class T2,class T3, class Var> | |
33790 | inline | |
33791 | detail::group1< detail::group4<T1,T2,T3, Var&> > | |
33792 | group(T1 a1,T2 a2,T3 a3, Var& var) | |
33793 | { | |
33794 | return detail::group1< detail::group4<T1,T2,T3, Var&> > | |
33795 | ( detail::group4<T1,T2,T3, Var&> | |
33796 | (a1,a2,a3, var) | |
33797 | ); | |
33798 | } | |
33799 | ||
33800 | template <class T1,class T2,class T3,class T4, class Var> | |
33801 | inline | |
33802 | detail::group1< detail::group5<T1,T2,T3,T4, Var&> > | |
33803 | group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var) | |
33804 | { | |
33805 | return detail::group1< detail::group5<T1,T2,T3,T4, Var&> > | |
33806 | ( detail::group5<T1,T2,T3,T4, Var&> | |
33807 | (a1,a2,a3,a4, var) | |
33808 | ); | |
33809 | } | |
33810 | ||
33811 | template <class T1,class T2,class T3,class T4,class T5, class Var> | |
33812 | inline | |
33813 | detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> > | |
33814 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var) | |
33815 | { | |
33816 | return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> > | |
33817 | ( detail::group6<T1,T2,T3,T4,T5, Var&> | |
33818 | (a1,a2,a3,a4,a5, var) | |
33819 | ); | |
33820 | } | |
33821 | ||
33822 | template <class T1,class T2,class T3,class T4,class T5,class T6, class Var> | |
33823 | inline | |
33824 | detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> > | |
33825 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var) | |
33826 | { | |
33827 | return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> > | |
33828 | ( detail::group7<T1,T2,T3,T4,T5,T6, Var&> | |
33829 | (a1,a2,a3,a4,a5,a6, var) | |
33830 | ); | |
33831 | } | |
33832 | ||
33833 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var> | |
33834 | inline | |
33835 | detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> > | |
33836 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var) | |
33837 | { | |
33838 | return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> > | |
33839 | ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> | |
33840 | (a1,a2,a3,a4,a5,a6,a7, var) | |
33841 | ); | |
33842 | } | |
33843 | ||
33844 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var> | |
33845 | inline | |
33846 | detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> > | |
33847 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var) | |
33848 | { | |
33849 | return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> > | |
33850 | ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> | |
33851 | (a1,a2,a3,a4,a5,a6,a7,a8, var) | |
33852 | ); | |
33853 | } | |
33854 | ||
33855 | template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var> | |
33856 | inline | |
33857 | detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> > | |
33858 | group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var) | |
33859 | { | |
33860 | return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> > | |
33861 | ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> | |
33862 | (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) | |
33863 | ); | |
33864 | } | |
33865 | ||
33866 | ||
33867 | ||
33868 | ||
33869 | ||
33870 | } | |
33871 | ||
33872 | } | |
33873 | # 49 "./boost/format.hpp" 2 | |
33874 | # 1 "./boost/format/feed_args.hpp" 1 | |
33875 | # 18 "./boost/format/feed_args.hpp" | |
33876 | # 1 "./boost/assert.hpp" 1 | |
33877 | # 36 "./boost/assert.hpp" | |
33878 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 1 3 4 | |
33879 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 3 4 | |
33880 | extern "C" { | |
33881 | ||
33882 | ||
33883 | extern void __assert (const char *, const char *, int, const char *); | |
33884 | ||
33885 | } | |
33886 | # 37 "./boost/assert.hpp" 2 | |
33887 | # 19 "./boost/format/feed_args.hpp" 2 | |
33888 | ||
33889 | ||
33890 | ||
33891 | ||
33892 | # 1 "./boost/format/detail/msvc_disambiguater.hpp" 1 | |
33893 | # 24 "./boost/format/feed_args.hpp" 2 | |
33894 | ||
33895 | namespace boost { | |
33896 | namespace io { | |
33897 | namespace detail { | |
33898 | ||
33899 | template<class Ch, class Tr, class Alloc> | |
33900 | void mk_str( std::basic_string<Ch,Tr, Alloc> & res, | |
33901 | const Ch * beg, | |
33902 | typename std::basic_string<Ch,Tr,Alloc>::size_type size, | |
33903 | std::streamsize w, | |
33904 | const Ch fill_char, | |
33905 | std::ios_base::fmtflags f, | |
33906 | const Ch prefix_space, | |
33907 | bool center) | |
33908 | ||
33909 | ||
33910 | { | |
33911 | typedef typename std::basic_string<Ch,Tr,Alloc>::size_type size_type; | |
33912 | res.resize(0); | |
33913 | if(w<=0 || static_cast<size_type>(w) <=size) { | |
33914 | ||
33915 | res.reserve(size + !!prefix_space); | |
33916 | if(prefix_space) | |
33917 | res.append(1, prefix_space); | |
33918 | if (size) | |
33919 | res.append(beg, size); | |
33920 | } | |
33921 | else { | |
33922 | std::streamsize n=static_cast<std::streamsize>(w-size-!!prefix_space); | |
33923 | std::streamsize n_after = 0, n_before = 0; | |
33924 | res.reserve(static_cast<size_type>(w)); | |
33925 | if(center) | |
33926 | n_after = n/2, n_before = n - n_after; | |
33927 | else | |
33928 | if(f & std::ios_base::left) | |
33929 | n_after = n; | |
33930 | else | |
33931 | n_before = n; | |
33932 | ||
33933 | if(n_before) res.append(static_cast<size_type>(n_before), fill_char); | |
33934 | if(prefix_space) | |
33935 | res.append(1, prefix_space); | |
33936 | if (size) | |
33937 | res.append(beg, size); | |
33938 | if(n_after) res.append(static_cast<size_type>(n_after), fill_char); | |
33939 | } | |
33940 | } | |
33941 | # 89 "./boost/format/feed_args.hpp" | |
33942 | template< class Ch, class Tr, class T> inline | |
33943 | void put_head (::std:: basic_ostream<Ch, Tr> &, const T& ) { | |
33944 | } | |
33945 | ||
33946 | template< class Ch, class Tr, class T> inline | |
33947 | void put_head( ::std:: basic_ostream<Ch, Tr> & os, const group1<T>& x ) { | |
33948 | os << group_head(x.a1_); | |
33949 | } | |
33950 | ||
33951 | template< class Ch, class Tr, class T> inline | |
33952 | void put_last( ::std:: basic_ostream<Ch, Tr> & os, const T& x ) { | |
33953 | os << x ; | |
33954 | } | |
33955 | ||
33956 | template< class Ch, class Tr, class T> inline | |
33957 | void put_last( ::std:: basic_ostream<Ch, Tr> & os, const group1<T>& x ) { | |
33958 | os << group_last(x.a1_); | |
33959 | } | |
33960 | ||
33961 | ||
33962 | template< class Ch, class Tr, class T> inline | |
33963 | void put_head( ::std:: basic_ostream<Ch, Tr> &, T& ) { | |
33964 | } | |
33965 | ||
33966 | template< class Ch, class Tr, class T> inline | |
33967 | void put_last( ::std:: basic_ostream<Ch, Tr> & os, T& x) { | |
33968 | os << x ; | |
33969 | } | |
33970 | ||
33971 | ||
33972 | ||
33973 | ||
33974 | template< class Ch, class Tr, class Alloc, class T> | |
33975 | void put( T x, | |
33976 | const format_item<Ch, Tr, Alloc>& specs, | |
33977 | typename basic_format<Ch, Tr, Alloc>::string_type& res, | |
33978 | typename basic_format<Ch, Tr, Alloc>::internal_streambuf_t & buf, | |
33979 | io::detail::locale_t *loc_p = __null) | |
33980 | { | |
33981 | # 138 "./boost/format/feed_args.hpp" | |
33982 | typedef typename basic_format<Ch, Tr, Alloc>::string_type string_type; | |
33983 | typedef typename basic_format<Ch, Tr, Alloc>::format_item_t format_item_t; | |
33984 | typedef typename string_type::size_type size_type; | |
33985 | ||
33986 | basic_oaltstringstream<Ch, Tr, Alloc> oss( &buf); | |
33987 | specs.fmtstate_.apply_on(oss, loc_p); | |
33988 | ||
33989 | ||
33990 | put_head( oss, x ); | |
33991 | ||
33992 | ||
33993 | ||
33994 | const std::ios_base::fmtflags fl=oss.flags(); | |
33995 | const bool internal = (fl & std::ios_base::internal) != 0; | |
33996 | const std::streamsize w = oss.width(); | |
33997 | const bool two_stepped_padding= internal && (w!=0); | |
33998 | ||
33999 | res.resize(0); | |
34000 | if(! two_stepped_padding) { | |
34001 | if(w>0) | |
34002 | oss.width(0); | |
34003 | put_last( oss, x); | |
34004 | const Ch * res_beg = buf.pbase(); | |
34005 | Ch prefix_space = 0; | |
34006 | if(specs.pad_scheme_ & format_item_t::spacepad) | |
34007 | if(buf.pcount()== 0 || | |
34008 | (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) | |
34009 | prefix_space = oss.widen(' '); | |
34010 | size_type res_size = (std::min)( | |
34011 | static_cast<size_type>(specs.truncate_ - !!prefix_space), | |
34012 | buf.pcount() ); | |
34013 | mk_str(res, res_beg, res_size, w, oss.fill(), fl, | |
34014 | prefix_space, (specs.pad_scheme_ & format_item_t::centered) !=0 ); | |
34015 | } | |
34016 | else { | |
34017 | ||
34018 | ||
34019 | ||
34020 | put_last( oss, x); | |
34021 | const Ch * res_beg = buf.pbase(); | |
34022 | size_type res_size = buf.pcount(); | |
34023 | bool prefix_space=false; | |
34024 | if(specs.pad_scheme_ & format_item_t::spacepad) | |
34025 | if(buf.pcount()== 0 || | |
34026 | (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) | |
34027 | prefix_space = true; | |
34028 | if(res_size == static_cast<size_type>(w) && w<=specs.truncate_ && !prefix_space) { | |
34029 | ||
34030 | res.assign(res_beg, res_size); | |
34031 | } | |
34032 | else { | |
34033 | ||
34034 | ||
34035 | ||
34036 | res.assign(res_beg, res_size); | |
34037 | res_beg=__null; | |
34038 | ||
34039 | ||
34040 | buf.clear_buffer(); | |
34041 | basic_oaltstringstream<Ch, Tr, Alloc> oss2( &buf); | |
34042 | specs.fmtstate_.apply_on(oss2, loc_p); | |
34043 | put_head( oss2, x ); | |
34044 | ||
34045 | oss2.width(0); | |
34046 | if(prefix_space) | |
34047 | oss2 << ' '; | |
34048 | put_last(oss2, x ); | |
34049 | if(buf.pcount()==0 && specs.pad_scheme_ & format_item_t::spacepad) { | |
34050 | prefix_space =true; | |
34051 | oss2 << ' '; | |
34052 | } | |
34053 | ||
34054 | const Ch * tmp_beg = buf.pbase(); | |
34055 | size_type tmp_size = (std::min)(static_cast<size_type>(specs.truncate_), | |
34056 | buf.pcount() ); | |
34057 | ||
34058 | ||
34059 | if(static_cast<size_type>(w) <= tmp_size) { | |
34060 | ||
34061 | res.assign(tmp_beg, tmp_size); | |
34062 | } | |
34063 | else { | |
34064 | ||
34065 | size_type sz = (std::min)(res_size + (prefix_space ? 1 : 0), tmp_size); | |
34066 | size_type i = prefix_space; | |
34067 | for(; i<sz && tmp_beg[i] == res[i - (prefix_space ? 1 : 0)]; ++i) {} | |
34068 | if(i>=tmp_size) i=prefix_space; | |
34069 | res.assign(tmp_beg, i); | |
34070 | std::streamsize d = w - static_cast<std::streamsize>(tmp_size); | |
34071 | (static_cast<void> ((d>0) ? 0 : (__assert ("d>0", "./boost/format/feed_args.hpp", 227, __PRETTY_FUNCTION__), 0))); | |
34072 | res.append(static_cast<size_type>( d ), oss2.fill()); | |
34073 | res.append(tmp_beg+i, tmp_size-i); | |
34074 | (static_cast<void> ((i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) == static_cast<size_type>(w)) ? 0 : (__assert ("i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) == static_cast<size_type>(w)", "./boost/format/feed_args.hpp", 231, __PRETTY_FUNCTION__), 0))); | |
34075 | ||
34076 | (static_cast<void> ((res.size() == static_cast<size_type>(w)) ? 0 : (__assert ("res.size() == static_cast<size_type>(w)", "./boost/format/feed_args.hpp", 232, __PRETTY_FUNCTION__), 0))); | |
34077 | } | |
34078 | } | |
34079 | } | |
34080 | buf.clear_buffer(); | |
34081 | ||
34082 | ||
34083 | ||
34084 | } | |
34085 | ||
34086 | ||
34087 | template< class Ch, class Tr, class Alloc, class T> | |
34088 | void distribute (basic_format<Ch,Tr, Alloc>& self, T x) { | |
34089 | ||
34090 | if(self.cur_arg_ >= self.num_args_) { | |
34091 | if( self.exceptions() & too_many_args_bit ) | |
34092 | boost::throw_exception(too_many_args(self.cur_arg_, self.num_args_)); | |
34093 | else return; | |
34094 | } | |
34095 | for(unsigned long i=0; i < self.items_.size(); ++i) { | |
34096 | if(self.items_[i].argN_ == self.cur_arg_) { | |
34097 | put<Ch, Tr, Alloc, T> (x, self.items_[i], self.items_[i].res_, | |
34098 | self.buf_, boost::get_pointer(self.loc_) ); | |
34099 | } | |
34100 | } | |
34101 | } | |
34102 | ||
34103 | template<class Ch, class Tr, class Alloc, class T> | |
34104 | basic_format<Ch, Tr, Alloc>& | |
34105 | feed (basic_format<Ch,Tr, Alloc>& self, T x) { | |
34106 | if(self.dumped_) self.clear(); | |
34107 | distribute<Ch, Tr, Alloc, T> (self, x); | |
34108 | ++self.cur_arg_; | |
34109 | if(self.bound_.size() != 0) { | |
34110 | while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] ) | |
34111 | ++self.cur_arg_; | |
34112 | } | |
34113 | return self; | |
34114 | } | |
34115 | ||
34116 | } | |
34117 | } | |
34118 | } | |
34119 | # 50 "./boost/format.hpp" 2 | |
34120 | # 1 "./boost/format/parsing.hpp" 1 | |
34121 | # 21 "./boost/format/parsing.hpp" | |
34122 | # 1 "./boost/assert.hpp" 1 | |
34123 | # 36 "./boost/assert.hpp" | |
34124 | # 1 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 1 3 4 | |
34125 | # 51 "/usr/local/src/blackfin/toolchains/20080521/bfin-linux-uclibc/bfin-linux-uclibc/runtime/usr/include/assert.h" 3 4 | |
34126 | extern "C" { | |
34127 | ||
34128 | ||
34129 | extern void __assert (const char *, const char *, int, const char *); | |
34130 | ||
34131 | } | |
34132 | # 37 "./boost/assert.hpp" 2 | |
34133 | # 22 "./boost/format/parsing.hpp" 2 | |
34134 | ||
34135 | ||
34136 | namespace boost { | |
34137 | namespace io { | |
34138 | namespace detail { | |
34139 | # 35 "./boost/format/parsing.hpp" | |
34140 | template<class T> | |
34141 | const T& const_or_not(const T& x) { | |
34142 | return x; | |
34143 | } | |
34144 | ||
34145 | ||
34146 | template<class Ch, class Facet> inline | |
34147 | char wrap_narrow(const Facet& fac, Ch c, char deflt) { | |
34148 | return const_or_not(fac).narrow(c, deflt); | |
34149 | } | |
34150 | ||
34151 | template<class Ch, class Facet> inline | |
34152 | bool wrap_isdigit(const Facet& fac, Ch c) { | |
34153 | ||
34154 | return fac.is(std::ctype<Ch>::digit, c); | |
34155 | ||
34156 | ||
34157 | ||
34158 | ||
34159 | } | |
34160 | ||
34161 | template<class Iter, class Facet> | |
34162 | Iter wrap_scan_notdigit(const Facet & fac, Iter beg, Iter end) { | |
34163 | using namespace std; | |
34164 | for( ; beg!=end && wrap_isdigit(fac, *beg); ++beg) ; | |
34165 | return beg; | |
34166 | } | |
34167 | ||
34168 | ||
34169 | ||
34170 | ||
34171 | ||
34172 | ||
34173 | template<class Res, class Iter, class Facet> | |
34174 | Iter str2int (const Iter & start, const Iter & last, Res & res, | |
34175 | const Facet& fac) | |
34176 | { | |
34177 | using namespace std; | |
34178 | Iter it; | |
34179 | res=0; | |
34180 | for(it=start; it != last && wrap_isdigit(fac, *it); ++it ) { | |
34181 | char cur_ch = wrap_narrow(fac, *it, 0); | |
34182 | res *= 10; | |
34183 | res += cur_ch - '0'; | |
34184 | } | |
34185 | return it; | |
34186 | } | |
34187 | ||
34188 | ||
34189 | ||
34190 | ||
34191 | ||
34192 | ||
34193 | template<class Iter, class Facet> | |
34194 | Iter skip_asterisk(Iter start, Iter last, const Facet& fac) | |
34195 | { | |
34196 | using namespace std; | |
34197 | ++ start; | |
34198 | start = wrap_scan_notdigit(fac, start, last); | |
34199 | if(start!=last && *start== const_or_not(fac).widen( '$') ) | |
34200 | ++start; | |
34201 | return start; | |
34202 | } | |
34203 | ||
34204 | ||
34205 | ||
34206 | ||
34207 | ||
34208 | inline void maybe_throw_exception(unsigned char exceptions, | |
34209 | std::size_t pos, std::size_t size) | |
34210 | { | |
34211 | if(exceptions & io::bad_format_string_bit) | |
34212 | boost::throw_exception(io::bad_format_string(pos, size) ); | |
34213 | } | |
34214 | # 121 "./boost/format/parsing.hpp" | |
34215 | template<class Ch, class Tr, class Alloc, class Iter, class Facet> | |
34216 | bool parse_printf_directive(Iter & start, const Iter& last, | |
34217 | detail::format_item<Ch, Tr, Alloc> * fpar, | |
34218 | const Facet& fac, | |
34219 | std::size_t offset, unsigned char exceptions) | |
34220 | { | |
34221 | typedef typename basic_format<Ch, Tr, Alloc>::format_item_t format_item_t; | |
34222 | ||
34223 | fpar->argN_ = format_item_t::argN_no_posit; | |
34224 | bool precision_set = false; | |
34225 | bool in_brackets=false; | |
34226 | Iter start0 = start; | |
34227 | std::size_t fstring_size = last-start0+offset; | |
34228 | ||
34229 | if(start>= last) { | |
34230 | maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); | |
34231 | return false; | |
34232 | } | |
34233 | ||
34234 | if(*start== const_or_not(fac).widen( '|')) { | |
34235 | in_brackets=true; | |
34236 | if( ++start >= last ) { | |
34237 | maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); | |
34238 | return false; | |
34239 | } | |
34240 | } | |
34241 | ||
34242 | ||
34243 | if(*start== const_or_not(fac).widen( '0')) | |
34244 | goto parse_flags; | |
34245 | ||
34246 | ||
34247 | if(wrap_isdigit(fac, *start)) { | |
34248 | int n; | |
34249 | start = str2int(start, last, n, fac); | |
34250 | if( start >= last ) { | |
34251 | maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34252 | return false; | |
34253 | } | |
34254 | ||
34255 | ||
34256 | if( *start == const_or_not(fac).widen( '%') ) { | |
34257 | fpar->argN_ = n-1; | |
34258 | ++start; | |
34259 | if( in_brackets) | |
34260 | maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34261 | ||
34262 | else | |
34263 | return true; | |
34264 | } | |
34265 | ||
34266 | if ( *start== const_or_not(fac).widen( '$') ) { | |
34267 | fpar->argN_ = n-1; | |
34268 | ++start; | |
34269 | } | |
34270 | else { | |
34271 | ||
34272 | fpar->fmtstate_.width_ = n; | |
34273 | fpar->argN_ = format_item_t::argN_no_posit; | |
34274 | goto parse_precision; | |
34275 | } | |
34276 | } | |
34277 | ||
34278 | parse_flags: | |
34279 | ||
34280 | while ( start != last) { | |
34281 | ||
34282 | switch ( wrap_narrow(fac, *start, 0)) { | |
34283 | case '\'' : break; | |
34284 | case 'l': | |
34285 | case 'h': | |
34286 | break; | |
34287 | case '-': | |
34288 | fpar->fmtstate_.flags_ |= std::ios_base::left; | |
34289 | break; | |
34290 | case '=': | |
34291 | fpar->pad_scheme_ |= format_item_t::centered; | |
34292 | break; | |
34293 | case '_': | |
34294 | fpar->fmtstate_.flags_ |= std::ios_base::internal; | |
34295 | break; | |
34296 | case ' ': | |
34297 | fpar->pad_scheme_ |= format_item_t::spacepad; | |
34298 | break; | |
34299 | case '+': | |
34300 | fpar->fmtstate_.flags_ |= std::ios_base::showpos; | |
34301 | break; | |
34302 | case '0': | |
34303 | fpar->pad_scheme_ |= format_item_t::zeropad; | |
34304 | ||
34305 | ||
34306 | break; | |
34307 | case '#': | |
34308 | fpar->fmtstate_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase; | |
34309 | break; | |
34310 | default: | |
34311 | goto parse_width; | |
34312 | } | |
34313 | ++start; | |
34314 | } | |
34315 | ||
34316 | if( start>=last) { | |
34317 | maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34318 | return true; | |
34319 | } | |
34320 | parse_width: | |
34321 | ||
34322 | ||
34323 | if(*start == const_or_not(fac).widen( '*') ) | |
34324 | start = skip_asterisk(start, last, fac); | |
34325 | if(start!=last && wrap_isdigit(fac, *start)) | |
34326 | start = str2int(start, last, fpar->fmtstate_.width_, fac); | |
34327 | ||
34328 | parse_precision: | |
34329 | if( start>= last) { | |
34330 | maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34331 | return true; | |
34332 | } | |
34333 | ||
34334 | if (*start== const_or_not(fac).widen( '.')) { | |
34335 | ++start; | |
34336 | if(start != last && *start == const_or_not(fac).widen( '*') ) | |
34337 | start = skip_asterisk(start, last, fac); | |
34338 | if(start != last && wrap_isdigit(fac, *start)) { | |
34339 | start = str2int(start, last, fpar->fmtstate_.precision_, fac); | |
34340 | precision_set = true; | |
34341 | } | |
34342 | else | |
34343 | fpar->fmtstate_.precision_ =0; | |
34344 | } | |
34345 | ||
34346 | ||
34347 | while( start != last && ( *start== const_or_not(fac).widen( 'l') | |
34348 | || *start== const_or_not(fac).widen( 'L') | |
34349 | || *start== const_or_not(fac).widen( 'h')) ) | |
34350 | ++start; | |
34351 | if( start>=last) { | |
34352 | maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34353 | return true; | |
34354 | } | |
34355 | ||
34356 | if( in_brackets && *start== const_or_not(fac).widen( '|') ) { | |
34357 | ++start; | |
34358 | return true; | |
34359 | } | |
34360 | switch ( wrap_narrow(fac, *start, 0) ) { | |
34361 | case 'X': | |
34362 | fpar->fmtstate_.flags_ |= std::ios_base::uppercase; | |
34363 | case 'p': | |
34364 | case 'x': | |
34365 | fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; | |
34366 | fpar->fmtstate_.flags_ |= std::ios_base::hex; | |
34367 | break; | |
34368 | ||
34369 | case 'o': | |
34370 | fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; | |
34371 | fpar->fmtstate_.flags_ |= std::ios_base::oct; | |
34372 | break; | |
34373 | ||
34374 | case 'E': | |
34375 | fpar->fmtstate_.flags_ |= std::ios_base::uppercase; | |
34376 | case 'e': | |
34377 | fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; | |
34378 | fpar->fmtstate_.flags_ |= std::ios_base::scientific; | |
34379 | ||
34380 | fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; | |
34381 | fpar->fmtstate_.flags_ |= std::ios_base::dec; | |
34382 | break; | |
34383 | ||
34384 | case 'f': | |
34385 | fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; | |
34386 | fpar->fmtstate_.flags_ |= std::ios_base::fixed; | |
34387 | case 'u': | |
34388 | case 'd': | |
34389 | case 'i': | |
34390 | fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; | |
34391 | fpar->fmtstate_.flags_ |= std::ios_base::dec; | |
34392 | break; | |
34393 | ||
34394 | case 'T': | |
34395 | ++start; | |
34396 | if( start >= last) | |
34397 | maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34398 | else | |
34399 | fpar->fmtstate_.fill_ = *start; | |
34400 | fpar->pad_scheme_ |= format_item_t::tabulation; | |
34401 | fpar->argN_ = format_item_t::argN_tabulation; | |
34402 | break; | |
34403 | case 't': | |
34404 | fpar->fmtstate_.fill_ = const_or_not(fac).widen( ' '); | |
34405 | fpar->pad_scheme_ |= format_item_t::tabulation; | |
34406 | fpar->argN_ = format_item_t::argN_tabulation; | |
34407 | break; | |
34408 | ||
34409 | case 'G': | |
34410 | fpar->fmtstate_.flags_ |= std::ios_base::uppercase; | |
34411 | break; | |
34412 | case 'g': | |
34413 | fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; | |
34414 | fpar->fmtstate_.flags_ |= std::ios_base::dec; | |
34415 | ||
34416 | ||
34417 | fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; | |
34418 | break; | |
34419 | ||
34420 | case 'C': | |
34421 | case 'c': | |
34422 | fpar->truncate_ = 1; | |
34423 | break; | |
34424 | case 'S': | |
34425 | case 's': | |
34426 | if(precision_set) | |
34427 | fpar->truncate_ = fpar->fmtstate_.precision_; | |
34428 | fpar->fmtstate_.precision_ = 6; | |
34429 | break; | |
34430 | case 'n' : | |
34431 | fpar->argN_ = format_item_t::argN_ignored; | |
34432 | break; | |
34433 | default: | |
34434 | maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34435 | } | |
34436 | ++start; | |
34437 | ||
34438 | if( in_brackets ) { | |
34439 | if( start != last && *start== const_or_not(fac).widen( '|') ) { | |
34440 | ++start; | |
34441 | return true; | |
34442 | } | |
34443 | else maybe_throw_exception(exceptions, start-start0+offset, fstring_size); | |
34444 | } | |
34445 | return true; | |
34446 | } | |
34447 | ||
34448 | ||
34449 | template<class String, class Facet> | |
34450 | int upper_bound_from_fstring(const String& buf, | |
34451 | const typename String::value_type arg_mark, | |
34452 | const Facet& fac, | |
34453 | unsigned char exceptions) | |
34454 | { | |
34455 | ||
34456 | ||
34457 | using namespace boost::io; | |
34458 | typename String::size_type i1=0; | |
34459 | int num_items=0; | |
34460 | while( (i1=buf.find(arg_mark,i1)) != String::npos ) { | |
34461 | if( i1+1 >= buf.size() ) { | |
34462 | if(exceptions & bad_format_string_bit) | |
34463 | boost::throw_exception(bad_format_string(i1, buf.size() )); | |
34464 | else { | |
34465 | ++num_items; | |
34466 | break; | |
34467 | } | |
34468 | } | |
34469 | if(buf[i1+1] == buf[i1] ) { | |
34470 | i1+=2; continue; | |
34471 | } | |
34472 | ||
34473 | ++i1; | |
34474 | ||
34475 | i1 = detail::wrap_scan_notdigit(fac, buf.begin()+i1, buf.end()) - buf.begin(); | |
34476 | if( i1 < buf.size() && buf[i1] == arg_mark ) | |
34477 | ++i1; | |
34478 | ++num_items; | |
34479 | } | |
34480 | return num_items; | |
34481 | } | |
34482 | template<class String> inline | |
34483 | void append_string(String& dst, const String& src, | |
34484 | const typename String::size_type beg, | |
34485 | const typename String::size_type end) { | |
34486 | ||
34487 | dst.append(src.begin()+beg, src.begin()+end); | |
34488 | ||
34489 | ||
34490 | ||
34491 | } | |
34492 | ||
34493 | } | |
34494 | } | |
34495 | ||
34496 | ||
34497 | ||
34498 | ||
34499 | ||
34500 | ||
34501 | template<class Ch, class Tr, class Alloc> | |
34502 | basic_format<Ch, Tr, Alloc>& basic_format<Ch, Tr, Alloc>:: | |
34503 | parse (const string_type& buf) { | |
34504 | ||
34505 | using namespace std; | |
34506 | ||
34507 | const std::ctype<Ch> & fac = std::use_facet< std::ctype<Ch> >(getloc()); | |
34508 | ||
34509 | ||
34510 | ||
34511 | ||
34512 | ||
34513 | const Ch arg_mark = io::detail::const_or_not(fac).widen( '%'); | |
34514 | bool ordered_args=true; | |
34515 | int max_argN=-1; | |
34516 | ||
34517 | ||
34518 | int num_items = io::detail::upper_bound_from_fstring(buf, arg_mark, fac, exceptions()); | |
34519 | make_or_reuse_data(num_items); | |
34520 | ||
34521 | ||
34522 | num_items=0; | |
34523 | typename string_type::size_type i0=0, i1=0; | |
34524 | typename string_type::const_iterator it; | |
34525 | bool special_things=false; | |
34526 | int cur_item=0; | |
34527 | while( (i1=buf.find(arg_mark,i1)) != string_type::npos ) { | |
34528 | string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; | |
34529 | if( buf[i1+1] == buf[i1] ) { | |
34530 | io::detail::append_string(piece, buf, i0, i1+1); | |
34531 | i1+=2; i0=i1; | |
34532 | continue; | |
34533 | } | |
34534 | (static_cast<void> ((static_cast<unsigned int>(cur_item) < items_.size() || cur_item==0) ? 0 : (__assert ("static_cast<unsigned int>(cur_item) < items_.size() || cur_item==0", "./boost/format/parsing.hpp", 440, __PRETTY_FUNCTION__), 0))); | |
34535 | ||
34536 | if(i1!=i0) { | |
34537 | io::detail::append_string(piece, buf, i0, i1); | |
34538 | i0=i1; | |
34539 | } | |
34540 | ++i1; | |
34541 | it = buf.begin()+i1; | |
34542 | bool parse_ok = io::detail::parse_printf_directive( | |
34543 | it, buf.end(), &items_[cur_item], fac, i1, exceptions()); | |
34544 | i1 = it - buf.begin(); | |
34545 | if( ! parse_ok ) | |
34546 | continue; | |
34547 | i0=i1; | |
34548 | items_[cur_item].compute_states(); | |
34549 | ||
34550 | int argN=items_[cur_item].argN_; | |
34551 | if(argN == format_item_t::argN_ignored) | |
34552 | continue; | |
34553 | if(argN ==format_item_t::argN_no_posit) | |
34554 | ordered_args=false; | |
34555 | else if(argN == format_item_t::argN_tabulation) special_things=true; | |
34556 | else if(argN > max_argN) max_argN = argN; | |
34557 | ++num_items; | |
34558 | ++cur_item; | |
34559 | } | |
34560 | (static_cast<void> ((cur_item == num_items) ? 0 : (__assert ("cur_item == num_items", "./boost/format/parsing.hpp", 466, __PRETTY_FUNCTION__), 0))); | |
34561 | ||
34562 | ||
34563 | { | |
34564 | string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; | |
34565 | io::detail::append_string(piece, buf, i0, buf.size()); | |
34566 | } | |
34567 | ||
34568 | if( !ordered_args) { | |
34569 | if(max_argN >= 0 ) { | |
34570 | if(exceptions() & io::bad_format_string_bit) | |
34571 | boost::throw_exception(io::bad_format_string(max_argN, 0)); | |
34572 | ||
34573 | } | |
34574 | ||
34575 | int non_ordered_items = 0; | |
34576 | for(int i=0; i< num_items; ++i) | |
34577 | if(items_[i].argN_ == format_item_t::argN_no_posit) { | |
34578 | items_[i].argN_ = non_ordered_items; | |
34579 | ++non_ordered_items; | |
34580 | } | |
34581 | max_argN = non_ordered_items-1; | |
34582 | } | |
34583 | ||
34584 | ||
34585 | items_.resize(num_items, format_item_t(io::detail::const_or_not(fac).widen( ' ')) ); | |
34586 | ||
34587 | if(special_things) style_ |= special_needs; | |
34588 | num_args_ = max_argN + 1; | |
34589 | if(ordered_args) style_ |= ordered; | |
34590 | else style_ &= ~ordered; | |
34591 | return *this; | |
34592 | } | |
34593 | ||
34594 | } | |
34595 | # 51 "./boost/format.hpp" 2 | |
34596 | ||
34597 | ||
34598 | # 1 "./boost/format/free_funcs.hpp" 1 | |
34599 | # 19 "./boost/format/free_funcs.hpp" | |
34600 | namespace boost { | |
34601 | ||
34602 | template<class Ch, class Tr, class Alloc> inline | |
34603 | std::basic_string<Ch, Tr, Alloc> str(const basic_format<Ch, Tr, Alloc>& f) { | |
34604 | ||
34605 | return f.str(); | |
34606 | } | |
34607 | namespace io { | |
34608 | using ::boost::str; | |
34609 | } | |
34610 | ||
34611 | ||
34612 | template<class Ch, class Tr, class Alloc> | |
34613 | std::basic_ostream<Ch, Tr> & | |
34614 | operator<<( std::basic_ostream<Ch, Tr> & os, | |
34615 | const basic_format<Ch, Tr, Alloc>& f) | |
34616 | ||
34617 | ||
34618 | ||
34619 | ||
34620 | ||
34621 | ||
34622 | ||
34623 | { | |
34624 | typedef boost::basic_format<Ch, Tr, Alloc> format_t; | |
34625 | if(f.items_.size()==0) | |
34626 | os << f.prefix_; | |
34627 | else { | |
34628 | if(f.cur_arg_ < f.num_args_) | |
34629 | if( f.exceptions() & io::too_few_args_bit ) | |
34630 | ||
34631 | boost::throw_exception(io::too_few_args(f.cur_arg_, f.num_args_)); | |
34632 | if(f.style_ & format_t::special_needs) | |
34633 | os << f.str(); | |
34634 | else { | |
34635 | ||
34636 | os << f.prefix_; | |
34637 | for(unsigned long i=0; i<f.items_.size(); ++i) { | |
34638 | const typename format_t::format_item_t& item = f.items_[i]; | |
34639 | os << item.res_; | |
34640 | os << item.appendix_; | |
34641 | } | |
34642 | } | |
34643 | } | |
34644 | f.dumped_=true; | |
34645 | return os; | |
34646 | } | |
34647 | ||
34648 | } | |
34649 | # 54 "./boost/format.hpp" 2 | |
34650 | ||
34651 | ||
34652 | ||
34653 | # 1 "./boost/format/detail/unset_macros.hpp" 1 | |
34654 | # 58 "./boost/format.hpp" 2 | |
34655 | # 2 "test.cpp" 2 | |
34656 | ||
34657 | int main() | |
34658 | { | |
34659 | boost::format f("%d\n"); | |
34660 | f %-123; | |
34661 | return 0; | |
34662 | } |