]>
Commit | Line | Data |
---|---|---|
45516216 | 1 | // /usr/libexec/gcc/powerpc-unknown-linux-gnu/4.1.2/cc1plus -quiet -D_GNU_SOURCE -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix conftest.cc -msecure-plt -quiet -dumpbase conftest.cc -mcpu=G3 -mtune=G3 -auxbase conftest -O2 -o - -frandom-seed=0 |
2 | # 1 "conftest.cc" | |
3 | # 1 "<built-in>" | |
4 | # 1 "<command line>" | |
5 | # 1 "conftest.cc" | |
6 | ||
7 | ||
8 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iostream" 1 3 | |
9 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iostream" 3 | |
10 | ||
11 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iostream" 3 | |
12 | #pragma GCC visibility push(default) | |
13 | ||
14 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 1 3 | |
15 | # 35 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 3 | |
16 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/os_defines.h" 1 3 | |
17 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/os_defines.h" 3 | |
18 | # 1 "/usr/include/features.h" 1 3 4 | |
19 | # 323 "/usr/include/features.h" 3 4 | |
20 | # 1 "/usr/include/sys/cdefs.h" 1 3 4 | |
21 | # 313 "/usr/include/sys/cdefs.h" 3 4 | |
22 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
23 | # 314 "/usr/include/sys/cdefs.h" 2 3 4 | |
24 | # 324 "/usr/include/features.h" 2 3 4 | |
25 | # 346 "/usr/include/features.h" 3 4 | |
26 | # 1 "/usr/include/gnu/stubs.h" 1 3 4 | |
27 | ||
28 | ||
29 | ||
30 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
31 | # 5 "/usr/include/gnu/stubs.h" 2 3 4 | |
32 | ||
33 | ||
34 | # 1 "/usr/include/gnu/stubs-32.h" 1 3 4 | |
35 | # 8 "/usr/include/gnu/stubs.h" 2 3 4 | |
36 | # 347 "/usr/include/features.h" 2 3 4 | |
37 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/os_defines.h" 2 3 | |
38 | # 36 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 2 3 | |
39 | ||
40 | ||
41 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/cpu_defines.h" 1 3 | |
42 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 2 3 | |
43 | ||
44 | ||
45 | ||
46 | ||
47 | namespace __gnu_debug_def { } | |
48 | ||
49 | namespace __gnu_debug | |
50 | { | |
51 | using namespace __gnu_debug_def; | |
52 | } | |
53 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iostream" 2 3 | |
54 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 1 3 | |
55 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
56 | ||
57 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
58 | #pragma GCC visibility push(default) | |
59 | ||
60 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 1 3 | |
61 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 3 | |
62 | ||
63 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 3 | |
64 | #pragma GCC visibility push(default) | |
65 | ||
66 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 1 3 | |
67 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 3 | |
68 | ||
69 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 3 | |
70 | #pragma GCC visibility push(default) | |
71 | ||
72 | ||
73 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 1 3 | |
74 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 3 | |
75 | ||
76 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 3 | |
77 | ||
78 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstring" 1 3 | |
79 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstring" 3 | |
80 | ||
81 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstring" 3 | |
82 | #pragma GCC visibility push(default) | |
83 | ||
84 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstddef" 1 3 | |
85 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstddef" 3 | |
86 | ||
87 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstddef" 3 | |
88 | #pragma GCC visibility push(default) | |
89 | ||
90 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
91 | # 152 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 3 4 | |
92 | typedef int ptrdiff_t; | |
93 | # 214 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 3 4 | |
94 | typedef unsigned int size_t; | |
95 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstddef" 2 3 | |
96 | ||
97 | namespace std | |
98 | { | |
99 | using ::ptrdiff_t; | |
100 | using ::size_t; | |
101 | } | |
102 | ||
103 | #pragma GCC visibility pop | |
104 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstring" 2 3 | |
105 | ||
106 | # 1 "/usr/include/string.h" 1 3 4 | |
107 | # 28 "/usr/include/string.h" 3 4 | |
108 | extern "C" { | |
109 | ||
110 | ||
111 | ||
112 | ||
113 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
114 | # 34 "/usr/include/string.h" 2 3 4 | |
115 | ||
116 | ||
117 | ||
118 | ||
119 | extern void *memcpy (void *__restrict __dest, | |
120 | __const void *__restrict __src, size_t __n) | |
121 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
122 | ||
123 | ||
124 | extern void *memmove (void *__dest, __const void *__src, size_t __n) | |
125 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
126 | ||
127 | ||
128 | ||
129 | ||
130 | ||
131 | ||
132 | extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, | |
133 | int __c, size_t __n) | |
134 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
141 | ||
142 | ||
143 | extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) | |
144 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
145 | ||
146 | ||
147 | extern void *memchr (__const void *__s, int __c, size_t __n) | |
148 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 | extern void *rawmemchr (__const void *__s, int __c) | |
155 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
156 | ||
157 | ||
158 | extern void *memrchr (__const void *__s, int __c, size_t __n) | |
159 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
160 | ||
161 | ||
162 | ||
163 | ||
164 | ||
165 | extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) | |
166 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
167 | ||
168 | extern char *strncpy (char *__restrict __dest, | |
169 | __const char *__restrict __src, size_t __n) | |
170 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
171 | ||
172 | ||
173 | extern char *strcat (char *__restrict __dest, __const char *__restrict __src) | |
174 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
175 | ||
176 | extern char *strncat (char *__restrict __dest, __const char *__restrict __src, | |
177 | size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
178 | ||
179 | ||
180 | extern int strcmp (__const char *__s1, __const char *__s2) | |
181 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
182 | ||
183 | extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) | |
184 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
185 | ||
186 | ||
187 | extern int strcoll (__const char *__s1, __const char *__s2) | |
188 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
189 | ||
190 | extern size_t strxfrm (char *__restrict __dest, | |
191 | __const char *__restrict __src, size_t __n) | |
192 | throw () __attribute__ ((__nonnull__ (2))); | |
193 | ||
194 | ||
195 | ||
196 | ||
197 | ||
198 | ||
199 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
200 | # 28 "/usr/include/xlocale.h" 3 4 | |
201 | typedef struct __locale_struct | |
202 | { | |
203 | ||
204 | struct locale_data *__locales[13]; | |
205 | ||
206 | ||
207 | const unsigned short int *__ctype_b; | |
208 | const int *__ctype_tolower; | |
209 | const int *__ctype_toupper; | |
210 | ||
211 | ||
212 | const char *__names[13]; | |
213 | } *__locale_t; | |
214 | # 119 "/usr/include/string.h" 2 3 4 | |
215 | ||
216 | ||
217 | extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) | |
218 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
219 | ||
220 | extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, | |
221 | __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); | |
222 | ||
223 | ||
224 | ||
225 | ||
226 | extern char *strdup (__const char *__s) | |
227 | throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
228 | ||
229 | ||
230 | ||
231 | ||
232 | ||
233 | ||
234 | extern char *strndup (__const char *__string, size_t __n) | |
235 | throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
236 | # 165 "/usr/include/string.h" 3 4 | |
237 | ||
238 | ||
239 | extern char *strchr (__const char *__s, int __c) | |
240 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
241 | ||
242 | extern char *strrchr (__const char *__s, int __c) | |
243 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
244 | ||
245 | ||
246 | ||
247 | ||
248 | ||
249 | extern char *strchrnul (__const char *__s, int __c) | |
250 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
251 | ||
252 | ||
253 | ||
254 | ||
255 | ||
256 | extern size_t strcspn (__const char *__s, __const char *__reject) | |
257 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
258 | ||
259 | ||
260 | extern size_t strspn (__const char *__s, __const char *__accept) | |
261 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
262 | ||
263 | extern char *strpbrk (__const char *__s, __const char *__accept) | |
264 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
265 | ||
266 | extern char *strstr (__const char *__haystack, __const char *__needle) | |
267 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
268 | ||
269 | ||
270 | ||
271 | extern char *strtok (char *__restrict __s, __const char *__restrict __delim) | |
272 | throw () __attribute__ ((__nonnull__ (2))); | |
273 | ||
274 | ||
275 | ||
276 | ||
277 | extern char *__strtok_r (char *__restrict __s, | |
278 | __const char *__restrict __delim, | |
279 | char **__restrict __save_ptr) | |
280 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
281 | ||
282 | extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, | |
283 | char **__restrict __save_ptr) | |
284 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
285 | ||
286 | ||
287 | ||
288 | ||
289 | extern char *strcasestr (__const char *__haystack, __const char *__needle) | |
290 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
291 | ||
292 | ||
293 | ||
294 | ||
295 | ||
296 | ||
297 | extern void *memmem (__const void *__haystack, size_t __haystacklen, | |
298 | __const void *__needle, size_t __needlelen) | |
299 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); | |
300 | ||
301 | ||
302 | ||
303 | extern void *__mempcpy (void *__restrict __dest, | |
304 | __const void *__restrict __src, size_t __n) | |
305 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
306 | extern void *mempcpy (void *__restrict __dest, | |
307 | __const void *__restrict __src, size_t __n) | |
308 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
309 | ||
310 | ||
311 | ||
312 | ||
313 | ||
314 | extern size_t strlen (__const char *__s) | |
315 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
316 | ||
317 | ||
318 | ||
319 | ||
320 | ||
321 | extern size_t strnlen (__const char *__string, size_t __maxlen) | |
322 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
323 | ||
324 | ||
325 | ||
326 | ||
327 | ||
328 | extern char *strerror (int __errnum) throw (); | |
329 | ||
330 | # 281 "/usr/include/string.h" 3 4 | |
331 | extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) | |
332 | throw () __attribute__ ((__nonnull__ (2))); | |
333 | ||
334 | ||
335 | ||
336 | ||
337 | ||
338 | extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
339 | ||
340 | ||
341 | ||
342 | extern void bcopy (__const void *__src, void *__dest, size_t __n) | |
343 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
344 | ||
345 | ||
346 | extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
347 | ||
348 | ||
349 | extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) | |
350 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
351 | ||
352 | ||
353 | extern char *index (__const char *__s, int __c) | |
354 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
355 | ||
356 | ||
357 | extern char *rindex (__const char *__s, int __c) | |
358 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
359 | ||
360 | ||
361 | ||
362 | extern int ffs (int __i) throw () __attribute__ ((__const__)); | |
363 | ||
364 | ||
365 | ||
366 | ||
367 | extern int ffsl (long int __l) throw () __attribute__ ((__const__)); | |
368 | ||
369 | __extension__ extern int ffsll (long long int __ll) | |
370 | throw () __attribute__ ((__const__)); | |
371 | ||
372 | ||
373 | ||
374 | ||
375 | extern int strcasecmp (__const char *__s1, __const char *__s2) | |
376 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
377 | ||
378 | ||
379 | extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) | |
380 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
381 | ||
382 | ||
383 | ||
384 | ||
385 | ||
386 | extern int strcasecmp_l (__const char *__s1, __const char *__s2, | |
387 | __locale_t __loc) | |
388 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
389 | ||
390 | extern int strncasecmp_l (__const char *__s1, __const char *__s2, | |
391 | size_t __n, __locale_t __loc) | |
392 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); | |
393 | ||
394 | ||
395 | ||
396 | ||
397 | ||
398 | extern char *strsep (char **__restrict __stringp, | |
399 | __const char *__restrict __delim) | |
400 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
401 | ||
402 | ||
403 | ||
404 | ||
405 | extern int strverscmp (__const char *__s1, __const char *__s2) | |
406 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
407 | ||
408 | ||
409 | extern char *strsignal (int __sig) throw (); | |
410 | ||
411 | ||
412 | extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
413 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
414 | extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
415 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
416 | ||
417 | ||
418 | ||
419 | extern char *__stpncpy (char *__restrict __dest, | |
420 | __const char *__restrict __src, size_t __n) | |
421 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
422 | extern char *stpncpy (char *__restrict __dest, | |
423 | __const char *__restrict __src, size_t __n) | |
424 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
425 | ||
426 | ||
427 | extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); | |
428 | ||
429 | ||
430 | extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
431 | ||
432 | ||
433 | ||
434 | ||
435 | ||
436 | ||
437 | extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); | |
438 | # 426 "/usr/include/string.h" 3 4 | |
439 | } | |
440 | # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstring" 2 3 | |
441 | # 79 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstring" 3 | |
442 | namespace std | |
443 | { | |
444 | using ::memcpy; | |
445 | using ::memmove; | |
446 | using ::strcpy; | |
447 | using ::strncpy; | |
448 | using ::strcat; | |
449 | using ::strncat; | |
450 | using ::memcmp; | |
451 | using ::strcmp; | |
452 | using ::strcoll; | |
453 | using ::strncmp; | |
454 | using ::strxfrm; | |
455 | using ::strcspn; | |
456 | using ::strspn; | |
457 | using ::strtok; | |
458 | using ::memset; | |
459 | using ::strerror; | |
460 | using ::strlen; | |
461 | ||
462 | using ::memchr; | |
463 | ||
464 | inline void* | |
465 | memchr(void* __p, int __c, size_t __n) | |
466 | { return memchr(const_cast<const void*>(__p), __c, __n); } | |
467 | ||
468 | using ::strchr; | |
469 | ||
470 | inline char* | |
471 | strchr(char* __s1, int __n) | |
472 | { return __builtin_strchr(const_cast<const char*>(__s1), __n); } | |
473 | ||
474 | using ::strpbrk; | |
475 | ||
476 | inline char* | |
477 | strpbrk(char* __s1, const char* __s2) | |
478 | { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); } | |
479 | ||
480 | using ::strrchr; | |
481 | ||
482 | inline char* | |
483 | strrchr(char* __s1, int __n) | |
484 | { return __builtin_strrchr(const_cast<const char*>(__s1), __n); } | |
485 | ||
486 | using ::strstr; | |
487 | ||
488 | inline char* | |
489 | strstr(char* __s1, const char* __s2) | |
490 | { return __builtin_strstr(const_cast<const char*>(__s1), __s2); } | |
491 | } | |
492 | ||
493 | #pragma GCC visibility pop | |
494 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 | |
495 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdio" 1 3 | |
496 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdio" 3 | |
497 | ||
498 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdio" 3 | |
499 | #pragma GCC visibility push(default) | |
500 | ||
501 | ||
502 | ||
503 | ||
504 | # 1 "/usr/include/stdio.h" 1 3 4 | |
505 | # 30 "/usr/include/stdio.h" 3 4 | |
506 | extern "C" { | |
507 | ||
508 | ||
509 | ||
510 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
511 | # 35 "/usr/include/stdio.h" 2 3 4 | |
512 | ||
513 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
514 | # 28 "/usr/include/bits/types.h" 3 4 | |
515 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
516 | # 29 "/usr/include/bits/types.h" 2 3 4 | |
517 | ||
518 | ||
519 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
520 | # 32 "/usr/include/bits/types.h" 2 3 4 | |
521 | ||
522 | ||
523 | typedef unsigned char __u_char; | |
524 | typedef unsigned short int __u_short; | |
525 | typedef unsigned int __u_int; | |
526 | typedef unsigned long int __u_long; | |
527 | ||
528 | ||
529 | typedef signed char __int8_t; | |
530 | typedef unsigned char __uint8_t; | |
531 | typedef signed short int __int16_t; | |
532 | typedef unsigned short int __uint16_t; | |
533 | typedef signed int __int32_t; | |
534 | typedef unsigned int __uint32_t; | |
535 | ||
536 | ||
537 | ||
538 | ||
539 | __extension__ typedef signed long long int __int64_t; | |
540 | __extension__ typedef unsigned long long int __uint64_t; | |
541 | ||
542 | ||
543 | ||
544 | ||
545 | ||
546 | ||
547 | ||
548 | __extension__ typedef long long int __quad_t; | |
549 | __extension__ typedef unsigned long long int __u_quad_t; | |
550 | # 134 "/usr/include/bits/types.h" 3 4 | |
551 | # 1 "/usr/include/bits/typesizes.h" 1 3 4 | |
552 | # 135 "/usr/include/bits/types.h" 2 3 4 | |
553 | ||
554 | ||
555 | __extension__ typedef __u_quad_t __dev_t; | |
556 | __extension__ typedef unsigned int __uid_t; | |
557 | __extension__ typedef unsigned int __gid_t; | |
558 | __extension__ typedef unsigned long int __ino_t; | |
559 | __extension__ typedef __u_quad_t __ino64_t; | |
560 | __extension__ typedef unsigned int __mode_t; | |
561 | __extension__ typedef unsigned int __nlink_t; | |
562 | __extension__ typedef long int __off_t; | |
563 | __extension__ typedef __quad_t __off64_t; | |
564 | __extension__ typedef int __pid_t; | |
565 | __extension__ typedef struct { int __val[2]; } __fsid_t; | |
566 | __extension__ typedef long int __clock_t; | |
567 | __extension__ typedef unsigned long int __rlim_t; | |
568 | __extension__ typedef __u_quad_t __rlim64_t; | |
569 | __extension__ typedef unsigned int __id_t; | |
570 | __extension__ typedef long int __time_t; | |
571 | __extension__ typedef unsigned int __useconds_t; | |
572 | __extension__ typedef long int __suseconds_t; | |
573 | ||
574 | __extension__ typedef int __daddr_t; | |
575 | __extension__ typedef long int __swblk_t; | |
576 | __extension__ typedef int __key_t; | |
577 | ||
578 | ||
579 | __extension__ typedef int __clockid_t; | |
580 | ||
581 | ||
582 | __extension__ typedef void * __timer_t; | |
583 | ||
584 | ||
585 | __extension__ typedef long int __blksize_t; | |
586 | ||
587 | ||
588 | ||
589 | ||
590 | __extension__ typedef long int __blkcnt_t; | |
591 | __extension__ typedef __quad_t __blkcnt64_t; | |
592 | ||
593 | ||
594 | __extension__ typedef unsigned long int __fsblkcnt_t; | |
595 | __extension__ typedef __u_quad_t __fsblkcnt64_t; | |
596 | ||
597 | ||
598 | __extension__ typedef unsigned long int __fsfilcnt_t; | |
599 | __extension__ typedef __u_quad_t __fsfilcnt64_t; | |
600 | ||
601 | __extension__ typedef int __ssize_t; | |
602 | ||
603 | ||
604 | ||
605 | typedef __off64_t __loff_t; | |
606 | typedef __quad_t *__qaddr_t; | |
607 | typedef char *__caddr_t; | |
608 | ||
609 | ||
610 | __extension__ typedef int __intptr_t; | |
611 | ||
612 | ||
613 | __extension__ typedef unsigned int __socklen_t; | |
614 | # 37 "/usr/include/stdio.h" 2 3 4 | |
615 | ||
616 | ||
617 | ||
618 | ||
619 | ||
620 | ||
621 | ||
622 | ||
623 | ||
624 | typedef struct _IO_FILE FILE; | |
625 | ||
626 | ||
627 | ||
628 | ||
629 | ||
630 | # 62 "/usr/include/stdio.h" 3 4 | |
631 | typedef struct _IO_FILE __FILE; | |
632 | # 72 "/usr/include/stdio.h" 3 4 | |
633 | # 1 "/usr/include/libio.h" 1 3 4 | |
634 | # 32 "/usr/include/libio.h" 3 4 | |
635 | # 1 "/usr/include/_G_config.h" 1 3 4 | |
636 | # 14 "/usr/include/_G_config.h" 3 4 | |
637 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
638 | # 355 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 3 4 | |
639 | typedef unsigned int wint_t; | |
640 | # 15 "/usr/include/_G_config.h" 2 3 4 | |
641 | # 24 "/usr/include/_G_config.h" 3 4 | |
642 | # 1 "/usr/include/wchar.h" 1 3 4 | |
643 | # 48 "/usr/include/wchar.h" 3 4 | |
644 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
645 | # 49 "/usr/include/wchar.h" 2 3 4 | |
646 | ||
647 | # 1 "/usr/include/bits/wchar.h" 1 3 4 | |
648 | # 51 "/usr/include/wchar.h" 2 3 4 | |
649 | # 76 "/usr/include/wchar.h" 3 4 | |
650 | typedef struct | |
651 | { | |
652 | int __count; | |
653 | union | |
654 | { | |
655 | wint_t __wch; | |
656 | char __wchb[4]; | |
657 | } __value; | |
658 | } __mbstate_t; | |
659 | # 25 "/usr/include/_G_config.h" 2 3 4 | |
660 | ||
661 | typedef struct | |
662 | { | |
663 | __off_t __pos; | |
664 | __mbstate_t __state; | |
665 | } _G_fpos_t; | |
666 | typedef struct | |
667 | { | |
668 | __off64_t __pos; | |
669 | __mbstate_t __state; | |
670 | } _G_fpos64_t; | |
671 | # 44 "/usr/include/_G_config.h" 3 4 | |
672 | # 1 "/usr/include/gconv.h" 1 3 4 | |
673 | # 28 "/usr/include/gconv.h" 3 4 | |
674 | # 1 "/usr/include/wchar.h" 1 3 4 | |
675 | # 48 "/usr/include/wchar.h" 3 4 | |
676 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
677 | # 49 "/usr/include/wchar.h" 2 3 4 | |
678 | # 29 "/usr/include/gconv.h" 2 3 4 | |
679 | ||
680 | ||
681 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
682 | # 32 "/usr/include/gconv.h" 2 3 4 | |
683 | ||
684 | ||
685 | ||
686 | ||
687 | ||
688 | enum | |
689 | { | |
690 | __GCONV_OK = 0, | |
691 | __GCONV_NOCONV, | |
692 | __GCONV_NODB, | |
693 | __GCONV_NOMEM, | |
694 | ||
695 | __GCONV_EMPTY_INPUT, | |
696 | __GCONV_FULL_OUTPUT, | |
697 | __GCONV_ILLEGAL_INPUT, | |
698 | __GCONV_INCOMPLETE_INPUT, | |
699 | ||
700 | __GCONV_ILLEGAL_DESCRIPTOR, | |
701 | __GCONV_INTERNAL_ERROR | |
702 | }; | |
703 | ||
704 | ||
705 | ||
706 | enum | |
707 | { | |
708 | __GCONV_IS_LAST = 0x0001, | |
709 | __GCONV_IGNORE_ERRORS = 0x0002 | |
710 | }; | |
711 | ||
712 | ||
713 | ||
714 | struct __gconv_step; | |
715 | struct __gconv_step_data; | |
716 | struct __gconv_loaded_object; | |
717 | struct __gconv_trans_data; | |
718 | ||
719 | ||
720 | ||
721 | typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, | |
722 | __const unsigned char **, __const unsigned char *, | |
723 | unsigned char **, size_t *, int, int); | |
724 | ||
725 | ||
726 | typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); | |
727 | ||
728 | ||
729 | typedef int (*__gconv_init_fct) (struct __gconv_step *); | |
730 | typedef void (*__gconv_end_fct) (struct __gconv_step *); | |
731 | ||
732 | ||
733 | ||
734 | typedef int (*__gconv_trans_fct) (struct __gconv_step *, | |
735 | struct __gconv_step_data *, void *, | |
736 | __const unsigned char *, | |
737 | __const unsigned char **, | |
738 | __const unsigned char *, unsigned char **, | |
739 | size_t *); | |
740 | ||
741 | ||
742 | typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, | |
743 | __const unsigned char *, | |
744 | unsigned char *, unsigned char *); | |
745 | ||
746 | ||
747 | typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, | |
748 | size_t *); | |
749 | ||
750 | ||
751 | typedef int (*__gconv_trans_init_fct) (void **, const char *); | |
752 | typedef void (*__gconv_trans_end_fct) (void *); | |
753 | ||
754 | struct __gconv_trans_data | |
755 | { | |
756 | ||
757 | __gconv_trans_fct __trans_fct; | |
758 | __gconv_trans_context_fct __trans_context_fct; | |
759 | __gconv_trans_end_fct __trans_end_fct; | |
760 | void *__data; | |
761 | struct __gconv_trans_data *__next; | |
762 | }; | |
763 | ||
764 | ||
765 | ||
766 | struct __gconv_step | |
767 | { | |
768 | struct __gconv_loaded_object *__shlib_handle; | |
769 | __const char *__modname; | |
770 | ||
771 | int __counter; | |
772 | ||
773 | char *__from_name; | |
774 | char *__to_name; | |
775 | ||
776 | __gconv_fct __fct; | |
777 | __gconv_btowc_fct __btowc_fct; | |
778 | __gconv_init_fct __init_fct; | |
779 | __gconv_end_fct __end_fct; | |
780 | ||
781 | ||
782 | ||
783 | int __min_needed_from; | |
784 | int __max_needed_from; | |
785 | int __min_needed_to; | |
786 | int __max_needed_to; | |
787 | ||
788 | ||
789 | int __stateful; | |
790 | ||
791 | void *__data; | |
792 | }; | |
793 | ||
794 | ||
795 | ||
796 | struct __gconv_step_data | |
797 | { | |
798 | unsigned char *__outbuf; | |
799 | unsigned char *__outbufend; | |
800 | ||
801 | ||
802 | ||
803 | int __flags; | |
804 | ||
805 | ||
806 | ||
807 | int __invocation_counter; | |
808 | ||
809 | ||
810 | ||
811 | int __internal_use; | |
812 | ||
813 | __mbstate_t *__statep; | |
814 | __mbstate_t __state; | |
815 | ||
816 | ||
817 | ||
818 | struct __gconv_trans_data *__trans; | |
819 | }; | |
820 | ||
821 | ||
822 | ||
823 | typedef struct __gconv_info | |
824 | { | |
825 | size_t __nsteps; | |
826 | struct __gconv_step *__steps; | |
827 | __extension__ struct __gconv_step_data __data []; | |
828 | } *__gconv_t; | |
829 | # 45 "/usr/include/_G_config.h" 2 3 4 | |
830 | typedef union | |
831 | { | |
832 | struct __gconv_info __cd; | |
833 | struct | |
834 | { | |
835 | struct __gconv_info __cd; | |
836 | struct __gconv_step_data __data; | |
837 | } __combined; | |
838 | } _G_iconv_t; | |
839 | ||
840 | typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); | |
841 | typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); | |
842 | typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); | |
843 | typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); | |
844 | # 33 "/usr/include/libio.h" 2 3 4 | |
845 | # 53 "/usr/include/libio.h" 3 4 | |
846 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stdarg.h" 1 3 4 | |
847 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stdarg.h" 3 4 | |
848 | typedef __builtin_va_list __gnuc_va_list; | |
849 | # 54 "/usr/include/libio.h" 2 3 4 | |
850 | # 166 "/usr/include/libio.h" 3 4 | |
851 | struct _IO_jump_t; struct _IO_FILE; | |
852 | # 176 "/usr/include/libio.h" 3 4 | |
853 | typedef void _IO_lock_t; | |
854 | ||
855 | ||
856 | ||
857 | ||
858 | ||
859 | struct _IO_marker { | |
860 | struct _IO_marker *_next; | |
861 | struct _IO_FILE *_sbuf; | |
862 | ||
863 | ||
864 | ||
865 | int _pos; | |
866 | # 199 "/usr/include/libio.h" 3 4 | |
867 | }; | |
868 | ||
869 | ||
870 | enum __codecvt_result | |
871 | { | |
872 | __codecvt_ok, | |
873 | __codecvt_partial, | |
874 | __codecvt_error, | |
875 | __codecvt_noconv | |
876 | }; | |
877 | # 267 "/usr/include/libio.h" 3 4 | |
878 | struct _IO_FILE { | |
879 | int _flags; | |
880 | ||
881 | ||
882 | ||
883 | ||
884 | char* _IO_read_ptr; | |
885 | char* _IO_read_end; | |
886 | char* _IO_read_base; | |
887 | char* _IO_write_base; | |
888 | char* _IO_write_ptr; | |
889 | char* _IO_write_end; | |
890 | char* _IO_buf_base; | |
891 | char* _IO_buf_end; | |
892 | ||
893 | char *_IO_save_base; | |
894 | char *_IO_backup_base; | |
895 | char *_IO_save_end; | |
896 | ||
897 | struct _IO_marker *_markers; | |
898 | ||
899 | struct _IO_FILE *_chain; | |
900 | ||
901 | int _fileno; | |
902 | ||
903 | ||
904 | ||
905 | int _flags2; | |
906 | ||
907 | __off_t _old_offset; | |
908 | ||
909 | ||
910 | ||
911 | unsigned short _cur_column; | |
912 | signed char _vtable_offset; | |
913 | char _shortbuf[1]; | |
914 | ||
915 | ||
916 | ||
917 | _IO_lock_t *_lock; | |
918 | # 315 "/usr/include/libio.h" 3 4 | |
919 | __off64_t _offset; | |
920 | # 324 "/usr/include/libio.h" 3 4 | |
921 | void *__pad1; | |
922 | void *__pad2; | |
923 | void *__pad3; | |
924 | void *__pad4; | |
925 | size_t __pad5; | |
926 | ||
927 | int _mode; | |
928 | ||
929 | char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; | |
930 | ||
931 | }; | |
932 | ||
933 | ||
934 | ||
935 | ||
936 | ||
937 | struct _IO_FILE_plus; | |
938 | ||
939 | extern struct _IO_FILE_plus _IO_2_1_stdin_; | |
940 | extern struct _IO_FILE_plus _IO_2_1_stdout_; | |
941 | extern struct _IO_FILE_plus _IO_2_1_stderr_; | |
942 | # 360 "/usr/include/libio.h" 3 4 | |
943 | typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); | |
944 | ||
945 | ||
946 | ||
947 | ||
948 | ||
949 | ||
950 | ||
951 | typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, | |
952 | size_t __n); | |
953 | ||
954 | ||
955 | ||
956 | ||
957 | ||
958 | ||
959 | ||
960 | typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); | |
961 | ||
962 | ||
963 | typedef int __io_close_fn (void *__cookie); | |
964 | ||
965 | ||
966 | ||
967 | ||
968 | typedef __io_read_fn cookie_read_function_t; | |
969 | typedef __io_write_fn cookie_write_function_t; | |
970 | typedef __io_seek_fn cookie_seek_function_t; | |
971 | typedef __io_close_fn cookie_close_function_t; | |
972 | ||
973 | ||
974 | typedef struct | |
975 | { | |
976 | __io_read_fn *read; | |
977 | __io_write_fn *write; | |
978 | __io_seek_fn *seek; | |
979 | __io_close_fn *close; | |
980 | } _IO_cookie_io_functions_t; | |
981 | typedef _IO_cookie_io_functions_t cookie_io_functions_t; | |
982 | ||
983 | struct _IO_cookie_file; | |
984 | ||
985 | ||
986 | extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, | |
987 | void *__cookie, _IO_cookie_io_functions_t __fns); | |
988 | ||
989 | ||
990 | ||
991 | ||
992 | extern "C" { | |
993 | ||
994 | ||
995 | extern int __underflow (_IO_FILE *) throw (); | |
996 | extern int __uflow (_IO_FILE *) throw (); | |
997 | extern int __overflow (_IO_FILE *, int) throw (); | |
998 | extern wint_t __wunderflow (_IO_FILE *) throw (); | |
999 | extern wint_t __wuflow (_IO_FILE *) throw (); | |
1000 | extern wint_t __woverflow (_IO_FILE *, wint_t) throw (); | |
1001 | # 450 "/usr/include/libio.h" 3 4 | |
1002 | extern int _IO_getc (_IO_FILE *__fp) throw (); | |
1003 | extern int _IO_putc (int __c, _IO_FILE *__fp) throw (); | |
1004 | extern int _IO_feof (_IO_FILE *__fp) throw (); | |
1005 | extern int _IO_ferror (_IO_FILE *__fp) throw (); | |
1006 | ||
1007 | extern int _IO_peekc_locked (_IO_FILE *__fp) throw (); | |
1008 | ||
1009 | ||
1010 | ||
1011 | ||
1012 | ||
1013 | extern void _IO_flockfile (_IO_FILE *) throw (); | |
1014 | extern void _IO_funlockfile (_IO_FILE *) throw (); | |
1015 | extern int _IO_ftrylockfile (_IO_FILE *) throw (); | |
1016 | # 480 "/usr/include/libio.h" 3 4 | |
1017 | extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, | |
1018 | __gnuc_va_list, int *__restrict); | |
1019 | extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, | |
1020 | __gnuc_va_list); | |
1021 | extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw (); | |
1022 | extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw (); | |
1023 | ||
1024 | extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw (); | |
1025 | extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw (); | |
1026 | ||
1027 | extern void _IO_free_backup_area (_IO_FILE *) throw (); | |
1028 | # 538 "/usr/include/libio.h" 3 4 | |
1029 | # 1 "/usr/include/bits/libio-ldbl.h" 1 3 4 | |
1030 | # 24 "/usr/include/bits/libio-ldbl.h" 3 4 | |
1031 | extern __typeof (_IO_vfscanf) _IO_vfscanf __asm ("" "__nldbl_" "_IO_vfscanf"); | |
1032 | extern __typeof (_IO_vfprintf) _IO_vfprintf __asm ("" "__nldbl_" "_IO_vfprintf"); | |
1033 | # 539 "/usr/include/libio.h" 2 3 4 | |
1034 | ||
1035 | ||
1036 | ||
1037 | } | |
1038 | # 73 "/usr/include/stdio.h" 2 3 4 | |
1039 | ||
1040 | ||
1041 | ||
1042 | ||
1043 | typedef __gnuc_va_list va_list; | |
1044 | # 86 "/usr/include/stdio.h" 3 4 | |
1045 | ||
1046 | ||
1047 | typedef _G_fpos_t fpos_t; | |
1048 | ||
1049 | ||
1050 | ||
1051 | ||
1052 | ||
1053 | typedef _G_fpos64_t fpos64_t; | |
1054 | # 138 "/usr/include/stdio.h" 3 4 | |
1055 | # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 | |
1056 | # 139 "/usr/include/stdio.h" 2 3 4 | |
1057 | ||
1058 | ||
1059 | ||
1060 | extern struct _IO_FILE *stdin; | |
1061 | extern struct _IO_FILE *stdout; | |
1062 | extern struct _IO_FILE *stderr; | |
1063 | ||
1064 | ||
1065 | ||
1066 | ||
1067 | ||
1068 | ||
1069 | ||
1070 | extern int remove (__const char *__filename) throw (); | |
1071 | ||
1072 | extern int rename (__const char *__old, __const char *__new) throw (); | |
1073 | ||
1074 | ||
1075 | ||
1076 | ||
1077 | extern int renameat (int __oldfd, __const char *__old, int __newfd, | |
1078 | __const char *__new) throw (); | |
1079 | ||
1080 | ||
1081 | ||
1082 | ||
1083 | ||
1084 | ||
1085 | ||
1086 | ||
1087 | extern FILE *tmpfile (void); | |
1088 | # 179 "/usr/include/stdio.h" 3 4 | |
1089 | extern FILE *tmpfile64 (void); | |
1090 | ||
1091 | ||
1092 | ||
1093 | extern char *tmpnam (char *__s) throw (); | |
1094 | ||
1095 | ||
1096 | ||
1097 | ||
1098 | ||
1099 | extern char *tmpnam_r (char *__s) throw (); | |
1100 | # 201 "/usr/include/stdio.h" 3 4 | |
1101 | extern char *tempnam (__const char *__dir, __const char *__pfx) | |
1102 | throw () __attribute__ ((__malloc__)); | |
1103 | ||
1104 | ||
1105 | ||
1106 | ||
1107 | ||
1108 | ||
1109 | ||
1110 | ||
1111 | extern int fclose (FILE *__stream); | |
1112 | ||
1113 | ||
1114 | ||
1115 | ||
1116 | extern int fflush (FILE *__stream); | |
1117 | ||
1118 | # 226 "/usr/include/stdio.h" 3 4 | |
1119 | extern int fflush_unlocked (FILE *__stream); | |
1120 | # 236 "/usr/include/stdio.h" 3 4 | |
1121 | extern int fcloseall (void); | |
1122 | ||
1123 | ||
1124 | ||
1125 | ||
1126 | ||
1127 | ||
1128 | ||
1129 | ||
1130 | ||
1131 | extern FILE *fopen (__const char *__restrict __filename, | |
1132 | __const char *__restrict __modes); | |
1133 | ||
1134 | ||
1135 | ||
1136 | ||
1137 | extern FILE *freopen (__const char *__restrict __filename, | |
1138 | __const char *__restrict __modes, | |
1139 | FILE *__restrict __stream); | |
1140 | # 267 "/usr/include/stdio.h" 3 4 | |
1141 | ||
1142 | ||
1143 | extern FILE *fopen64 (__const char *__restrict __filename, | |
1144 | __const char *__restrict __modes); | |
1145 | extern FILE *freopen64 (__const char *__restrict __filename, | |
1146 | __const char *__restrict __modes, | |
1147 | FILE *__restrict __stream); | |
1148 | ||
1149 | ||
1150 | ||
1151 | ||
1152 | extern FILE *fdopen (int __fd, __const char *__modes) throw (); | |
1153 | ||
1154 | ||
1155 | ||
1156 | ||
1157 | ||
1158 | extern FILE *fopencookie (void *__restrict __magic_cookie, | |
1159 | __const char *__restrict __modes, | |
1160 | _IO_cookie_io_functions_t __io_funcs) throw (); | |
1161 | ||
1162 | ||
1163 | extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw (); | |
1164 | ||
1165 | ||
1166 | ||
1167 | ||
1168 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw (); | |
1169 | ||
1170 | ||
1171 | ||
1172 | ||
1173 | ||
1174 | ||
1175 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); | |
1176 | ||
1177 | ||
1178 | ||
1179 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, | |
1180 | int __modes, size_t __n) throw (); | |
1181 | ||
1182 | ||
1183 | ||
1184 | ||
1185 | ||
1186 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, | |
1187 | size_t __size) throw (); | |
1188 | ||
1189 | ||
1190 | extern void setlinebuf (FILE *__stream) throw (); | |
1191 | ||
1192 | ||
1193 | ||
1194 | ||
1195 | ||
1196 | ||
1197 | ||
1198 | ||
1199 | extern int fprintf (FILE *__restrict __stream, | |
1200 | __const char *__restrict __format, ...); | |
1201 | ||
1202 | ||
1203 | ||
1204 | ||
1205 | extern int printf (__const char *__restrict __format, ...); | |
1206 | ||
1207 | extern int sprintf (char *__restrict __s, | |
1208 | __const char *__restrict __format, ...) throw (); | |
1209 | ||
1210 | ||
1211 | ||
1212 | ||
1213 | ||
1214 | extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, | |
1215 | __gnuc_va_list __arg); | |
1216 | ||
1217 | ||
1218 | ||
1219 | ||
1220 | extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); | |
1221 | ||
1222 | extern int vsprintf (char *__restrict __s, __const char *__restrict __format, | |
1223 | __gnuc_va_list __arg) throw (); | |
1224 | ||
1225 | ||
1226 | ||
1227 | ||
1228 | ||
1229 | extern int snprintf (char *__restrict __s, size_t __maxlen, | |
1230 | __const char *__restrict __format, ...) | |
1231 | throw () __attribute__ ((__format__ (__printf__, 3, 4))); | |
1232 | ||
1233 | extern int vsnprintf (char *__restrict __s, size_t __maxlen, | |
1234 | __const char *__restrict __format, __gnuc_va_list __arg) | |
1235 | throw () __attribute__ ((__format__ (__printf__, 3, 0))); | |
1236 | ||
1237 | ||
1238 | ||
1239 | ||
1240 | ||
1241 | ||
1242 | extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, | |
1243 | __gnuc_va_list __arg) | |
1244 | throw () __attribute__ ((__format__ (__printf__, 2, 0))); | |
1245 | extern int __asprintf (char **__restrict __ptr, | |
1246 | __const char *__restrict __fmt, ...) | |
1247 | throw () __attribute__ ((__format__ (__printf__, 2, 3))); | |
1248 | extern int asprintf (char **__restrict __ptr, | |
1249 | __const char *__restrict __fmt, ...) | |
1250 | throw () __attribute__ ((__format__ (__printf__, 2, 3))); | |
1251 | ||
1252 | ||
1253 | ||
1254 | ||
1255 | ||
1256 | ||
1257 | ||
1258 | extern int vdprintf (int __fd, __const char *__restrict __fmt, | |
1259 | __gnuc_va_list __arg) | |
1260 | __attribute__ ((__format__ (__printf__, 2, 0))); | |
1261 | extern int dprintf (int __fd, __const char *__restrict __fmt, ...) | |
1262 | __attribute__ ((__format__ (__printf__, 2, 3))); | |
1263 | ||
1264 | ||
1265 | ||
1266 | ||
1267 | ||
1268 | ||
1269 | ||
1270 | ||
1271 | extern int fscanf (FILE *__restrict __stream, | |
1272 | __const char *__restrict __format, ...) ; | |
1273 | ||
1274 | ||
1275 | ||
1276 | ||
1277 | extern int scanf (__const char *__restrict __format, ...) ; | |
1278 | ||
1279 | extern int sscanf (__const char *__restrict __s, | |
1280 | __const char *__restrict __format, ...) throw (); | |
1281 | ||
1282 | ||
1283 | ||
1284 | ||
1285 | ||
1286 | ||
1287 | ||
1288 | ||
1289 | extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, | |
1290 | __gnuc_va_list __arg) | |
1291 | __attribute__ ((__format__ (__scanf__, 2, 0))) ; | |
1292 | ||
1293 | ||
1294 | ||
1295 | ||
1296 | ||
1297 | extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) | |
1298 | __attribute__ ((__format__ (__scanf__, 1, 0))) ; | |
1299 | ||
1300 | ||
1301 | extern int vsscanf (__const char *__restrict __s, | |
1302 | __const char *__restrict __format, __gnuc_va_list __arg) | |
1303 | throw () __attribute__ ((__format__ (__scanf__, 2, 0))); | |
1304 | ||
1305 | ||
1306 | ||
1307 | ||
1308 | ||
1309 | ||
1310 | ||
1311 | ||
1312 | ||
1313 | extern int fgetc (FILE *__stream); | |
1314 | extern int getc (FILE *__stream); | |
1315 | ||
1316 | ||
1317 | ||
1318 | ||
1319 | ||
1320 | extern int getchar (void); | |
1321 | ||
1322 | # 458 "/usr/include/stdio.h" 3 4 | |
1323 | extern int getc_unlocked (FILE *__stream); | |
1324 | extern int getchar_unlocked (void); | |
1325 | # 469 "/usr/include/stdio.h" 3 4 | |
1326 | extern int fgetc_unlocked (FILE *__stream); | |
1327 | ||
1328 | ||
1329 | ||
1330 | ||
1331 | ||
1332 | ||
1333 | ||
1334 | ||
1335 | ||
1336 | ||
1337 | ||
1338 | extern int fputc (int __c, FILE *__stream); | |
1339 | extern int putc (int __c, FILE *__stream); | |
1340 | ||
1341 | ||
1342 | ||
1343 | ||
1344 | ||
1345 | extern int putchar (int __c); | |
1346 | ||
1347 | # 502 "/usr/include/stdio.h" 3 4 | |
1348 | extern int fputc_unlocked (int __c, FILE *__stream); | |
1349 | ||
1350 | ||
1351 | ||
1352 | ||
1353 | ||
1354 | ||
1355 | ||
1356 | extern int putc_unlocked (int __c, FILE *__stream); | |
1357 | extern int putchar_unlocked (int __c); | |
1358 | ||
1359 | ||
1360 | ||
1361 | ||
1362 | ||
1363 | ||
1364 | extern int getw (FILE *__stream); | |
1365 | ||
1366 | ||
1367 | extern int putw (int __w, FILE *__stream); | |
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | |
1377 | ; | |
1378 | ||
1379 | ||
1380 | ||
1381 | ||
1382 | ||
1383 | ||
1384 | extern char *gets (char *__s) ; | |
1385 | ||
1386 | # 548 "/usr/include/stdio.h" 3 4 | |
1387 | extern char *fgets_unlocked (char *__restrict __s, int __n, | |
1388 | FILE *__restrict __stream) ; | |
1389 | # 564 "/usr/include/stdio.h" 3 4 | |
1390 | extern __ssize_t __getdelim (char **__restrict __lineptr, | |
1391 | size_t *__restrict __n, int __delimiter, | |
1392 | FILE *__restrict __stream) ; | |
1393 | extern __ssize_t getdelim (char **__restrict __lineptr, | |
1394 | size_t *__restrict __n, int __delimiter, | |
1395 | FILE *__restrict __stream) ; | |
1396 | ||
1397 | ||
1398 | ||
1399 | ||
1400 | ||
1401 | ||
1402 | ||
1403 | extern __ssize_t getline (char **__restrict __lineptr, | |
1404 | size_t *__restrict __n, | |
1405 | FILE *__restrict __stream) ; | |
1406 | ||
1407 | ||
1408 | ||
1409 | ||
1410 | ||
1411 | ||
1412 | ||
1413 | ||
1414 | extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); | |
1415 | ||
1416 | ||
1417 | ||
1418 | ||
1419 | ||
1420 | extern int puts (__const char *__s); | |
1421 | ||
1422 | ||
1423 | ||
1424 | ||
1425 | ||
1426 | ||
1427 | extern int ungetc (int __c, FILE *__stream); | |
1428 | ||
1429 | ||
1430 | ||
1431 | ||
1432 | ||
1433 | ||
1434 | extern size_t fread (void *__restrict __ptr, size_t __size, | |
1435 | size_t __n, FILE *__restrict __stream) ; | |
1436 | ||
1437 | ||
1438 | ||
1439 | ||
1440 | extern size_t fwrite (__const void *__restrict __ptr, size_t __size, | |
1441 | size_t __n, FILE *__restrict __s) ; | |
1442 | ||
1443 | # 625 "/usr/include/stdio.h" 3 4 | |
1444 | extern int fputs_unlocked (__const char *__restrict __s, | |
1445 | FILE *__restrict __stream); | |
1446 | # 636 "/usr/include/stdio.h" 3 4 | |
1447 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, | |
1448 | size_t __n, FILE *__restrict __stream) ; | |
1449 | extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, | |
1450 | size_t __n, FILE *__restrict __stream) ; | |
1451 | ||
1452 | ||
1453 | ||
1454 | ||
1455 | ||
1456 | ||
1457 | ||
1458 | ||
1459 | extern int fseek (FILE *__stream, long int __off, int __whence); | |
1460 | ||
1461 | ||
1462 | ||
1463 | ||
1464 | extern long int ftell (FILE *__stream) ; | |
1465 | ||
1466 | ||
1467 | ||
1468 | ||
1469 | extern void rewind (FILE *__stream); | |
1470 | ||
1471 | # 672 "/usr/include/stdio.h" 3 4 | |
1472 | extern int fseeko (FILE *__stream, __off_t __off, int __whence); | |
1473 | ||
1474 | ||
1475 | ||
1476 | ||
1477 | extern __off_t ftello (FILE *__stream) ; | |
1478 | # 691 "/usr/include/stdio.h" 3 4 | |
1479 | ||
1480 | ||
1481 | ||
1482 | ||
1483 | ||
1484 | ||
1485 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); | |
1486 | ||
1487 | ||
1488 | ||
1489 | ||
1490 | extern int fsetpos (FILE *__stream, __const fpos_t *__pos); | |
1491 | # 714 "/usr/include/stdio.h" 3 4 | |
1492 | ||
1493 | ||
1494 | ||
1495 | extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); | |
1496 | extern __off64_t ftello64 (FILE *__stream) ; | |
1497 | extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); | |
1498 | extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); | |
1499 | ||
1500 | ||
1501 | ||
1502 | ||
1503 | extern void clearerr (FILE *__stream) throw (); | |
1504 | ||
1505 | extern int feof (FILE *__stream) throw () ; | |
1506 | ||
1507 | extern int ferror (FILE *__stream) throw () ; | |
1508 | ||
1509 | ||
1510 | ||
1511 | ||
1512 | extern void clearerr_unlocked (FILE *__stream) throw (); | |
1513 | extern int feof_unlocked (FILE *__stream) throw () ; | |
1514 | extern int ferror_unlocked (FILE *__stream) throw () ; | |
1515 | ||
1516 | ||
1517 | ||
1518 | ||
1519 | ||
1520 | ||
1521 | ||
1522 | ||
1523 | extern void perror (__const char *__s); | |
1524 | ||
1525 | ||
1526 | ||
1527 | ||
1528 | ||
1529 | ||
1530 | # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 | |
1531 | # 27 "/usr/include/bits/sys_errlist.h" 3 4 | |
1532 | extern int sys_nerr; | |
1533 | extern __const char *__const sys_errlist[]; | |
1534 | ||
1535 | ||
1536 | extern int _sys_nerr; | |
1537 | extern __const char *__const _sys_errlist[]; | |
1538 | # 753 "/usr/include/stdio.h" 2 3 4 | |
1539 | ||
1540 | ||
1541 | ||
1542 | ||
1543 | extern int fileno (FILE *__stream) throw () ; | |
1544 | ||
1545 | ||
1546 | ||
1547 | ||
1548 | extern int fileno_unlocked (FILE *__stream) throw () ; | |
1549 | # 772 "/usr/include/stdio.h" 3 4 | |
1550 | extern FILE *popen (__const char *__command, __const char *__modes) ; | |
1551 | ||
1552 | ||
1553 | ||
1554 | ||
1555 | ||
1556 | extern int pclose (FILE *__stream); | |
1557 | ||
1558 | ||
1559 | ||
1560 | ||
1561 | ||
1562 | extern char *ctermid (char *__s) throw (); | |
1563 | ||
1564 | ||
1565 | ||
1566 | ||
1567 | ||
1568 | extern char *cuserid (char *__s); | |
1569 | ||
1570 | ||
1571 | ||
1572 | ||
1573 | struct obstack; | |
1574 | ||
1575 | ||
1576 | extern int obstack_printf (struct obstack *__restrict __obstack, | |
1577 | __const char *__restrict __format, ...) | |
1578 | throw () __attribute__ ((__format__ (__printf__, 2, 3))); | |
1579 | extern int obstack_vprintf (struct obstack *__restrict __obstack, | |
1580 | __const char *__restrict __format, | |
1581 | __gnuc_va_list __args) | |
1582 | throw () __attribute__ ((__format__ (__printf__, 2, 0))); | |
1583 | ||
1584 | ||
1585 | ||
1586 | ||
1587 | ||
1588 | ||
1589 | ||
1590 | extern void flockfile (FILE *__stream) throw (); | |
1591 | ||
1592 | ||
1593 | ||
1594 | extern int ftrylockfile (FILE *__stream) throw () ; | |
1595 | ||
1596 | ||
1597 | extern void funlockfile (FILE *__stream) throw (); | |
1598 | # 833 "/usr/include/stdio.h" 3 4 | |
1599 | # 1 "/usr/include/bits/stdio.h" 1 3 4 | |
1600 | # 33 "/usr/include/bits/stdio.h" 3 4 | |
1601 | inline int | |
1602 | vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) | |
1603 | { | |
1604 | return vfprintf (stdout, __fmt, __arg); | |
1605 | } | |
1606 | ||
1607 | ||
1608 | inline int | |
1609 | getchar (void) | |
1610 | { | |
1611 | return _IO_getc (stdin); | |
1612 | } | |
1613 | ||
1614 | ||
1615 | ||
1616 | ||
1617 | inline int | |
1618 | getc_unlocked (FILE *__fp) | |
1619 | { | |
1620 | return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); | |
1621 | } | |
1622 | ||
1623 | ||
1624 | inline int | |
1625 | getchar_unlocked (void) | |
1626 | { | |
1627 | return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); | |
1628 | } | |
1629 | ||
1630 | ||
1631 | ||
1632 | ||
1633 | inline int | |
1634 | putchar (int __c) | |
1635 | { | |
1636 | return _IO_putc (__c, stdout); | |
1637 | } | |
1638 | ||
1639 | ||
1640 | ||
1641 | ||
1642 | inline int | |
1643 | fputc_unlocked (int __c, FILE *__stream) | |
1644 | { | |
1645 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
1646 | } | |
1647 | ||
1648 | ||
1649 | ||
1650 | ||
1651 | ||
1652 | inline int | |
1653 | putc_unlocked (int __c, FILE *__stream) | |
1654 | { | |
1655 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
1656 | } | |
1657 | ||
1658 | ||
1659 | inline int | |
1660 | putchar_unlocked (int __c) | |
1661 | { | |
1662 | return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); | |
1663 | } | |
1664 | ||
1665 | ||
1666 | ||
1667 | ||
1668 | ||
1669 | inline __ssize_t | |
1670 | getline (char **__lineptr, size_t *__n, FILE *__stream) | |
1671 | { | |
1672 | return __getdelim (__lineptr, __n, '\n', __stream); | |
1673 | } | |
1674 | ||
1675 | ||
1676 | ||
1677 | ||
1678 | ||
1679 | inline int | |
1680 | feof_unlocked (FILE *__stream) throw () | |
1681 | { | |
1682 | return (((__stream)->_flags & 0x10) != 0); | |
1683 | } | |
1684 | ||
1685 | ||
1686 | inline int | |
1687 | ferror_unlocked (FILE *__stream) throw () | |
1688 | { | |
1689 | return (((__stream)->_flags & 0x20) != 0); | |
1690 | } | |
1691 | # 834 "/usr/include/stdio.h" 2 3 4 | |
1692 | ||
1693 | ||
1694 | ||
1695 | ||
1696 | ||
1697 | # 1 "/usr/include/bits/stdio-ldbl.h" 1 3 4 | |
1698 | # 24 "/usr/include/bits/stdio-ldbl.h" 3 4 | |
1699 | ||
1700 | extern __typeof (fprintf) fprintf __asm ("" "__nldbl_" "fprintf"); | |
1701 | extern __typeof (printf) printf __asm ("" "__nldbl_" "printf"); | |
1702 | extern __typeof (sprintf) sprintf __asm ("" "__nldbl_" "sprintf"); | |
1703 | extern __typeof (vfprintf) vfprintf __asm ("" "__nldbl_" "vfprintf"); | |
1704 | extern __typeof (vprintf) vprintf __asm ("" "__nldbl_" "vprintf"); | |
1705 | extern __typeof (vsprintf) vsprintf __asm ("" "__nldbl_" "vsprintf"); | |
1706 | extern __typeof (fscanf) fscanf __asm ("" "__nldbl_" "fscanf"); | |
1707 | extern __typeof (scanf) scanf __asm ("" "__nldbl_" "scanf"); | |
1708 | extern __typeof (sscanf) sscanf __asm ("" "__nldbl_" "sscanf"); | |
1709 | ||
1710 | ||
1711 | ||
1712 | ||
1713 | extern __typeof (snprintf) snprintf __asm ("" "__nldbl_" "snprintf"); | |
1714 | extern __typeof (vsnprintf) vsnprintf __asm ("" "__nldbl_" "vsnprintf"); | |
1715 | ||
1716 | ||
1717 | ||
1718 | ||
1719 | ||
1720 | extern __typeof (vfscanf) vfscanf __asm ("" "__nldbl_" "vfscanf"); | |
1721 | extern __typeof (vsscanf) vsscanf __asm ("" "__nldbl_" "vsscanf"); | |
1722 | extern __typeof (vscanf) vscanf __asm ("" "__nldbl_" "vscanf"); | |
1723 | ||
1724 | ||
1725 | ||
1726 | ||
1727 | extern __typeof (vdprintf) vdprintf __asm ("" "__nldbl_" "vdprintf"); | |
1728 | extern __typeof (dprintf) dprintf __asm ("" "__nldbl_" "dprintf"); | |
1729 | extern __typeof (vasprintf) vasprintf __asm ("" "__nldbl_" "vasprintf"); | |
1730 | extern __typeof (__asprintf) __asprintf __asm ("" "__nldbl_" "__asprintf"); | |
1731 | extern __typeof (asprintf) asprintf __asm ("" "__nldbl_" "asprintf"); | |
1732 | extern __typeof (obstack_printf) obstack_printf __asm ("" "__nldbl_" "obstack_printf"); | |
1733 | extern __typeof (obstack_vprintf) obstack_vprintf __asm ("" "__nldbl_" "obstack_vprintf"); | |
1734 | # 840 "/usr/include/stdio.h" 2 3 4 | |
1735 | ||
1736 | ||
1737 | } | |
1738 | # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdio" 2 3 | |
1739 | # 99 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdio" 3 | |
1740 | namespace std | |
1741 | { | |
1742 | using ::FILE; | |
1743 | using ::fpos_t; | |
1744 | ||
1745 | using ::clearerr; | |
1746 | using ::fclose; | |
1747 | using ::feof; | |
1748 | using ::ferror; | |
1749 | using ::fflush; | |
1750 | using ::fgetc; | |
1751 | using ::fgetpos; | |
1752 | using ::fgets; | |
1753 | using ::fopen; | |
1754 | using ::fprintf; | |
1755 | using ::fputc; | |
1756 | using ::fputs; | |
1757 | using ::fread; | |
1758 | using ::freopen; | |
1759 | using ::fscanf; | |
1760 | using ::fseek; | |
1761 | using ::fsetpos; | |
1762 | using ::ftell; | |
1763 | using ::fwrite; | |
1764 | using ::getc; | |
1765 | using ::getchar; | |
1766 | using ::gets; | |
1767 | using ::perror; | |
1768 | using ::printf; | |
1769 | using ::putc; | |
1770 | using ::putchar; | |
1771 | using ::puts; | |
1772 | using ::remove; | |
1773 | using ::rename; | |
1774 | using ::rewind; | |
1775 | using ::scanf; | |
1776 | using ::setbuf; | |
1777 | using ::setvbuf; | |
1778 | using ::sprintf; | |
1779 | using ::sscanf; | |
1780 | using ::tmpfile; | |
1781 | using ::tmpnam; | |
1782 | using ::ungetc; | |
1783 | using ::vfprintf; | |
1784 | using ::vprintf; | |
1785 | using ::vsprintf; | |
1786 | } | |
1787 | # 155 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdio" 3 | |
1788 | namespace __gnu_cxx | |
1789 | { | |
1790 | # 170 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdio" 3 | |
1791 | using ::snprintf; | |
1792 | using ::vfscanf; | |
1793 | using ::vscanf; | |
1794 | using ::vsnprintf; | |
1795 | using ::vsscanf; | |
1796 | ||
1797 | } | |
1798 | ||
1799 | namespace std | |
1800 | { | |
1801 | using __gnu_cxx::snprintf; | |
1802 | using __gnu_cxx::vfscanf; | |
1803 | using __gnu_cxx::vscanf; | |
1804 | using __gnu_cxx::vsnprintf; | |
1805 | using __gnu_cxx::vsscanf; | |
1806 | } | |
1807 | ||
1808 | ||
1809 | #pragma GCC visibility pop | |
1810 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 | |
1811 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/clocale" 1 3 | |
1812 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/clocale" 3 | |
1813 | ||
1814 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/clocale" 3 | |
1815 | #pragma GCC visibility push(default) | |
1816 | ||
1817 | # 1 "/usr/include/locale.h" 1 3 4 | |
1818 | # 29 "/usr/include/locale.h" 3 4 | |
1819 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
1820 | # 30 "/usr/include/locale.h" 2 3 4 | |
1821 | # 1 "/usr/include/bits/locale.h" 1 3 4 | |
1822 | # 27 "/usr/include/bits/locale.h" 3 4 | |
1823 | enum | |
1824 | { | |
1825 | __LC_CTYPE = 0, | |
1826 | __LC_NUMERIC = 1, | |
1827 | __LC_TIME = 2, | |
1828 | __LC_COLLATE = 3, | |
1829 | __LC_MONETARY = 4, | |
1830 | __LC_MESSAGES = 5, | |
1831 | __LC_ALL = 6, | |
1832 | __LC_PAPER = 7, | |
1833 | __LC_NAME = 8, | |
1834 | __LC_ADDRESS = 9, | |
1835 | __LC_TELEPHONE = 10, | |
1836 | __LC_MEASUREMENT = 11, | |
1837 | __LC_IDENTIFICATION = 12 | |
1838 | }; | |
1839 | # 31 "/usr/include/locale.h" 2 3 4 | |
1840 | ||
1841 | extern "C" { | |
1842 | # 52 "/usr/include/locale.h" 3 4 | |
1843 | struct lconv | |
1844 | { | |
1845 | ||
1846 | ||
1847 | char *decimal_point; | |
1848 | char *thousands_sep; | |
1849 | ||
1850 | ||
1851 | ||
1852 | ||
1853 | ||
1854 | char *grouping; | |
1855 | ||
1856 | ||
1857 | ||
1858 | ||
1859 | ||
1860 | char *int_curr_symbol; | |
1861 | char *currency_symbol; | |
1862 | char *mon_decimal_point; | |
1863 | char *mon_thousands_sep; | |
1864 | char *mon_grouping; | |
1865 | char *positive_sign; | |
1866 | char *negative_sign; | |
1867 | char int_frac_digits; | |
1868 | char frac_digits; | |
1869 | ||
1870 | char p_cs_precedes; | |
1871 | ||
1872 | char p_sep_by_space; | |
1873 | ||
1874 | char n_cs_precedes; | |
1875 | ||
1876 | char n_sep_by_space; | |
1877 | ||
1878 | ||
1879 | ||
1880 | ||
1881 | ||
1882 | ||
1883 | char p_sign_posn; | |
1884 | char n_sign_posn; | |
1885 | ||
1886 | ||
1887 | char int_p_cs_precedes; | |
1888 | ||
1889 | char int_p_sep_by_space; | |
1890 | ||
1891 | char int_n_cs_precedes; | |
1892 | ||
1893 | char int_n_sep_by_space; | |
1894 | ||
1895 | ||
1896 | ||
1897 | ||
1898 | ||
1899 | ||
1900 | char int_p_sign_posn; | |
1901 | char int_n_sign_posn; | |
1902 | # 119 "/usr/include/locale.h" 3 4 | |
1903 | }; | |
1904 | ||
1905 | ||
1906 | ||
1907 | ||
1908 | ||
1909 | extern char *setlocale (int __category, __const char *__locale) throw (); | |
1910 | ||
1911 | ||
1912 | extern struct lconv *localeconv (void) throw (); | |
1913 | ||
1914 | ||
1915 | # 148 "/usr/include/locale.h" 3 4 | |
1916 | typedef __locale_t locale_t; | |
1917 | ||
1918 | ||
1919 | ||
1920 | ||
1921 | ||
1922 | extern __locale_t newlocale (int __category_mask, __const char *__locale, | |
1923 | __locale_t __base) throw (); | |
1924 | # 189 "/usr/include/locale.h" 3 4 | |
1925 | extern __locale_t duplocale (__locale_t __dataset) throw (); | |
1926 | ||
1927 | ||
1928 | ||
1929 | extern void freelocale (__locale_t __dataset) throw (); | |
1930 | ||
1931 | ||
1932 | ||
1933 | ||
1934 | ||
1935 | ||
1936 | extern __locale_t uselocale (__locale_t __dataset) throw (); | |
1937 | ||
1938 | ||
1939 | ||
1940 | ||
1941 | ||
1942 | ||
1943 | ||
1944 | } | |
1945 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/clocale" 2 3 | |
1946 | ||
1947 | ||
1948 | ||
1949 | ||
1950 | ||
1951 | namespace std | |
1952 | { | |
1953 | using ::lconv; | |
1954 | using ::setlocale; | |
1955 | using ::localeconv; | |
1956 | } | |
1957 | ||
1958 | #pragma GCC visibility pop | |
1959 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 | |
1960 | # 1 "/usr/include/langinfo.h" 1 3 4 | |
1961 | # 24 "/usr/include/langinfo.h" 3 4 | |
1962 | # 1 "/usr/include/nl_types.h" 1 3 4 | |
1963 | # 31 "/usr/include/nl_types.h" 3 4 | |
1964 | extern "C" { | |
1965 | ||
1966 | ||
1967 | typedef void *nl_catd; | |
1968 | ||
1969 | ||
1970 | typedef int nl_item; | |
1971 | ||
1972 | ||
1973 | ||
1974 | ||
1975 | ||
1976 | extern nl_catd catopen (__const char *__cat_name, int __flag) __attribute__ ((__nonnull__ (1))); | |
1977 | ||
1978 | ||
1979 | ||
1980 | extern char *catgets (nl_catd __catalog, int __set, int __number, | |
1981 | __const char *__string) throw () __attribute__ ((__nonnull__ (1))); | |
1982 | ||
1983 | ||
1984 | extern int catclose (nl_catd __catalog) throw () __attribute__ ((__nonnull__ (1))); | |
1985 | ||
1986 | } | |
1987 | # 25 "/usr/include/langinfo.h" 2 3 4 | |
1988 | ||
1989 | # 1 "/usr/include/bits/locale.h" 1 3 4 | |
1990 | # 27 "/usr/include/langinfo.h" 2 3 4 | |
1991 | ||
1992 | ||
1993 | extern "C" { | |
1994 | # 42 "/usr/include/langinfo.h" 3 4 | |
1995 | enum | |
1996 | { | |
1997 | ||
1998 | ||
1999 | ||
2000 | ABDAY_1 = (((__LC_TIME) << 16) | (0)), | |
2001 | ||
2002 | ABDAY_2, | |
2003 | ||
2004 | ABDAY_3, | |
2005 | ||
2006 | ABDAY_4, | |
2007 | ||
2008 | ABDAY_5, | |
2009 | ||
2010 | ABDAY_6, | |
2011 | ||
2012 | ABDAY_7, | |
2013 | ||
2014 | ||
2015 | ||
2016 | DAY_1, | |
2017 | ||
2018 | DAY_2, | |
2019 | ||
2020 | DAY_3, | |
2021 | ||
2022 | DAY_4, | |
2023 | ||
2024 | DAY_5, | |
2025 | ||
2026 | DAY_6, | |
2027 | ||
2028 | DAY_7, | |
2029 | ||
2030 | ||
2031 | ||
2032 | ABMON_1, | |
2033 | ||
2034 | ABMON_2, | |
2035 | ||
2036 | ABMON_3, | |
2037 | ||
2038 | ABMON_4, | |
2039 | ||
2040 | ABMON_5, | |
2041 | ||
2042 | ABMON_6, | |
2043 | ||
2044 | ABMON_7, | |
2045 | ||
2046 | ABMON_8, | |
2047 | ||
2048 | ABMON_9, | |
2049 | ||
2050 | ABMON_10, | |
2051 | ||
2052 | ABMON_11, | |
2053 | ||
2054 | ABMON_12, | |
2055 | ||
2056 | ||
2057 | ||
2058 | MON_1, | |
2059 | ||
2060 | MON_2, | |
2061 | ||
2062 | MON_3, | |
2063 | ||
2064 | MON_4, | |
2065 | ||
2066 | MON_5, | |
2067 | ||
2068 | MON_6, | |
2069 | ||
2070 | MON_7, | |
2071 | ||
2072 | MON_8, | |
2073 | ||
2074 | MON_9, | |
2075 | ||
2076 | MON_10, | |
2077 | ||
2078 | MON_11, | |
2079 | ||
2080 | MON_12, | |
2081 | ||
2082 | ||
2083 | AM_STR, | |
2084 | ||
2085 | PM_STR, | |
2086 | ||
2087 | ||
2088 | D_T_FMT, | |
2089 | ||
2090 | D_FMT, | |
2091 | ||
2092 | T_FMT, | |
2093 | ||
2094 | T_FMT_AMPM, | |
2095 | ||
2096 | ||
2097 | ERA, | |
2098 | ||
2099 | __ERA_YEAR, | |
2100 | ||
2101 | ||
2102 | ||
2103 | ERA_D_FMT, | |
2104 | ||
2105 | ALT_DIGITS, | |
2106 | ||
2107 | ERA_D_T_FMT, | |
2108 | ||
2109 | ERA_T_FMT, | |
2110 | ||
2111 | ||
2112 | _NL_TIME_ERA_NUM_ENTRIES, | |
2113 | _NL_TIME_ERA_ENTRIES, | |
2114 | ||
2115 | _NL_WABDAY_1, | |
2116 | _NL_WABDAY_2, | |
2117 | _NL_WABDAY_3, | |
2118 | _NL_WABDAY_4, | |
2119 | _NL_WABDAY_5, | |
2120 | _NL_WABDAY_6, | |
2121 | _NL_WABDAY_7, | |
2122 | ||
2123 | ||
2124 | _NL_WDAY_1, | |
2125 | _NL_WDAY_2, | |
2126 | _NL_WDAY_3, | |
2127 | _NL_WDAY_4, | |
2128 | _NL_WDAY_5, | |
2129 | _NL_WDAY_6, | |
2130 | _NL_WDAY_7, | |
2131 | ||
2132 | ||
2133 | _NL_WABMON_1, | |
2134 | _NL_WABMON_2, | |
2135 | _NL_WABMON_3, | |
2136 | _NL_WABMON_4, | |
2137 | _NL_WABMON_5, | |
2138 | _NL_WABMON_6, | |
2139 | _NL_WABMON_7, | |
2140 | _NL_WABMON_8, | |
2141 | _NL_WABMON_9, | |
2142 | _NL_WABMON_10, | |
2143 | _NL_WABMON_11, | |
2144 | _NL_WABMON_12, | |
2145 | ||
2146 | ||
2147 | _NL_WMON_1, | |
2148 | _NL_WMON_2, | |
2149 | _NL_WMON_3, | |
2150 | _NL_WMON_4, | |
2151 | _NL_WMON_5, | |
2152 | _NL_WMON_6, | |
2153 | _NL_WMON_7, | |
2154 | _NL_WMON_8, | |
2155 | _NL_WMON_9, | |
2156 | _NL_WMON_10, | |
2157 | _NL_WMON_11, | |
2158 | _NL_WMON_12, | |
2159 | ||
2160 | _NL_WAM_STR, | |
2161 | _NL_WPM_STR, | |
2162 | ||
2163 | _NL_WD_T_FMT, | |
2164 | _NL_WD_FMT, | |
2165 | _NL_WT_FMT, | |
2166 | _NL_WT_FMT_AMPM, | |
2167 | ||
2168 | _NL_WERA_YEAR, | |
2169 | _NL_WERA_D_FMT, | |
2170 | _NL_WALT_DIGITS, | |
2171 | _NL_WERA_D_T_FMT, | |
2172 | _NL_WERA_T_FMT, | |
2173 | ||
2174 | _NL_TIME_WEEK_NDAYS, | |
2175 | _NL_TIME_WEEK_1STDAY, | |
2176 | _NL_TIME_WEEK_1STWEEK, | |
2177 | _NL_TIME_FIRST_WEEKDAY, | |
2178 | _NL_TIME_FIRST_WORKDAY, | |
2179 | _NL_TIME_CAL_DIRECTION, | |
2180 | _NL_TIME_TIMEZONE, | |
2181 | ||
2182 | _DATE_FMT, | |
2183 | ||
2184 | _NL_W_DATE_FMT, | |
2185 | ||
2186 | _NL_TIME_CODESET, | |
2187 | ||
2188 | _NL_NUM_LC_TIME, | |
2189 | ||
2190 | ||
2191 | ||
2192 | ||
2193 | _NL_COLLATE_NRULES = (((__LC_COLLATE) << 16) | (0)), | |
2194 | _NL_COLLATE_RULESETS, | |
2195 | _NL_COLLATE_TABLEMB, | |
2196 | _NL_COLLATE_WEIGHTMB, | |
2197 | _NL_COLLATE_EXTRAMB, | |
2198 | _NL_COLLATE_INDIRECTMB, | |
2199 | _NL_COLLATE_GAP1, | |
2200 | _NL_COLLATE_GAP2, | |
2201 | _NL_COLLATE_GAP3, | |
2202 | _NL_COLLATE_TABLEWC, | |
2203 | _NL_COLLATE_WEIGHTWC, | |
2204 | _NL_COLLATE_EXTRAWC, | |
2205 | _NL_COLLATE_INDIRECTWC, | |
2206 | _NL_COLLATE_SYMB_HASH_SIZEMB, | |
2207 | _NL_COLLATE_SYMB_TABLEMB, | |
2208 | _NL_COLLATE_SYMB_EXTRAMB, | |
2209 | _NL_COLLATE_COLLSEQMB, | |
2210 | _NL_COLLATE_COLLSEQWC, | |
2211 | _NL_COLLATE_CODESET, | |
2212 | _NL_NUM_LC_COLLATE, | |
2213 | ||
2214 | ||
2215 | ||
2216 | ||
2217 | _NL_CTYPE_CLASS = (((__LC_CTYPE) << 16) | (0)), | |
2218 | _NL_CTYPE_TOUPPER, | |
2219 | _NL_CTYPE_GAP1, | |
2220 | _NL_CTYPE_TOLOWER, | |
2221 | _NL_CTYPE_GAP2, | |
2222 | _NL_CTYPE_CLASS32, | |
2223 | _NL_CTYPE_GAP3, | |
2224 | _NL_CTYPE_GAP4, | |
2225 | _NL_CTYPE_GAP5, | |
2226 | _NL_CTYPE_GAP6, | |
2227 | _NL_CTYPE_CLASS_NAMES, | |
2228 | _NL_CTYPE_MAP_NAMES, | |
2229 | _NL_CTYPE_WIDTH, | |
2230 | _NL_CTYPE_MB_CUR_MAX, | |
2231 | _NL_CTYPE_CODESET_NAME, | |
2232 | CODESET = _NL_CTYPE_CODESET_NAME, | |
2233 | ||
2234 | _NL_CTYPE_TOUPPER32, | |
2235 | _NL_CTYPE_TOLOWER32, | |
2236 | _NL_CTYPE_CLASS_OFFSET, | |
2237 | _NL_CTYPE_MAP_OFFSET, | |
2238 | _NL_CTYPE_INDIGITS_MB_LEN, | |
2239 | _NL_CTYPE_INDIGITS0_MB, | |
2240 | _NL_CTYPE_INDIGITS1_MB, | |
2241 | _NL_CTYPE_INDIGITS2_MB, | |
2242 | _NL_CTYPE_INDIGITS3_MB, | |
2243 | _NL_CTYPE_INDIGITS4_MB, | |
2244 | _NL_CTYPE_INDIGITS5_MB, | |
2245 | _NL_CTYPE_INDIGITS6_MB, | |
2246 | _NL_CTYPE_INDIGITS7_MB, | |
2247 | _NL_CTYPE_INDIGITS8_MB, | |
2248 | _NL_CTYPE_INDIGITS9_MB, | |
2249 | _NL_CTYPE_INDIGITS_WC_LEN, | |
2250 | _NL_CTYPE_INDIGITS0_WC, | |
2251 | _NL_CTYPE_INDIGITS1_WC, | |
2252 | _NL_CTYPE_INDIGITS2_WC, | |
2253 | _NL_CTYPE_INDIGITS3_WC, | |
2254 | _NL_CTYPE_INDIGITS4_WC, | |
2255 | _NL_CTYPE_INDIGITS5_WC, | |
2256 | _NL_CTYPE_INDIGITS6_WC, | |
2257 | _NL_CTYPE_INDIGITS7_WC, | |
2258 | _NL_CTYPE_INDIGITS8_WC, | |
2259 | _NL_CTYPE_INDIGITS9_WC, | |
2260 | _NL_CTYPE_OUTDIGIT0_MB, | |
2261 | _NL_CTYPE_OUTDIGIT1_MB, | |
2262 | _NL_CTYPE_OUTDIGIT2_MB, | |
2263 | _NL_CTYPE_OUTDIGIT3_MB, | |
2264 | _NL_CTYPE_OUTDIGIT4_MB, | |
2265 | _NL_CTYPE_OUTDIGIT5_MB, | |
2266 | _NL_CTYPE_OUTDIGIT6_MB, | |
2267 | _NL_CTYPE_OUTDIGIT7_MB, | |
2268 | _NL_CTYPE_OUTDIGIT8_MB, | |
2269 | _NL_CTYPE_OUTDIGIT9_MB, | |
2270 | _NL_CTYPE_OUTDIGIT0_WC, | |
2271 | _NL_CTYPE_OUTDIGIT1_WC, | |
2272 | _NL_CTYPE_OUTDIGIT2_WC, | |
2273 | _NL_CTYPE_OUTDIGIT3_WC, | |
2274 | _NL_CTYPE_OUTDIGIT4_WC, | |
2275 | _NL_CTYPE_OUTDIGIT5_WC, | |
2276 | _NL_CTYPE_OUTDIGIT6_WC, | |
2277 | _NL_CTYPE_OUTDIGIT7_WC, | |
2278 | _NL_CTYPE_OUTDIGIT8_WC, | |
2279 | _NL_CTYPE_OUTDIGIT9_WC, | |
2280 | _NL_CTYPE_TRANSLIT_TAB_SIZE, | |
2281 | _NL_CTYPE_TRANSLIT_FROM_IDX, | |
2282 | _NL_CTYPE_TRANSLIT_FROM_TBL, | |
2283 | _NL_CTYPE_TRANSLIT_TO_IDX, | |
2284 | _NL_CTYPE_TRANSLIT_TO_TBL, | |
2285 | _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, | |
2286 | _NL_CTYPE_TRANSLIT_DEFAULT_MISSING, | |
2287 | _NL_CTYPE_TRANSLIT_IGNORE_LEN, | |
2288 | _NL_CTYPE_TRANSLIT_IGNORE, | |
2289 | _NL_CTYPE_MAP_TO_NONASCII, | |
2290 | _NL_CTYPE_EXTRA_MAP_1, | |
2291 | _NL_CTYPE_EXTRA_MAP_2, | |
2292 | _NL_CTYPE_EXTRA_MAP_3, | |
2293 | _NL_CTYPE_EXTRA_MAP_4, | |
2294 | _NL_CTYPE_EXTRA_MAP_5, | |
2295 | _NL_CTYPE_EXTRA_MAP_6, | |
2296 | _NL_CTYPE_EXTRA_MAP_7, | |
2297 | _NL_CTYPE_EXTRA_MAP_8, | |
2298 | _NL_CTYPE_EXTRA_MAP_9, | |
2299 | _NL_CTYPE_EXTRA_MAP_10, | |
2300 | _NL_CTYPE_EXTRA_MAP_11, | |
2301 | _NL_CTYPE_EXTRA_MAP_12, | |
2302 | _NL_CTYPE_EXTRA_MAP_13, | |
2303 | _NL_CTYPE_EXTRA_MAP_14, | |
2304 | _NL_NUM_LC_CTYPE, | |
2305 | ||
2306 | ||
2307 | ||
2308 | ||
2309 | __INT_CURR_SYMBOL = (((__LC_MONETARY) << 16) | (0)), | |
2310 | ||
2311 | ||
2312 | ||
2313 | __CURRENCY_SYMBOL, | |
2314 | ||
2315 | ||
2316 | ||
2317 | __MON_DECIMAL_POINT, | |
2318 | ||
2319 | ||
2320 | ||
2321 | __MON_THOUSANDS_SEP, | |
2322 | ||
2323 | ||
2324 | ||
2325 | __MON_GROUPING, | |
2326 | ||
2327 | ||
2328 | ||
2329 | __POSITIVE_SIGN, | |
2330 | ||
2331 | ||
2332 | ||
2333 | __NEGATIVE_SIGN, | |
2334 | ||
2335 | ||
2336 | ||
2337 | __INT_FRAC_DIGITS, | |
2338 | ||
2339 | ||
2340 | ||
2341 | __FRAC_DIGITS, | |
2342 | ||
2343 | ||
2344 | ||
2345 | __P_CS_PRECEDES, | |
2346 | ||
2347 | ||
2348 | ||
2349 | __P_SEP_BY_SPACE, | |
2350 | ||
2351 | ||
2352 | ||
2353 | __N_CS_PRECEDES, | |
2354 | ||
2355 | ||
2356 | ||
2357 | __N_SEP_BY_SPACE, | |
2358 | ||
2359 | ||
2360 | ||
2361 | __P_SIGN_POSN, | |
2362 | ||
2363 | ||
2364 | ||
2365 | __N_SIGN_POSN, | |
2366 | ||
2367 | ||
2368 | ||
2369 | _NL_MONETARY_CRNCYSTR, | |
2370 | ||
2371 | __INT_P_CS_PRECEDES, | |
2372 | ||
2373 | ||
2374 | ||
2375 | __INT_P_SEP_BY_SPACE, | |
2376 | ||
2377 | ||
2378 | ||
2379 | __INT_N_CS_PRECEDES, | |
2380 | ||
2381 | ||
2382 | ||
2383 | __INT_N_SEP_BY_SPACE, | |
2384 | ||
2385 | ||
2386 | ||
2387 | __INT_P_SIGN_POSN, | |
2388 | ||
2389 | ||
2390 | ||
2391 | __INT_N_SIGN_POSN, | |
2392 | ||
2393 | ||
2394 | ||
2395 | _NL_MONETARY_DUO_INT_CURR_SYMBOL, | |
2396 | _NL_MONETARY_DUO_CURRENCY_SYMBOL, | |
2397 | _NL_MONETARY_DUO_INT_FRAC_DIGITS, | |
2398 | _NL_MONETARY_DUO_FRAC_DIGITS, | |
2399 | _NL_MONETARY_DUO_P_CS_PRECEDES, | |
2400 | _NL_MONETARY_DUO_P_SEP_BY_SPACE, | |
2401 | _NL_MONETARY_DUO_N_CS_PRECEDES, | |
2402 | _NL_MONETARY_DUO_N_SEP_BY_SPACE, | |
2403 | _NL_MONETARY_DUO_INT_P_CS_PRECEDES, | |
2404 | _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, | |
2405 | _NL_MONETARY_DUO_INT_N_CS_PRECEDES, | |
2406 | _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, | |
2407 | _NL_MONETARY_DUO_P_SIGN_POSN, | |
2408 | _NL_MONETARY_DUO_N_SIGN_POSN, | |
2409 | _NL_MONETARY_DUO_INT_P_SIGN_POSN, | |
2410 | _NL_MONETARY_DUO_INT_N_SIGN_POSN, | |
2411 | _NL_MONETARY_UNO_VALID_FROM, | |
2412 | _NL_MONETARY_UNO_VALID_TO, | |
2413 | _NL_MONETARY_DUO_VALID_FROM, | |
2414 | _NL_MONETARY_DUO_VALID_TO, | |
2415 | _NL_MONETARY_CONVERSION_RATE, | |
2416 | _NL_MONETARY_DECIMAL_POINT_WC, | |
2417 | _NL_MONETARY_THOUSANDS_SEP_WC, | |
2418 | _NL_MONETARY_CODESET, | |
2419 | _NL_NUM_LC_MONETARY, | |
2420 | ||
2421 | ||
2422 | ||
2423 | __DECIMAL_POINT = (((__LC_NUMERIC) << 16) | (0)), | |
2424 | ||
2425 | ||
2426 | ||
2427 | RADIXCHAR = __DECIMAL_POINT, | |
2428 | ||
2429 | __THOUSANDS_SEP, | |
2430 | ||
2431 | ||
2432 | ||
2433 | THOUSEP = __THOUSANDS_SEP, | |
2434 | ||
2435 | __GROUPING, | |
2436 | ||
2437 | ||
2438 | ||
2439 | _NL_NUMERIC_DECIMAL_POINT_WC, | |
2440 | _NL_NUMERIC_THOUSANDS_SEP_WC, | |
2441 | _NL_NUMERIC_CODESET, | |
2442 | _NL_NUM_LC_NUMERIC, | |
2443 | ||
2444 | __YESEXPR = (((__LC_MESSAGES) << 16) | (0)), | |
2445 | ||
2446 | __NOEXPR, | |
2447 | ||
2448 | __YESSTR, | |
2449 | ||
2450 | ||
2451 | ||
2452 | __NOSTR, | |
2453 | ||
2454 | ||
2455 | ||
2456 | _NL_MESSAGES_CODESET, | |
2457 | _NL_NUM_LC_MESSAGES, | |
2458 | ||
2459 | _NL_PAPER_HEIGHT = (((__LC_PAPER) << 16) | (0)), | |
2460 | _NL_PAPER_WIDTH, | |
2461 | _NL_PAPER_CODESET, | |
2462 | _NL_NUM_LC_PAPER, | |
2463 | ||
2464 | _NL_NAME_NAME_FMT = (((__LC_NAME) << 16) | (0)), | |
2465 | _NL_NAME_NAME_GEN, | |
2466 | _NL_NAME_NAME_MR, | |
2467 | _NL_NAME_NAME_MRS, | |
2468 | _NL_NAME_NAME_MISS, | |
2469 | _NL_NAME_NAME_MS, | |
2470 | _NL_NAME_CODESET, | |
2471 | _NL_NUM_LC_NAME, | |
2472 | ||
2473 | _NL_ADDRESS_POSTAL_FMT = (((__LC_ADDRESS) << 16) | (0)), | |
2474 | _NL_ADDRESS_COUNTRY_NAME, | |
2475 | _NL_ADDRESS_COUNTRY_POST, | |
2476 | _NL_ADDRESS_COUNTRY_AB2, | |
2477 | _NL_ADDRESS_COUNTRY_AB3, | |
2478 | _NL_ADDRESS_COUNTRY_CAR, | |
2479 | _NL_ADDRESS_COUNTRY_NUM, | |
2480 | _NL_ADDRESS_COUNTRY_ISBN, | |
2481 | _NL_ADDRESS_LANG_NAME, | |
2482 | _NL_ADDRESS_LANG_AB, | |
2483 | _NL_ADDRESS_LANG_TERM, | |
2484 | _NL_ADDRESS_LANG_LIB, | |
2485 | _NL_ADDRESS_CODESET, | |
2486 | _NL_NUM_LC_ADDRESS, | |
2487 | ||
2488 | _NL_TELEPHONE_TEL_INT_FMT = (((__LC_TELEPHONE) << 16) | (0)), | |
2489 | _NL_TELEPHONE_TEL_DOM_FMT, | |
2490 | _NL_TELEPHONE_INT_SELECT, | |
2491 | _NL_TELEPHONE_INT_PREFIX, | |
2492 | _NL_TELEPHONE_CODESET, | |
2493 | _NL_NUM_LC_TELEPHONE, | |
2494 | ||
2495 | _NL_MEASUREMENT_MEASUREMENT = (((__LC_MEASUREMENT) << 16) | (0)), | |
2496 | _NL_MEASUREMENT_CODESET, | |
2497 | _NL_NUM_LC_MEASUREMENT, | |
2498 | ||
2499 | _NL_IDENTIFICATION_TITLE = (((__LC_IDENTIFICATION) << 16) | (0)), | |
2500 | _NL_IDENTIFICATION_SOURCE, | |
2501 | _NL_IDENTIFICATION_ADDRESS, | |
2502 | _NL_IDENTIFICATION_CONTACT, | |
2503 | _NL_IDENTIFICATION_EMAIL, | |
2504 | _NL_IDENTIFICATION_TEL, | |
2505 | _NL_IDENTIFICATION_FAX, | |
2506 | _NL_IDENTIFICATION_LANGUAGE, | |
2507 | _NL_IDENTIFICATION_TERRITORY, | |
2508 | _NL_IDENTIFICATION_AUDIENCE, | |
2509 | _NL_IDENTIFICATION_APPLICATION, | |
2510 | _NL_IDENTIFICATION_ABBREVIATION, | |
2511 | _NL_IDENTIFICATION_REVISION, | |
2512 | _NL_IDENTIFICATION_DATE, | |
2513 | _NL_IDENTIFICATION_CATEGORY, | |
2514 | _NL_IDENTIFICATION_CODESET, | |
2515 | _NL_NUM_LC_IDENTIFICATION, | |
2516 | ||
2517 | ||
2518 | _NL_NUM | |
2519 | }; | |
2520 | # 582 "/usr/include/langinfo.h" 3 4 | |
2521 | extern char *nl_langinfo (nl_item __item) throw (); | |
2522 | # 593 "/usr/include/langinfo.h" 3 4 | |
2523 | extern char *nl_langinfo_l (nl_item __item, __locale_t l); | |
2524 | ||
2525 | ||
2526 | } | |
2527 | # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 | |
2528 | # 1 "/usr/include/iconv.h" 1 3 4 | |
2529 | # 24 "/usr/include/iconv.h" 3 4 | |
2530 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
2531 | # 25 "/usr/include/iconv.h" 2 3 4 | |
2532 | ||
2533 | ||
2534 | extern "C" { | |
2535 | ||
2536 | ||
2537 | typedef void *iconv_t; | |
2538 | ||
2539 | ||
2540 | ||
2541 | ||
2542 | ||
2543 | ||
2544 | ||
2545 | extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); | |
2546 | ||
2547 | ||
2548 | ||
2549 | ||
2550 | extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, | |
2551 | size_t *__restrict __inbytesleft, | |
2552 | char **__restrict __outbuf, | |
2553 | size_t *__restrict __outbytesleft); | |
2554 | ||
2555 | ||
2556 | ||
2557 | ||
2558 | ||
2559 | extern int iconv_close (iconv_t __cd); | |
2560 | ||
2561 | } | |
2562 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 | |
2563 | # 1 "/usr/include/libintl.h" 1 3 4 | |
2564 | # 35 "/usr/include/libintl.h" 3 4 | |
2565 | extern "C" { | |
2566 | ||
2567 | ||
2568 | ||
2569 | ||
2570 | extern char *gettext (__const char *__msgid) | |
2571 | throw () __attribute__ ((__format_arg__ (1))); | |
2572 | ||
2573 | ||
2574 | ||
2575 | extern char *dgettext (__const char *__domainname, __const char *__msgid) | |
2576 | throw () __attribute__ ((__format_arg__ (2))); | |
2577 | extern char *__dgettext (__const char *__domainname, __const char *__msgid) | |
2578 | throw () __attribute__ ((__format_arg__ (2))); | |
2579 | ||
2580 | ||
2581 | ||
2582 | extern char *dcgettext (__const char *__domainname, | |
2583 | __const char *__msgid, int __category) | |
2584 | throw () __attribute__ ((__format_arg__ (2))); | |
2585 | extern char *__dcgettext (__const char *__domainname, | |
2586 | __const char *__msgid, int __category) | |
2587 | throw () __attribute__ ((__format_arg__ (2))); | |
2588 | ||
2589 | ||
2590 | ||
2591 | ||
2592 | extern char *ngettext (__const char *__msgid1, __const char *__msgid2, | |
2593 | unsigned long int __n) | |
2594 | throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); | |
2595 | ||
2596 | ||
2597 | ||
2598 | extern char *dngettext (__const char *__domainname, __const char *__msgid1, | |
2599 | __const char *__msgid2, unsigned long int __n) | |
2600 | throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); | |
2601 | ||
2602 | ||
2603 | ||
2604 | extern char *dcngettext (__const char *__domainname, __const char *__msgid1, | |
2605 | __const char *__msgid2, unsigned long int __n, | |
2606 | int __category) | |
2607 | throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); | |
2608 | ||
2609 | ||
2610 | ||
2611 | ||
2612 | ||
2613 | extern char *textdomain (__const char *__domainname) throw (); | |
2614 | ||
2615 | ||
2616 | ||
2617 | extern char *bindtextdomain (__const char *__domainname, | |
2618 | __const char *__dirname) throw (); | |
2619 | ||
2620 | ||
2621 | ||
2622 | extern char *bind_textdomain_codeset (__const char *__domainname, | |
2623 | __const char *__codeset) throw (); | |
2624 | # 122 "/usr/include/libintl.h" 3 4 | |
2625 | } | |
2626 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 | |
2627 | ||
2628 | ||
2629 | ||
2630 | ||
2631 | ||
2632 | ||
2633 | namespace __gnu_cxx | |
2634 | { | |
2635 | extern "C" __typeof(uselocale) __uselocale; | |
2636 | } | |
2637 | ||
2638 | ||
2639 | namespace std | |
2640 | { | |
2641 | typedef __locale_t __c_locale; | |
2642 | ||
2643 | ||
2644 | ||
2645 | ||
2646 | ||
2647 | template<typename _Tv> | |
2648 | int | |
2649 | __convert_from_v(char* __out, | |
2650 | const int __size __attribute__ ((__unused__)), | |
2651 | const char* __fmt, | |
2652 | ||
2653 | _Tv __v, const __c_locale& __cloc, int __prec) | |
2654 | { | |
2655 | __c_locale __old = __gnu_cxx::__uselocale(__cloc); | |
2656 | # 86 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 3 | |
2657 | const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); | |
2658 | ||
2659 | ||
2660 | ||
2661 | ||
2662 | ||
2663 | __gnu_cxx::__uselocale(__old); | |
2664 | ||
2665 | ||
2666 | ||
2667 | ||
2668 | return __ret; | |
2669 | } | |
2670 | } | |
2671 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 2 3 | |
2672 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 1 3 | |
2673 | # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 3 | |
2674 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 1 3 | |
2675 | # 33 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 3 | |
2676 | #pragma GCC visibility push(default) | |
2677 | # 114 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 3 | |
2678 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 1 3 | |
2679 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 | |
2680 | # 1 "/usr/include/pthread.h" 1 3 4 | |
2681 | # 23 "/usr/include/pthread.h" 3 4 | |
2682 | # 1 "/usr/include/sched.h" 1 3 4 | |
2683 | # 29 "/usr/include/sched.h" 3 4 | |
2684 | # 1 "/usr/include/time.h" 1 3 4 | |
2685 | # 121 "/usr/include/time.h" 3 4 | |
2686 | struct timespec | |
2687 | { | |
2688 | __time_t tv_sec; | |
2689 | long int tv_nsec; | |
2690 | }; | |
2691 | # 30 "/usr/include/sched.h" 2 3 4 | |
2692 | ||
2693 | ||
2694 | # 1 "/usr/include/bits/sched.h" 1 3 4 | |
2695 | # 65 "/usr/include/bits/sched.h" 3 4 | |
2696 | struct sched_param | |
2697 | { | |
2698 | int __sched_priority; | |
2699 | }; | |
2700 | ||
2701 | extern "C" { | |
2702 | ||
2703 | ||
2704 | ||
2705 | extern int clone (int (*__fn) (void *__arg), void *__child_stack, | |
2706 | int __flags, void *__arg, ...) throw (); | |
2707 | ||
2708 | ||
2709 | extern int unshare (int __flags) throw (); | |
2710 | ||
2711 | ||
2712 | } | |
2713 | ||
2714 | ||
2715 | ||
2716 | ||
2717 | ||
2718 | ||
2719 | ||
2720 | struct __sched_param | |
2721 | { | |
2722 | int __sched_priority; | |
2723 | }; | |
2724 | # 104 "/usr/include/bits/sched.h" 3 4 | |
2725 | typedef unsigned long int __cpu_mask; | |
2726 | ||
2727 | ||
2728 | ||
2729 | ||
2730 | ||
2731 | ||
2732 | typedef struct | |
2733 | { | |
2734 | __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; | |
2735 | } cpu_set_t; | |
2736 | # 33 "/usr/include/sched.h" 2 3 4 | |
2737 | ||
2738 | ||
2739 | ||
2740 | ||
2741 | extern "C" { | |
2742 | ||
2743 | ||
2744 | extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) | |
2745 | throw (); | |
2746 | ||
2747 | ||
2748 | extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); | |
2749 | ||
2750 | ||
2751 | extern int sched_setscheduler (__pid_t __pid, int __policy, | |
2752 | __const struct sched_param *__param) throw (); | |
2753 | ||
2754 | ||
2755 | extern int sched_getscheduler (__pid_t __pid) throw (); | |
2756 | ||
2757 | ||
2758 | extern int sched_yield (void) throw (); | |
2759 | ||
2760 | ||
2761 | extern int sched_get_priority_max (int __algorithm) throw (); | |
2762 | ||
2763 | ||
2764 | extern int sched_get_priority_min (int __algorithm) throw (); | |
2765 | ||
2766 | ||
2767 | extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); | |
2768 | # 76 "/usr/include/sched.h" 3 4 | |
2769 | extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, | |
2770 | __const cpu_set_t *__cpuset) throw (); | |
2771 | ||
2772 | ||
2773 | extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, | |
2774 | cpu_set_t *__cpuset) throw (); | |
2775 | ||
2776 | ||
2777 | } | |
2778 | # 24 "/usr/include/pthread.h" 2 3 4 | |
2779 | # 1 "/usr/include/time.h" 1 3 4 | |
2780 | # 31 "/usr/include/time.h" 3 4 | |
2781 | extern "C" { | |
2782 | ||
2783 | ||
2784 | ||
2785 | ||
2786 | ||
2787 | ||
2788 | ||
2789 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
2790 | # 40 "/usr/include/time.h" 2 3 4 | |
2791 | ||
2792 | ||
2793 | ||
2794 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
2795 | # 44 "/usr/include/time.h" 2 3 4 | |
2796 | # 59 "/usr/include/time.h" 3 4 | |
2797 | ||
2798 | ||
2799 | typedef __clock_t clock_t; | |
2800 | ||
2801 | ||
2802 | ||
2803 | # 75 "/usr/include/time.h" 3 4 | |
2804 | ||
2805 | ||
2806 | typedef __time_t time_t; | |
2807 | ||
2808 | ||
2809 | ||
2810 | # 93 "/usr/include/time.h" 3 4 | |
2811 | typedef __clockid_t clockid_t; | |
2812 | # 105 "/usr/include/time.h" 3 4 | |
2813 | typedef __timer_t timer_t; | |
2814 | # 132 "/usr/include/time.h" 3 4 | |
2815 | ||
2816 | ||
2817 | struct tm | |
2818 | { | |
2819 | int tm_sec; | |
2820 | int tm_min; | |
2821 | int tm_hour; | |
2822 | int tm_mday; | |
2823 | int tm_mon; | |
2824 | int tm_year; | |
2825 | int tm_wday; | |
2826 | int tm_yday; | |
2827 | int tm_isdst; | |
2828 | ||
2829 | ||
2830 | long int tm_gmtoff; | |
2831 | __const char *tm_zone; | |
2832 | ||
2833 | ||
2834 | ||
2835 | ||
2836 | }; | |
2837 | ||
2838 | ||
2839 | ||
2840 | ||
2841 | ||
2842 | ||
2843 | ||
2844 | ||
2845 | struct itimerspec | |
2846 | { | |
2847 | struct timespec it_interval; | |
2848 | struct timespec it_value; | |
2849 | }; | |
2850 | ||
2851 | ||
2852 | struct sigevent; | |
2853 | ||
2854 | ||
2855 | ||
2856 | ||
2857 | ||
2858 | typedef __pid_t pid_t; | |
2859 | ||
2860 | ||
2861 | ||
2862 | ||
2863 | ||
2864 | ||
2865 | ||
2866 | ||
2867 | extern clock_t clock (void) throw (); | |
2868 | ||
2869 | ||
2870 | extern time_t time (time_t *__timer) throw (); | |
2871 | ||
2872 | ||
2873 | extern double difftime (time_t __time1, time_t __time0) | |
2874 | throw () __attribute__ ((__const__)); | |
2875 | ||
2876 | ||
2877 | extern time_t mktime (struct tm *__tp) throw (); | |
2878 | ||
2879 | ||
2880 | ||
2881 | ||
2882 | ||
2883 | extern size_t strftime (char *__restrict __s, size_t __maxsize, | |
2884 | __const char *__restrict __format, | |
2885 | __const struct tm *__restrict __tp) throw (); | |
2886 | ||
2887 | ||
2888 | ||
2889 | ||
2890 | ||
2891 | extern char *strptime (__const char *__restrict __s, | |
2892 | __const char *__restrict __fmt, struct tm *__tp) | |
2893 | throw (); | |
2894 | ||
2895 | ||
2896 | ||
2897 | ||
2898 | ||
2899 | ||
2900 | ||
2901 | extern size_t strftime_l (char *__restrict __s, size_t __maxsize, | |
2902 | __const char *__restrict __format, | |
2903 | __const struct tm *__restrict __tp, | |
2904 | __locale_t __loc) throw (); | |
2905 | ||
2906 | extern char *strptime_l (__const char *__restrict __s, | |
2907 | __const char *__restrict __fmt, struct tm *__tp, | |
2908 | __locale_t __loc) throw (); | |
2909 | ||
2910 | ||
2911 | ||
2912 | ||
2913 | ||
2914 | ||
2915 | extern struct tm *gmtime (__const time_t *__timer) throw (); | |
2916 | ||
2917 | ||
2918 | ||
2919 | extern struct tm *localtime (__const time_t *__timer) throw (); | |
2920 | ||
2921 | ||
2922 | ||
2923 | ||
2924 | ||
2925 | extern struct tm *gmtime_r (__const time_t *__restrict __timer, | |
2926 | struct tm *__restrict __tp) throw (); | |
2927 | ||
2928 | ||
2929 | ||
2930 | extern struct tm *localtime_r (__const time_t *__restrict __timer, | |
2931 | struct tm *__restrict __tp) throw (); | |
2932 | ||
2933 | ||
2934 | ||
2935 | ||
2936 | ||
2937 | extern char *asctime (__const struct tm *__tp) throw (); | |
2938 | ||
2939 | ||
2940 | extern char *ctime (__const time_t *__timer) throw (); | |
2941 | ||
2942 | ||
2943 | ||
2944 | ||
2945 | ||
2946 | ||
2947 | ||
2948 | extern char *asctime_r (__const struct tm *__restrict __tp, | |
2949 | char *__restrict __buf) throw (); | |
2950 | ||
2951 | ||
2952 | extern char *ctime_r (__const time_t *__restrict __timer, | |
2953 | char *__restrict __buf) throw (); | |
2954 | ||
2955 | ||
2956 | ||
2957 | ||
2958 | extern char *__tzname[2]; | |
2959 | extern int __daylight; | |
2960 | extern long int __timezone; | |
2961 | ||
2962 | ||
2963 | ||
2964 | ||
2965 | extern char *tzname[2]; | |
2966 | ||
2967 | ||
2968 | ||
2969 | extern void tzset (void) throw (); | |
2970 | ||
2971 | ||
2972 | ||
2973 | extern int daylight; | |
2974 | extern long int timezone; | |
2975 | ||
2976 | ||
2977 | ||
2978 | ||
2979 | ||
2980 | extern int stime (__const time_t *__when) throw (); | |
2981 | # 312 "/usr/include/time.h" 3 4 | |
2982 | extern time_t timegm (struct tm *__tp) throw (); | |
2983 | ||
2984 | ||
2985 | extern time_t timelocal (struct tm *__tp) throw (); | |
2986 | ||
2987 | ||
2988 | extern int dysize (int __year) throw () __attribute__ ((__const__)); | |
2989 | # 327 "/usr/include/time.h" 3 4 | |
2990 | extern int nanosleep (__const struct timespec *__requested_time, | |
2991 | struct timespec *__remaining); | |
2992 | ||
2993 | ||
2994 | ||
2995 | extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); | |
2996 | ||
2997 | ||
2998 | extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); | |
2999 | ||
3000 | ||
3001 | extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) | |
3002 | throw (); | |
3003 | ||
3004 | ||
3005 | ||
3006 | ||
3007 | ||
3008 | ||
3009 | extern int clock_nanosleep (clockid_t __clock_id, int __flags, | |
3010 | __const struct timespec *__req, | |
3011 | struct timespec *__rem); | |
3012 | ||
3013 | ||
3014 | extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); | |
3015 | ||
3016 | ||
3017 | ||
3018 | ||
3019 | extern int timer_create (clockid_t __clock_id, | |
3020 | struct sigevent *__restrict __evp, | |
3021 | timer_t *__restrict __timerid) throw (); | |
3022 | ||
3023 | ||
3024 | extern int timer_delete (timer_t __timerid) throw (); | |
3025 | ||
3026 | ||
3027 | extern int timer_settime (timer_t __timerid, int __flags, | |
3028 | __const struct itimerspec *__restrict __value, | |
3029 | struct itimerspec *__restrict __ovalue) throw (); | |
3030 | ||
3031 | ||
3032 | extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) | |
3033 | throw (); | |
3034 | ||
3035 | ||
3036 | extern int timer_getoverrun (timer_t __timerid) throw (); | |
3037 | # 389 "/usr/include/time.h" 3 4 | |
3038 | extern int getdate_err; | |
3039 | # 398 "/usr/include/time.h" 3 4 | |
3040 | extern struct tm *getdate (__const char *__string); | |
3041 | # 412 "/usr/include/time.h" 3 4 | |
3042 | extern int getdate_r (__const char *__restrict __string, | |
3043 | struct tm *__restrict __resbufp); | |
3044 | ||
3045 | ||
3046 | } | |
3047 | # 25 "/usr/include/pthread.h" 2 3 4 | |
3048 | ||
3049 | ||
3050 | # 1 "/usr/include/signal.h" 1 3 4 | |
3051 | # 31 "/usr/include/signal.h" 3 4 | |
3052 | extern "C" { | |
3053 | ||
3054 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
3055 | # 23 "/usr/include/bits/sigset.h" 3 4 | |
3056 | typedef int __sig_atomic_t; | |
3057 | ||
3058 | ||
3059 | ||
3060 | ||
3061 | typedef struct | |
3062 | { | |
3063 | unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; | |
3064 | } __sigset_t; | |
3065 | # 34 "/usr/include/signal.h" 2 3 4 | |
3066 | # 50 "/usr/include/signal.h" 3 4 | |
3067 | typedef __sigset_t sigset_t; | |
3068 | # 400 "/usr/include/signal.h" 3 4 | |
3069 | } | |
3070 | # 28 "/usr/include/pthread.h" 2 3 4 | |
3071 | # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 | |
3072 | # 24 "/usr/include/bits/pthreadtypes.h" 3 4 | |
3073 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
3074 | # 25 "/usr/include/bits/pthreadtypes.h" 2 3 4 | |
3075 | # 51 "/usr/include/bits/pthreadtypes.h" 3 4 | |
3076 | typedef unsigned long int pthread_t; | |
3077 | ||
3078 | ||
3079 | typedef union | |
3080 | { | |
3081 | char __size[36]; | |
3082 | long int __align; | |
3083 | } pthread_attr_t; | |
3084 | # 68 "/usr/include/bits/pthreadtypes.h" 3 4 | |
3085 | typedef struct __pthread_internal_slist | |
3086 | { | |
3087 | struct __pthread_internal_slist *__next; | |
3088 | } __pthread_slist_t; | |
3089 | ||
3090 | ||
3091 | ||
3092 | ||
3093 | ||
3094 | typedef union | |
3095 | { | |
3096 | struct __pthread_mutex_s | |
3097 | { | |
3098 | int __lock; | |
3099 | unsigned int __count; | |
3100 | int __owner; | |
3101 | ||
3102 | ||
3103 | ||
3104 | ||
3105 | ||
3106 | int __kind; | |
3107 | ||
3108 | ||
3109 | ||
3110 | ||
3111 | ||
3112 | unsigned int __nusers; | |
3113 | __extension__ union | |
3114 | { | |
3115 | int __spins; | |
3116 | __pthread_slist_t __list; | |
3117 | }; | |
3118 | ||
3119 | } __data; | |
3120 | char __size[24]; | |
3121 | long int __align; | |
3122 | } pthread_mutex_t; | |
3123 | ||
3124 | typedef union | |
3125 | { | |
3126 | char __size[4]; | |
3127 | int __align; | |
3128 | } pthread_mutexattr_t; | |
3129 | ||
3130 | ||
3131 | ||
3132 | ||
3133 | typedef union | |
3134 | { | |
3135 | struct | |
3136 | { | |
3137 | int __lock; | |
3138 | unsigned int __futex; | |
3139 | __extension__ unsigned long long int __total_seq; | |
3140 | __extension__ unsigned long long int __wakeup_seq; | |
3141 | __extension__ unsigned long long int __woken_seq; | |
3142 | void *__mutex; | |
3143 | unsigned int __nwaiters; | |
3144 | unsigned int __broadcast_seq; | |
3145 | } __data; | |
3146 | char __size[48]; | |
3147 | __extension__ long long int __align; | |
3148 | } pthread_cond_t; | |
3149 | ||
3150 | typedef union | |
3151 | { | |
3152 | char __size[4]; | |
3153 | int __align; | |
3154 | } pthread_condattr_t; | |
3155 | ||
3156 | ||
3157 | ||
3158 | typedef unsigned int pthread_key_t; | |
3159 | ||
3160 | ||
3161 | ||
3162 | typedef int pthread_once_t; | |
3163 | ||
3164 | ||
3165 | ||
3166 | ||
3167 | ||
3168 | typedef union | |
3169 | { | |
3170 | # 171 "/usr/include/bits/pthreadtypes.h" 3 4 | |
3171 | struct | |
3172 | { | |
3173 | int __lock; | |
3174 | unsigned int __nr_readers; | |
3175 | unsigned int __readers_wakeup; | |
3176 | unsigned int __writer_wakeup; | |
3177 | unsigned int __nr_readers_queued; | |
3178 | unsigned int __nr_writers_queued; | |
3179 | ||
3180 | ||
3181 | unsigned int __flags; | |
3182 | int __writer; | |
3183 | } __data; | |
3184 | ||
3185 | char __size[32]; | |
3186 | long int __align; | |
3187 | } pthread_rwlock_t; | |
3188 | ||
3189 | typedef union | |
3190 | { | |
3191 | char __size[8]; | |
3192 | long int __align; | |
3193 | } pthread_rwlockattr_t; | |
3194 | ||
3195 | ||
3196 | ||
3197 | ||
3198 | ||
3199 | typedef volatile int pthread_spinlock_t; | |
3200 | ||
3201 | ||
3202 | ||
3203 | ||
3204 | typedef union | |
3205 | { | |
3206 | char __size[20]; | |
3207 | long int __align; | |
3208 | } pthread_barrier_t; | |
3209 | ||
3210 | typedef union | |
3211 | { | |
3212 | char __size[4]; | |
3213 | int __align; | |
3214 | } pthread_barrierattr_t; | |
3215 | # 29 "/usr/include/pthread.h" 2 3 4 | |
3216 | # 1 "/usr/include/bits/setjmp.h" 1 3 4 | |
3217 | # 33 "/usr/include/bits/setjmp.h" 3 4 | |
3218 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
3219 | # 34 "/usr/include/bits/setjmp.h" 2 3 4 | |
3220 | # 48 "/usr/include/bits/setjmp.h" 3 4 | |
3221 | typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16))); | |
3222 | # 30 "/usr/include/pthread.h" 2 3 4 | |
3223 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
3224 | # 31 "/usr/include/pthread.h" 2 3 4 | |
3225 | ||
3226 | ||
3227 | ||
3228 | enum | |
3229 | { | |
3230 | PTHREAD_CREATE_JOINABLE, | |
3231 | ||
3232 | PTHREAD_CREATE_DETACHED | |
3233 | ||
3234 | }; | |
3235 | ||
3236 | ||
3237 | ||
3238 | enum | |
3239 | { | |
3240 | PTHREAD_MUTEX_TIMED_NP, | |
3241 | PTHREAD_MUTEX_RECURSIVE_NP, | |
3242 | PTHREAD_MUTEX_ERRORCHECK_NP, | |
3243 | PTHREAD_MUTEX_ADAPTIVE_NP | |
3244 | ||
3245 | , | |
3246 | PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, | |
3247 | PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, | |
3248 | PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, | |
3249 | PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL | |
3250 | ||
3251 | ||
3252 | ||
3253 | , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP | |
3254 | ||
3255 | }; | |
3256 | ||
3257 | ||
3258 | ||
3259 | ||
3260 | enum | |
3261 | { | |
3262 | PTHREAD_MUTEX_STALLED_NP, | |
3263 | PTHREAD_MUTEX_ROBUST_NP | |
3264 | }; | |
3265 | ||
3266 | ||
3267 | ||
3268 | ||
3269 | ||
3270 | enum | |
3271 | { | |
3272 | PTHREAD_PRIO_NONE, | |
3273 | PTHREAD_PRIO_INHERIT, | |
3274 | PTHREAD_PRIO_PROTECT | |
3275 | }; | |
3276 | # 113 "/usr/include/pthread.h" 3 4 | |
3277 | enum | |
3278 | { | |
3279 | PTHREAD_RWLOCK_PREFER_READER_NP, | |
3280 | PTHREAD_RWLOCK_PREFER_WRITER_NP, | |
3281 | PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, | |
3282 | PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP | |
3283 | }; | |
3284 | # 143 "/usr/include/pthread.h" 3 4 | |
3285 | enum | |
3286 | { | |
3287 | PTHREAD_INHERIT_SCHED, | |
3288 | ||
3289 | PTHREAD_EXPLICIT_SCHED | |
3290 | ||
3291 | }; | |
3292 | ||
3293 | ||
3294 | ||
3295 | enum | |
3296 | { | |
3297 | PTHREAD_SCOPE_SYSTEM, | |
3298 | ||
3299 | PTHREAD_SCOPE_PROCESS | |
3300 | ||
3301 | }; | |
3302 | ||
3303 | ||
3304 | ||
3305 | enum | |
3306 | { | |
3307 | PTHREAD_PROCESS_PRIVATE, | |
3308 | ||
3309 | PTHREAD_PROCESS_SHARED | |
3310 | ||
3311 | }; | |
3312 | # 178 "/usr/include/pthread.h" 3 4 | |
3313 | struct _pthread_cleanup_buffer | |
3314 | { | |
3315 | void (*__routine) (void *); | |
3316 | void *__arg; | |
3317 | int __canceltype; | |
3318 | struct _pthread_cleanup_buffer *__prev; | |
3319 | }; | |
3320 | ||
3321 | ||
3322 | enum | |
3323 | { | |
3324 | PTHREAD_CANCEL_ENABLE, | |
3325 | ||
3326 | PTHREAD_CANCEL_DISABLE | |
3327 | ||
3328 | }; | |
3329 | enum | |
3330 | { | |
3331 | PTHREAD_CANCEL_DEFERRED, | |
3332 | ||
3333 | PTHREAD_CANCEL_ASYNCHRONOUS | |
3334 | ||
3335 | }; | |
3336 | # 216 "/usr/include/pthread.h" 3 4 | |
3337 | extern "C" { | |
3338 | ||
3339 | ||
3340 | ||
3341 | ||
3342 | extern int pthread_create (pthread_t *__restrict __newthread, | |
3343 | __const pthread_attr_t *__restrict __attr, | |
3344 | void *(*__start_routine) (void *), | |
3345 | void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); | |
3346 | ||
3347 | ||
3348 | ||
3349 | ||
3350 | ||
3351 | extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); | |
3352 | ||
3353 | ||
3354 | ||
3355 | ||
3356 | ||
3357 | ||
3358 | ||
3359 | extern int pthread_join (pthread_t __th, void **__thread_return); | |
3360 | ||
3361 | ||
3362 | ||
3363 | ||
3364 | extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); | |
3365 | ||
3366 | ||
3367 | ||
3368 | ||
3369 | ||
3370 | ||
3371 | ||
3372 | extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, | |
3373 | __const struct timespec *__abstime); | |
3374 | ||
3375 | ||
3376 | ||
3377 | ||
3378 | ||
3379 | ||
3380 | extern int pthread_detach (pthread_t __th) throw (); | |
3381 | ||
3382 | ||
3383 | ||
3384 | extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); | |
3385 | ||
3386 | ||
3387 | extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); | |
3388 | ||
3389 | ||
3390 | ||
3391 | ||
3392 | ||
3393 | ||
3394 | ||
3395 | extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); | |
3396 | ||
3397 | ||
3398 | extern int pthread_attr_destroy (pthread_attr_t *__attr) | |
3399 | throw () __attribute__ ((__nonnull__ (1))); | |
3400 | ||
3401 | ||
3402 | extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, | |
3403 | int *__detachstate) | |
3404 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3405 | ||
3406 | ||
3407 | extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, | |
3408 | int __detachstate) | |
3409 | throw () __attribute__ ((__nonnull__ (1))); | |
3410 | ||
3411 | ||
3412 | ||
3413 | extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, | |
3414 | size_t *__guardsize) | |
3415 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3416 | ||
3417 | ||
3418 | extern int pthread_attr_setguardsize (pthread_attr_t *__attr, | |
3419 | size_t __guardsize) | |
3420 | throw () __attribute__ ((__nonnull__ (1))); | |
3421 | ||
3422 | ||
3423 | ||
3424 | extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict | |
3425 | __attr, | |
3426 | struct sched_param *__restrict __param) | |
3427 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3428 | ||
3429 | ||
3430 | extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, | |
3431 | __const struct sched_param *__restrict | |
3432 | __param) throw () __attribute__ ((__nonnull__ (1, 2))); | |
3433 | ||
3434 | ||
3435 | extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict | |
3436 | __attr, int *__restrict __policy) | |
3437 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3438 | ||
3439 | ||
3440 | extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) | |
3441 | throw () __attribute__ ((__nonnull__ (1))); | |
3442 | ||
3443 | ||
3444 | extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict | |
3445 | __attr, int *__restrict __inherit) | |
3446 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3447 | ||
3448 | ||
3449 | extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, | |
3450 | int __inherit) | |
3451 | throw () __attribute__ ((__nonnull__ (1))); | |
3452 | ||
3453 | ||
3454 | ||
3455 | extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, | |
3456 | int *__restrict __scope) | |
3457 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3458 | ||
3459 | ||
3460 | extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) | |
3461 | throw () __attribute__ ((__nonnull__ (1))); | |
3462 | ||
3463 | ||
3464 | extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict | |
3465 | __attr, void **__restrict __stackaddr) | |
3466 | throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); | |
3467 | ||
3468 | ||
3469 | ||
3470 | ||
3471 | ||
3472 | extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, | |
3473 | void *__stackaddr) | |
3474 | throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); | |
3475 | ||
3476 | ||
3477 | extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict | |
3478 | __attr, size_t *__restrict __stacksize) | |
3479 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3480 | ||
3481 | ||
3482 | ||
3483 | ||
3484 | extern int pthread_attr_setstacksize (pthread_attr_t *__attr, | |
3485 | size_t __stacksize) | |
3486 | throw () __attribute__ ((__nonnull__ (1))); | |
3487 | ||
3488 | ||
3489 | ||
3490 | extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, | |
3491 | void **__restrict __stackaddr, | |
3492 | size_t *__restrict __stacksize) | |
3493 | throw () __attribute__ ((__nonnull__ (1, 2, 3))); | |
3494 | ||
3495 | ||
3496 | ||
3497 | ||
3498 | extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, | |
3499 | size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); | |
3500 | ||
3501 | ||
3502 | ||
3503 | ||
3504 | ||
3505 | extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, | |
3506 | size_t __cpusetsize, | |
3507 | __const cpu_set_t *__cpuset) | |
3508 | throw () __attribute__ ((__nonnull__ (1, 3))); | |
3509 | ||
3510 | ||
3511 | ||
3512 | extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, | |
3513 | size_t __cpusetsize, | |
3514 | cpu_set_t *__cpuset) | |
3515 | throw () __attribute__ ((__nonnull__ (1, 3))); | |
3516 | ||
3517 | ||
3518 | ||
3519 | ||
3520 | ||
3521 | extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) | |
3522 | throw () __attribute__ ((__nonnull__ (2))); | |
3523 | ||
3524 | ||
3525 | ||
3526 | ||
3527 | ||
3528 | ||
3529 | ||
3530 | extern int pthread_setschedparam (pthread_t __target_thread, int __policy, | |
3531 | __const struct sched_param *__param) | |
3532 | throw () __attribute__ ((__nonnull__ (3))); | |
3533 | ||
3534 | ||
3535 | extern int pthread_getschedparam (pthread_t __target_thread, | |
3536 | int *__restrict __policy, | |
3537 | struct sched_param *__restrict __param) | |
3538 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
3539 | ||
3540 | ||
3541 | extern int pthread_setschedprio (pthread_t __target_thread, int __prio) | |
3542 | throw (); | |
3543 | ||
3544 | ||
3545 | ||
3546 | ||
3547 | extern int pthread_getconcurrency (void) throw (); | |
3548 | ||
3549 | ||
3550 | extern int pthread_setconcurrency (int __level) throw (); | |
3551 | ||
3552 | ||
3553 | ||
3554 | ||
3555 | ||
3556 | ||
3557 | ||
3558 | extern int pthread_yield (void) throw (); | |
3559 | ||
3560 | ||
3561 | ||
3562 | ||
3563 | extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, | |
3564 | __const cpu_set_t *__cpuset) | |
3565 | throw () __attribute__ ((__nonnull__ (3))); | |
3566 | ||
3567 | ||
3568 | extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, | |
3569 | cpu_set_t *__cpuset) | |
3570 | throw () __attribute__ ((__nonnull__ (3))); | |
3571 | # 462 "/usr/include/pthread.h" 3 4 | |
3572 | extern int pthread_once (pthread_once_t *__once_control, | |
3573 | void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); | |
3574 | # 474 "/usr/include/pthread.h" 3 4 | |
3575 | extern int pthread_setcancelstate (int __state, int *__oldstate); | |
3576 | ||
3577 | ||
3578 | ||
3579 | extern int pthread_setcanceltype (int __type, int *__oldtype); | |
3580 | ||
3581 | ||
3582 | extern int pthread_cancel (pthread_t __th); | |
3583 | ||
3584 | ||
3585 | ||
3586 | ||
3587 | extern void pthread_testcancel (void); | |
3588 | ||
3589 | ||
3590 | ||
3591 | ||
3592 | typedef struct | |
3593 | { | |
3594 | struct | |
3595 | { | |
3596 | __jmp_buf __cancel_jmp_buf; | |
3597 | int __mask_was_saved; | |
3598 | } __cancel_jmp_buf[1]; | |
3599 | void *__pad[4]; | |
3600 | } __pthread_unwind_buf_t __attribute__ ((__aligned__)); | |
3601 | # 508 "/usr/include/pthread.h" 3 4 | |
3602 | struct __pthread_cleanup_frame | |
3603 | { | |
3604 | void (*__cancel_routine) (void *); | |
3605 | void *__cancel_arg; | |
3606 | int __do_it; | |
3607 | int __cancel_type; | |
3608 | }; | |
3609 | ||
3610 | ||
3611 | ||
3612 | ||
3613 | class __pthread_cleanup_class | |
3614 | { | |
3615 | void (*__cancel_routine) (void *); | |
3616 | void *__cancel_arg; | |
3617 | int __do_it; | |
3618 | int __cancel_type; | |
3619 | ||
3620 | public: | |
3621 | __pthread_cleanup_class (void (*__fct) (void *), void *__arg) | |
3622 | : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } | |
3623 | ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } | |
3624 | void __setdoit (int __newval) { __do_it = __newval; } | |
3625 | void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, | |
3626 | &__cancel_type); } | |
3627 | void __restore () const { pthread_setcanceltype (__cancel_type, 0); } | |
3628 | }; | |
3629 | # 708 "/usr/include/pthread.h" 3 4 | |
3630 | struct __jmp_buf_tag; | |
3631 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); | |
3632 | ||
3633 | ||
3634 | ||
3635 | ||
3636 | ||
3637 | extern int pthread_mutex_init (pthread_mutex_t *__mutex, | |
3638 | __const pthread_mutexattr_t *__mutexattr) | |
3639 | throw () __attribute__ ((__nonnull__ (1))); | |
3640 | ||
3641 | ||
3642 | extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) | |
3643 | throw () __attribute__ ((__nonnull__ (1))); | |
3644 | ||
3645 | ||
3646 | extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) | |
3647 | throw () __attribute__ ((__nonnull__ (1))); | |
3648 | ||
3649 | ||
3650 | extern int pthread_mutex_lock (pthread_mutex_t *__mutex) | |
3651 | throw () __attribute__ ((__nonnull__ (1))); | |
3652 | ||
3653 | ||
3654 | ||
3655 | extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, | |
3656 | __const struct timespec *__restrict | |
3657 | __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); | |
3658 | ||
3659 | ||
3660 | ||
3661 | extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) | |
3662 | throw () __attribute__ ((__nonnull__ (1))); | |
3663 | ||
3664 | ||
3665 | ||
3666 | ||
3667 | extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * | |
3668 | __restrict __mutex, | |
3669 | int *__restrict __prioceiling) | |
3670 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3671 | ||
3672 | ||
3673 | ||
3674 | extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, | |
3675 | int __prioceiling, | |
3676 | int *__restrict __old_ceiling) | |
3677 | throw () __attribute__ ((__nonnull__ (1, 3))); | |
3678 | ||
3679 | ||
3680 | ||
3681 | ||
3682 | ||
3683 | extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) | |
3684 | throw () __attribute__ ((__nonnull__ (1))); | |
3685 | ||
3686 | ||
3687 | ||
3688 | ||
3689 | ||
3690 | ||
3691 | ||
3692 | extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) | |
3693 | throw () __attribute__ ((__nonnull__ (1))); | |
3694 | ||
3695 | ||
3696 | extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) | |
3697 | throw () __attribute__ ((__nonnull__ (1))); | |
3698 | ||
3699 | ||
3700 | extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * | |
3701 | __restrict __attr, | |
3702 | int *__restrict __pshared) | |
3703 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3704 | ||
3705 | ||
3706 | extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, | |
3707 | int __pshared) | |
3708 | throw () __attribute__ ((__nonnull__ (1))); | |
3709 | ||
3710 | ||
3711 | ||
3712 | extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict | |
3713 | __attr, int *__restrict __kind) | |
3714 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3715 | ||
3716 | ||
3717 | ||
3718 | ||
3719 | extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) | |
3720 | throw () __attribute__ ((__nonnull__ (1))); | |
3721 | ||
3722 | ||
3723 | extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * | |
3724 | __restrict __attr, | |
3725 | int *__restrict __protocol) | |
3726 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3727 | ||
3728 | ||
3729 | ||
3730 | extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, | |
3731 | int __protocol) | |
3732 | throw () __attribute__ ((__nonnull__ (1))); | |
3733 | ||
3734 | ||
3735 | extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * | |
3736 | __restrict __attr, | |
3737 | int *__restrict __prioceiling) | |
3738 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3739 | ||
3740 | ||
3741 | extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, | |
3742 | int __prioceiling) | |
3743 | throw () __attribute__ ((__nonnull__ (1))); | |
3744 | ||
3745 | ||
3746 | ||
3747 | ||
3748 | extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, | |
3749 | int *__robustness) | |
3750 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3751 | ||
3752 | ||
3753 | extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, | |
3754 | int __robustness) | |
3755 | throw () __attribute__ ((__nonnull__ (1))); | |
3756 | # 842 "/usr/include/pthread.h" 3 4 | |
3757 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, | |
3758 | __const pthread_rwlockattr_t *__restrict | |
3759 | __attr) throw () __attribute__ ((__nonnull__ (1))); | |
3760 | ||
3761 | ||
3762 | extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) | |
3763 | throw () __attribute__ ((__nonnull__ (1))); | |
3764 | ||
3765 | ||
3766 | extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) | |
3767 | throw () __attribute__ ((__nonnull__ (1))); | |
3768 | ||
3769 | ||
3770 | extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) | |
3771 | throw () __attribute__ ((__nonnull__ (1))); | |
3772 | ||
3773 | ||
3774 | ||
3775 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, | |
3776 | __const struct timespec *__restrict | |
3777 | __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); | |
3778 | ||
3779 | ||
3780 | ||
3781 | extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) | |
3782 | throw () __attribute__ ((__nonnull__ (1))); | |
3783 | ||
3784 | ||
3785 | extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) | |
3786 | throw () __attribute__ ((__nonnull__ (1))); | |
3787 | ||
3788 | ||
3789 | ||
3790 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, | |
3791 | __const struct timespec *__restrict | |
3792 | __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); | |
3793 | ||
3794 | ||
3795 | ||
3796 | extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) | |
3797 | throw () __attribute__ ((__nonnull__ (1))); | |
3798 | ||
3799 | ||
3800 | ||
3801 | ||
3802 | ||
3803 | extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) | |
3804 | throw () __attribute__ ((__nonnull__ (1))); | |
3805 | ||
3806 | ||
3807 | extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) | |
3808 | throw () __attribute__ ((__nonnull__ (1))); | |
3809 | ||
3810 | ||
3811 | extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * | |
3812 | __restrict __attr, | |
3813 | int *__restrict __pshared) | |
3814 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3815 | ||
3816 | ||
3817 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, | |
3818 | int __pshared) | |
3819 | throw () __attribute__ ((__nonnull__ (1))); | |
3820 | ||
3821 | ||
3822 | extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * | |
3823 | __restrict __attr, | |
3824 | int *__restrict __pref) | |
3825 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3826 | ||
3827 | ||
3828 | extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, | |
3829 | int __pref) throw () __attribute__ ((__nonnull__ (1))); | |
3830 | ||
3831 | ||
3832 | ||
3833 | ||
3834 | ||
3835 | ||
3836 | ||
3837 | extern int pthread_cond_init (pthread_cond_t *__restrict __cond, | |
3838 | __const pthread_condattr_t *__restrict | |
3839 | __cond_attr) throw () __attribute__ ((__nonnull__ (1))); | |
3840 | ||
3841 | ||
3842 | extern int pthread_cond_destroy (pthread_cond_t *__cond) | |
3843 | throw () __attribute__ ((__nonnull__ (1))); | |
3844 | ||
3845 | ||
3846 | extern int pthread_cond_signal (pthread_cond_t *__cond) | |
3847 | throw () __attribute__ ((__nonnull__ (1))); | |
3848 | ||
3849 | ||
3850 | extern int pthread_cond_broadcast (pthread_cond_t *__cond) | |
3851 | throw () __attribute__ ((__nonnull__ (1))); | |
3852 | ||
3853 | ||
3854 | ||
3855 | ||
3856 | ||
3857 | ||
3858 | extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, | |
3859 | pthread_mutex_t *__restrict __mutex) | |
3860 | __attribute__ ((__nonnull__ (1, 2))); | |
3861 | # 954 "/usr/include/pthread.h" 3 4 | |
3862 | extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, | |
3863 | pthread_mutex_t *__restrict __mutex, | |
3864 | __const struct timespec *__restrict | |
3865 | __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); | |
3866 | ||
3867 | ||
3868 | ||
3869 | ||
3870 | extern int pthread_condattr_init (pthread_condattr_t *__attr) | |
3871 | throw () __attribute__ ((__nonnull__ (1))); | |
3872 | ||
3873 | ||
3874 | extern int pthread_condattr_destroy (pthread_condattr_t *__attr) | |
3875 | throw () __attribute__ ((__nonnull__ (1))); | |
3876 | ||
3877 | ||
3878 | extern int pthread_condattr_getpshared (__const pthread_condattr_t * | |
3879 | __restrict __attr, | |
3880 | int *__restrict __pshared) | |
3881 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3882 | ||
3883 | ||
3884 | extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, | |
3885 | int __pshared) throw () __attribute__ ((__nonnull__ (1))); | |
3886 | ||
3887 | ||
3888 | ||
3889 | extern int pthread_condattr_getclock (__const pthread_condattr_t * | |
3890 | __restrict __attr, | |
3891 | __clockid_t *__restrict __clock_id) | |
3892 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3893 | ||
3894 | ||
3895 | extern int pthread_condattr_setclock (pthread_condattr_t *__attr, | |
3896 | __clockid_t __clock_id) | |
3897 | throw () __attribute__ ((__nonnull__ (1))); | |
3898 | # 998 "/usr/include/pthread.h" 3 4 | |
3899 | extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) | |
3900 | throw () __attribute__ ((__nonnull__ (1))); | |
3901 | ||
3902 | ||
3903 | extern int pthread_spin_destroy (pthread_spinlock_t *__lock) | |
3904 | throw () __attribute__ ((__nonnull__ (1))); | |
3905 | ||
3906 | ||
3907 | extern int pthread_spin_lock (pthread_spinlock_t *__lock) | |
3908 | throw () __attribute__ ((__nonnull__ (1))); | |
3909 | ||
3910 | ||
3911 | extern int pthread_spin_trylock (pthread_spinlock_t *__lock) | |
3912 | throw () __attribute__ ((__nonnull__ (1))); | |
3913 | ||
3914 | ||
3915 | extern int pthread_spin_unlock (pthread_spinlock_t *__lock) | |
3916 | throw () __attribute__ ((__nonnull__ (1))); | |
3917 | ||
3918 | ||
3919 | ||
3920 | ||
3921 | ||
3922 | ||
3923 | extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, | |
3924 | __const pthread_barrierattr_t *__restrict | |
3925 | __attr, unsigned int __count) | |
3926 | throw () __attribute__ ((__nonnull__ (1))); | |
3927 | ||
3928 | ||
3929 | extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) | |
3930 | throw () __attribute__ ((__nonnull__ (1))); | |
3931 | ||
3932 | ||
3933 | extern int pthread_barrier_wait (pthread_barrier_t *__barrier) | |
3934 | throw () __attribute__ ((__nonnull__ (1))); | |
3935 | ||
3936 | ||
3937 | ||
3938 | extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) | |
3939 | throw () __attribute__ ((__nonnull__ (1))); | |
3940 | ||
3941 | ||
3942 | extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) | |
3943 | throw () __attribute__ ((__nonnull__ (1))); | |
3944 | ||
3945 | ||
3946 | extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * | |
3947 | __restrict __attr, | |
3948 | int *__restrict __pshared) | |
3949 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
3950 | ||
3951 | ||
3952 | extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, | |
3953 | int __pshared) | |
3954 | throw () __attribute__ ((__nonnull__ (1))); | |
3955 | # 1065 "/usr/include/pthread.h" 3 4 | |
3956 | extern int pthread_key_create (pthread_key_t *__key, | |
3957 | void (*__destr_function) (void *)) | |
3958 | throw () __attribute__ ((__nonnull__ (1))); | |
3959 | ||
3960 | ||
3961 | extern int pthread_key_delete (pthread_key_t __key) throw (); | |
3962 | ||
3963 | ||
3964 | extern void *pthread_getspecific (pthread_key_t __key) throw (); | |
3965 | ||
3966 | ||
3967 | extern int pthread_setspecific (pthread_key_t __key, | |
3968 | __const void *__pointer) throw () ; | |
3969 | ||
3970 | ||
3971 | ||
3972 | ||
3973 | extern int pthread_getcpuclockid (pthread_t __thread_id, | |
3974 | __clockid_t *__clock_id) | |
3975 | throw () __attribute__ ((__nonnull__ (2))); | |
3976 | # 1099 "/usr/include/pthread.h" 3 4 | |
3977 | extern int pthread_atfork (void (*__prepare) (void), | |
3978 | void (*__parent) (void), | |
3979 | void (*__child) (void)) throw (); | |
3980 | ||
3981 | ||
3982 | ||
3983 | ||
3984 | extern __inline int | |
3985 | pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () | |
3986 | { | |
3987 | return __thread1 == __thread2; | |
3988 | } | |
3989 | ||
3990 | ||
3991 | } | |
3992 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 2 3 | |
3993 | # 1 "/usr/include/unistd.h" 1 3 4 | |
3994 | # 28 "/usr/include/unistd.h" 3 4 | |
3995 | extern "C" { | |
3996 | # 171 "/usr/include/unistd.h" 3 4 | |
3997 | # 1 "/usr/include/bits/posix_opt.h" 1 3 4 | |
3998 | # 172 "/usr/include/unistd.h" 2 3 4 | |
3999 | ||
4000 | ||
4001 | ||
4002 | # 1 "/usr/include/bits/environments.h" 1 3 4 | |
4003 | # 23 "/usr/include/bits/environments.h" 3 4 | |
4004 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
4005 | # 24 "/usr/include/bits/environments.h" 2 3 4 | |
4006 | # 176 "/usr/include/unistd.h" 2 3 4 | |
4007 | # 189 "/usr/include/unistd.h" 3 4 | |
4008 | typedef __ssize_t ssize_t; | |
4009 | ||
4010 | ||
4011 | ||
4012 | ||
4013 | ||
4014 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
4015 | # 196 "/usr/include/unistd.h" 2 3 4 | |
4016 | ||
4017 | ||
4018 | ||
4019 | ||
4020 | ||
4021 | typedef __gid_t gid_t; | |
4022 | ||
4023 | ||
4024 | ||
4025 | ||
4026 | typedef __uid_t uid_t; | |
4027 | ||
4028 | ||
4029 | ||
4030 | ||
4031 | ||
4032 | typedef __off_t off_t; | |
4033 | ||
4034 | ||
4035 | ||
4036 | ||
4037 | ||
4038 | ||
4039 | typedef __off64_t off64_t; | |
4040 | ||
4041 | ||
4042 | ||
4043 | ||
4044 | typedef __useconds_t useconds_t; | |
4045 | # 236 "/usr/include/unistd.h" 3 4 | |
4046 | typedef __intptr_t intptr_t; | |
4047 | ||
4048 | ||
4049 | ||
4050 | ||
4051 | ||
4052 | ||
4053 | typedef __socklen_t socklen_t; | |
4054 | # 256 "/usr/include/unistd.h" 3 4 | |
4055 | extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); | |
4056 | ||
4057 | ||
4058 | ||
4059 | ||
4060 | extern int euidaccess (__const char *__name, int __type) | |
4061 | throw () __attribute__ ((__nonnull__ (1))); | |
4062 | ||
4063 | ||
4064 | extern int eaccess (__const char *__name, int __type) | |
4065 | throw () __attribute__ ((__nonnull__ (1))); | |
4066 | ||
4067 | ||
4068 | ||
4069 | ||
4070 | ||
4071 | ||
4072 | extern int faccessat (int __fd, __const char *__file, int __type, int __flag) | |
4073 | throw () __attribute__ ((__nonnull__ (2))) ; | |
4074 | # 299 "/usr/include/unistd.h" 3 4 | |
4075 | extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); | |
4076 | # 310 "/usr/include/unistd.h" 3 4 | |
4077 | extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) | |
4078 | throw (); | |
4079 | ||
4080 | ||
4081 | ||
4082 | ||
4083 | ||
4084 | ||
4085 | extern int close (int __fd); | |
4086 | ||
4087 | ||
4088 | ||
4089 | ||
4090 | ||
4091 | ||
4092 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; | |
4093 | ||
4094 | ||
4095 | ||
4096 | ||
4097 | ||
4098 | extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; | |
4099 | # 341 "/usr/include/unistd.h" 3 4 | |
4100 | extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, | |
4101 | __off_t __offset) ; | |
4102 | ||
4103 | ||
4104 | ||
4105 | ||
4106 | ||
4107 | ||
4108 | extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, | |
4109 | __off_t __offset) ; | |
4110 | # 369 "/usr/include/unistd.h" 3 4 | |
4111 | extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, | |
4112 | __off64_t __offset) ; | |
4113 | ||
4114 | ||
4115 | extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, | |
4116 | __off64_t __offset) ; | |
4117 | ||
4118 | ||
4119 | ||
4120 | ||
4121 | ||
4122 | ||
4123 | ||
4124 | extern int pipe (int __pipedes[2]) throw () ; | |
4125 | # 391 "/usr/include/unistd.h" 3 4 | |
4126 | extern unsigned int alarm (unsigned int __seconds) throw (); | |
4127 | # 403 "/usr/include/unistd.h" 3 4 | |
4128 | extern unsigned int sleep (unsigned int __seconds); | |
4129 | ||
4130 | ||
4131 | ||
4132 | ||
4133 | ||
4134 | ||
4135 | extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) | |
4136 | throw (); | |
4137 | ||
4138 | ||
4139 | ||
4140 | ||
4141 | ||
4142 | ||
4143 | extern int usleep (__useconds_t __useconds); | |
4144 | # 427 "/usr/include/unistd.h" 3 4 | |
4145 | extern int pause (void); | |
4146 | ||
4147 | ||
4148 | ||
4149 | extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) | |
4150 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4151 | ||
4152 | ||
4153 | ||
4154 | extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; | |
4155 | ||
4156 | ||
4157 | ||
4158 | ||
4159 | extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) | |
4160 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4161 | ||
4162 | ||
4163 | ||
4164 | ||
4165 | ||
4166 | ||
4167 | extern int fchownat (int __fd, __const char *__file, __uid_t __owner, | |
4168 | __gid_t __group, int __flag) | |
4169 | throw () __attribute__ ((__nonnull__ (2))) ; | |
4170 | ||
4171 | ||
4172 | ||
4173 | extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; | |
4174 | ||
4175 | ||
4176 | ||
4177 | extern int fchdir (int __fd) throw () ; | |
4178 | # 469 "/usr/include/unistd.h" 3 4 | |
4179 | extern char *getcwd (char *__buf, size_t __size) throw () ; | |
4180 | ||
4181 | ||
4182 | ||
4183 | ||
4184 | ||
4185 | extern char *get_current_dir_name (void) throw (); | |
4186 | ||
4187 | ||
4188 | ||
4189 | ||
4190 | ||
4191 | ||
4192 | extern char *getwd (char *__buf) | |
4193 | throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; | |
4194 | ||
4195 | ||
4196 | ||
4197 | ||
4198 | extern int dup (int __fd) throw () ; | |
4199 | ||
4200 | ||
4201 | extern int dup2 (int __fd, int __fd2) throw (); | |
4202 | ||
4203 | ||
4204 | extern char **__environ; | |
4205 | ||
4206 | extern char **environ; | |
4207 | ||
4208 | ||
4209 | ||
4210 | ||
4211 | ||
4212 | extern int execve (__const char *__path, char *__const __argv[], | |
4213 | char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1))); | |
4214 | ||
4215 | ||
4216 | ||
4217 | ||
4218 | extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) | |
4219 | throw (); | |
4220 | ||
4221 | ||
4222 | ||
4223 | ||
4224 | extern int execv (__const char *__path, char *__const __argv[]) | |
4225 | throw () __attribute__ ((__nonnull__ (1))); | |
4226 | ||
4227 | ||
4228 | ||
4229 | extern int execle (__const char *__path, __const char *__arg, ...) | |
4230 | throw () __attribute__ ((__nonnull__ (1))); | |
4231 | ||
4232 | ||
4233 | ||
4234 | extern int execl (__const char *__path, __const char *__arg, ...) | |
4235 | throw () __attribute__ ((__nonnull__ (1))); | |
4236 | ||
4237 | ||
4238 | ||
4239 | extern int execvp (__const char *__file, char *__const __argv[]) | |
4240 | throw () __attribute__ ((__nonnull__ (1))); | |
4241 | ||
4242 | ||
4243 | ||
4244 | ||
4245 | extern int execlp (__const char *__file, __const char *__arg, ...) | |
4246 | throw () __attribute__ ((__nonnull__ (1))); | |
4247 | ||
4248 | ||
4249 | ||
4250 | ||
4251 | extern int nice (int __inc) throw () ; | |
4252 | ||
4253 | ||
4254 | ||
4255 | ||
4256 | extern void _exit (int __status) __attribute__ ((__noreturn__)); | |
4257 | ||
4258 | ||
4259 | ||
4260 | ||
4261 | ||
4262 | # 1 "/usr/include/bits/confname.h" 1 3 4 | |
4263 | # 26 "/usr/include/bits/confname.h" 3 4 | |
4264 | enum | |
4265 | { | |
4266 | _PC_LINK_MAX, | |
4267 | ||
4268 | _PC_MAX_CANON, | |
4269 | ||
4270 | _PC_MAX_INPUT, | |
4271 | ||
4272 | _PC_NAME_MAX, | |
4273 | ||
4274 | _PC_PATH_MAX, | |
4275 | ||
4276 | _PC_PIPE_BUF, | |
4277 | ||
4278 | _PC_CHOWN_RESTRICTED, | |
4279 | ||
4280 | _PC_NO_TRUNC, | |
4281 | ||
4282 | _PC_VDISABLE, | |
4283 | ||
4284 | _PC_SYNC_IO, | |
4285 | ||
4286 | _PC_ASYNC_IO, | |
4287 | ||
4288 | _PC_PRIO_IO, | |
4289 | ||
4290 | _PC_SOCK_MAXBUF, | |
4291 | ||
4292 | _PC_FILESIZEBITS, | |
4293 | ||
4294 | _PC_REC_INCR_XFER_SIZE, | |
4295 | ||
4296 | _PC_REC_MAX_XFER_SIZE, | |
4297 | ||
4298 | _PC_REC_MIN_XFER_SIZE, | |
4299 | ||
4300 | _PC_REC_XFER_ALIGN, | |
4301 | ||
4302 | _PC_ALLOC_SIZE_MIN, | |
4303 | ||
4304 | _PC_SYMLINK_MAX, | |
4305 | ||
4306 | _PC_2_SYMLINKS | |
4307 | ||
4308 | }; | |
4309 | ||
4310 | ||
4311 | enum | |
4312 | { | |
4313 | _SC_ARG_MAX, | |
4314 | ||
4315 | _SC_CHILD_MAX, | |
4316 | ||
4317 | _SC_CLK_TCK, | |
4318 | ||
4319 | _SC_NGROUPS_MAX, | |
4320 | ||
4321 | _SC_OPEN_MAX, | |
4322 | ||
4323 | _SC_STREAM_MAX, | |
4324 | ||
4325 | _SC_TZNAME_MAX, | |
4326 | ||
4327 | _SC_JOB_CONTROL, | |
4328 | ||
4329 | _SC_SAVED_IDS, | |
4330 | ||
4331 | _SC_REALTIME_SIGNALS, | |
4332 | ||
4333 | _SC_PRIORITY_SCHEDULING, | |
4334 | ||
4335 | _SC_TIMERS, | |
4336 | ||
4337 | _SC_ASYNCHRONOUS_IO, | |
4338 | ||
4339 | _SC_PRIORITIZED_IO, | |
4340 | ||
4341 | _SC_SYNCHRONIZED_IO, | |
4342 | ||
4343 | _SC_FSYNC, | |
4344 | ||
4345 | _SC_MAPPED_FILES, | |
4346 | ||
4347 | _SC_MEMLOCK, | |
4348 | ||
4349 | _SC_MEMLOCK_RANGE, | |
4350 | ||
4351 | _SC_MEMORY_PROTECTION, | |
4352 | ||
4353 | _SC_MESSAGE_PASSING, | |
4354 | ||
4355 | _SC_SEMAPHORES, | |
4356 | ||
4357 | _SC_SHARED_MEMORY_OBJECTS, | |
4358 | ||
4359 | _SC_AIO_LISTIO_MAX, | |
4360 | ||
4361 | _SC_AIO_MAX, | |
4362 | ||
4363 | _SC_AIO_PRIO_DELTA_MAX, | |
4364 | ||
4365 | _SC_DELAYTIMER_MAX, | |
4366 | ||
4367 | _SC_MQ_OPEN_MAX, | |
4368 | ||
4369 | _SC_MQ_PRIO_MAX, | |
4370 | ||
4371 | _SC_VERSION, | |
4372 | ||
4373 | _SC_PAGESIZE, | |
4374 | ||
4375 | ||
4376 | _SC_RTSIG_MAX, | |
4377 | ||
4378 | _SC_SEM_NSEMS_MAX, | |
4379 | ||
4380 | _SC_SEM_VALUE_MAX, | |
4381 | ||
4382 | _SC_SIGQUEUE_MAX, | |
4383 | ||
4384 | _SC_TIMER_MAX, | |
4385 | ||
4386 | ||
4387 | ||
4388 | ||
4389 | _SC_BC_BASE_MAX, | |
4390 | ||
4391 | _SC_BC_DIM_MAX, | |
4392 | ||
4393 | _SC_BC_SCALE_MAX, | |
4394 | ||
4395 | _SC_BC_STRING_MAX, | |
4396 | ||
4397 | _SC_COLL_WEIGHTS_MAX, | |
4398 | ||
4399 | _SC_EQUIV_CLASS_MAX, | |
4400 | ||
4401 | _SC_EXPR_NEST_MAX, | |
4402 | ||
4403 | _SC_LINE_MAX, | |
4404 | ||
4405 | _SC_RE_DUP_MAX, | |
4406 | ||
4407 | _SC_CHARCLASS_NAME_MAX, | |
4408 | ||
4409 | ||
4410 | _SC_2_VERSION, | |
4411 | ||
4412 | _SC_2_C_BIND, | |
4413 | ||
4414 | _SC_2_C_DEV, | |
4415 | ||
4416 | _SC_2_FORT_DEV, | |
4417 | ||
4418 | _SC_2_FORT_RUN, | |
4419 | ||
4420 | _SC_2_SW_DEV, | |
4421 | ||
4422 | _SC_2_LOCALEDEF, | |
4423 | ||
4424 | ||
4425 | _SC_PII, | |
4426 | ||
4427 | _SC_PII_XTI, | |
4428 | ||
4429 | _SC_PII_SOCKET, | |
4430 | ||
4431 | _SC_PII_INTERNET, | |
4432 | ||
4433 | _SC_PII_OSI, | |
4434 | ||
4435 | _SC_POLL, | |
4436 | ||
4437 | _SC_SELECT, | |
4438 | ||
4439 | _SC_UIO_MAXIOV, | |
4440 | ||
4441 | _SC_IOV_MAX = _SC_UIO_MAXIOV, | |
4442 | ||
4443 | _SC_PII_INTERNET_STREAM, | |
4444 | ||
4445 | _SC_PII_INTERNET_DGRAM, | |
4446 | ||
4447 | _SC_PII_OSI_COTS, | |
4448 | ||
4449 | _SC_PII_OSI_CLTS, | |
4450 | ||
4451 | _SC_PII_OSI_M, | |
4452 | ||
4453 | _SC_T_IOV_MAX, | |
4454 | ||
4455 | ||
4456 | ||
4457 | _SC_THREADS, | |
4458 | ||
4459 | _SC_THREAD_SAFE_FUNCTIONS, | |
4460 | ||
4461 | _SC_GETGR_R_SIZE_MAX, | |
4462 | ||
4463 | _SC_GETPW_R_SIZE_MAX, | |
4464 | ||
4465 | _SC_LOGIN_NAME_MAX, | |
4466 | ||
4467 | _SC_TTY_NAME_MAX, | |
4468 | ||
4469 | _SC_THREAD_DESTRUCTOR_ITERATIONS, | |
4470 | ||
4471 | _SC_THREAD_KEYS_MAX, | |
4472 | ||
4473 | _SC_THREAD_STACK_MIN, | |
4474 | ||
4475 | _SC_THREAD_THREADS_MAX, | |
4476 | ||
4477 | _SC_THREAD_ATTR_STACKADDR, | |
4478 | ||
4479 | _SC_THREAD_ATTR_STACKSIZE, | |
4480 | ||
4481 | _SC_THREAD_PRIORITY_SCHEDULING, | |
4482 | ||
4483 | _SC_THREAD_PRIO_INHERIT, | |
4484 | ||
4485 | _SC_THREAD_PRIO_PROTECT, | |
4486 | ||
4487 | _SC_THREAD_PROCESS_SHARED, | |
4488 | ||
4489 | ||
4490 | _SC_NPROCESSORS_CONF, | |
4491 | ||
4492 | _SC_NPROCESSORS_ONLN, | |
4493 | ||
4494 | _SC_PHYS_PAGES, | |
4495 | ||
4496 | _SC_AVPHYS_PAGES, | |
4497 | ||
4498 | _SC_ATEXIT_MAX, | |
4499 | ||
4500 | _SC_PASS_MAX, | |
4501 | ||
4502 | ||
4503 | _SC_XOPEN_VERSION, | |
4504 | ||
4505 | _SC_XOPEN_XCU_VERSION, | |
4506 | ||
4507 | _SC_XOPEN_UNIX, | |
4508 | ||
4509 | _SC_XOPEN_CRYPT, | |
4510 | ||
4511 | _SC_XOPEN_ENH_I18N, | |
4512 | ||
4513 | _SC_XOPEN_SHM, | |
4514 | ||
4515 | ||
4516 | _SC_2_CHAR_TERM, | |
4517 | ||
4518 | _SC_2_C_VERSION, | |
4519 | ||
4520 | _SC_2_UPE, | |
4521 | ||
4522 | ||
4523 | _SC_XOPEN_XPG2, | |
4524 | ||
4525 | _SC_XOPEN_XPG3, | |
4526 | ||
4527 | _SC_XOPEN_XPG4, | |
4528 | ||
4529 | ||
4530 | _SC_CHAR_BIT, | |
4531 | ||
4532 | _SC_CHAR_MAX, | |
4533 | ||
4534 | _SC_CHAR_MIN, | |
4535 | ||
4536 | _SC_INT_MAX, | |
4537 | ||
4538 | _SC_INT_MIN, | |
4539 | ||
4540 | _SC_LONG_BIT, | |
4541 | ||
4542 | _SC_WORD_BIT, | |
4543 | ||
4544 | _SC_MB_LEN_MAX, | |
4545 | ||
4546 | _SC_NZERO, | |
4547 | ||
4548 | _SC_SSIZE_MAX, | |
4549 | ||
4550 | _SC_SCHAR_MAX, | |
4551 | ||
4552 | _SC_SCHAR_MIN, | |
4553 | ||
4554 | _SC_SHRT_MAX, | |
4555 | ||
4556 | _SC_SHRT_MIN, | |
4557 | ||
4558 | _SC_UCHAR_MAX, | |
4559 | ||
4560 | _SC_UINT_MAX, | |
4561 | ||
4562 | _SC_ULONG_MAX, | |
4563 | ||
4564 | _SC_USHRT_MAX, | |
4565 | ||
4566 | ||
4567 | _SC_NL_ARGMAX, | |
4568 | ||
4569 | _SC_NL_LANGMAX, | |
4570 | ||
4571 | _SC_NL_MSGMAX, | |
4572 | ||
4573 | _SC_NL_NMAX, | |
4574 | ||
4575 | _SC_NL_SETMAX, | |
4576 | ||
4577 | _SC_NL_TEXTMAX, | |
4578 | ||
4579 | ||
4580 | _SC_XBS5_ILP32_OFF32, | |
4581 | ||
4582 | _SC_XBS5_ILP32_OFFBIG, | |
4583 | ||
4584 | _SC_XBS5_LP64_OFF64, | |
4585 | ||
4586 | _SC_XBS5_LPBIG_OFFBIG, | |
4587 | ||
4588 | ||
4589 | _SC_XOPEN_LEGACY, | |
4590 | ||
4591 | _SC_XOPEN_REALTIME, | |
4592 | ||
4593 | _SC_XOPEN_REALTIME_THREADS, | |
4594 | ||
4595 | ||
4596 | _SC_ADVISORY_INFO, | |
4597 | ||
4598 | _SC_BARRIERS, | |
4599 | ||
4600 | _SC_BASE, | |
4601 | ||
4602 | _SC_C_LANG_SUPPORT, | |
4603 | ||
4604 | _SC_C_LANG_SUPPORT_R, | |
4605 | ||
4606 | _SC_CLOCK_SELECTION, | |
4607 | ||
4608 | _SC_CPUTIME, | |
4609 | ||
4610 | _SC_THREAD_CPUTIME, | |
4611 | ||
4612 | _SC_DEVICE_IO, | |
4613 | ||
4614 | _SC_DEVICE_SPECIFIC, | |
4615 | ||
4616 | _SC_DEVICE_SPECIFIC_R, | |
4617 | ||
4618 | _SC_FD_MGMT, | |
4619 | ||
4620 | _SC_FIFO, | |
4621 | ||
4622 | _SC_PIPE, | |
4623 | ||
4624 | _SC_FILE_ATTRIBUTES, | |
4625 | ||
4626 | _SC_FILE_LOCKING, | |
4627 | ||
4628 | _SC_FILE_SYSTEM, | |
4629 | ||
4630 | _SC_MONOTONIC_CLOCK, | |
4631 | ||
4632 | _SC_MULTI_PROCESS, | |
4633 | ||
4634 | _SC_SINGLE_PROCESS, | |
4635 | ||
4636 | _SC_NETWORKING, | |
4637 | ||
4638 | _SC_READER_WRITER_LOCKS, | |
4639 | ||
4640 | _SC_SPIN_LOCKS, | |
4641 | ||
4642 | _SC_REGEXP, | |
4643 | ||
4644 | _SC_REGEX_VERSION, | |
4645 | ||
4646 | _SC_SHELL, | |
4647 | ||
4648 | _SC_SIGNALS, | |
4649 | ||
4650 | _SC_SPAWN, | |
4651 | ||
4652 | _SC_SPORADIC_SERVER, | |
4653 | ||
4654 | _SC_THREAD_SPORADIC_SERVER, | |
4655 | ||
4656 | _SC_SYSTEM_DATABASE, | |
4657 | ||
4658 | _SC_SYSTEM_DATABASE_R, | |
4659 | ||
4660 | _SC_TIMEOUTS, | |
4661 | ||
4662 | _SC_TYPED_MEMORY_OBJECTS, | |
4663 | ||
4664 | _SC_USER_GROUPS, | |
4665 | ||
4666 | _SC_USER_GROUPS_R, | |
4667 | ||
4668 | _SC_2_PBS, | |
4669 | ||
4670 | _SC_2_PBS_ACCOUNTING, | |
4671 | ||
4672 | _SC_2_PBS_LOCATE, | |
4673 | ||
4674 | _SC_2_PBS_MESSAGE, | |
4675 | ||
4676 | _SC_2_PBS_TRACK, | |
4677 | ||
4678 | _SC_SYMLOOP_MAX, | |
4679 | ||
4680 | _SC_STREAMS, | |
4681 | ||
4682 | _SC_2_PBS_CHECKPOINT, | |
4683 | ||
4684 | ||
4685 | _SC_V6_ILP32_OFF32, | |
4686 | ||
4687 | _SC_V6_ILP32_OFFBIG, | |
4688 | ||
4689 | _SC_V6_LP64_OFF64, | |
4690 | ||
4691 | _SC_V6_LPBIG_OFFBIG, | |
4692 | ||
4693 | ||
4694 | _SC_HOST_NAME_MAX, | |
4695 | ||
4696 | _SC_TRACE, | |
4697 | ||
4698 | _SC_TRACE_EVENT_FILTER, | |
4699 | ||
4700 | _SC_TRACE_INHERIT, | |
4701 | ||
4702 | _SC_TRACE_LOG, | |
4703 | ||
4704 | ||
4705 | _SC_LEVEL1_ICACHE_SIZE, | |
4706 | ||
4707 | _SC_LEVEL1_ICACHE_ASSOC, | |
4708 | ||
4709 | _SC_LEVEL1_ICACHE_LINESIZE, | |
4710 | ||
4711 | _SC_LEVEL1_DCACHE_SIZE, | |
4712 | ||
4713 | _SC_LEVEL1_DCACHE_ASSOC, | |
4714 | ||
4715 | _SC_LEVEL1_DCACHE_LINESIZE, | |
4716 | ||
4717 | _SC_LEVEL2_CACHE_SIZE, | |
4718 | ||
4719 | _SC_LEVEL2_CACHE_ASSOC, | |
4720 | ||
4721 | _SC_LEVEL2_CACHE_LINESIZE, | |
4722 | ||
4723 | _SC_LEVEL3_CACHE_SIZE, | |
4724 | ||
4725 | _SC_LEVEL3_CACHE_ASSOC, | |
4726 | ||
4727 | _SC_LEVEL3_CACHE_LINESIZE, | |
4728 | ||
4729 | _SC_LEVEL4_CACHE_SIZE, | |
4730 | ||
4731 | _SC_LEVEL4_CACHE_ASSOC, | |
4732 | ||
4733 | _SC_LEVEL4_CACHE_LINESIZE, | |
4734 | ||
4735 | ||
4736 | ||
4737 | _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, | |
4738 | ||
4739 | _SC_RAW_SOCKETS | |
4740 | ||
4741 | }; | |
4742 | ||
4743 | ||
4744 | enum | |
4745 | { | |
4746 | _CS_PATH, | |
4747 | ||
4748 | ||
4749 | _CS_V6_WIDTH_RESTRICTED_ENVS, | |
4750 | ||
4751 | ||
4752 | _CS_GNU_LIBC_VERSION, | |
4753 | ||
4754 | _CS_GNU_LIBPTHREAD_VERSION, | |
4755 | ||
4756 | ||
4757 | _CS_LFS_CFLAGS = 1000, | |
4758 | ||
4759 | _CS_LFS_LDFLAGS, | |
4760 | ||
4761 | _CS_LFS_LIBS, | |
4762 | ||
4763 | _CS_LFS_LINTFLAGS, | |
4764 | ||
4765 | _CS_LFS64_CFLAGS, | |
4766 | ||
4767 | _CS_LFS64_LDFLAGS, | |
4768 | ||
4769 | _CS_LFS64_LIBS, | |
4770 | ||
4771 | _CS_LFS64_LINTFLAGS, | |
4772 | ||
4773 | ||
4774 | _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, | |
4775 | ||
4776 | _CS_XBS5_ILP32_OFF32_LDFLAGS, | |
4777 | ||
4778 | _CS_XBS5_ILP32_OFF32_LIBS, | |
4779 | ||
4780 | _CS_XBS5_ILP32_OFF32_LINTFLAGS, | |
4781 | ||
4782 | _CS_XBS5_ILP32_OFFBIG_CFLAGS, | |
4783 | ||
4784 | _CS_XBS5_ILP32_OFFBIG_LDFLAGS, | |
4785 | ||
4786 | _CS_XBS5_ILP32_OFFBIG_LIBS, | |
4787 | ||
4788 | _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, | |
4789 | ||
4790 | _CS_XBS5_LP64_OFF64_CFLAGS, | |
4791 | ||
4792 | _CS_XBS5_LP64_OFF64_LDFLAGS, | |
4793 | ||
4794 | _CS_XBS5_LP64_OFF64_LIBS, | |
4795 | ||
4796 | _CS_XBS5_LP64_OFF64_LINTFLAGS, | |
4797 | ||
4798 | _CS_XBS5_LPBIG_OFFBIG_CFLAGS, | |
4799 | ||
4800 | _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, | |
4801 | ||
4802 | _CS_XBS5_LPBIG_OFFBIG_LIBS, | |
4803 | ||
4804 | _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, | |
4805 | ||
4806 | ||
4807 | _CS_POSIX_V6_ILP32_OFF32_CFLAGS, | |
4808 | ||
4809 | _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, | |
4810 | ||
4811 | _CS_POSIX_V6_ILP32_OFF32_LIBS, | |
4812 | ||
4813 | _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, | |
4814 | ||
4815 | _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, | |
4816 | ||
4817 | _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, | |
4818 | ||
4819 | _CS_POSIX_V6_ILP32_OFFBIG_LIBS, | |
4820 | ||
4821 | _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, | |
4822 | ||
4823 | _CS_POSIX_V6_LP64_OFF64_CFLAGS, | |
4824 | ||
4825 | _CS_POSIX_V6_LP64_OFF64_LDFLAGS, | |
4826 | ||
4827 | _CS_POSIX_V6_LP64_OFF64_LIBS, | |
4828 | ||
4829 | _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, | |
4830 | ||
4831 | _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, | |
4832 | ||
4833 | _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, | |
4834 | ||
4835 | _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, | |
4836 | ||
4837 | _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS | |
4838 | ||
4839 | }; | |
4840 | # 553 "/usr/include/unistd.h" 2 3 4 | |
4841 | ||
4842 | ||
4843 | extern long int pathconf (__const char *__path, int __name) | |
4844 | throw () __attribute__ ((__nonnull__ (1))); | |
4845 | ||
4846 | ||
4847 | extern long int fpathconf (int __fd, int __name) throw (); | |
4848 | ||
4849 | ||
4850 | extern long int sysconf (int __name) throw () __attribute__ ((__const__)); | |
4851 | ||
4852 | ||
4853 | ||
4854 | extern size_t confstr (int __name, char *__buf, size_t __len) throw (); | |
4855 | ||
4856 | ||
4857 | ||
4858 | ||
4859 | extern __pid_t getpid (void) throw (); | |
4860 | ||
4861 | ||
4862 | extern __pid_t getppid (void) throw (); | |
4863 | ||
4864 | ||
4865 | ||
4866 | ||
4867 | extern __pid_t getpgrp (void) throw (); | |
4868 | # 589 "/usr/include/unistd.h" 3 4 | |
4869 | extern __pid_t __getpgid (__pid_t __pid) throw (); | |
4870 | ||
4871 | extern __pid_t getpgid (__pid_t __pid) throw (); | |
4872 | ||
4873 | ||
4874 | ||
4875 | ||
4876 | ||
4877 | ||
4878 | extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); | |
4879 | # 615 "/usr/include/unistd.h" 3 4 | |
4880 | extern int setpgrp (void) throw (); | |
4881 | # 632 "/usr/include/unistd.h" 3 4 | |
4882 | extern __pid_t setsid (void) throw (); | |
4883 | ||
4884 | ||
4885 | ||
4886 | extern __pid_t getsid (__pid_t __pid) throw (); | |
4887 | ||
4888 | ||
4889 | ||
4890 | extern __uid_t getuid (void) throw (); | |
4891 | ||
4892 | ||
4893 | extern __uid_t geteuid (void) throw (); | |
4894 | ||
4895 | ||
4896 | extern __gid_t getgid (void) throw (); | |
4897 | ||
4898 | ||
4899 | extern __gid_t getegid (void) throw (); | |
4900 | ||
4901 | ||
4902 | ||
4903 | ||
4904 | extern int getgroups (int __size, __gid_t __list[]) throw () ; | |
4905 | ||
4906 | ||
4907 | ||
4908 | extern int group_member (__gid_t __gid) throw (); | |
4909 | ||
4910 | ||
4911 | ||
4912 | ||
4913 | ||
4914 | ||
4915 | extern int setuid (__uid_t __uid) throw (); | |
4916 | ||
4917 | ||
4918 | ||
4919 | ||
4920 | extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); | |
4921 | ||
4922 | ||
4923 | ||
4924 | ||
4925 | extern int seteuid (__uid_t __uid) throw (); | |
4926 | ||
4927 | ||
4928 | ||
4929 | ||
4930 | ||
4931 | ||
4932 | extern int setgid (__gid_t __gid) throw (); | |
4933 | ||
4934 | ||
4935 | ||
4936 | ||
4937 | extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); | |
4938 | ||
4939 | ||
4940 | ||
4941 | ||
4942 | extern int setegid (__gid_t __gid) throw (); | |
4943 | ||
4944 | ||
4945 | ||
4946 | ||
4947 | ||
4948 | extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) | |
4949 | throw (); | |
4950 | ||
4951 | ||
4952 | ||
4953 | extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) | |
4954 | throw (); | |
4955 | ||
4956 | ||
4957 | ||
4958 | extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) | |
4959 | throw (); | |
4960 | ||
4961 | ||
4962 | ||
4963 | extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) | |
4964 | throw (); | |
4965 | ||
4966 | ||
4967 | ||
4968 | ||
4969 | ||
4970 | ||
4971 | extern __pid_t fork (void) throw (); | |
4972 | ||
4973 | ||
4974 | ||
4975 | ||
4976 | ||
4977 | ||
4978 | extern __pid_t vfork (void) throw (); | |
4979 | ||
4980 | ||
4981 | ||
4982 | ||
4983 | ||
4984 | extern char *ttyname (int __fd) throw (); | |
4985 | ||
4986 | ||
4987 | ||
4988 | extern int ttyname_r (int __fd, char *__buf, size_t __buflen) | |
4989 | throw () __attribute__ ((__nonnull__ (2))) ; | |
4990 | ||
4991 | ||
4992 | ||
4993 | extern int isatty (int __fd) throw (); | |
4994 | ||
4995 | ||
4996 | ||
4997 | ||
4998 | ||
4999 | extern int ttyslot (void) throw (); | |
5000 | ||
5001 | ||
5002 | ||
5003 | ||
5004 | extern int link (__const char *__from, __const char *__to) | |
5005 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
5006 | ||
5007 | ||
5008 | ||
5009 | ||
5010 | extern int linkat (int __fromfd, __const char *__from, int __tofd, | |
5011 | __const char *__to, int __flags) | |
5012 | throw () __attribute__ ((__nonnull__ (2, 4))) ; | |
5013 | ||
5014 | ||
5015 | ||
5016 | ||
5017 | extern int symlink (__const char *__from, __const char *__to) | |
5018 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
5019 | ||
5020 | ||
5021 | ||
5022 | ||
5023 | extern ssize_t readlink (__const char *__restrict __path, | |
5024 | char *__restrict __buf, size_t __len) | |
5025 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
5026 | ||
5027 | ||
5028 | ||
5029 | ||
5030 | extern int symlinkat (__const char *__from, int __tofd, | |
5031 | __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
5032 | ||
5033 | ||
5034 | extern ssize_t readlinkat (int __fd, __const char *__restrict __path, | |
5035 | char *__restrict __buf, size_t __len) | |
5036 | throw () __attribute__ ((__nonnull__ (2, 3))) ; | |
5037 | ||
5038 | ||
5039 | ||
5040 | extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); | |
5041 | ||
5042 | ||
5043 | ||
5044 | extern int unlinkat (int __fd, __const char *__name, int __flag) | |
5045 | throw () __attribute__ ((__nonnull__ (2))); | |
5046 | ||
5047 | ||
5048 | ||
5049 | extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); | |
5050 | ||
5051 | ||
5052 | ||
5053 | extern __pid_t tcgetpgrp (int __fd) throw (); | |
5054 | ||
5055 | ||
5056 | extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); | |
5057 | ||
5058 | ||
5059 | ||
5060 | ||
5061 | ||
5062 | ||
5063 | extern char *getlogin (void); | |
5064 | ||
5065 | ||
5066 | ||
5067 | ||
5068 | ||
5069 | ||
5070 | ||
5071 | extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); | |
5072 | ||
5073 | ||
5074 | ||
5075 | ||
5076 | extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); | |
5077 | # 835 "/usr/include/unistd.h" 3 4 | |
5078 | # 1 "/usr/include/getopt.h" 1 3 4 | |
5079 | # 50 "/usr/include/getopt.h" 3 4 | |
5080 | extern "C" { | |
5081 | # 59 "/usr/include/getopt.h" 3 4 | |
5082 | extern char *optarg; | |
5083 | # 73 "/usr/include/getopt.h" 3 4 | |
5084 | extern int optind; | |
5085 | ||
5086 | ||
5087 | ||
5088 | ||
5089 | extern int opterr; | |
5090 | ||
5091 | ||
5092 | ||
5093 | extern int optopt; | |
5094 | # 152 "/usr/include/getopt.h" 3 4 | |
5095 | extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) | |
5096 | throw (); | |
5097 | # 171 "/usr/include/getopt.h" 3 4 | |
5098 | } | |
5099 | # 836 "/usr/include/unistd.h" 2 3 4 | |
5100 | ||
5101 | ||
5102 | ||
5103 | ||
5104 | ||
5105 | ||
5106 | ||
5107 | extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); | |
5108 | ||
5109 | ||
5110 | ||
5111 | ||
5112 | ||
5113 | ||
5114 | extern int sethostname (__const char *__name, size_t __len) | |
5115 | throw () __attribute__ ((__nonnull__ (1))) ; | |
5116 | ||
5117 | ||
5118 | ||
5119 | extern int sethostid (long int __id) throw () ; | |
5120 | ||
5121 | ||
5122 | ||
5123 | ||
5124 | ||
5125 | extern int getdomainname (char *__name, size_t __len) | |
5126 | throw () __attribute__ ((__nonnull__ (1))) ; | |
5127 | extern int setdomainname (__const char *__name, size_t __len) | |
5128 | throw () __attribute__ ((__nonnull__ (1))) ; | |
5129 | ||
5130 | ||
5131 | ||
5132 | ||
5133 | ||
5134 | extern int vhangup (void) throw (); | |
5135 | ||
5136 | ||
5137 | extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ; | |
5138 | ||
5139 | ||
5140 | ||
5141 | ||
5142 | ||
5143 | ||
5144 | ||
5145 | extern int profil (unsigned short int *__sample_buffer, size_t __size, | |
5146 | size_t __offset, unsigned int __scale) | |
5147 | throw () __attribute__ ((__nonnull__ (1))); | |
5148 | ||
5149 | ||
5150 | ||
5151 | ||
5152 | ||
5153 | extern int acct (__const char *__name) throw (); | |
5154 | ||
5155 | ||
5156 | ||
5157 | extern char *getusershell (void) throw (); | |
5158 | extern void endusershell (void) throw (); | |
5159 | extern void setusershell (void) throw (); | |
5160 | ||
5161 | ||
5162 | ||
5163 | ||
5164 | ||
5165 | extern int daemon (int __nochdir, int __noclose) throw () ; | |
5166 | ||
5167 | ||
5168 | ||
5169 | ||
5170 | ||
5171 | ||
5172 | extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; | |
5173 | ||
5174 | ||
5175 | ||
5176 | extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); | |
5177 | # 921 "/usr/include/unistd.h" 3 4 | |
5178 | extern int fsync (int __fd); | |
5179 | ||
5180 | ||
5181 | ||
5182 | ||
5183 | ||
5184 | ||
5185 | extern long int gethostid (void); | |
5186 | ||
5187 | ||
5188 | extern void sync (void) throw (); | |
5189 | ||
5190 | ||
5191 | ||
5192 | ||
5193 | extern int getpagesize (void) throw () __attribute__ ((__const__)); | |
5194 | ||
5195 | ||
5196 | ||
5197 | ||
5198 | extern int getdtablesize (void) throw (); | |
5199 | ||
5200 | ||
5201 | ||
5202 | ||
5203 | extern int truncate (__const char *__file, __off_t __length) | |
5204 | throw () __attribute__ ((__nonnull__ (1))) ; | |
5205 | # 958 "/usr/include/unistd.h" 3 4 | |
5206 | extern int truncate64 (__const char *__file, __off64_t __length) | |
5207 | throw () __attribute__ ((__nonnull__ (1))) ; | |
5208 | # 968 "/usr/include/unistd.h" 3 4 | |
5209 | extern int ftruncate (int __fd, __off_t __length) throw () ; | |
5210 | # 978 "/usr/include/unistd.h" 3 4 | |
5211 | extern int ftruncate64 (int __fd, __off64_t __length) throw () ; | |
5212 | # 988 "/usr/include/unistd.h" 3 4 | |
5213 | extern int brk (void *__addr) throw () ; | |
5214 | ||
5215 | ||
5216 | ||
5217 | ||
5218 | ||
5219 | extern void *sbrk (intptr_t __delta) throw (); | |
5220 | # 1009 "/usr/include/unistd.h" 3 4 | |
5221 | extern long int syscall (long int __sysno, ...) throw (); | |
5222 | # 1032 "/usr/include/unistd.h" 3 4 | |
5223 | extern int lockf (int __fd, int __cmd, __off_t __len) ; | |
5224 | # 1042 "/usr/include/unistd.h" 3 4 | |
5225 | extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; | |
5226 | # 1063 "/usr/include/unistd.h" 3 4 | |
5227 | extern int fdatasync (int __fildes) throw (); | |
5228 | ||
5229 | ||
5230 | ||
5231 | ||
5232 | ||
5233 | ||
5234 | ||
5235 | extern char *crypt (__const char *__key, __const char *__salt) | |
5236 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
5237 | ||
5238 | ||
5239 | ||
5240 | extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); | |
5241 | ||
5242 | ||
5243 | ||
5244 | ||
5245 | ||
5246 | ||
5247 | extern void swab (__const void *__restrict __from, void *__restrict __to, | |
5248 | ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
5249 | ||
5250 | ||
5251 | ||
5252 | ||
5253 | ||
5254 | ||
5255 | ||
5256 | extern char *ctermid (char *__s) throw (); | |
5257 | # 1101 "/usr/include/unistd.h" 3 4 | |
5258 | } | |
5259 | # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 2 3 | |
5260 | ||
5261 | typedef pthread_key_t __gthread_key_t; | |
5262 | typedef pthread_once_t __gthread_once_t; | |
5263 | typedef pthread_mutex_t __gthread_mutex_t; | |
5264 | typedef pthread_mutex_t __gthread_recursive_mutex_t; | |
5265 | # 88 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 | |
5266 | extern __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); | |
5267 | extern __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); | |
5268 | extern __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); | |
5269 | extern __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); | |
5270 | extern __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); | |
5271 | extern __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); | |
5272 | extern __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); | |
5273 | extern __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); | |
5274 | extern __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); | |
5275 | ||
5276 | ||
5277 | extern __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); | |
5278 | extern __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); | |
5279 | extern __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); | |
5280 | extern __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); | |
5281 | extern __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); | |
5282 | # 145 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 | |
5283 | static inline int | |
5284 | __gthread_active_p (void) | |
5285 | { | |
5286 | static void *const __gthread_active_ptr | |
5287 | = __extension__ (void *) &__gthrw_pthread_cancel; | |
5288 | return __gthread_active_ptr != 0; | |
5289 | } | |
5290 | # 512 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 | |
5291 | static inline int | |
5292 | __gthread_once (__gthread_once_t *once, void (*func) (void)) | |
5293 | { | |
5294 | if (__gthread_active_p ()) | |
5295 | return __gthrw_pthread_once (once, func); | |
5296 | else | |
5297 | return -1; | |
5298 | } | |
5299 | ||
5300 | static inline int | |
5301 | __gthread_key_create (__gthread_key_t *key, void (*dtor) (void *)) | |
5302 | { | |
5303 | return __gthrw_pthread_key_create (key, dtor); | |
5304 | } | |
5305 | ||
5306 | static inline int | |
5307 | __gthread_key_delete (__gthread_key_t key) | |
5308 | { | |
5309 | return __gthrw_pthread_key_delete (key); | |
5310 | } | |
5311 | ||
5312 | static inline void * | |
5313 | __gthread_getspecific (__gthread_key_t key) | |
5314 | { | |
5315 | return __gthrw_pthread_getspecific (key); | |
5316 | } | |
5317 | ||
5318 | static inline int | |
5319 | __gthread_setspecific (__gthread_key_t key, const void *ptr) | |
5320 | { | |
5321 | return __gthrw_pthread_setspecific (key, ptr); | |
5322 | } | |
5323 | ||
5324 | static inline int | |
5325 | __gthread_mutex_lock (__gthread_mutex_t *mutex) | |
5326 | { | |
5327 | if (__gthread_active_p ()) | |
5328 | return __gthrw_pthread_mutex_lock (mutex); | |
5329 | else | |
5330 | return 0; | |
5331 | } | |
5332 | ||
5333 | static inline int | |
5334 | __gthread_mutex_trylock (__gthread_mutex_t *mutex) | |
5335 | { | |
5336 | if (__gthread_active_p ()) | |
5337 | return __gthrw_pthread_mutex_trylock (mutex); | |
5338 | else | |
5339 | return 0; | |
5340 | } | |
5341 | ||
5342 | static inline int | |
5343 | __gthread_mutex_unlock (__gthread_mutex_t *mutex) | |
5344 | { | |
5345 | if (__gthread_active_p ()) | |
5346 | return __gthrw_pthread_mutex_unlock (mutex); | |
5347 | else | |
5348 | return 0; | |
5349 | } | |
5350 | # 594 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 | |
5351 | static inline int | |
5352 | __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) | |
5353 | { | |
5354 | return __gthread_mutex_lock (mutex); | |
5355 | } | |
5356 | ||
5357 | static inline int | |
5358 | __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex) | |
5359 | { | |
5360 | return __gthread_mutex_trylock (mutex); | |
5361 | } | |
5362 | ||
5363 | static inline int | |
5364 | __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex) | |
5365 | { | |
5366 | return __gthread_mutex_unlock (mutex); | |
5367 | } | |
5368 | # 115 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 2 3 | |
5369 | ||
5370 | ||
5371 | ||
5372 | ||
5373 | ||
5374 | ||
5375 | ||
5376 | #pragma GCC visibility pop | |
5377 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 2 3 | |
5378 | ||
5379 | namespace std | |
5380 | { | |
5381 | typedef __gthread_mutex_t __c_lock; | |
5382 | ||
5383 | ||
5384 | typedef FILE __c_file; | |
5385 | } | |
5386 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 2 3 | |
5387 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cctype" 1 3 | |
5388 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cctype" 3 | |
5389 | ||
5390 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cctype" 3 | |
5391 | #pragma GCC visibility push(default) | |
5392 | ||
5393 | ||
5394 | # 1 "/usr/include/ctype.h" 1 3 4 | |
5395 | # 30 "/usr/include/ctype.h" 3 4 | |
5396 | extern "C" { | |
5397 | # 41 "/usr/include/ctype.h" 3 4 | |
5398 | # 1 "/usr/include/endian.h" 1 3 4 | |
5399 | # 37 "/usr/include/endian.h" 3 4 | |
5400 | # 1 "/usr/include/bits/endian.h" 1 3 4 | |
5401 | # 38 "/usr/include/endian.h" 2 3 4 | |
5402 | # 42 "/usr/include/ctype.h" 2 3 4 | |
5403 | ||
5404 | ||
5405 | ||
5406 | ||
5407 | ||
5408 | ||
5409 | enum | |
5410 | { | |
5411 | _ISupper = (1 << (0)), | |
5412 | _ISlower = (1 << (1)), | |
5413 | _ISalpha = (1 << (2)), | |
5414 | _ISdigit = (1 << (3)), | |
5415 | _ISxdigit = (1 << (4)), | |
5416 | _ISspace = (1 << (5)), | |
5417 | _ISprint = (1 << (6)), | |
5418 | _ISgraph = (1 << (7)), | |
5419 | _ISblank = (1 << (8)), | |
5420 | _IScntrl = (1 << (9)), | |
5421 | _ISpunct = (1 << (10)), | |
5422 | _ISalnum = (1 << (11)) | |
5423 | }; | |
5424 | # 81 "/usr/include/ctype.h" 3 4 | |
5425 | extern __const unsigned short int **__ctype_b_loc (void) | |
5426 | __attribute__ ((__const)); | |
5427 | extern __const __int32_t **__ctype_tolower_loc (void) | |
5428 | __attribute__ ((__const)); | |
5429 | extern __const __int32_t **__ctype_toupper_loc (void) | |
5430 | __attribute__ ((__const)); | |
5431 | # 96 "/usr/include/ctype.h" 3 4 | |
5432 | ||
5433 | ||
5434 | ||
5435 | ||
5436 | ||
5437 | ||
5438 | extern int isalnum (int) throw (); | |
5439 | extern int isalpha (int) throw (); | |
5440 | extern int iscntrl (int) throw (); | |
5441 | extern int isdigit (int) throw (); | |
5442 | extern int islower (int) throw (); | |
5443 | extern int isgraph (int) throw (); | |
5444 | extern int isprint (int) throw (); | |
5445 | extern int ispunct (int) throw (); | |
5446 | extern int isspace (int) throw (); | |
5447 | extern int isupper (int) throw (); | |
5448 | extern int isxdigit (int) throw (); | |
5449 | ||
5450 | ||
5451 | ||
5452 | extern int tolower (int __c) throw (); | |
5453 | ||
5454 | ||
5455 | extern int toupper (int __c) throw (); | |
5456 | ||
5457 | ||
5458 | ||
5459 | ||
5460 | ||
5461 | ||
5462 | ||
5463 | ||
5464 | extern int isblank (int) throw (); | |
5465 | ||
5466 | ||
5467 | ||
5468 | ||
5469 | ||
5470 | ||
5471 | extern int isctype (int __c, int __mask) throw (); | |
5472 | ||
5473 | ||
5474 | ||
5475 | ||
5476 | ||
5477 | ||
5478 | extern int isascii (int __c) throw (); | |
5479 | ||
5480 | ||
5481 | ||
5482 | extern int toascii (int __c) throw (); | |
5483 | ||
5484 | ||
5485 | ||
5486 | extern int _toupper (int) throw (); | |
5487 | extern int _tolower (int) throw (); | |
5488 | # 247 "/usr/include/ctype.h" 3 4 | |
5489 | extern int isalnum_l (int, __locale_t) throw (); | |
5490 | extern int isalpha_l (int, __locale_t) throw (); | |
5491 | extern int iscntrl_l (int, __locale_t) throw (); | |
5492 | extern int isdigit_l (int, __locale_t) throw (); | |
5493 | extern int islower_l (int, __locale_t) throw (); | |
5494 | extern int isgraph_l (int, __locale_t) throw (); | |
5495 | extern int isprint_l (int, __locale_t) throw (); | |
5496 | extern int ispunct_l (int, __locale_t) throw (); | |
5497 | extern int isspace_l (int, __locale_t) throw (); | |
5498 | extern int isupper_l (int, __locale_t) throw (); | |
5499 | extern int isxdigit_l (int, __locale_t) throw (); | |
5500 | ||
5501 | extern int isblank_l (int, __locale_t) throw (); | |
5502 | ||
5503 | ||
5504 | ||
5505 | extern int __tolower_l (int __c, __locale_t __l) throw (); | |
5506 | extern int tolower_l (int __c, __locale_t __l) throw (); | |
5507 | ||
5508 | ||
5509 | extern int __toupper_l (int __c, __locale_t __l) throw (); | |
5510 | extern int toupper_l (int __c, __locale_t __l) throw (); | |
5511 | # 323 "/usr/include/ctype.h" 3 4 | |
5512 | } | |
5513 | # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cctype" 2 3 | |
5514 | # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cctype" 3 | |
5515 | namespace std | |
5516 | { | |
5517 | using ::isalnum; | |
5518 | using ::isalpha; | |
5519 | using ::iscntrl; | |
5520 | using ::isdigit; | |
5521 | using ::isgraph; | |
5522 | using ::islower; | |
5523 | using ::isprint; | |
5524 | using ::ispunct; | |
5525 | using ::isspace; | |
5526 | using ::isupper; | |
5527 | using ::isxdigit; | |
5528 | using ::tolower; | |
5529 | using ::toupper; | |
5530 | } | |
5531 | ||
5532 | #pragma GCC visibility pop | |
5533 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 2 3 | |
5534 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stringfwd.h" 1 3 | |
5535 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stringfwd.h" 3 | |
5536 | ||
5537 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stringfwd.h" 3 | |
5538 | ||
5539 | ||
5540 | ||
5541 | namespace std | |
5542 | { | |
5543 | template<typename _Alloc> | |
5544 | class allocator; | |
5545 | ||
5546 | template<class _CharT> | |
5547 | struct char_traits; | |
5548 | ||
5549 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
5550 | typename _Alloc = allocator<_CharT> > | |
5551 | class basic_string; | |
5552 | ||
5553 | template<> struct char_traits<char>; | |
5554 | ||
5555 | typedef basic_string<char> string; | |
5556 | ||
5557 | ||
5558 | template<> struct char_traits<wchar_t>; | |
5559 | ||
5560 | typedef basic_string<wchar_t> wstring; | |
5561 | ||
5562 | } | |
5563 | # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 2 3 | |
5564 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 1 3 | |
5565 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 3 | |
5566 | ||
5567 | # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 3 | |
5568 | ||
5569 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 1 3 | |
5570 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 3 | |
5571 | ||
5572 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 3 | |
5573 | #pragma GCC visibility push(default) | |
5574 | ||
5575 | ||
5576 | ||
5577 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ctime" 1 3 | |
5578 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ctime" 3 | |
5579 | ||
5580 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ctime" 3 | |
5581 | #pragma GCC visibility push(default) | |
5582 | # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ctime" 3 | |
5583 | namespace std | |
5584 | { | |
5585 | using ::clock_t; | |
5586 | using ::time_t; | |
5587 | using ::tm; | |
5588 | ||
5589 | using ::clock; | |
5590 | using ::difftime; | |
5591 | using ::mktime; | |
5592 | using ::time; | |
5593 | using ::asctime; | |
5594 | using ::ctime; | |
5595 | using ::gmtime; | |
5596 | using ::localtime; | |
5597 | using ::strftime; | |
5598 | } | |
5599 | ||
5600 | #pragma GCC visibility pop | |
5601 | # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 2 3 | |
5602 | ||
5603 | ||
5604 | # 1 "/usr/include/wchar.h" 1 3 4 | |
5605 | # 40 "/usr/include/wchar.h" 3 4 | |
5606 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stdarg.h" 1 3 4 | |
5607 | # 41 "/usr/include/wchar.h" 2 3 4 | |
5608 | ||
5609 | ||
5610 | ||
5611 | ||
5612 | ||
5613 | ||
5614 | ||
5615 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
5616 | # 49 "/usr/include/wchar.h" 2 3 4 | |
5617 | # 93 "/usr/include/wchar.h" 3 4 | |
5618 | ||
5619 | ||
5620 | typedef __mbstate_t mbstate_t; | |
5621 | ||
5622 | ||
5623 | ||
5624 | # 118 "/usr/include/wchar.h" 3 4 | |
5625 | extern "C" { | |
5626 | ||
5627 | ||
5628 | ||
5629 | ||
5630 | struct tm; | |
5631 | ||
5632 | ||
5633 | ||
5634 | ||
5635 | ||
5636 | ||
5637 | ||
5638 | ||
5639 | ||
5640 | extern wchar_t *wcscpy (wchar_t *__restrict __dest, | |
5641 | __const wchar_t *__restrict __src) throw (); | |
5642 | ||
5643 | extern wchar_t *wcsncpy (wchar_t *__restrict __dest, | |
5644 | __const wchar_t *__restrict __src, size_t __n) | |
5645 | throw (); | |
5646 | ||
5647 | ||
5648 | extern wchar_t *wcscat (wchar_t *__restrict __dest, | |
5649 | __const wchar_t *__restrict __src) throw (); | |
5650 | ||
5651 | extern wchar_t *wcsncat (wchar_t *__restrict __dest, | |
5652 | __const wchar_t *__restrict __src, size_t __n) | |
5653 | throw (); | |
5654 | ||
5655 | ||
5656 | extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) | |
5657 | throw () __attribute__ ((__pure__)); | |
5658 | ||
5659 | extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) | |
5660 | throw () __attribute__ ((__pure__)); | |
5661 | ||
5662 | ||
5663 | ||
5664 | ||
5665 | extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); | |
5666 | ||
5667 | ||
5668 | extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, | |
5669 | size_t __n) throw (); | |
5670 | ||
5671 | ||
5672 | ||
5673 | ||
5674 | ||
5675 | extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, | |
5676 | __locale_t __loc) throw (); | |
5677 | ||
5678 | extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, | |
5679 | size_t __n, __locale_t __loc) throw (); | |
5680 | ||
5681 | ||
5682 | ||
5683 | ||
5684 | ||
5685 | extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); | |
5686 | ||
5687 | ||
5688 | ||
5689 | extern size_t wcsxfrm (wchar_t *__restrict __s1, | |
5690 | __const wchar_t *__restrict __s2, size_t __n) throw (); | |
5691 | ||
5692 | ||
5693 | ||
5694 | ||
5695 | ||
5696 | ||
5697 | ||
5698 | ||
5699 | extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, | |
5700 | __locale_t __loc) throw (); | |
5701 | ||
5702 | ||
5703 | ||
5704 | ||
5705 | extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, | |
5706 | size_t __n, __locale_t __loc) throw (); | |
5707 | ||
5708 | ||
5709 | extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); | |
5710 | ||
5711 | ||
5712 | ||
5713 | ||
5714 | extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) | |
5715 | throw () __attribute__ ((__pure__)); | |
5716 | ||
5717 | extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) | |
5718 | throw () __attribute__ ((__pure__)); | |
5719 | ||
5720 | ||
5721 | ||
5722 | ||
5723 | ||
5724 | extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) | |
5725 | throw () __attribute__ ((__pure__)); | |
5726 | ||
5727 | ||
5728 | ||
5729 | ||
5730 | ||
5731 | extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) | |
5732 | throw () __attribute__ ((__pure__)); | |
5733 | ||
5734 | ||
5735 | extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) | |
5736 | throw () __attribute__ ((__pure__)); | |
5737 | ||
5738 | extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) | |
5739 | throw () __attribute__ ((__pure__)); | |
5740 | ||
5741 | extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) | |
5742 | throw () __attribute__ ((__pure__)); | |
5743 | ||
5744 | ||
5745 | extern wchar_t *wcstok (wchar_t *__restrict __s, | |
5746 | __const wchar_t *__restrict __delim, | |
5747 | wchar_t **__restrict __ptr) throw (); | |
5748 | ||
5749 | ||
5750 | extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); | |
5751 | ||
5752 | ||
5753 | ||
5754 | ||
5755 | extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) | |
5756 | throw () __attribute__ ((__pure__)); | |
5757 | ||
5758 | ||
5759 | ||
5760 | ||
5761 | extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) | |
5762 | throw () __attribute__ ((__pure__)); | |
5763 | ||
5764 | ||
5765 | ||
5766 | ||
5767 | ||
5768 | extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) | |
5769 | throw () __attribute__ ((__pure__)); | |
5770 | ||
5771 | ||
5772 | extern int wmemcmp (__const wchar_t *__restrict __s1, | |
5773 | __const wchar_t *__restrict __s2, size_t __n) | |
5774 | throw () __attribute__ ((__pure__)); | |
5775 | ||
5776 | ||
5777 | extern wchar_t *wmemcpy (wchar_t *__restrict __s1, | |
5778 | __const wchar_t *__restrict __s2, size_t __n) throw (); | |
5779 | ||
5780 | ||
5781 | ||
5782 | extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) | |
5783 | throw (); | |
5784 | ||
5785 | ||
5786 | extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); | |
5787 | ||
5788 | ||
5789 | ||
5790 | ||
5791 | ||
5792 | extern wchar_t *wmempcpy (wchar_t *__restrict __s1, | |
5793 | __const wchar_t *__restrict __s2, size_t __n) | |
5794 | throw (); | |
5795 | ||
5796 | ||
5797 | ||
5798 | ||
5799 | ||
5800 | ||
5801 | extern wint_t btowc (int __c) throw (); | |
5802 | ||
5803 | ||
5804 | ||
5805 | extern int wctob (wint_t __c) throw (); | |
5806 | ||
5807 | ||
5808 | ||
5809 | extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); | |
5810 | ||
5811 | ||
5812 | ||
5813 | extern size_t mbrtowc (wchar_t *__restrict __pwc, | |
5814 | __const char *__restrict __s, size_t __n, | |
5815 | mbstate_t *__p) throw (); | |
5816 | ||
5817 | ||
5818 | extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, | |
5819 | mbstate_t *__restrict __ps) throw (); | |
5820 | ||
5821 | ||
5822 | extern size_t __mbrlen (__const char *__restrict __s, size_t __n, | |
5823 | mbstate_t *__restrict __ps) throw (); | |
5824 | extern size_t mbrlen (__const char *__restrict __s, size_t __n, | |
5825 | mbstate_t *__restrict __ps) throw (); | |
5826 | ||
5827 | # 341 "/usr/include/wchar.h" 3 4 | |
5828 | extern __inline size_t | |
5829 | mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () | |
5830 | ||
5831 | { return (__ps != __null | |
5832 | ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } | |
5833 | ||
5834 | ||
5835 | ||
5836 | ||
5837 | ||
5838 | extern size_t mbsrtowcs (wchar_t *__restrict __dst, | |
5839 | __const char **__restrict __src, size_t __len, | |
5840 | mbstate_t *__restrict __ps) throw (); | |
5841 | ||
5842 | ||
5843 | ||
5844 | extern size_t wcsrtombs (char *__restrict __dst, | |
5845 | __const wchar_t **__restrict __src, size_t __len, | |
5846 | mbstate_t *__restrict __ps) throw (); | |
5847 | ||
5848 | ||
5849 | ||
5850 | ||
5851 | ||
5852 | ||
5853 | extern size_t mbsnrtowcs (wchar_t *__restrict __dst, | |
5854 | __const char **__restrict __src, size_t __nmc, | |
5855 | size_t __len, mbstate_t *__restrict __ps) throw (); | |
5856 | ||
5857 | ||
5858 | ||
5859 | extern size_t wcsnrtombs (char *__restrict __dst, | |
5860 | __const wchar_t **__restrict __src, | |
5861 | size_t __nwc, size_t __len, | |
5862 | mbstate_t *__restrict __ps) throw (); | |
5863 | ||
5864 | ||
5865 | ||
5866 | ||
5867 | ||
5868 | ||
5869 | extern int wcwidth (wchar_t __c) throw (); | |
5870 | ||
5871 | ||
5872 | ||
5873 | extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); | |
5874 | ||
5875 | ||
5876 | ||
5877 | ||
5878 | ||
5879 | ||
5880 | extern double wcstod (__const wchar_t *__restrict __nptr, | |
5881 | wchar_t **__restrict __endptr) throw (); | |
5882 | ||
5883 | ||
5884 | ||
5885 | extern float wcstof (__const wchar_t *__restrict __nptr, | |
5886 | wchar_t **__restrict __endptr) throw (); | |
5887 | extern long double wcstold (__const wchar_t *__restrict __nptr, | |
5888 | wchar_t **__restrict __endptr) throw (); | |
5889 | ||
5890 | ||
5891 | ||
5892 | ||
5893 | ||
5894 | extern long int wcstol (__const wchar_t *__restrict __nptr, | |
5895 | wchar_t **__restrict __endptr, int __base) throw (); | |
5896 | ||
5897 | ||
5898 | ||
5899 | extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, | |
5900 | wchar_t **__restrict __endptr, int __base) | |
5901 | throw (); | |
5902 | ||
5903 | ||
5904 | ||
5905 | ||
5906 | __extension__ | |
5907 | extern long long int wcstoll (__const wchar_t *__restrict __nptr, | |
5908 | wchar_t **__restrict __endptr, int __base) | |
5909 | throw (); | |
5910 | ||
5911 | ||
5912 | ||
5913 | __extension__ | |
5914 | extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, | |
5915 | wchar_t **__restrict __endptr, | |
5916 | int __base) throw (); | |
5917 | ||
5918 | ||
5919 | ||
5920 | ||
5921 | ||
5922 | ||
5923 | __extension__ | |
5924 | extern long long int wcstoq (__const wchar_t *__restrict __nptr, | |
5925 | wchar_t **__restrict __endptr, int __base) | |
5926 | throw (); | |
5927 | ||
5928 | ||
5929 | ||
5930 | __extension__ | |
5931 | extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, | |
5932 | wchar_t **__restrict __endptr, | |
5933 | int __base) throw (); | |
5934 | # 467 "/usr/include/wchar.h" 3 4 | |
5935 | extern long int wcstol_l (__const wchar_t *__restrict __nptr, | |
5936 | wchar_t **__restrict __endptr, int __base, | |
5937 | __locale_t __loc) throw (); | |
5938 | ||
5939 | extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, | |
5940 | wchar_t **__restrict __endptr, | |
5941 | int __base, __locale_t __loc) throw (); | |
5942 | ||
5943 | __extension__ | |
5944 | extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, | |
5945 | wchar_t **__restrict __endptr, | |
5946 | int __base, __locale_t __loc) throw (); | |
5947 | ||
5948 | __extension__ | |
5949 | extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, | |
5950 | wchar_t **__restrict __endptr, | |
5951 | int __base, __locale_t __loc) | |
5952 | throw (); | |
5953 | ||
5954 | extern double wcstod_l (__const wchar_t *__restrict __nptr, | |
5955 | wchar_t **__restrict __endptr, __locale_t __loc) | |
5956 | throw (); | |
5957 | ||
5958 | extern float wcstof_l (__const wchar_t *__restrict __nptr, | |
5959 | wchar_t **__restrict __endptr, __locale_t __loc) | |
5960 | throw (); | |
5961 | ||
5962 | extern long double wcstold_l (__const wchar_t *__restrict __nptr, | |
5963 | wchar_t **__restrict __endptr, | |
5964 | __locale_t __loc) throw (); | |
5965 | ||
5966 | ||
5967 | ||
5968 | ||
5969 | ||
5970 | extern double __wcstod_internal (__const wchar_t *__restrict __nptr, | |
5971 | wchar_t **__restrict __endptr, int __group) | |
5972 | throw (); | |
5973 | extern float __wcstof_internal (__const wchar_t *__restrict __nptr, | |
5974 | wchar_t **__restrict __endptr, int __group) | |
5975 | throw (); | |
5976 | extern long double __wcstold_internal (__const wchar_t *__restrict __nptr, | |
5977 | wchar_t **__restrict __endptr, | |
5978 | int __group) throw (); | |
5979 | ||
5980 | ||
5981 | ||
5982 | extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, | |
5983 | wchar_t **__restrict __endptr, | |
5984 | int __base, int __group) throw (); | |
5985 | ||
5986 | ||
5987 | ||
5988 | ||
5989 | extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt, | |
5990 | wchar_t **__restrict __endptr, | |
5991 | int __base, int __group) throw (); | |
5992 | ||
5993 | ||
5994 | ||
5995 | ||
5996 | __extension__ | |
5997 | extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr, | |
5998 | wchar_t **__restrict __endptr, | |
5999 | int __base, int __group) throw (); | |
6000 | ||
6001 | ||
6002 | ||
6003 | ||
6004 | __extension__ | |
6005 | extern unsigned long long int __wcstoull_internal (__const wchar_t * | |
6006 | __restrict __nptr, | |
6007 | wchar_t ** | |
6008 | __restrict __endptr, | |
6009 | int __base, | |
6010 | int __group) throw (); | |
6011 | ||
6012 | ||
6013 | ||
6014 | ||
6015 | ||
6016 | ||
6017 | ||
6018 | ||
6019 | extern __inline double | |
6020 | wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () | |
6021 | ||
6022 | { return __wcstod_internal (__nptr, __endptr, 0); } | |
6023 | extern __inline long int | |
6024 | wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
6025 | ||
6026 | { return __wcstol_internal (__nptr, __endptr, __base, 0); } | |
6027 | extern __inline unsigned long int | |
6028 | wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
6029 | ||
6030 | { return __wcstoul_internal (__nptr, __endptr, __base, 0); } | |
6031 | ||
6032 | ||
6033 | ||
6034 | extern __inline float | |
6035 | wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () | |
6036 | ||
6037 | { return __wcstof_internal (__nptr, __endptr, 0); } | |
6038 | ||
6039 | ||
6040 | ||
6041 | ||
6042 | ||
6043 | ||
6044 | __extension__ | |
6045 | extern __inline long long int | |
6046 | wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
6047 | ||
6048 | { return __wcstoll_internal (__nptr, __endptr, __base, 0); } | |
6049 | __extension__ | |
6050 | extern __inline unsigned long long int | |
6051 | wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
6052 | ||
6053 | { return __wcstoull_internal (__nptr, __endptr, __base, 0); } | |
6054 | ||
6055 | ||
6056 | ||
6057 | ||
6058 | ||
6059 | ||
6060 | ||
6061 | extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw (); | |
6062 | ||
6063 | ||
6064 | ||
6065 | extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) | |
6066 | throw (); | |
6067 | # 607 "/usr/include/wchar.h" 3 4 | |
6068 | extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); | |
6069 | ||
6070 | ||
6071 | ||
6072 | ||
6073 | ||
6074 | ||
6075 | extern int fwide (__FILE *__fp, int __mode) throw (); | |
6076 | ||
6077 | ||
6078 | ||
6079 | ||
6080 | ||
6081 | ||
6082 | extern int fwprintf (__FILE *__restrict __stream, | |
6083 | __const wchar_t *__restrict __format, ...) | |
6084 | ; | |
6085 | ||
6086 | ||
6087 | ||
6088 | ||
6089 | extern int wprintf (__const wchar_t *__restrict __format, ...) | |
6090 | ; | |
6091 | ||
6092 | extern int swprintf (wchar_t *__restrict __s, size_t __n, | |
6093 | __const wchar_t *__restrict __format, ...) | |
6094 | throw () ; | |
6095 | ||
6096 | ||
6097 | ||
6098 | ||
6099 | ||
6100 | extern int vfwprintf (__FILE *__restrict __s, | |
6101 | __const wchar_t *__restrict __format, | |
6102 | __gnuc_va_list __arg) | |
6103 | ; | |
6104 | ||
6105 | ||
6106 | ||
6107 | ||
6108 | extern int vwprintf (__const wchar_t *__restrict __format, | |
6109 | __gnuc_va_list __arg) | |
6110 | ; | |
6111 | ||
6112 | ||
6113 | extern int vswprintf (wchar_t *__restrict __s, size_t __n, | |
6114 | __const wchar_t *__restrict __format, | |
6115 | __gnuc_va_list __arg) | |
6116 | throw () ; | |
6117 | ||
6118 | ||
6119 | ||
6120 | ||
6121 | ||
6122 | ||
6123 | extern int fwscanf (__FILE *__restrict __stream, | |
6124 | __const wchar_t *__restrict __format, ...) | |
6125 | ; | |
6126 | ||
6127 | ||
6128 | ||
6129 | ||
6130 | extern int wscanf (__const wchar_t *__restrict __format, ...) | |
6131 | ; | |
6132 | ||
6133 | extern int swscanf (__const wchar_t *__restrict __s, | |
6134 | __const wchar_t *__restrict __format, ...) | |
6135 | throw () ; | |
6136 | ||
6137 | ||
6138 | ||
6139 | ||
6140 | ||
6141 | ||
6142 | ||
6143 | ||
6144 | ||
6145 | ||
6146 | ||
6147 | extern int vfwscanf (__FILE *__restrict __s, | |
6148 | __const wchar_t *__restrict __format, | |
6149 | __gnuc_va_list __arg) | |
6150 | ; | |
6151 | ||
6152 | ||
6153 | ||
6154 | ||
6155 | extern int vwscanf (__const wchar_t *__restrict __format, | |
6156 | __gnuc_va_list __arg) | |
6157 | ; | |
6158 | ||
6159 | extern int vswscanf (__const wchar_t *__restrict __s, | |
6160 | __const wchar_t *__restrict __format, | |
6161 | __gnuc_va_list __arg) | |
6162 | throw () ; | |
6163 | ||
6164 | ||
6165 | ||
6166 | ||
6167 | ||
6168 | ||
6169 | ||
6170 | ||
6171 | ||
6172 | ||
6173 | extern wint_t fgetwc (__FILE *__stream); | |
6174 | extern wint_t getwc (__FILE *__stream); | |
6175 | ||
6176 | ||
6177 | ||
6178 | ||
6179 | ||
6180 | extern wint_t getwchar (void); | |
6181 | ||
6182 | ||
6183 | ||
6184 | ||
6185 | ||
6186 | ||
6187 | extern wint_t fputwc (wchar_t __wc, __FILE *__stream); | |
6188 | extern wint_t putwc (wchar_t __wc, __FILE *__stream); | |
6189 | ||
6190 | ||
6191 | ||
6192 | ||
6193 | ||
6194 | extern wint_t putwchar (wchar_t __wc); | |
6195 | ||
6196 | ||
6197 | ||
6198 | ||
6199 | ||
6200 | ||
6201 | ||
6202 | extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, | |
6203 | __FILE *__restrict __stream); | |
6204 | ||
6205 | ||
6206 | ||
6207 | ||
6208 | ||
6209 | extern int fputws (__const wchar_t *__restrict __ws, | |
6210 | __FILE *__restrict __stream); | |
6211 | ||
6212 | ||
6213 | ||
6214 | ||
6215 | ||
6216 | ||
6217 | extern wint_t ungetwc (wint_t __wc, __FILE *__stream); | |
6218 | ||
6219 | # 768 "/usr/include/wchar.h" 3 4 | |
6220 | extern wint_t getwc_unlocked (__FILE *__stream); | |
6221 | extern wint_t getwchar_unlocked (void); | |
6222 | ||
6223 | ||
6224 | ||
6225 | ||
6226 | ||
6227 | ||
6228 | ||
6229 | extern wint_t fgetwc_unlocked (__FILE *__stream); | |
6230 | ||
6231 | ||
6232 | ||
6233 | ||
6234 | ||
6235 | ||
6236 | ||
6237 | extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); | |
6238 | # 794 "/usr/include/wchar.h" 3 4 | |
6239 | extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); | |
6240 | extern wint_t putwchar_unlocked (wchar_t __wc); | |
6241 | # 804 "/usr/include/wchar.h" 3 4 | |
6242 | extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, | |
6243 | __FILE *__restrict __stream); | |
6244 | ||
6245 | ||
6246 | ||
6247 | ||
6248 | ||
6249 | ||
6250 | ||
6251 | extern int fputws_unlocked (__const wchar_t *__restrict __ws, | |
6252 | __FILE *__restrict __stream); | |
6253 | ||
6254 | ||
6255 | ||
6256 | ||
6257 | ||
6258 | ||
6259 | ||
6260 | extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, | |
6261 | __const wchar_t *__restrict __format, | |
6262 | __const struct tm *__restrict __tp) throw (); | |
6263 | ||
6264 | ||
6265 | ||
6266 | ||
6267 | ||
6268 | ||
6269 | ||
6270 | extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, | |
6271 | __const wchar_t *__restrict __format, | |
6272 | __const struct tm *__restrict __tp, | |
6273 | __locale_t __loc) throw (); | |
6274 | # 855 "/usr/include/wchar.h" 3 4 | |
6275 | # 1 "/usr/include/bits/wchar-ldbl.h" 1 3 4 | |
6276 | # 25 "/usr/include/bits/wchar-ldbl.h" 3 4 | |
6277 | ||
6278 | extern __typeof (fwprintf) fwprintf __asm ("" "__nldbl_" "fwprintf");; | |
6279 | extern __typeof (wprintf) wprintf __asm ("" "__nldbl_" "wprintf");; | |
6280 | extern __typeof (swprintf) swprintf __asm ("" "__nldbl_" "swprintf");; | |
6281 | extern __typeof (vfwprintf) vfwprintf __asm ("" "__nldbl_" "vfwprintf");; | |
6282 | extern __typeof (vwprintf) vwprintf __asm ("" "__nldbl_" "vwprintf");; | |
6283 | extern __typeof (vswprintf) vswprintf __asm ("" "__nldbl_" "vswprintf");; | |
6284 | extern __typeof (fwscanf) fwscanf __asm ("" "__nldbl_" "fwscanf");; | |
6285 | extern __typeof (wscanf) wscanf __asm ("" "__nldbl_" "wscanf");; | |
6286 | extern __typeof (swscanf) swscanf __asm ("" "__nldbl_" "swscanf");; | |
6287 | ||
6288 | ||
6289 | ||
6290 | ||
6291 | ||
6292 | extern __typeof (wcstold) wcstold __asm ("" "wcstod");; | |
6293 | extern __typeof (vfwscanf) vfwscanf __asm ("" "__nldbl_" "vfwscanf");; | |
6294 | extern __typeof (vwscanf) vwscanf __asm ("" "__nldbl_" "vwscanf");; | |
6295 | extern __typeof (vswscanf) vswscanf __asm ("" "__nldbl_" "vswscanf");; | |
6296 | ||
6297 | ||
6298 | ||
6299 | ||
6300 | extern __typeof (wcstold_l) wcstold_l __asm ("" "wcstod_l");; | |
6301 | ||
6302 | ||
6303 | extern __typeof (__wcstold_internal) __wcstold_internal __asm ("" "__wcstod_internal");; | |
6304 | # 856 "/usr/include/wchar.h" 2 3 4 | |
6305 | ||
6306 | ||
6307 | } | |
6308 | # 57 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 2 3 | |
6309 | # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 3 | |
6310 | namespace std | |
6311 | { | |
6312 | using ::mbstate_t; | |
6313 | } | |
6314 | # 143 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 3 | |
6315 | namespace std | |
6316 | { | |
6317 | using ::wint_t; | |
6318 | ||
6319 | using ::btowc; | |
6320 | using ::fgetwc; | |
6321 | using ::fgetws; | |
6322 | using ::fputwc; | |
6323 | using ::fputws; | |
6324 | using ::fwide; | |
6325 | using ::fwprintf; | |
6326 | using ::fwscanf; | |
6327 | using ::getwc; | |
6328 | using ::getwchar; | |
6329 | using ::mbrlen; | |
6330 | using ::mbrtowc; | |
6331 | using ::mbsinit; | |
6332 | using ::mbsrtowcs; | |
6333 | using ::putwc; | |
6334 | using ::putwchar; | |
6335 | using ::swprintf; | |
6336 | using ::swscanf; | |
6337 | using ::ungetwc; | |
6338 | using ::vfwprintf; | |
6339 | ||
6340 | using ::vfwscanf; | |
6341 | ||
6342 | using ::vswprintf; | |
6343 | ||
6344 | using ::vswscanf; | |
6345 | ||
6346 | using ::vwprintf; | |
6347 | ||
6348 | using ::vwscanf; | |
6349 | ||
6350 | using ::wcrtomb; | |
6351 | using ::wcscat; | |
6352 | using ::wcscmp; | |
6353 | using ::wcscoll; | |
6354 | using ::wcscpy; | |
6355 | using ::wcscspn; | |
6356 | ||
6357 | ||
6358 | ||
6359 | using ::wcslen; | |
6360 | using ::wcsncat; | |
6361 | using ::wcsncmp; | |
6362 | using ::wcsncpy; | |
6363 | using ::wcsrtombs; | |
6364 | using ::wcsspn; | |
6365 | using ::wcstod; | |
6366 | ||
6367 | using ::wcstof; | |
6368 | ||
6369 | using ::wcstok; | |
6370 | using ::wcstol; | |
6371 | using ::wcstoul; | |
6372 | using ::wcsxfrm; | |
6373 | using ::wctob; | |
6374 | using ::wmemcmp; | |
6375 | using ::wmemcpy; | |
6376 | using ::wmemmove; | |
6377 | using ::wmemset; | |
6378 | using ::wprintf; | |
6379 | using ::wscanf; | |
6380 | ||
6381 | using ::wcschr; | |
6382 | ||
6383 | inline wchar_t* | |
6384 | wcschr(wchar_t* __p, wchar_t __c) | |
6385 | { return wcschr(const_cast<const wchar_t*>(__p), __c); } | |
6386 | ||
6387 | using ::wcspbrk; | |
6388 | ||
6389 | inline wchar_t* | |
6390 | wcspbrk(wchar_t* __s1, const wchar_t* __s2) | |
6391 | { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } | |
6392 | ||
6393 | using ::wcsrchr; | |
6394 | ||
6395 | inline wchar_t* | |
6396 | wcsrchr(wchar_t* __p, wchar_t __c) | |
6397 | { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } | |
6398 | ||
6399 | using ::wcsstr; | |
6400 | ||
6401 | inline wchar_t* | |
6402 | wcsstr(wchar_t* __s1, const wchar_t* __s2) | |
6403 | { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } | |
6404 | ||
6405 | using ::wmemchr; | |
6406 | ||
6407 | inline wchar_t* | |
6408 | wmemchr(wchar_t* __p, wchar_t __c, size_t __n) | |
6409 | { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } | |
6410 | } | |
6411 | ||
6412 | ||
6413 | ||
6414 | ||
6415 | ||
6416 | ||
6417 | ||
6418 | namespace __gnu_cxx | |
6419 | { | |
6420 | ||
6421 | ||
6422 | ||
6423 | ||
6424 | ||
6425 | using ::wcstold; | |
6426 | # 262 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwchar" 3 | |
6427 | using ::wcstoll; | |
6428 | using ::wcstoull; | |
6429 | ||
6430 | } | |
6431 | ||
6432 | namespace std | |
6433 | { | |
6434 | using __gnu_cxx::wcstold; | |
6435 | using __gnu_cxx::wcstoll; | |
6436 | using __gnu_cxx::wcstoull; | |
6437 | } | |
6438 | ||
6439 | ||
6440 | ||
6441 | ||
6442 | #pragma GCC visibility pop | |
6443 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 2 3 | |
6444 | ||
6445 | ||
6446 | # 1 "/usr/include/stdint.h" 1 3 4 | |
6447 | # 28 "/usr/include/stdint.h" 3 4 | |
6448 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
6449 | # 29 "/usr/include/stdint.h" 2 3 4 | |
6450 | # 37 "/usr/include/stdint.h" 3 4 | |
6451 | typedef signed char int8_t; | |
6452 | typedef short int int16_t; | |
6453 | typedef int int32_t; | |
6454 | ||
6455 | ||
6456 | ||
6457 | __extension__ | |
6458 | typedef long long int int64_t; | |
6459 | ||
6460 | ||
6461 | ||
6462 | ||
6463 | typedef unsigned char uint8_t; | |
6464 | typedef unsigned short int uint16_t; | |
6465 | ||
6466 | typedef unsigned int uint32_t; | |
6467 | ||
6468 | ||
6469 | ||
6470 | ||
6471 | ||
6472 | __extension__ | |
6473 | typedef unsigned long long int uint64_t; | |
6474 | ||
6475 | ||
6476 | ||
6477 | ||
6478 | ||
6479 | ||
6480 | typedef signed char int_least8_t; | |
6481 | typedef short int int_least16_t; | |
6482 | typedef int int_least32_t; | |
6483 | ||
6484 | ||
6485 | ||
6486 | __extension__ | |
6487 | typedef long long int int_least64_t; | |
6488 | ||
6489 | ||
6490 | ||
6491 | typedef unsigned char uint_least8_t; | |
6492 | typedef unsigned short int uint_least16_t; | |
6493 | typedef unsigned int uint_least32_t; | |
6494 | ||
6495 | ||
6496 | ||
6497 | __extension__ | |
6498 | typedef unsigned long long int uint_least64_t; | |
6499 | ||
6500 | ||
6501 | ||
6502 | ||
6503 | ||
6504 | ||
6505 | typedef signed char int_fast8_t; | |
6506 | ||
6507 | ||
6508 | ||
6509 | ||
6510 | ||
6511 | typedef int int_fast16_t; | |
6512 | typedef int int_fast32_t; | |
6513 | __extension__ | |
6514 | typedef long long int int_fast64_t; | |
6515 | ||
6516 | ||
6517 | ||
6518 | typedef unsigned char uint_fast8_t; | |
6519 | ||
6520 | ||
6521 | ||
6522 | ||
6523 | ||
6524 | typedef unsigned int uint_fast16_t; | |
6525 | typedef unsigned int uint_fast32_t; | |
6526 | __extension__ | |
6527 | typedef unsigned long long int uint_fast64_t; | |
6528 | # 129 "/usr/include/stdint.h" 3 4 | |
6529 | typedef unsigned int uintptr_t; | |
6530 | # 138 "/usr/include/stdint.h" 3 4 | |
6531 | __extension__ | |
6532 | typedef long long int intmax_t; | |
6533 | __extension__ | |
6534 | typedef unsigned long long int uintmax_t; | |
6535 | # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 2 3 | |
6536 | ||
6537 | ||
6538 | namespace std | |
6539 | { | |
6540 | # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 3 | |
6541 | typedef int64_t streamoff; | |
6542 | ||
6543 | ||
6544 | ||
6545 | ||
6546 | ||
6547 | typedef ptrdiff_t streamsize; | |
6548 | ||
6549 | template<typename _StateT> | |
6550 | class fpos; | |
6551 | # 94 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 3 | |
6552 | template<typename _StateT> | |
6553 | class fpos | |
6554 | { | |
6555 | private: | |
6556 | streamoff _M_off; | |
6557 | _StateT _M_state; | |
6558 | ||
6559 | public: | |
6560 | ||
6561 | ||
6562 | ||
6563 | ||
6564 | fpos() | |
6565 | : _M_off(0), _M_state() { } | |
6566 | # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/postypes.h" 3 | |
6567 | fpos(streamoff __off) | |
6568 | : _M_off(__off), _M_state() { } | |
6569 | ||
6570 | ||
6571 | operator streamoff() const { return _M_off; } | |
6572 | ||
6573 | ||
6574 | void | |
6575 | state(_StateT __st) | |
6576 | { _M_state = __st; } | |
6577 | ||
6578 | ||
6579 | _StateT | |
6580 | state() const | |
6581 | { return _M_state; } | |
6582 | ||
6583 | ||
6584 | ||
6585 | ||
6586 | ||
6587 | ||
6588 | bool | |
6589 | operator==(const fpos& __other) const | |
6590 | { return _M_off == __other._M_off; } | |
6591 | ||
6592 | ||
6593 | bool | |
6594 | operator!=(const fpos& __other) const | |
6595 | { return _M_off != __other._M_off; } | |
6596 | ||
6597 | ||
6598 | ||
6599 | ||
6600 | ||
6601 | fpos& | |
6602 | operator+=(streamoff __off) | |
6603 | { | |
6604 | _M_off += __off; | |
6605 | return *this; | |
6606 | } | |
6607 | ||
6608 | ||
6609 | ||
6610 | ||
6611 | ||
6612 | fpos& | |
6613 | operator-=(streamoff __off) | |
6614 | { | |
6615 | _M_off -= __off; | |
6616 | return *this; | |
6617 | } | |
6618 | ||
6619 | ||
6620 | ||
6621 | ||
6622 | ||
6623 | ||
6624 | ||
6625 | fpos | |
6626 | operator+(streamoff __off) const | |
6627 | { | |
6628 | fpos __pos(*this); | |
6629 | __pos += __off; | |
6630 | return __pos; | |
6631 | } | |
6632 | ||
6633 | ||
6634 | ||
6635 | ||
6636 | ||
6637 | ||
6638 | ||
6639 | fpos | |
6640 | operator-(streamoff __off) const | |
6641 | { | |
6642 | fpos __pos(*this); | |
6643 | __pos -= __off; | |
6644 | return __pos; | |
6645 | } | |
6646 | ||
6647 | ||
6648 | ||
6649 | ||
6650 | ||
6651 | ||
6652 | streamoff | |
6653 | operator-(const fpos& __other) const | |
6654 | { return _M_off - __other._M_off; } | |
6655 | }; | |
6656 | ||
6657 | ||
6658 | ||
6659 | ||
6660 | ||
6661 | typedef fpos<mbstate_t> streampos; | |
6662 | ||
6663 | typedef fpos<mbstate_t> wstreampos; | |
6664 | } | |
6665 | # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 2 3 | |
6666 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/functexcept.h" 1 3 | |
6667 | # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/functexcept.h" 3 | |
6668 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/exception_defines.h" 1 3 | |
6669 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/functexcept.h" 2 3 | |
6670 | ||
6671 | namespace std | |
6672 | { | |
6673 | ||
6674 | void | |
6675 | __throw_bad_exception(void) __attribute__((__noreturn__)); | |
6676 | ||
6677 | ||
6678 | void | |
6679 | __throw_bad_alloc(void) __attribute__((__noreturn__)); | |
6680 | ||
6681 | ||
6682 | void | |
6683 | __throw_bad_cast(void) __attribute__((__noreturn__)); | |
6684 | ||
6685 | void | |
6686 | __throw_bad_typeid(void) __attribute__((__noreturn__)); | |
6687 | ||
6688 | ||
6689 | void | |
6690 | __throw_logic_error(const char*) __attribute__((__noreturn__)); | |
6691 | ||
6692 | void | |
6693 | __throw_domain_error(const char*) __attribute__((__noreturn__)); | |
6694 | ||
6695 | void | |
6696 | __throw_invalid_argument(const char*) __attribute__((__noreturn__)); | |
6697 | ||
6698 | void | |
6699 | __throw_length_error(const char*) __attribute__((__noreturn__)); | |
6700 | ||
6701 | void | |
6702 | __throw_out_of_range(const char*) __attribute__((__noreturn__)); | |
6703 | ||
6704 | void | |
6705 | __throw_runtime_error(const char*) __attribute__((__noreturn__)); | |
6706 | ||
6707 | void | |
6708 | __throw_range_error(const char*) __attribute__((__noreturn__)); | |
6709 | ||
6710 | void | |
6711 | __throw_overflow_error(const char*) __attribute__((__noreturn__)); | |
6712 | ||
6713 | void | |
6714 | __throw_underflow_error(const char*) __attribute__((__noreturn__)); | |
6715 | ||
6716 | ||
6717 | void | |
6718 | __throw_ios_failure(const char*) __attribute__((__noreturn__)); | |
6719 | } | |
6720 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 2 3 | |
6721 | ||
6722 | namespace std | |
6723 | { | |
6724 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6725 | class basic_ios; | |
6726 | ||
6727 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6728 | class basic_streambuf; | |
6729 | ||
6730 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6731 | class basic_istream; | |
6732 | ||
6733 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6734 | class basic_ostream; | |
6735 | ||
6736 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6737 | class basic_iostream; | |
6738 | ||
6739 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
6740 | typename _Alloc = allocator<_CharT> > | |
6741 | class basic_stringbuf; | |
6742 | ||
6743 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
6744 | typename _Alloc = allocator<_CharT> > | |
6745 | class basic_istringstream; | |
6746 | ||
6747 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
6748 | typename _Alloc = allocator<_CharT> > | |
6749 | class basic_ostringstream; | |
6750 | ||
6751 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
6752 | typename _Alloc = allocator<_CharT> > | |
6753 | class basic_stringstream; | |
6754 | ||
6755 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6756 | class basic_filebuf; | |
6757 | ||
6758 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6759 | class basic_ifstream; | |
6760 | ||
6761 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6762 | class basic_ofstream; | |
6763 | ||
6764 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6765 | class basic_fstream; | |
6766 | ||
6767 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6768 | class istreambuf_iterator; | |
6769 | ||
6770 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
6771 | class ostreambuf_iterator; | |
6772 | ||
6773 | ||
6774 | ||
6775 | class ios_base; | |
6776 | # 136 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iosfwd" 3 | |
6777 | typedef basic_ios<char> ios; | |
6778 | typedef basic_streambuf<char> streambuf; | |
6779 | typedef basic_istream<char> istream; | |
6780 | typedef basic_ostream<char> ostream; | |
6781 | typedef basic_iostream<char> iostream; | |
6782 | typedef basic_stringbuf<char> stringbuf; | |
6783 | typedef basic_istringstream<char> istringstream; | |
6784 | typedef basic_ostringstream<char> ostringstream; | |
6785 | typedef basic_stringstream<char> stringstream; | |
6786 | typedef basic_filebuf<char> filebuf; | |
6787 | typedef basic_ifstream<char> ifstream; | |
6788 | typedef basic_ofstream<char> ofstream; | |
6789 | typedef basic_fstream<char> fstream; | |
6790 | ||
6791 | ||
6792 | typedef basic_ios<wchar_t> wios; | |
6793 | typedef basic_streambuf<wchar_t> wstreambuf; | |
6794 | typedef basic_istream<wchar_t> wistream; | |
6795 | typedef basic_ostream<wchar_t> wostream; | |
6796 | typedef basic_iostream<wchar_t> wiostream; | |
6797 | typedef basic_stringbuf<wchar_t> wstringbuf; | |
6798 | typedef basic_istringstream<wchar_t> wistringstream; | |
6799 | typedef basic_ostringstream<wchar_t> wostringstream; | |
6800 | typedef basic_stringstream<wchar_t> wstringstream; | |
6801 | typedef basic_filebuf<wchar_t> wfilebuf; | |
6802 | typedef basic_ifstream<wchar_t> wifstream; | |
6803 | typedef basic_ofstream<wchar_t> wofstream; | |
6804 | typedef basic_fstream<wchar_t> wfstream; | |
6805 | ||
6806 | ||
6807 | } | |
6808 | ||
6809 | #pragma GCC visibility pop | |
6810 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 2 3 | |
6811 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/exception" 1 3 | |
6812 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/exception" 3 | |
6813 | #pragma GCC visibility push(default) | |
6814 | ||
6815 | extern "C++" { | |
6816 | ||
6817 | namespace std | |
6818 | { | |
6819 | # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/exception" 3 | |
6820 | class exception | |
6821 | { | |
6822 | public: | |
6823 | exception() throw() { } | |
6824 | virtual ~exception() throw(); | |
6825 | ||
6826 | ||
6827 | virtual const char* what() const throw(); | |
6828 | }; | |
6829 | ||
6830 | ||
6831 | ||
6832 | class bad_exception : public exception | |
6833 | { | |
6834 | public: | |
6835 | bad_exception() throw() { } | |
6836 | ||
6837 | ||
6838 | virtual ~bad_exception() throw(); | |
6839 | }; | |
6840 | ||
6841 | ||
6842 | typedef void (*terminate_handler) (); | |
6843 | ||
6844 | typedef void (*unexpected_handler) (); | |
6845 | ||
6846 | ||
6847 | terminate_handler set_terminate(terminate_handler) throw(); | |
6848 | ||
6849 | ||
6850 | void terminate() __attribute__ ((__noreturn__)); | |
6851 | ||
6852 | ||
6853 | unexpected_handler set_unexpected(unexpected_handler) throw(); | |
6854 | ||
6855 | ||
6856 | void unexpected() __attribute__ ((__noreturn__)); | |
6857 | # 102 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/exception" 3 | |
6858 | bool uncaught_exception() throw(); | |
6859 | } | |
6860 | ||
6861 | namespace __gnu_cxx | |
6862 | { | |
6863 | # 117 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/exception" 3 | |
6864 | void __verbose_terminate_handler (); | |
6865 | } | |
6866 | ||
6867 | } | |
6868 | ||
6869 | #pragma GCC visibility pop | |
6870 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 2 3 | |
6871 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/char_traits.h" 1 3 | |
6872 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/char_traits.h" 3 | |
6873 | ||
6874 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/char_traits.h" 3 | |
6875 | ||
6876 | ||
6877 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 1 3 | |
6878 | # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
6879 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/climits" 1 3 | |
6880 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/climits" 3 | |
6881 | ||
6882 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/climits" 3 | |
6883 | #pragma GCC visibility push(default) | |
6884 | ||
6885 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/limits.h" 1 3 4 | |
6886 | # 11 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/limits.h" 3 4 | |
6887 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/syslimits.h" 1 3 4 | |
6888 | ||
6889 | ||
6890 | ||
6891 | ||
6892 | ||
6893 | ||
6894 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/limits.h" 1 3 4 | |
6895 | # 122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/limits.h" 3 4 | |
6896 | # 1 "/usr/include/limits.h" 1 3 4 | |
6897 | # 145 "/usr/include/limits.h" 3 4 | |
6898 | # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 | |
6899 | # 153 "/usr/include/bits/posix1_lim.h" 3 4 | |
6900 | # 1 "/usr/include/bits/local_lim.h" 1 3 4 | |
6901 | # 36 "/usr/include/bits/local_lim.h" 3 4 | |
6902 | # 1 "/usr/include/linux/limits.h" 1 3 4 | |
6903 | # 37 "/usr/include/bits/local_lim.h" 2 3 4 | |
6904 | # 154 "/usr/include/bits/posix1_lim.h" 2 3 4 | |
6905 | # 146 "/usr/include/limits.h" 2 3 4 | |
6906 | ||
6907 | ||
6908 | ||
6909 | # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 | |
6910 | # 150 "/usr/include/limits.h" 2 3 4 | |
6911 | ||
6912 | ||
6913 | ||
6914 | # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 | |
6915 | # 34 "/usr/include/bits/xopen_lim.h" 3 4 | |
6916 | # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 | |
6917 | # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 | |
6918 | # 154 "/usr/include/limits.h" 2 3 4 | |
6919 | # 123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/limits.h" 2 3 4 | |
6920 | # 8 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/syslimits.h" 2 3 4 | |
6921 | # 12 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/limits.h" 2 3 4 | |
6922 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/climits" 2 3 | |
6923 | ||
6924 | #pragma GCC visibility pop | |
6925 | # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
6926 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 1 3 | |
6927 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 3 | |
6928 | ||
6929 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 3 | |
6930 | #pragma GCC visibility push(default) | |
6931 | # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 3 | |
6932 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
6933 | # 33 "/usr/include/stdlib.h" 3 4 | |
6934 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
6935 | # 34 "/usr/include/stdlib.h" 2 3 4 | |
6936 | ||
6937 | extern "C" { | |
6938 | ||
6939 | ||
6940 | ||
6941 | ||
6942 | ||
6943 | ||
6944 | # 1 "/usr/include/bits/waitflags.h" 1 3 4 | |
6945 | # 43 "/usr/include/stdlib.h" 2 3 4 | |
6946 | # 1 "/usr/include/bits/waitstatus.h" 1 3 4 | |
6947 | # 67 "/usr/include/bits/waitstatus.h" 3 4 | |
6948 | union wait | |
6949 | { | |
6950 | int w_status; | |
6951 | struct | |
6952 | { | |
6953 | ||
6954 | ||
6955 | ||
6956 | ||
6957 | ||
6958 | ||
6959 | ||
6960 | unsigned int:16; | |
6961 | unsigned int __w_retcode:8; | |
6962 | unsigned int __w_coredump:1; | |
6963 | unsigned int __w_termsig:7; | |
6964 | ||
6965 | } __wait_terminated; | |
6966 | struct | |
6967 | { | |
6968 | ||
6969 | ||
6970 | ||
6971 | ||
6972 | ||
6973 | ||
6974 | unsigned int:16; | |
6975 | unsigned int __w_stopsig:8; | |
6976 | unsigned int __w_stopval:8; | |
6977 | ||
6978 | } __wait_stopped; | |
6979 | }; | |
6980 | # 44 "/usr/include/stdlib.h" 2 3 4 | |
6981 | # 96 "/usr/include/stdlib.h" 3 4 | |
6982 | ||
6983 | ||
6984 | typedef struct | |
6985 | { | |
6986 | int quot; | |
6987 | int rem; | |
6988 | } div_t; | |
6989 | ||
6990 | ||
6991 | ||
6992 | typedef struct | |
6993 | { | |
6994 | long int quot; | |
6995 | long int rem; | |
6996 | } ldiv_t; | |
6997 | ||
6998 | ||
6999 | ||
7000 | ||
7001 | ||
7002 | ||
7003 | ||
7004 | __extension__ typedef struct | |
7005 | { | |
7006 | long long int quot; | |
7007 | long long int rem; | |
7008 | } lldiv_t; | |
7009 | ||
7010 | ||
7011 | # 140 "/usr/include/stdlib.h" 3 4 | |
7012 | extern size_t __ctype_get_mb_cur_max (void) throw () ; | |
7013 | ||
7014 | ||
7015 | ||
7016 | ||
7017 | extern double atof (__const char *__nptr) | |
7018 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
7019 | ||
7020 | extern int atoi (__const char *__nptr) | |
7021 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
7022 | ||
7023 | extern long int atol (__const char *__nptr) | |
7024 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
7025 | ||
7026 | ||
7027 | ||
7028 | ||
7029 | ||
7030 | __extension__ extern long long int atoll (__const char *__nptr) | |
7031 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
7032 | ||
7033 | ||
7034 | ||
7035 | ||
7036 | ||
7037 | extern double strtod (__const char *__restrict __nptr, | |
7038 | char **__restrict __endptr) | |
7039 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7040 | ||
7041 | ||
7042 | ||
7043 | ||
7044 | ||
7045 | extern float strtof (__const char *__restrict __nptr, | |
7046 | char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; | |
7047 | ||
7048 | extern long double strtold (__const char *__restrict __nptr, | |
7049 | char **__restrict __endptr) | |
7050 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7051 | ||
7052 | ||
7053 | ||
7054 | ||
7055 | ||
7056 | extern long int strtol (__const char *__restrict __nptr, | |
7057 | char **__restrict __endptr, int __base) | |
7058 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7059 | ||
7060 | extern unsigned long int strtoul (__const char *__restrict __nptr, | |
7061 | char **__restrict __endptr, int __base) | |
7062 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7063 | ||
7064 | ||
7065 | ||
7066 | ||
7067 | __extension__ | |
7068 | extern long long int strtoq (__const char *__restrict __nptr, | |
7069 | char **__restrict __endptr, int __base) | |
7070 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7071 | ||
7072 | __extension__ | |
7073 | extern unsigned long long int strtouq (__const char *__restrict __nptr, | |
7074 | char **__restrict __endptr, int __base) | |
7075 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7076 | ||
7077 | ||
7078 | ||
7079 | ||
7080 | ||
7081 | __extension__ | |
7082 | extern long long int strtoll (__const char *__restrict __nptr, | |
7083 | char **__restrict __endptr, int __base) | |
7084 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7085 | ||
7086 | __extension__ | |
7087 | extern unsigned long long int strtoull (__const char *__restrict __nptr, | |
7088 | char **__restrict __endptr, int __base) | |
7089 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7090 | ||
7091 | # 240 "/usr/include/stdlib.h" 3 4 | |
7092 | extern long int strtol_l (__const char *__restrict __nptr, | |
7093 | char **__restrict __endptr, int __base, | |
7094 | __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
7095 | ||
7096 | extern unsigned long int strtoul_l (__const char *__restrict __nptr, | |
7097 | char **__restrict __endptr, | |
7098 | int __base, __locale_t __loc) | |
7099 | throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
7100 | ||
7101 | __extension__ | |
7102 | extern long long int strtoll_l (__const char *__restrict __nptr, | |
7103 | char **__restrict __endptr, int __base, | |
7104 | __locale_t __loc) | |
7105 | throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
7106 | ||
7107 | __extension__ | |
7108 | extern unsigned long long int strtoull_l (__const char *__restrict __nptr, | |
7109 | char **__restrict __endptr, | |
7110 | int __base, __locale_t __loc) | |
7111 | throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
7112 | ||
7113 | extern double strtod_l (__const char *__restrict __nptr, | |
7114 | char **__restrict __endptr, __locale_t __loc) | |
7115 | throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
7116 | ||
7117 | extern float strtof_l (__const char *__restrict __nptr, | |
7118 | char **__restrict __endptr, __locale_t __loc) | |
7119 | throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
7120 | ||
7121 | extern long double strtold_l (__const char *__restrict __nptr, | |
7122 | char **__restrict __endptr, | |
7123 | __locale_t __loc) | |
7124 | throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
7125 | ||
7126 | ||
7127 | ||
7128 | ||
7129 | ||
7130 | ||
7131 | extern double __strtod_internal (__const char *__restrict __nptr, | |
7132 | char **__restrict __endptr, int __group) | |
7133 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7134 | extern float __strtof_internal (__const char *__restrict __nptr, | |
7135 | char **__restrict __endptr, int __group) | |
7136 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7137 | extern long double __strtold_internal (__const char *__restrict __nptr, | |
7138 | char **__restrict __endptr, | |
7139 | int __group) | |
7140 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7141 | ||
7142 | extern long int __strtol_internal (__const char *__restrict __nptr, | |
7143 | char **__restrict __endptr, | |
7144 | int __base, int __group) | |
7145 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7146 | ||
7147 | ||
7148 | ||
7149 | extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, | |
7150 | char **__restrict __endptr, | |
7151 | int __base, int __group) | |
7152 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7153 | ||
7154 | ||
7155 | ||
7156 | ||
7157 | __extension__ | |
7158 | extern long long int __strtoll_internal (__const char *__restrict __nptr, | |
7159 | char **__restrict __endptr, | |
7160 | int __base, int __group) | |
7161 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7162 | ||
7163 | ||
7164 | ||
7165 | __extension__ | |
7166 | extern unsigned long long int __strtoull_internal (__const char * | |
7167 | __restrict __nptr, | |
7168 | char **__restrict __endptr, | |
7169 | int __base, int __group) | |
7170 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7171 | ||
7172 | ||
7173 | ||
7174 | ||
7175 | ||
7176 | ||
7177 | ||
7178 | ||
7179 | extern __inline double | |
7180 | strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () | |
7181 | { | |
7182 | return __strtod_internal (__nptr, __endptr, 0); | |
7183 | } | |
7184 | extern __inline long int | |
7185 | strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
7186 | ||
7187 | { | |
7188 | return __strtol_internal (__nptr, __endptr, __base, 0); | |
7189 | } | |
7190 | extern __inline unsigned long int | |
7191 | strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
7192 | ||
7193 | { | |
7194 | return __strtoul_internal (__nptr, __endptr, __base, 0); | |
7195 | } | |
7196 | ||
7197 | ||
7198 | ||
7199 | ||
7200 | extern __inline float | |
7201 | strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () | |
7202 | { | |
7203 | return __strtof_internal (__nptr, __endptr, 0); | |
7204 | } | |
7205 | ||
7206 | ||
7207 | ||
7208 | ||
7209 | ||
7210 | ||
7211 | ||
7212 | ||
7213 | ||
7214 | ||
7215 | ||
7216 | __extension__ extern __inline long long int | |
7217 | strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
7218 | ||
7219 | { | |
7220 | return __strtoll_internal (__nptr, __endptr, __base, 0); | |
7221 | } | |
7222 | __extension__ extern __inline unsigned long long int | |
7223 | strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
7224 | ||
7225 | { | |
7226 | return __strtoull_internal (__nptr, __endptr, __base, 0); | |
7227 | } | |
7228 | ||
7229 | ||
7230 | ||
7231 | ||
7232 | __extension__ extern __inline long long int | |
7233 | strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
7234 | ||
7235 | { | |
7236 | return __strtoll_internal (__nptr, __endptr, __base, 0); | |
7237 | } | |
7238 | __extension__ extern __inline unsigned long long int | |
7239 | strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw () | |
7240 | ||
7241 | { | |
7242 | return __strtoull_internal (__nptr, __endptr, __base, 0); | |
7243 | } | |
7244 | ||
7245 | ||
7246 | ||
7247 | ||
7248 | extern __inline double | |
7249 | atof (__const char *__nptr) throw () | |
7250 | { | |
7251 | return strtod (__nptr, (char **) __null); | |
7252 | } | |
7253 | extern __inline int | |
7254 | atoi (__const char *__nptr) throw () | |
7255 | { | |
7256 | return (int) strtol (__nptr, (char **) __null, 10); | |
7257 | } | |
7258 | extern __inline long int | |
7259 | atol (__const char *__nptr) throw () | |
7260 | { | |
7261 | return strtol (__nptr, (char **) __null, 10); | |
7262 | } | |
7263 | ||
7264 | ||
7265 | ||
7266 | ||
7267 | __extension__ extern __inline long long int | |
7268 | atoll (__const char *__nptr) throw () | |
7269 | { | |
7270 | return strtoll (__nptr, (char **) __null, 10); | |
7271 | } | |
7272 | ||
7273 | # 429 "/usr/include/stdlib.h" 3 4 | |
7274 | extern char *l64a (long int __n) throw () ; | |
7275 | ||
7276 | ||
7277 | extern long int a64l (__const char *__s) | |
7278 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
7279 | ||
7280 | ||
7281 | ||
7282 | ||
7283 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
7284 | # 29 "/usr/include/sys/types.h" 3 4 | |
7285 | extern "C" { | |
7286 | ||
7287 | ||
7288 | ||
7289 | ||
7290 | ||
7291 | typedef __u_char u_char; | |
7292 | typedef __u_short u_short; | |
7293 | typedef __u_int u_int; | |
7294 | typedef __u_long u_long; | |
7295 | typedef __quad_t quad_t; | |
7296 | typedef __u_quad_t u_quad_t; | |
7297 | typedef __fsid_t fsid_t; | |
7298 | ||
7299 | ||
7300 | ||
7301 | ||
7302 | typedef __loff_t loff_t; | |
7303 | ||
7304 | ||
7305 | ||
7306 | typedef __ino_t ino_t; | |
7307 | ||
7308 | ||
7309 | ||
7310 | ||
7311 | ||
7312 | ||
7313 | typedef __ino64_t ino64_t; | |
7314 | ||
7315 | ||
7316 | ||
7317 | ||
7318 | typedef __dev_t dev_t; | |
7319 | # 72 "/usr/include/sys/types.h" 3 4 | |
7320 | typedef __mode_t mode_t; | |
7321 | ||
7322 | ||
7323 | ||
7324 | ||
7325 | typedef __nlink_t nlink_t; | |
7326 | # 105 "/usr/include/sys/types.h" 3 4 | |
7327 | typedef __id_t id_t; | |
7328 | # 116 "/usr/include/sys/types.h" 3 4 | |
7329 | typedef __daddr_t daddr_t; | |
7330 | typedef __caddr_t caddr_t; | |
7331 | ||
7332 | ||
7333 | ||
7334 | ||
7335 | ||
7336 | typedef __key_t key_t; | |
7337 | # 141 "/usr/include/sys/types.h" 3 4 | |
7338 | typedef __suseconds_t suseconds_t; | |
7339 | ||
7340 | ||
7341 | ||
7342 | ||
7343 | ||
7344 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
7345 | # 148 "/usr/include/sys/types.h" 2 3 4 | |
7346 | ||
7347 | ||
7348 | ||
7349 | typedef unsigned long int ulong; | |
7350 | typedef unsigned short int ushort; | |
7351 | typedef unsigned int uint; | |
7352 | # 201 "/usr/include/sys/types.h" 3 4 | |
7353 | typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); | |
7354 | typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); | |
7355 | typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); | |
7356 | typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); | |
7357 | ||
7358 | typedef int register_t __attribute__ ((__mode__ (__word__))); | |
7359 | # 220 "/usr/include/sys/types.h" 3 4 | |
7360 | # 1 "/usr/include/sys/select.h" 1 3 4 | |
7361 | # 31 "/usr/include/sys/select.h" 3 4 | |
7362 | # 1 "/usr/include/bits/select.h" 1 3 4 | |
7363 | # 32 "/usr/include/sys/select.h" 2 3 4 | |
7364 | ||
7365 | ||
7366 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
7367 | # 35 "/usr/include/sys/select.h" 2 3 4 | |
7368 | # 46 "/usr/include/sys/select.h" 3 4 | |
7369 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
7370 | # 69 "/usr/include/bits/time.h" 3 4 | |
7371 | struct timeval | |
7372 | { | |
7373 | __time_t tv_sec; | |
7374 | __suseconds_t tv_usec; | |
7375 | }; | |
7376 | # 47 "/usr/include/sys/select.h" 2 3 4 | |
7377 | # 55 "/usr/include/sys/select.h" 3 4 | |
7378 | typedef long int __fd_mask; | |
7379 | # 67 "/usr/include/sys/select.h" 3 4 | |
7380 | typedef struct | |
7381 | { | |
7382 | ||
7383 | ||
7384 | ||
7385 | __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; | |
7386 | ||
7387 | ||
7388 | ||
7389 | ||
7390 | ||
7391 | } fd_set; | |
7392 | ||
7393 | ||
7394 | ||
7395 | ||
7396 | ||
7397 | ||
7398 | typedef __fd_mask fd_mask; | |
7399 | # 99 "/usr/include/sys/select.h" 3 4 | |
7400 | extern "C" { | |
7401 | # 109 "/usr/include/sys/select.h" 3 4 | |
7402 | extern int select (int __nfds, fd_set *__restrict __readfds, | |
7403 | fd_set *__restrict __writefds, | |
7404 | fd_set *__restrict __exceptfds, | |
7405 | struct timeval *__restrict __timeout); | |
7406 | # 121 "/usr/include/sys/select.h" 3 4 | |
7407 | extern int pselect (int __nfds, fd_set *__restrict __readfds, | |
7408 | fd_set *__restrict __writefds, | |
7409 | fd_set *__restrict __exceptfds, | |
7410 | const struct timespec *__restrict __timeout, | |
7411 | const __sigset_t *__restrict __sigmask); | |
7412 | ||
7413 | ||
7414 | } | |
7415 | # 221 "/usr/include/sys/types.h" 2 3 4 | |
7416 | ||
7417 | ||
7418 | # 1 "/usr/include/sys/sysmacros.h" 1 3 4 | |
7419 | # 29 "/usr/include/sys/sysmacros.h" 3 4 | |
7420 | __extension__ | |
7421 | extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) | |
7422 | throw (); | |
7423 | __extension__ | |
7424 | extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) | |
7425 | throw (); | |
7426 | __extension__ | |
7427 | extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, | |
7428 | unsigned int __minor) | |
7429 | throw (); | |
7430 | ||
7431 | ||
7432 | __extension__ extern __inline unsigned int | |
7433 | gnu_dev_major (unsigned long long int __dev) throw () | |
7434 | { | |
7435 | return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); | |
7436 | } | |
7437 | ||
7438 | __extension__ extern __inline unsigned int | |
7439 | gnu_dev_minor (unsigned long long int __dev) throw () | |
7440 | { | |
7441 | return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); | |
7442 | } | |
7443 | ||
7444 | __extension__ extern __inline unsigned long long int | |
7445 | gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () | |
7446 | { | |
7447 | return ((__minor & 0xff) | ((__major & 0xfff) << 8) | |
7448 | | (((unsigned long long int) (__minor & ~0xff)) << 12) | |
7449 | | (((unsigned long long int) (__major & ~0xfff)) << 32)); | |
7450 | } | |
7451 | # 224 "/usr/include/sys/types.h" 2 3 4 | |
7452 | ||
7453 | ||
7454 | ||
7455 | ||
7456 | typedef __blksize_t blksize_t; | |
7457 | ||
7458 | ||
7459 | ||
7460 | ||
7461 | ||
7462 | ||
7463 | typedef __blkcnt_t blkcnt_t; | |
7464 | ||
7465 | ||
7466 | ||
7467 | typedef __fsblkcnt_t fsblkcnt_t; | |
7468 | ||
7469 | ||
7470 | ||
7471 | typedef __fsfilcnt_t fsfilcnt_t; | |
7472 | # 262 "/usr/include/sys/types.h" 3 4 | |
7473 | typedef __blkcnt64_t blkcnt64_t; | |
7474 | typedef __fsblkcnt64_t fsblkcnt64_t; | |
7475 | typedef __fsfilcnt64_t fsfilcnt64_t; | |
7476 | # 273 "/usr/include/sys/types.h" 3 4 | |
7477 | } | |
7478 | # 439 "/usr/include/stdlib.h" 2 3 4 | |
7479 | ||
7480 | ||
7481 | ||
7482 | ||
7483 | ||
7484 | ||
7485 | extern long int random (void) throw (); | |
7486 | ||
7487 | ||
7488 | extern void srandom (unsigned int __seed) throw (); | |
7489 | ||
7490 | ||
7491 | ||
7492 | ||
7493 | ||
7494 | extern char *initstate (unsigned int __seed, char *__statebuf, | |
7495 | size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); | |
7496 | ||
7497 | ||
7498 | ||
7499 | extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); | |
7500 | ||
7501 | ||
7502 | ||
7503 | ||
7504 | ||
7505 | ||
7506 | ||
7507 | struct random_data | |
7508 | { | |
7509 | int32_t *fptr; | |
7510 | int32_t *rptr; | |
7511 | int32_t *state; | |
7512 | int rand_type; | |
7513 | int rand_deg; | |
7514 | int rand_sep; | |
7515 | int32_t *end_ptr; | |
7516 | }; | |
7517 | ||
7518 | extern int random_r (struct random_data *__restrict __buf, | |
7519 | int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
7520 | ||
7521 | extern int srandom_r (unsigned int __seed, struct random_data *__buf) | |
7522 | throw () __attribute__ ((__nonnull__ (2))); | |
7523 | ||
7524 | extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, | |
7525 | size_t __statelen, | |
7526 | struct random_data *__restrict __buf) | |
7527 | throw () __attribute__ ((__nonnull__ (2, 4))); | |
7528 | ||
7529 | extern int setstate_r (char *__restrict __statebuf, | |
7530 | struct random_data *__restrict __buf) | |
7531 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7532 | ||
7533 | ||
7534 | ||
7535 | ||
7536 | ||
7537 | ||
7538 | extern int rand (void) throw (); | |
7539 | ||
7540 | extern void srand (unsigned int __seed) throw (); | |
7541 | ||
7542 | ||
7543 | ||
7544 | ||
7545 | extern int rand_r (unsigned int *__seed) throw (); | |
7546 | ||
7547 | ||
7548 | ||
7549 | ||
7550 | ||
7551 | ||
7552 | ||
7553 | extern double drand48 (void) throw (); | |
7554 | extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); | |
7555 | ||
7556 | ||
7557 | extern long int lrand48 (void) throw (); | |
7558 | extern long int nrand48 (unsigned short int __xsubi[3]) | |
7559 | throw () __attribute__ ((__nonnull__ (1))); | |
7560 | ||
7561 | ||
7562 | extern long int mrand48 (void) throw (); | |
7563 | extern long int jrand48 (unsigned short int __xsubi[3]) | |
7564 | throw () __attribute__ ((__nonnull__ (1))); | |
7565 | ||
7566 | ||
7567 | extern void srand48 (long int __seedval) throw (); | |
7568 | extern unsigned short int *seed48 (unsigned short int __seed16v[3]) | |
7569 | throw () __attribute__ ((__nonnull__ (1))); | |
7570 | extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); | |
7571 | ||
7572 | ||
7573 | ||
7574 | ||
7575 | ||
7576 | struct drand48_data | |
7577 | { | |
7578 | unsigned short int __x[3]; | |
7579 | unsigned short int __old_x[3]; | |
7580 | unsigned short int __c; | |
7581 | unsigned short int __init; | |
7582 | unsigned long long int __a; | |
7583 | }; | |
7584 | ||
7585 | ||
7586 | extern int drand48_r (struct drand48_data *__restrict __buffer, | |
7587 | double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
7588 | extern int erand48_r (unsigned short int __xsubi[3], | |
7589 | struct drand48_data *__restrict __buffer, | |
7590 | double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
7591 | ||
7592 | ||
7593 | extern int lrand48_r (struct drand48_data *__restrict __buffer, | |
7594 | long int *__restrict __result) | |
7595 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7596 | extern int nrand48_r (unsigned short int __xsubi[3], | |
7597 | struct drand48_data *__restrict __buffer, | |
7598 | long int *__restrict __result) | |
7599 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7600 | ||
7601 | ||
7602 | extern int mrand48_r (struct drand48_data *__restrict __buffer, | |
7603 | long int *__restrict __result) | |
7604 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7605 | extern int jrand48_r (unsigned short int __xsubi[3], | |
7606 | struct drand48_data *__restrict __buffer, | |
7607 | long int *__restrict __result) | |
7608 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7609 | ||
7610 | ||
7611 | extern int srand48_r (long int __seedval, struct drand48_data *__buffer) | |
7612 | throw () __attribute__ ((__nonnull__ (2))); | |
7613 | ||
7614 | extern int seed48_r (unsigned short int __seed16v[3], | |
7615 | struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); | |
7616 | ||
7617 | extern int lcong48_r (unsigned short int __param[7], | |
7618 | struct drand48_data *__buffer) | |
7619 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7620 | ||
7621 | ||
7622 | ||
7623 | ||
7624 | ||
7625 | ||
7626 | ||
7627 | ||
7628 | ||
7629 | extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; | |
7630 | ||
7631 | extern void *calloc (size_t __nmemb, size_t __size) | |
7632 | throw () __attribute__ ((__malloc__)) ; | |
7633 | ||
7634 | ||
7635 | ||
7636 | ||
7637 | ||
7638 | ||
7639 | ||
7640 | extern void *realloc (void *__ptr, size_t __size) | |
7641 | throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
7642 | ||
7643 | extern void free (void *__ptr) throw (); | |
7644 | ||
7645 | ||
7646 | ||
7647 | ||
7648 | extern void cfree (void *__ptr) throw (); | |
7649 | ||
7650 | ||
7651 | ||
7652 | # 1 "/usr/include/alloca.h" 1 3 4 | |
7653 | # 25 "/usr/include/alloca.h" 3 4 | |
7654 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
7655 | # 26 "/usr/include/alloca.h" 2 3 4 | |
7656 | ||
7657 | extern "C" { | |
7658 | ||
7659 | ||
7660 | ||
7661 | ||
7662 | ||
7663 | extern void *alloca (size_t __size) throw (); | |
7664 | ||
7665 | ||
7666 | ||
7667 | ||
7668 | ||
7669 | } | |
7670 | # 613 "/usr/include/stdlib.h" 2 3 4 | |
7671 | ||
7672 | ||
7673 | ||
7674 | ||
7675 | extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; | |
7676 | ||
7677 | ||
7678 | ||
7679 | ||
7680 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) | |
7681 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7682 | ||
7683 | ||
7684 | ||
7685 | ||
7686 | extern void abort (void) throw () __attribute__ ((__noreturn__)); | |
7687 | ||
7688 | ||
7689 | ||
7690 | extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); | |
7691 | ||
7692 | ||
7693 | ||
7694 | ||
7695 | ||
7696 | extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) | |
7697 | throw () __attribute__ ((__nonnull__ (1))); | |
7698 | ||
7699 | ||
7700 | ||
7701 | ||
7702 | ||
7703 | ||
7704 | extern void exit (int __status) throw () __attribute__ ((__noreturn__)); | |
7705 | ||
7706 | ||
7707 | ||
7708 | ||
7709 | ||
7710 | ||
7711 | extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); | |
7712 | ||
7713 | ||
7714 | ||
7715 | ||
7716 | ||
7717 | ||
7718 | extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; | |
7719 | ||
7720 | ||
7721 | ||
7722 | ||
7723 | extern char *__secure_getenv (__const char *__name) | |
7724 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7725 | ||
7726 | ||
7727 | ||
7728 | ||
7729 | ||
7730 | extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); | |
7731 | ||
7732 | ||
7733 | ||
7734 | ||
7735 | ||
7736 | extern int setenv (__const char *__name, __const char *__value, int __replace) | |
7737 | throw () __attribute__ ((__nonnull__ (2))); | |
7738 | ||
7739 | ||
7740 | extern int unsetenv (__const char *__name) throw (); | |
7741 | ||
7742 | ||
7743 | ||
7744 | ||
7745 | ||
7746 | ||
7747 | extern int clearenv (void) throw (); | |
7748 | # 698 "/usr/include/stdlib.h" 3 4 | |
7749 | extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; | |
7750 | # 709 "/usr/include/stdlib.h" 3 4 | |
7751 | extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; | |
7752 | # 719 "/usr/include/stdlib.h" 3 4 | |
7753 | extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; | |
7754 | # 729 "/usr/include/stdlib.h" 3 4 | |
7755 | extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; | |
7756 | ||
7757 | ||
7758 | ||
7759 | ||
7760 | ||
7761 | ||
7762 | ||
7763 | ||
7764 | extern int system (__const char *__command) ; | |
7765 | ||
7766 | ||
7767 | ||
7768 | ||
7769 | ||
7770 | ||
7771 | ||
7772 | extern char *canonicalize_file_name (__const char *__name) | |
7773 | throw () __attribute__ ((__nonnull__ (1))) ; | |
7774 | # 757 "/usr/include/stdlib.h" 3 4 | |
7775 | extern char *realpath (__const char *__restrict __name, | |
7776 | char *__restrict __resolved) throw () ; | |
7777 | ||
7778 | ||
7779 | ||
7780 | ||
7781 | ||
7782 | ||
7783 | typedef int (*__compar_fn_t) (__const void *, __const void *); | |
7784 | ||
7785 | ||
7786 | typedef __compar_fn_t comparison_fn_t; | |
7787 | ||
7788 | ||
7789 | ||
7790 | ||
7791 | ||
7792 | ||
7793 | extern void *bsearch (__const void *__key, __const void *__base, | |
7794 | size_t __nmemb, size_t __size, __compar_fn_t __compar) | |
7795 | __attribute__ ((__nonnull__ (1, 2, 5))) ; | |
7796 | ||
7797 | ||
7798 | ||
7799 | extern void qsort (void *__base, size_t __nmemb, size_t __size, | |
7800 | __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); | |
7801 | ||
7802 | ||
7803 | ||
7804 | extern int abs (int __x) throw () __attribute__ ((__const__)) ; | |
7805 | extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; | |
7806 | ||
7807 | ||
7808 | ||
7809 | __extension__ extern long long int llabs (long long int __x) | |
7810 | throw () __attribute__ ((__const__)) ; | |
7811 | ||
7812 | ||
7813 | ||
7814 | ||
7815 | ||
7816 | ||
7817 | ||
7818 | extern div_t div (int __numer, int __denom) | |
7819 | throw () __attribute__ ((__const__)) ; | |
7820 | extern ldiv_t ldiv (long int __numer, long int __denom) | |
7821 | throw () __attribute__ ((__const__)) ; | |
7822 | ||
7823 | ||
7824 | ||
7825 | ||
7826 | __extension__ extern lldiv_t lldiv (long long int __numer, | |
7827 | long long int __denom) | |
7828 | throw () __attribute__ ((__const__)) ; | |
7829 | ||
7830 | # 822 "/usr/include/stdlib.h" 3 4 | |
7831 | extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, | |
7832 | int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
7833 | ||
7834 | ||
7835 | ||
7836 | ||
7837 | extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, | |
7838 | int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
7839 | ||
7840 | ||
7841 | ||
7842 | ||
7843 | extern char *gcvt (double __value, int __ndigit, char *__buf) | |
7844 | throw () __attribute__ ((__nonnull__ (3))) ; | |
7845 | ||
7846 | ||
7847 | ||
7848 | ||
7849 | extern char *qecvt (long double __value, int __ndigit, | |
7850 | int *__restrict __decpt, int *__restrict __sign) | |
7851 | throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
7852 | extern char *qfcvt (long double __value, int __ndigit, | |
7853 | int *__restrict __decpt, int *__restrict __sign) | |
7854 | throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
7855 | extern char *qgcvt (long double __value, int __ndigit, char *__buf) | |
7856 | throw () __attribute__ ((__nonnull__ (3))) ; | |
7857 | ||
7858 | ||
7859 | ||
7860 | ||
7861 | extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
7862 | int *__restrict __sign, char *__restrict __buf, | |
7863 | size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
7864 | extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
7865 | int *__restrict __sign, char *__restrict __buf, | |
7866 | size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
7867 | ||
7868 | extern int qecvt_r (long double __value, int __ndigit, | |
7869 | int *__restrict __decpt, int *__restrict __sign, | |
7870 | char *__restrict __buf, size_t __len) | |
7871 | throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
7872 | extern int qfcvt_r (long double __value, int __ndigit, | |
7873 | int *__restrict __decpt, int *__restrict __sign, | |
7874 | char *__restrict __buf, size_t __len) | |
7875 | throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
7876 | ||
7877 | ||
7878 | ||
7879 | ||
7880 | ||
7881 | ||
7882 | ||
7883 | extern int mblen (__const char *__s, size_t __n) throw () ; | |
7884 | ||
7885 | ||
7886 | extern int mbtowc (wchar_t *__restrict __pwc, | |
7887 | __const char *__restrict __s, size_t __n) throw () ; | |
7888 | ||
7889 | ||
7890 | extern int wctomb (char *__s, wchar_t __wchar) throw () ; | |
7891 | ||
7892 | ||
7893 | ||
7894 | extern size_t mbstowcs (wchar_t *__restrict __pwcs, | |
7895 | __const char *__restrict __s, size_t __n) throw (); | |
7896 | ||
7897 | extern size_t wcstombs (char *__restrict __s, | |
7898 | __const wchar_t *__restrict __pwcs, size_t __n) | |
7899 | throw (); | |
7900 | ||
7901 | ||
7902 | ||
7903 | ||
7904 | ||
7905 | ||
7906 | ||
7907 | ||
7908 | extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; | |
7909 | # 910 "/usr/include/stdlib.h" 3 4 | |
7910 | extern int getsubopt (char **__restrict __optionp, | |
7911 | char *__const *__restrict __tokens, | |
7912 | char **__restrict __valuep) | |
7913 | throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; | |
7914 | ||
7915 | ||
7916 | ||
7917 | ||
7918 | ||
7919 | extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); | |
7920 | ||
7921 | ||
7922 | ||
7923 | ||
7924 | ||
7925 | ||
7926 | ||
7927 | extern int posix_openpt (int __oflag) ; | |
7928 | ||
7929 | ||
7930 | ||
7931 | ||
7932 | ||
7933 | ||
7934 | ||
7935 | extern int grantpt (int __fd) throw (); | |
7936 | ||
7937 | ||
7938 | ||
7939 | extern int unlockpt (int __fd) throw (); | |
7940 | ||
7941 | ||
7942 | ||
7943 | ||
7944 | extern char *ptsname (int __fd) throw () ; | |
7945 | ||
7946 | ||
7947 | ||
7948 | ||
7949 | ||
7950 | ||
7951 | extern int ptsname_r (int __fd, char *__buf, size_t __buflen) | |
7952 | throw () __attribute__ ((__nonnull__ (2))); | |
7953 | ||
7954 | ||
7955 | extern int getpt (void); | |
7956 | ||
7957 | ||
7958 | ||
7959 | ||
7960 | ||
7961 | ||
7962 | extern int getloadavg (double __loadavg[], int __nelem) | |
7963 | throw () __attribute__ ((__nonnull__ (1))); | |
7964 | # 972 "/usr/include/stdlib.h" 3 4 | |
7965 | # 1 "/usr/include/bits/stdlib-ldbl.h" 1 3 4 | |
7966 | # 25 "/usr/include/bits/stdlib-ldbl.h" 3 4 | |
7967 | ||
7968 | extern __typeof (strtold) strtold __asm ("" "strtod"); | |
7969 | ||
7970 | ||
7971 | ||
7972 | ||
7973 | extern __typeof (strtold_l) strtold_l __asm ("" "strtod_l"); | |
7974 | ||
7975 | ||
7976 | extern __typeof (__strtold_internal) __strtold_internal __asm ("" "__strtod_internal"); | |
7977 | ||
7978 | ||
7979 | ||
7980 | extern __typeof (qecvt) qecvt __asm ("" "ecvt"); | |
7981 | extern __typeof (qfcvt) qfcvt __asm ("" "fcvt"); | |
7982 | extern __typeof (qgcvt) qgcvt __asm ("" "gcvt"); | |
7983 | extern __typeof (qecvt_r) qecvt_r __asm ("" "ecvt_r"); | |
7984 | extern __typeof (qfcvt_r) qfcvt_r __asm ("" "fcvt_r"); | |
7985 | # 973 "/usr/include/stdlib.h" 2 3 4 | |
7986 | ||
7987 | ||
7988 | ||
7989 | ||
7990 | ||
7991 | } | |
7992 | # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 2 3 | |
7993 | # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 3 | |
7994 | namespace std | |
7995 | { | |
7996 | using ::div_t; | |
7997 | using ::ldiv_t; | |
7998 | ||
7999 | using ::abort; | |
8000 | using ::abs; | |
8001 | using ::atexit; | |
8002 | using ::atof; | |
8003 | using ::atoi; | |
8004 | using ::atol; | |
8005 | using ::bsearch; | |
8006 | using ::calloc; | |
8007 | using ::div; | |
8008 | using ::exit; | |
8009 | using ::free; | |
8010 | using ::getenv; | |
8011 | using ::labs; | |
8012 | using ::ldiv; | |
8013 | using ::malloc; | |
8014 | ||
8015 | using ::mblen; | |
8016 | using ::mbstowcs; | |
8017 | using ::mbtowc; | |
8018 | ||
8019 | using ::qsort; | |
8020 | using ::rand; | |
8021 | using ::realloc; | |
8022 | using ::srand; | |
8023 | using ::strtod; | |
8024 | using ::strtol; | |
8025 | using ::strtoul; | |
8026 | using ::system; | |
8027 | ||
8028 | using ::wcstombs; | |
8029 | using ::wctomb; | |
8030 | ||
8031 | ||
8032 | inline long | |
8033 | abs(long __i) { return labs(__i); } | |
8034 | ||
8035 | inline ldiv_t | |
8036 | div(long __i, long __j) { return ldiv(__i, __j); } | |
8037 | } | |
8038 | # 160 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 3 | |
8039 | namespace __gnu_cxx | |
8040 | { | |
8041 | ||
8042 | using ::lldiv_t; | |
8043 | ||
8044 | ||
8045 | ||
8046 | ||
8047 | ||
8048 | using ::_Exit; | |
8049 | ||
8050 | ||
8051 | inline long long | |
8052 | abs(long long __x) { return __x >= 0 ? __x : -__x; } | |
8053 | ||
8054 | ||
8055 | using ::llabs; | |
8056 | ||
8057 | inline lldiv_t | |
8058 | div(long long __n, long long __d) | |
8059 | { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } | |
8060 | ||
8061 | using ::lldiv; | |
8062 | # 193 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cstdlib" 3 | |
8063 | using ::atoll; | |
8064 | using ::strtoll; | |
8065 | using ::strtoull; | |
8066 | ||
8067 | using ::strtof; | |
8068 | using ::strtold; | |
8069 | } | |
8070 | ||
8071 | namespace std | |
8072 | { | |
8073 | ||
8074 | using ::__gnu_cxx::lldiv_t; | |
8075 | ||
8076 | using ::__gnu_cxx::_Exit; | |
8077 | using ::__gnu_cxx::abs; | |
8078 | ||
8079 | using ::__gnu_cxx::llabs; | |
8080 | using ::__gnu_cxx::div; | |
8081 | using ::__gnu_cxx::lldiv; | |
8082 | ||
8083 | using ::__gnu_cxx::atoll; | |
8084 | using ::__gnu_cxx::strtof; | |
8085 | using ::__gnu_cxx::strtoll; | |
8086 | using ::__gnu_cxx::strtoull; | |
8087 | using ::__gnu_cxx::strtold; | |
8088 | } | |
8089 | ||
8090 | ||
8091 | ||
8092 | ||
8093 | ||
8094 | #pragma GCC visibility pop | |
8095 | # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
8096 | ||
8097 | ||
8098 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_pair.h" 1 3 | |
8099 | # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_pair.h" 3 | |
8100 | namespace std | |
8101 | { | |
8102 | ||
8103 | template<class _T1, class _T2> | |
8104 | struct pair | |
8105 | { | |
8106 | typedef _T1 first_type; | |
8107 | typedef _T2 second_type; | |
8108 | ||
8109 | _T1 first; | |
8110 | _T2 second; | |
8111 | ||
8112 | ||
8113 | ||
8114 | ||
8115 | ||
8116 | pair() | |
8117 | : first(), second() { } | |
8118 | ||
8119 | ||
8120 | pair(const _T1& __a, const _T2& __b) | |
8121 | : first(__a), second(__b) { } | |
8122 | ||
8123 | ||
8124 | template<class _U1, class _U2> | |
8125 | pair(const pair<_U1, _U2>& __p) | |
8126 | : first(__p.first), second(__p.second) { } | |
8127 | }; | |
8128 | ||
8129 | ||
8130 | template<class _T1, class _T2> | |
8131 | inline bool | |
8132 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
8133 | { return __x.first == __y.first && __x.second == __y.second; } | |
8134 | ||
8135 | ||
8136 | template<class _T1, class _T2> | |
8137 | inline bool | |
8138 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
8139 | { return __x.first < __y.first | |
8140 | || (!(__y.first < __x.first) && __x.second < __y.second); } | |
8141 | ||
8142 | ||
8143 | template<class _T1, class _T2> | |
8144 | inline bool | |
8145 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
8146 | { return !(__x == __y); } | |
8147 | ||
8148 | ||
8149 | template<class _T1, class _T2> | |
8150 | inline bool | |
8151 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
8152 | { return __y < __x; } | |
8153 | ||
8154 | ||
8155 | template<class _T1, class _T2> | |
8156 | inline bool | |
8157 | operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
8158 | { return !(__y < __x); } | |
8159 | ||
8160 | ||
8161 | template<class _T1, class _T2> | |
8162 | inline bool | |
8163 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
8164 | { return !(__x < __y); } | |
8165 | # 142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_pair.h" 3 | |
8166 | template<class _T1, class _T2> | |
8167 | inline pair<_T1, _T2> | |
8168 | make_pair(_T1 __x, _T2 __y) | |
8169 | { return pair<_T1, _T2>(__x, __y); } | |
8170 | } | |
8171 | # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
8172 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/cpp_type_traits.h" 1 3 | |
8173 | # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/cpp_type_traits.h" 3 | |
8174 | ||
8175 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/cpp_type_traits.h" 3 | |
8176 | # 75 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/cpp_type_traits.h" 3 | |
8177 | namespace __gnu_internal | |
8178 | { | |
8179 | typedef char __one; | |
8180 | typedef char __two[2]; | |
8181 | ||
8182 | template<typename _Tp> | |
8183 | __one __test_type(int _Tp::*); | |
8184 | template<typename _Tp> | |
8185 | __two& __test_type(...); | |
8186 | } | |
8187 | ||
8188 | ||
8189 | namespace __gnu_cxx | |
8190 | { | |
8191 | template<typename _Iterator, typename _Container> | |
8192 | class __normal_iterator; | |
8193 | } | |
8194 | ||
8195 | struct __true_type { }; | |
8196 | struct __false_type { }; | |
8197 | ||
8198 | namespace std | |
8199 | { | |
8200 | template<bool> | |
8201 | struct __truth_type | |
8202 | { typedef __false_type __type; }; | |
8203 | ||
8204 | template<> | |
8205 | struct __truth_type<true> | |
8206 | { typedef __true_type __type; }; | |
8207 | ||
8208 | ||
8209 | ||
8210 | template<class _Sp, class _Tp> | |
8211 | struct __traitor | |
8212 | { | |
8213 | enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; | |
8214 | typedef typename __truth_type<__value>::__type __type; | |
8215 | }; | |
8216 | ||
8217 | ||
8218 | template<typename, typename> | |
8219 | struct __are_same | |
8220 | { | |
8221 | enum { __value = 0 }; | |
8222 | typedef __false_type __type; | |
8223 | }; | |
8224 | ||
8225 | template<typename _Tp> | |
8226 | struct __are_same<_Tp, _Tp> | |
8227 | { | |
8228 | enum { __value = 1 }; | |
8229 | typedef __true_type __type; | |
8230 | }; | |
8231 | ||
8232 | ||
8233 | template<typename, bool> | |
8234 | struct __enable_if | |
8235 | { | |
8236 | }; | |
8237 | ||
8238 | template<typename _Tp> | |
8239 | struct __enable_if<_Tp, true> | |
8240 | { | |
8241 | typedef _Tp __type; | |
8242 | }; | |
8243 | ||
8244 | ||
8245 | template<typename _Tp> | |
8246 | struct __is_void | |
8247 | { | |
8248 | enum { __value = 0 }; | |
8249 | typedef __false_type __type; | |
8250 | }; | |
8251 | ||
8252 | template<> | |
8253 | struct __is_void<void> | |
8254 | { | |
8255 | enum { __value = 1 }; | |
8256 | typedef __true_type __type; | |
8257 | }; | |
8258 | ||
8259 | ||
8260 | ||
8261 | ||
8262 | template<typename _Tp> | |
8263 | struct __is_integer | |
8264 | { | |
8265 | enum { __value = 0 }; | |
8266 | typedef __false_type __type; | |
8267 | }; | |
8268 | ||
8269 | ||
8270 | ||
8271 | ||
8272 | template<> | |
8273 | struct __is_integer<bool> | |
8274 | { | |
8275 | enum { __value = 1 }; | |
8276 | typedef __true_type __type; | |
8277 | }; | |
8278 | ||
8279 | template<> | |
8280 | struct __is_integer<char> | |
8281 | { | |
8282 | enum { __value = 1 }; | |
8283 | typedef __true_type __type; | |
8284 | }; | |
8285 | ||
8286 | template<> | |
8287 | struct __is_integer<signed char> | |
8288 | { | |
8289 | enum { __value = 1 }; | |
8290 | typedef __true_type __type; | |
8291 | }; | |
8292 | ||
8293 | template<> | |
8294 | struct __is_integer<unsigned char> | |
8295 | { | |
8296 | enum { __value = 1 }; | |
8297 | typedef __true_type __type; | |
8298 | }; | |
8299 | ||
8300 | ||
8301 | template<> | |
8302 | struct __is_integer<wchar_t> | |
8303 | { | |
8304 | enum { __value = 1 }; | |
8305 | typedef __true_type __type; | |
8306 | }; | |
8307 | ||
8308 | ||
8309 | template<> | |
8310 | struct __is_integer<short> | |
8311 | { | |
8312 | enum { __value = 1 }; | |
8313 | typedef __true_type __type; | |
8314 | }; | |
8315 | ||
8316 | template<> | |
8317 | struct __is_integer<unsigned short> | |
8318 | { | |
8319 | enum { __value = 1 }; | |
8320 | typedef __true_type __type; | |
8321 | }; | |
8322 | ||
8323 | template<> | |
8324 | struct __is_integer<int> | |
8325 | { | |
8326 | enum { __value = 1 }; | |
8327 | typedef __true_type __type; | |
8328 | }; | |
8329 | ||
8330 | template<> | |
8331 | struct __is_integer<unsigned int> | |
8332 | { | |
8333 | enum { __value = 1 }; | |
8334 | typedef __true_type __type; | |
8335 | }; | |
8336 | ||
8337 | template<> | |
8338 | struct __is_integer<long> | |
8339 | { | |
8340 | enum { __value = 1 }; | |
8341 | typedef __true_type __type; | |
8342 | }; | |
8343 | ||
8344 | template<> | |
8345 | struct __is_integer<unsigned long> | |
8346 | { | |
8347 | enum { __value = 1 }; | |
8348 | typedef __true_type __type; | |
8349 | }; | |
8350 | ||
8351 | template<> | |
8352 | struct __is_integer<long long> | |
8353 | { | |
8354 | enum { __value = 1 }; | |
8355 | typedef __true_type __type; | |
8356 | }; | |
8357 | ||
8358 | template<> | |
8359 | struct __is_integer<unsigned long long> | |
8360 | { | |
8361 | enum { __value = 1 }; | |
8362 | typedef __true_type __type; | |
8363 | }; | |
8364 | ||
8365 | ||
8366 | ||
8367 | ||
8368 | template<typename _Tp> | |
8369 | struct __is_floating | |
8370 | { | |
8371 | enum { __value = 0 }; | |
8372 | typedef __false_type __type; | |
8373 | }; | |
8374 | ||
8375 | ||
8376 | template<> | |
8377 | struct __is_floating<float> | |
8378 | { | |
8379 | enum { __value = 1 }; | |
8380 | typedef __true_type __type; | |
8381 | }; | |
8382 | ||
8383 | template<> | |
8384 | struct __is_floating<double> | |
8385 | { | |
8386 | enum { __value = 1 }; | |
8387 | typedef __true_type __type; | |
8388 | }; | |
8389 | ||
8390 | template<> | |
8391 | struct __is_floating<long double> | |
8392 | { | |
8393 | enum { __value = 1 }; | |
8394 | typedef __true_type __type; | |
8395 | }; | |
8396 | ||
8397 | ||
8398 | ||
8399 | ||
8400 | template<typename _Tp> | |
8401 | struct __is_pointer | |
8402 | { | |
8403 | enum { __value = 0 }; | |
8404 | typedef __false_type __type; | |
8405 | }; | |
8406 | ||
8407 | template<typename _Tp> | |
8408 | struct __is_pointer<_Tp*> | |
8409 | { | |
8410 | enum { __value = 1 }; | |
8411 | typedef __true_type __type; | |
8412 | }; | |
8413 | ||
8414 | ||
8415 | ||
8416 | ||
8417 | template<typename _Tp> | |
8418 | struct __is_normal_iterator | |
8419 | { | |
8420 | enum { __value = 0 }; | |
8421 | typedef __false_type __type; | |
8422 | }; | |
8423 | ||
8424 | template<typename _Iterator, typename _Container> | |
8425 | struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, | |
8426 | _Container> > | |
8427 | { | |
8428 | enum { __value = 1 }; | |
8429 | typedef __true_type __type; | |
8430 | }; | |
8431 | ||
8432 | ||
8433 | ||
8434 | ||
8435 | template<typename _Tp> | |
8436 | struct __is_arithmetic | |
8437 | : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > | |
8438 | { }; | |
8439 | ||
8440 | ||
8441 | ||
8442 | ||
8443 | template<typename _Tp> | |
8444 | struct __is_fundamental | |
8445 | : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > | |
8446 | { }; | |
8447 | ||
8448 | ||
8449 | ||
8450 | ||
8451 | template<typename _Tp> | |
8452 | struct __is_scalar | |
8453 | : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > | |
8454 | { }; | |
8455 | ||
8456 | ||
8457 | ||
8458 | ||
8459 | template<typename _Tp> | |
8460 | struct __is_pod | |
8461 | { | |
8462 | enum | |
8463 | { | |
8464 | __value = (sizeof(__gnu_internal::__test_type<_Tp>(0)) | |
8465 | != sizeof(__gnu_internal::__one)) | |
8466 | }; | |
8467 | }; | |
8468 | ||
8469 | ||
8470 | ||
8471 | ||
8472 | template<typename _Tp> | |
8473 | struct __is_empty | |
8474 | { | |
8475 | private: | |
8476 | template<typename> | |
8477 | struct __first { }; | |
8478 | template<typename _Up> | |
8479 | struct __second | |
8480 | : public _Up { }; | |
8481 | ||
8482 | public: | |
8483 | enum | |
8484 | { | |
8485 | __value = sizeof(__first<_Tp>) == sizeof(__second<_Tp>) | |
8486 | }; | |
8487 | }; | |
8488 | ||
8489 | } | |
8490 | # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
8491 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_types.h" 1 3 | |
8492 | # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
8493 | ||
8494 | # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
8495 | ||
8496 | namespace std | |
8497 | { | |
8498 | # 80 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
8499 | struct input_iterator_tag {}; | |
8500 | ||
8501 | struct output_iterator_tag {}; | |
8502 | ||
8503 | struct forward_iterator_tag : public input_iterator_tag {}; | |
8504 | ||
8505 | ||
8506 | struct bidirectional_iterator_tag : public forward_iterator_tag {}; | |
8507 | ||
8508 | ||
8509 | struct random_access_iterator_tag : public bidirectional_iterator_tag {}; | |
8510 | # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
8511 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, | |
8512 | typename _Pointer = _Tp*, typename _Reference = _Tp&> | |
8513 | struct iterator | |
8514 | { | |
8515 | ||
8516 | typedef _Category iterator_category; | |
8517 | ||
8518 | typedef _Tp value_type; | |
8519 | ||
8520 | typedef _Distance difference_type; | |
8521 | ||
8522 | typedef _Pointer pointer; | |
8523 | ||
8524 | typedef _Reference reference; | |
8525 | }; | |
8526 | ||
8527 | ||
8528 | ||
8529 | ||
8530 | ||
8531 | ||
8532 | ||
8533 | template<typename _Iterator> | |
8534 | struct iterator_traits | |
8535 | { | |
8536 | typedef typename _Iterator::iterator_category iterator_category; | |
8537 | typedef typename _Iterator::value_type value_type; | |
8538 | typedef typename _Iterator::difference_type difference_type; | |
8539 | typedef typename _Iterator::pointer pointer; | |
8540 | typedef typename _Iterator::reference reference; | |
8541 | }; | |
8542 | ||
8543 | template<typename _Tp> | |
8544 | struct iterator_traits<_Tp*> | |
8545 | { | |
8546 | typedef random_access_iterator_tag iterator_category; | |
8547 | typedef _Tp value_type; | |
8548 | typedef ptrdiff_t difference_type; | |
8549 | typedef _Tp* pointer; | |
8550 | typedef _Tp& reference; | |
8551 | }; | |
8552 | ||
8553 | template<typename _Tp> | |
8554 | struct iterator_traits<const _Tp*> | |
8555 | { | |
8556 | typedef random_access_iterator_tag iterator_category; | |
8557 | typedef _Tp value_type; | |
8558 | typedef ptrdiff_t difference_type; | |
8559 | typedef const _Tp* pointer; | |
8560 | typedef const _Tp& reference; | |
8561 | }; | |
8562 | ||
8563 | ||
8564 | ||
8565 | ||
8566 | ||
8567 | ||
8568 | ||
8569 | template<typename _Iter> | |
8570 | inline typename iterator_traits<_Iter>::iterator_category | |
8571 | __iterator_category(const _Iter&) | |
8572 | { return typename iterator_traits<_Iter>::iterator_category(); } | |
8573 | ||
8574 | } | |
8575 | # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
8576 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3 | |
8577 | # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
8578 | ||
8579 | # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
8580 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/concept_check.h" 1 3 | |
8581 | # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/concept_check.h" 3 | |
8582 | ||
8583 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/concept_check.h" 3 | |
8584 | # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 2 3 | |
8585 | ||
8586 | namespace std | |
8587 | { | |
8588 | template<typename _InputIterator> | |
8589 | inline typename iterator_traits<_InputIterator>::difference_type | |
8590 | __distance(_InputIterator __first, _InputIterator __last, | |
8591 | input_iterator_tag) | |
8592 | { | |
8593 | ||
8594 | ||
8595 | ||
8596 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
8597 | while (__first != __last) | |
8598 | { | |
8599 | ++__first; | |
8600 | ++__n; | |
8601 | } | |
8602 | return __n; | |
8603 | } | |
8604 | ||
8605 | template<typename _RandomAccessIterator> | |
8606 | inline typename iterator_traits<_RandomAccessIterator>::difference_type | |
8607 | __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
8608 | random_access_iterator_tag) | |
8609 | { | |
8610 | ||
8611 | ||
8612 | ||
8613 | return __last - __first; | |
8614 | } | |
8615 | # 112 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
8616 | template<typename _InputIterator> | |
8617 | inline typename iterator_traits<_InputIterator>::difference_type | |
8618 | distance(_InputIterator __first, _InputIterator __last) | |
8619 | { | |
8620 | ||
8621 | return std::__distance(__first, __last, | |
8622 | std::__iterator_category(__first)); | |
8623 | } | |
8624 | ||
8625 | template<typename _InputIterator, typename _Distance> | |
8626 | inline void | |
8627 | __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) | |
8628 | { | |
8629 | ||
8630 | ||
8631 | while (__n--) | |
8632 | ++__i; | |
8633 | } | |
8634 | ||
8635 | template<typename _BidirectionalIterator, typename _Distance> | |
8636 | inline void | |
8637 | __advance(_BidirectionalIterator& __i, _Distance __n, | |
8638 | bidirectional_iterator_tag) | |
8639 | { | |
8640 | ||
8641 | ||
8642 | ||
8643 | if (__n > 0) | |
8644 | while (__n--) | |
8645 | ++__i; | |
8646 | else | |
8647 | while (__n++) | |
8648 | --__i; | |
8649 | } | |
8650 | ||
8651 | template<typename _RandomAccessIterator, typename _Distance> | |
8652 | inline void | |
8653 | __advance(_RandomAccessIterator& __i, _Distance __n, | |
8654 | random_access_iterator_tag) | |
8655 | { | |
8656 | ||
8657 | ||
8658 | ||
8659 | __i += __n; | |
8660 | } | |
8661 | # 170 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
8662 | template<typename _InputIterator, typename _Distance> | |
8663 | inline void | |
8664 | advance(_InputIterator& __i, _Distance __n) | |
8665 | { | |
8666 | ||
8667 | std::__advance(__i, __n, std::__iterator_category(__i)); | |
8668 | } | |
8669 | } | |
8670 | # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
8671 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 1 3 | |
8672 | # 70 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
8673 | namespace std | |
8674 | { | |
8675 | # 91 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
8676 | template<typename _Iterator> | |
8677 | class reverse_iterator | |
8678 | : public iterator<typename iterator_traits<_Iterator>::iterator_category, | |
8679 | typename iterator_traits<_Iterator>::value_type, | |
8680 | typename iterator_traits<_Iterator>::difference_type, | |
8681 | typename iterator_traits<_Iterator>::pointer, | |
8682 | typename iterator_traits<_Iterator>::reference> | |
8683 | { | |
8684 | protected: | |
8685 | _Iterator current; | |
8686 | ||
8687 | public: | |
8688 | typedef _Iterator iterator_type; | |
8689 | typedef typename iterator_traits<_Iterator>::difference_type | |
8690 | difference_type; | |
8691 | typedef typename iterator_traits<_Iterator>::reference reference; | |
8692 | typedef typename iterator_traits<_Iterator>::pointer pointer; | |
8693 | ||
8694 | public: | |
8695 | ||
8696 | ||
8697 | ||
8698 | ||
8699 | ||
8700 | ||
8701 | reverse_iterator() : current() { } | |
8702 | ||
8703 | ||
8704 | ||
8705 | ||
8706 | explicit | |
8707 | reverse_iterator(iterator_type __x) : current(__x) { } | |
8708 | ||
8709 | ||
8710 | ||
8711 | ||
8712 | reverse_iterator(const reverse_iterator& __x) | |
8713 | : current(__x.current) { } | |
8714 | ||
8715 | ||
8716 | ||
8717 | ||
8718 | ||
8719 | template<typename _Iter> | |
8720 | reverse_iterator(const reverse_iterator<_Iter>& __x) | |
8721 | : current(__x.base()) { } | |
8722 | ||
8723 | ||
8724 | ||
8725 | ||
8726 | iterator_type | |
8727 | base() const | |
8728 | { return current; } | |
8729 | ||
8730 | ||
8731 | ||
8732 | ||
8733 | ||
8734 | ||
8735 | reference | |
8736 | operator*() const | |
8737 | { | |
8738 | _Iterator __tmp = current; | |
8739 | return *--__tmp; | |
8740 | } | |
8741 | ||
8742 | ||
8743 | ||
8744 | ||
8745 | ||
8746 | ||
8747 | pointer | |
8748 | operator->() const | |
8749 | { return &(operator*()); } | |
8750 | ||
8751 | ||
8752 | ||
8753 | ||
8754 | ||
8755 | ||
8756 | reverse_iterator& | |
8757 | operator++() | |
8758 | { | |
8759 | --current; | |
8760 | return *this; | |
8761 | } | |
8762 | ||
8763 | ||
8764 | ||
8765 | ||
8766 | ||
8767 | ||
8768 | reverse_iterator | |
8769 | operator++(int) | |
8770 | { | |
8771 | reverse_iterator __tmp = *this; | |
8772 | --current; | |
8773 | return __tmp; | |
8774 | } | |
8775 | ||
8776 | ||
8777 | ||
8778 | ||
8779 | ||
8780 | ||
8781 | reverse_iterator& | |
8782 | operator--() | |
8783 | { | |
8784 | ++current; | |
8785 | return *this; | |
8786 | } | |
8787 | ||
8788 | ||
8789 | ||
8790 | ||
8791 | ||
8792 | ||
8793 | reverse_iterator | |
8794 | operator--(int) | |
8795 | { | |
8796 | reverse_iterator __tmp = *this; | |
8797 | ++current; | |
8798 | return __tmp; | |
8799 | } | |
8800 | ||
8801 | ||
8802 | ||
8803 | ||
8804 | ||
8805 | ||
8806 | reverse_iterator | |
8807 | operator+(difference_type __n) const | |
8808 | { return reverse_iterator(current - __n); } | |
8809 | ||
8810 | ||
8811 | ||
8812 | ||
8813 | ||
8814 | ||
8815 | reverse_iterator& | |
8816 | operator+=(difference_type __n) | |
8817 | { | |
8818 | current -= __n; | |
8819 | return *this; | |
8820 | } | |
8821 | ||
8822 | ||
8823 | ||
8824 | ||
8825 | ||
8826 | ||
8827 | reverse_iterator | |
8828 | operator-(difference_type __n) const | |
8829 | { return reverse_iterator(current + __n); } | |
8830 | ||
8831 | ||
8832 | ||
8833 | ||
8834 | ||
8835 | ||
8836 | reverse_iterator& | |
8837 | operator-=(difference_type __n) | |
8838 | { | |
8839 | current += __n; | |
8840 | return *this; | |
8841 | } | |
8842 | ||
8843 | ||
8844 | ||
8845 | ||
8846 | ||
8847 | ||
8848 | reference | |
8849 | operator[](difference_type __n) const | |
8850 | { return *(*this + __n); } | |
8851 | }; | |
8852 | # 278 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
8853 | template<typename _Iterator> | |
8854 | inline bool | |
8855 | operator==(const reverse_iterator<_Iterator>& __x, | |
8856 | const reverse_iterator<_Iterator>& __y) | |
8857 | { return __x.base() == __y.base(); } | |
8858 | ||
8859 | template<typename _Iterator> | |
8860 | inline bool | |
8861 | operator<(const reverse_iterator<_Iterator>& __x, | |
8862 | const reverse_iterator<_Iterator>& __y) | |
8863 | { return __y.base() < __x.base(); } | |
8864 | ||
8865 | template<typename _Iterator> | |
8866 | inline bool | |
8867 | operator!=(const reverse_iterator<_Iterator>& __x, | |
8868 | const reverse_iterator<_Iterator>& __y) | |
8869 | { return !(__x == __y); } | |
8870 | ||
8871 | template<typename _Iterator> | |
8872 | inline bool | |
8873 | operator>(const reverse_iterator<_Iterator>& __x, | |
8874 | const reverse_iterator<_Iterator>& __y) | |
8875 | { return __y < __x; } | |
8876 | ||
8877 | template<typename _Iterator> | |
8878 | inline bool | |
8879 | operator<=(const reverse_iterator<_Iterator>& __x, | |
8880 | const reverse_iterator<_Iterator>& __y) | |
8881 | { return !(__y < __x); } | |
8882 | ||
8883 | template<typename _Iterator> | |
8884 | inline bool | |
8885 | operator>=(const reverse_iterator<_Iterator>& __x, | |
8886 | const reverse_iterator<_Iterator>& __y) | |
8887 | { return !(__x < __y); } | |
8888 | ||
8889 | template<typename _Iterator> | |
8890 | inline typename reverse_iterator<_Iterator>::difference_type | |
8891 | operator-(const reverse_iterator<_Iterator>& __x, | |
8892 | const reverse_iterator<_Iterator>& __y) | |
8893 | { return __y.base() - __x.base(); } | |
8894 | ||
8895 | template<typename _Iterator> | |
8896 | inline reverse_iterator<_Iterator> | |
8897 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | |
8898 | const reverse_iterator<_Iterator>& __x) | |
8899 | { return reverse_iterator<_Iterator>(__x.base() - __n); } | |
8900 | ||
8901 | ||
8902 | ||
8903 | template<typename _IteratorL, typename _IteratorR> | |
8904 | inline bool | |
8905 | operator==(const reverse_iterator<_IteratorL>& __x, | |
8906 | const reverse_iterator<_IteratorR>& __y) | |
8907 | { return __x.base() == __y.base(); } | |
8908 | ||
8909 | template<typename _IteratorL, typename _IteratorR> | |
8910 | inline bool | |
8911 | operator<(const reverse_iterator<_IteratorL>& __x, | |
8912 | const reverse_iterator<_IteratorR>& __y) | |
8913 | { return __y.base() < __x.base(); } | |
8914 | ||
8915 | template<typename _IteratorL, typename _IteratorR> | |
8916 | inline bool | |
8917 | operator!=(const reverse_iterator<_IteratorL>& __x, | |
8918 | const reverse_iterator<_IteratorR>& __y) | |
8919 | { return !(__x == __y); } | |
8920 | ||
8921 | template<typename _IteratorL, typename _IteratorR> | |
8922 | inline bool | |
8923 | operator>(const reverse_iterator<_IteratorL>& __x, | |
8924 | const reverse_iterator<_IteratorR>& __y) | |
8925 | { return __y < __x; } | |
8926 | ||
8927 | template<typename _IteratorL, typename _IteratorR> | |
8928 | inline bool | |
8929 | operator<=(const reverse_iterator<_IteratorL>& __x, | |
8930 | const reverse_iterator<_IteratorR>& __y) | |
8931 | { return !(__y < __x); } | |
8932 | ||
8933 | template<typename _IteratorL, typename _IteratorR> | |
8934 | inline bool | |
8935 | operator>=(const reverse_iterator<_IteratorL>& __x, | |
8936 | const reverse_iterator<_IteratorR>& __y) | |
8937 | { return !(__x < __y); } | |
8938 | ||
8939 | template<typename _IteratorL, typename _IteratorR> | |
8940 | inline typename reverse_iterator<_IteratorL>::difference_type | |
8941 | operator-(const reverse_iterator<_IteratorL>& __x, | |
8942 | const reverse_iterator<_IteratorR>& __y) | |
8943 | { return __y.base() - __x.base(); } | |
8944 | # 382 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
8945 | template<typename _Container> | |
8946 | class back_insert_iterator | |
8947 | : public iterator<output_iterator_tag, void, void, void, void> | |
8948 | { | |
8949 | protected: | |
8950 | _Container* container; | |
8951 | ||
8952 | public: | |
8953 | ||
8954 | typedef _Container container_type; | |
8955 | ||
8956 | ||
8957 | explicit | |
8958 | back_insert_iterator(_Container& __x) : container(&__x) { } | |
8959 | # 408 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
8960 | back_insert_iterator& | |
8961 | operator=(typename _Container::const_reference __value) | |
8962 | { | |
8963 | container->push_back(__value); | |
8964 | return *this; | |
8965 | } | |
8966 | ||
8967 | ||
8968 | back_insert_iterator& | |
8969 | operator*() | |
8970 | { return *this; } | |
8971 | ||
8972 | ||
8973 | back_insert_iterator& | |
8974 | operator++() | |
8975 | { return *this; } | |
8976 | ||
8977 | ||
8978 | back_insert_iterator | |
8979 | operator++(int) | |
8980 | { return *this; } | |
8981 | }; | |
8982 | # 442 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
8983 | template<typename _Container> | |
8984 | inline back_insert_iterator<_Container> | |
8985 | back_inserter(_Container& __x) | |
8986 | { return back_insert_iterator<_Container>(__x); } | |
8987 | # 457 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
8988 | template<typename _Container> | |
8989 | class front_insert_iterator | |
8990 | : public iterator<output_iterator_tag, void, void, void, void> | |
8991 | { | |
8992 | protected: | |
8993 | _Container* container; | |
8994 | ||
8995 | public: | |
8996 | ||
8997 | typedef _Container container_type; | |
8998 | ||
8999 | ||
9000 | explicit front_insert_iterator(_Container& __x) : container(&__x) { } | |
9001 | # 482 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
9002 | front_insert_iterator& | |
9003 | operator=(typename _Container::const_reference __value) | |
9004 | { | |
9005 | container->push_front(__value); | |
9006 | return *this; | |
9007 | } | |
9008 | ||
9009 | ||
9010 | front_insert_iterator& | |
9011 | operator*() | |
9012 | { return *this; } | |
9013 | ||
9014 | ||
9015 | front_insert_iterator& | |
9016 | operator++() | |
9017 | { return *this; } | |
9018 | ||
9019 | ||
9020 | front_insert_iterator | |
9021 | operator++(int) | |
9022 | { return *this; } | |
9023 | }; | |
9024 | # 516 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
9025 | template<typename _Container> | |
9026 | inline front_insert_iterator<_Container> | |
9027 | front_inserter(_Container& __x) | |
9028 | { return front_insert_iterator<_Container>(__x); } | |
9029 | # 535 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
9030 | template<typename _Container> | |
9031 | class insert_iterator | |
9032 | : public iterator<output_iterator_tag, void, void, void, void> | |
9033 | { | |
9034 | protected: | |
9035 | _Container* container; | |
9036 | typename _Container::iterator iter; | |
9037 | ||
9038 | public: | |
9039 | ||
9040 | typedef _Container container_type; | |
9041 | ||
9042 | ||
9043 | ||
9044 | ||
9045 | ||
9046 | insert_iterator(_Container& __x, typename _Container::iterator __i) | |
9047 | : container(&__x), iter(__i) {} | |
9048 | # 577 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
9049 | insert_iterator& | |
9050 | operator=(const typename _Container::const_reference __value) | |
9051 | { | |
9052 | iter = container->insert(iter, __value); | |
9053 | ++iter; | |
9054 | return *this; | |
9055 | } | |
9056 | ||
9057 | ||
9058 | insert_iterator& | |
9059 | operator*() | |
9060 | { return *this; } | |
9061 | ||
9062 | ||
9063 | insert_iterator& | |
9064 | operator++() | |
9065 | { return *this; } | |
9066 | ||
9067 | ||
9068 | insert_iterator& | |
9069 | operator++(int) | |
9070 | { return *this; } | |
9071 | }; | |
9072 | # 612 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
9073 | template<typename _Container, typename _Iterator> | |
9074 | inline insert_iterator<_Container> | |
9075 | inserter(_Container& __x, _Iterator __i) | |
9076 | { | |
9077 | return insert_iterator<_Container>(__x, | |
9078 | typename _Container::iterator(__i)); | |
9079 | } | |
9080 | } | |
9081 | ||
9082 | namespace __gnu_cxx | |
9083 | { | |
9084 | ||
9085 | ||
9086 | ||
9087 | ||
9088 | ||
9089 | ||
9090 | ||
9091 | using std::iterator_traits; | |
9092 | using std::iterator; | |
9093 | template<typename _Iterator, typename _Container> | |
9094 | class __normal_iterator | |
9095 | { | |
9096 | protected: | |
9097 | _Iterator _M_current; | |
9098 | ||
9099 | public: | |
9100 | typedef typename iterator_traits<_Iterator>::iterator_category | |
9101 | iterator_category; | |
9102 | typedef typename iterator_traits<_Iterator>::value_type value_type; | |
9103 | typedef typename iterator_traits<_Iterator>::difference_type | |
9104 | difference_type; | |
9105 | typedef typename iterator_traits<_Iterator>::reference reference; | |
9106 | typedef typename iterator_traits<_Iterator>::pointer pointer; | |
9107 | ||
9108 | __normal_iterator() : _M_current(_Iterator()) { } | |
9109 | ||
9110 | explicit | |
9111 | __normal_iterator(const _Iterator& __i) : _M_current(__i) { } | |
9112 | ||
9113 | ||
9114 | template<typename _Iter> | |
9115 | __normal_iterator(const __normal_iterator<_Iter, | |
9116 | typename std::__enable_if<_Container, | |
9117 | (std::__are_same<_Iter, | |
9118 | typename _Container::pointer>::__value) | |
9119 | >::__type>& __i) | |
9120 | : _M_current(__i.base()) { } | |
9121 | ||
9122 | ||
9123 | reference | |
9124 | operator*() const | |
9125 | { return *_M_current; } | |
9126 | ||
9127 | pointer | |
9128 | operator->() const | |
9129 | { return _M_current; } | |
9130 | ||
9131 | __normal_iterator& | |
9132 | operator++() | |
9133 | { | |
9134 | ++_M_current; | |
9135 | return *this; | |
9136 | } | |
9137 | ||
9138 | __normal_iterator | |
9139 | operator++(int) | |
9140 | { return __normal_iterator(_M_current++); } | |
9141 | ||
9142 | ||
9143 | __normal_iterator& | |
9144 | operator--() | |
9145 | { | |
9146 | --_M_current; | |
9147 | return *this; | |
9148 | } | |
9149 | ||
9150 | __normal_iterator | |
9151 | operator--(int) | |
9152 | { return __normal_iterator(_M_current--); } | |
9153 | ||
9154 | ||
9155 | reference | |
9156 | operator[](const difference_type& __n) const | |
9157 | { return _M_current[__n]; } | |
9158 | ||
9159 | __normal_iterator& | |
9160 | operator+=(const difference_type& __n) | |
9161 | { _M_current += __n; return *this; } | |
9162 | ||
9163 | __normal_iterator | |
9164 | operator+(const difference_type& __n) const | |
9165 | { return __normal_iterator(_M_current + __n); } | |
9166 | ||
9167 | __normal_iterator& | |
9168 | operator-=(const difference_type& __n) | |
9169 | { _M_current -= __n; return *this; } | |
9170 | ||
9171 | __normal_iterator | |
9172 | operator-(const difference_type& __n) const | |
9173 | { return __normal_iterator(_M_current - __n); } | |
9174 | ||
9175 | const _Iterator& | |
9176 | base() const | |
9177 | { return _M_current; } | |
9178 | }; | |
9179 | # 728 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_iterator.h" 3 | |
9180 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
9181 | inline bool | |
9182 | operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
9183 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
9184 | { return __lhs.base() == __rhs.base(); } | |
9185 | ||
9186 | template<typename _Iterator, typename _Container> | |
9187 | inline bool | |
9188 | operator==(const __normal_iterator<_Iterator, _Container>& __lhs, | |
9189 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
9190 | { return __lhs.base() == __rhs.base(); } | |
9191 | ||
9192 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
9193 | inline bool | |
9194 | operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
9195 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
9196 | { return __lhs.base() != __rhs.base(); } | |
9197 | ||
9198 | template<typename _Iterator, typename _Container> | |
9199 | inline bool | |
9200 | operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
9201 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
9202 | { return __lhs.base() != __rhs.base(); } | |
9203 | ||
9204 | ||
9205 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
9206 | inline bool | |
9207 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
9208 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
9209 | { return __lhs.base() < __rhs.base(); } | |
9210 | ||
9211 | template<typename _Iterator, typename _Container> | |
9212 | inline bool | |
9213 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs, | |
9214 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
9215 | { return __lhs.base() < __rhs.base(); } | |
9216 | ||
9217 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
9218 | inline bool | |
9219 | operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
9220 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
9221 | { return __lhs.base() > __rhs.base(); } | |
9222 | ||
9223 | template<typename _Iterator, typename _Container> | |
9224 | inline bool | |
9225 | operator>(const __normal_iterator<_Iterator, _Container>& __lhs, | |
9226 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
9227 | { return __lhs.base() > __rhs.base(); } | |
9228 | ||
9229 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
9230 | inline bool | |
9231 | operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
9232 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
9233 | { return __lhs.base() <= __rhs.base(); } | |
9234 | ||
9235 | template<typename _Iterator, typename _Container> | |
9236 | inline bool | |
9237 | operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
9238 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
9239 | { return __lhs.base() <= __rhs.base(); } | |
9240 | ||
9241 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
9242 | inline bool | |
9243 | operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
9244 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
9245 | { return __lhs.base() >= __rhs.base(); } | |
9246 | ||
9247 | template<typename _Iterator, typename _Container> | |
9248 | inline bool | |
9249 | operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
9250 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
9251 | { return __lhs.base() >= __rhs.base(); } | |
9252 | ||
9253 | ||
9254 | ||
9255 | ||
9256 | ||
9257 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
9258 | inline typename __normal_iterator<_IteratorL, _Container>::difference_type | |
9259 | operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
9260 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
9261 | { return __lhs.base() - __rhs.base(); } | |
9262 | ||
9263 | template<typename _Iterator, typename _Container> | |
9264 | inline __normal_iterator<_Iterator, _Container> | |
9265 | operator+(typename __normal_iterator<_Iterator, _Container>::difference_type | |
9266 | __n, const __normal_iterator<_Iterator, _Container>& __i) | |
9267 | { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } | |
9268 | } | |
9269 | # 75 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
9270 | ||
9271 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/debug/debug.h" 1 3 | |
9272 | # 77 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 2 3 | |
9273 | ||
9274 | namespace std | |
9275 | { | |
9276 | # 90 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9277 | template<typename _Tp> | |
9278 | inline void | |
9279 | swap(_Tp& __a, _Tp& __b) | |
9280 | { | |
9281 | ||
9282 | ||
9283 | ||
9284 | _Tp __tmp = __a; | |
9285 | __a = __b; | |
9286 | __b = __tmp; | |
9287 | } | |
9288 | ||
9289 | ||
9290 | ||
9291 | ||
9292 | template<bool _BoolType> | |
9293 | struct __iter_swap | |
9294 | { | |
9295 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
9296 | static void | |
9297 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
9298 | { | |
9299 | typedef typename iterator_traits<_ForwardIterator1>::value_type | |
9300 | _ValueType1; | |
9301 | _ValueType1 __tmp = *__a; | |
9302 | *__a = *__b; | |
9303 | *__b = __tmp; | |
9304 | } | |
9305 | }; | |
9306 | ||
9307 | template<> | |
9308 | struct __iter_swap<true> | |
9309 | { | |
9310 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
9311 | static void | |
9312 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
9313 | { | |
9314 | swap(*__a, *__b); | |
9315 | } | |
9316 | }; | |
9317 | # 140 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9318 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
9319 | inline void | |
9320 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
9321 | { | |
9322 | typedef typename iterator_traits<_ForwardIterator1>::value_type | |
9323 | _ValueType1; | |
9324 | typedef typename iterator_traits<_ForwardIterator2>::value_type | |
9325 | _ValueType2; | |
9326 | ||
9327 | ||
9328 | ||
9329 | ||
9330 | ||
9331 | ||
9332 | ||
9333 | ||
9334 | ||
9335 | ||
9336 | ||
9337 | typedef typename iterator_traits<_ForwardIterator1>::reference | |
9338 | _ReferenceType1; | |
9339 | typedef typename iterator_traits<_ForwardIterator2>::reference | |
9340 | _ReferenceType2; | |
9341 | std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && | |
9342 | __are_same<_ValueType1 &, _ReferenceType1>::__value && | |
9343 | __are_same<_ValueType2 &, _ReferenceType2>::__value>:: | |
9344 | iter_swap(__a, __b); | |
9345 | } | |
9346 | # 182 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9347 | template<typename _Tp> | |
9348 | inline const _Tp& | |
9349 | min(const _Tp& __a, const _Tp& __b) | |
9350 | { | |
9351 | ||
9352 | ||
9353 | ||
9354 | if (__b < __a) | |
9355 | return __b; | |
9356 | return __a; | |
9357 | } | |
9358 | # 204 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9359 | template<typename _Tp> | |
9360 | inline const _Tp& | |
9361 | max(const _Tp& __a, const _Tp& __b) | |
9362 | { | |
9363 | ||
9364 | ||
9365 | ||
9366 | if (__a < __b) | |
9367 | return __b; | |
9368 | return __a; | |
9369 | } | |
9370 | # 226 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9371 | template<typename _Tp, typename _Compare> | |
9372 | inline const _Tp& | |
9373 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | |
9374 | { | |
9375 | ||
9376 | if (__comp(__b, __a)) | |
9377 | return __b; | |
9378 | return __a; | |
9379 | } | |
9380 | # 246 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9381 | template<typename _Tp, typename _Compare> | |
9382 | inline const _Tp& | |
9383 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | |
9384 | { | |
9385 | ||
9386 | if (__comp(__a, __b)) | |
9387 | return __b; | |
9388 | return __a; | |
9389 | } | |
9390 | ||
9391 | ||
9392 | ||
9393 | ||
9394 | ||
9395 | ||
9396 | ||
9397 | template<bool, typename> | |
9398 | struct __copy | |
9399 | { | |
9400 | template<typename _II, typename _OI> | |
9401 | static _OI | |
9402 | copy(_II __first, _II __last, _OI __result) | |
9403 | { | |
9404 | for (; __first != __last; ++__result, ++__first) | |
9405 | *__result = *__first; | |
9406 | return __result; | |
9407 | } | |
9408 | }; | |
9409 | ||
9410 | template<bool _BoolType> | |
9411 | struct __copy<_BoolType, random_access_iterator_tag> | |
9412 | { | |
9413 | template<typename _II, typename _OI> | |
9414 | static _OI | |
9415 | copy(_II __first, _II __last, _OI __result) | |
9416 | { | |
9417 | typedef typename iterator_traits<_II>::difference_type _Distance; | |
9418 | for(_Distance __n = __last - __first; __n > 0; --__n) | |
9419 | { | |
9420 | *__result = *__first; | |
9421 | ++__first; | |
9422 | ++__result; | |
9423 | } | |
9424 | return __result; | |
9425 | } | |
9426 | }; | |
9427 | ||
9428 | template<> | |
9429 | struct __copy<true, random_access_iterator_tag> | |
9430 | { | |
9431 | template<typename _Tp> | |
9432 | static _Tp* | |
9433 | copy(const _Tp* __first, const _Tp* __last, _Tp* __result) | |
9434 | { | |
9435 | std::memmove(__result, __first, sizeof(_Tp) * (__last - __first)); | |
9436 | return __result + (__last - __first); | |
9437 | } | |
9438 | }; | |
9439 | ||
9440 | template<typename _II, typename _OI> | |
9441 | inline _OI | |
9442 | __copy_aux(_II __first, _II __last, _OI __result) | |
9443 | { | |
9444 | typedef typename iterator_traits<_II>::value_type _ValueTypeI; | |
9445 | typedef typename iterator_traits<_OI>::value_type _ValueTypeO; | |
9446 | typedef typename iterator_traits<_II>::iterator_category _Category; | |
9447 | const bool __simple = (__is_scalar<_ValueTypeI>::__value | |
9448 | && __is_pointer<_II>::__value | |
9449 | && __is_pointer<_OI>::__value | |
9450 | && __are_same<_ValueTypeI, _ValueTypeO>::__value); | |
9451 | ||
9452 | return std::__copy<__simple, _Category>::copy(__first, __last, __result); | |
9453 | } | |
9454 | ||
9455 | template<bool, bool> | |
9456 | struct __copy_normal | |
9457 | { | |
9458 | template<typename _II, typename _OI> | |
9459 | static _OI | |
9460 | copy_n(_II __first, _II __last, _OI __result) | |
9461 | { return std::__copy_aux(__first, __last, __result); } | |
9462 | }; | |
9463 | ||
9464 | template<> | |
9465 | struct __copy_normal<true, false> | |
9466 | { | |
9467 | template<typename _II, typename _OI> | |
9468 | static _OI | |
9469 | copy_n(_II __first, _II __last, _OI __result) | |
9470 | { return std::__copy_aux(__first.base(), __last.base(), __result); } | |
9471 | }; | |
9472 | ||
9473 | template<> | |
9474 | struct __copy_normal<false, true> | |
9475 | { | |
9476 | template<typename _II, typename _OI> | |
9477 | static _OI | |
9478 | copy_n(_II __first, _II __last, _OI __result) | |
9479 | { return _OI(std::__copy_aux(__first, __last, __result.base())); } | |
9480 | }; | |
9481 | ||
9482 | template<> | |
9483 | struct __copy_normal<true, true> | |
9484 | { | |
9485 | template<typename _II, typename _OI> | |
9486 | static _OI | |
9487 | copy_n(_II __first, _II __last, _OI __result) | |
9488 | { return _OI(std::__copy_aux(__first.base(), __last.base(), | |
9489 | __result.base())); } | |
9490 | }; | |
9491 | # 373 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9492 | template<typename _InputIterator, typename _OutputIterator> | |
9493 | inline _OutputIterator | |
9494 | copy(_InputIterator __first, _InputIterator __last, | |
9495 | _OutputIterator __result) | |
9496 | { | |
9497 | ||
9498 | ||
9499 | ||
9500 | ||
9501 | ; | |
9502 | ||
9503 | const bool __in = __is_normal_iterator<_InputIterator>::__value; | |
9504 | const bool __out = __is_normal_iterator<_OutputIterator>::__value; | |
9505 | return std::__copy_normal<__in, __out>::copy_n(__first, __last, | |
9506 | __result); | |
9507 | } | |
9508 | ||
9509 | template<bool, typename> | |
9510 | struct __copy_backward | |
9511 | { | |
9512 | template<typename _BI1, typename _BI2> | |
9513 | static _BI2 | |
9514 | copy_b(_BI1 __first, _BI1 __last, _BI2 __result) | |
9515 | { | |
9516 | while (__first != __last) | |
9517 | *--__result = *--__last; | |
9518 | return __result; | |
9519 | } | |
9520 | }; | |
9521 | ||
9522 | template<bool _BoolType> | |
9523 | struct __copy_backward<_BoolType, random_access_iterator_tag> | |
9524 | { | |
9525 | template<typename _BI1, typename _BI2> | |
9526 | static _BI2 | |
9527 | copy_b(_BI1 __first, _BI1 __last, _BI2 __result) | |
9528 | { | |
9529 | typename iterator_traits<_BI1>::difference_type __n; | |
9530 | for (__n = __last - __first; __n > 0; --__n) | |
9531 | *--__result = *--__last; | |
9532 | return __result; | |
9533 | } | |
9534 | }; | |
9535 | ||
9536 | template<> | |
9537 | struct __copy_backward<true, random_access_iterator_tag> | |
9538 | { | |
9539 | template<typename _Tp> | |
9540 | static _Tp* | |
9541 | copy_b(const _Tp* __first, const _Tp* __last, _Tp* __result) | |
9542 | { | |
9543 | const ptrdiff_t _Num = __last - __first; | |
9544 | std::memmove(__result - _Num, __first, sizeof(_Tp) * _Num); | |
9545 | return __result - _Num; | |
9546 | } | |
9547 | }; | |
9548 | ||
9549 | template<typename _BI1, typename _BI2> | |
9550 | inline _BI2 | |
9551 | __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result) | |
9552 | { | |
9553 | typedef typename iterator_traits<_BI1>::value_type _ValueType1; | |
9554 | typedef typename iterator_traits<_BI2>::value_type _ValueType2; | |
9555 | typedef typename iterator_traits<_BI1>::iterator_category _Category; | |
9556 | const bool __simple = (__is_scalar<_ValueType1>::__value | |
9557 | && __is_pointer<_BI1>::__value | |
9558 | && __is_pointer<_BI2>::__value | |
9559 | && __are_same<_ValueType1, _ValueType2>::__value); | |
9560 | ||
9561 | return std::__copy_backward<__simple, _Category>::copy_b(__first, __last, | |
9562 | __result); | |
9563 | } | |
9564 | ||
9565 | template<bool, bool> | |
9566 | struct __copy_backward_normal | |
9567 | { | |
9568 | template<typename _BI1, typename _BI2> | |
9569 | static _BI2 | |
9570 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
9571 | { return std::__copy_backward_aux(__first, __last, __result); } | |
9572 | }; | |
9573 | ||
9574 | template<> | |
9575 | struct __copy_backward_normal<true, false> | |
9576 | { | |
9577 | template<typename _BI1, typename _BI2> | |
9578 | static _BI2 | |
9579 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
9580 | { return std::__copy_backward_aux(__first.base(), __last.base(), | |
9581 | __result); } | |
9582 | }; | |
9583 | ||
9584 | template<> | |
9585 | struct __copy_backward_normal<false, true> | |
9586 | { | |
9587 | template<typename _BI1, typename _BI2> | |
9588 | static _BI2 | |
9589 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
9590 | { return _BI2(std::__copy_backward_aux(__first, __last, | |
9591 | __result.base())); } | |
9592 | }; | |
9593 | ||
9594 | template<> | |
9595 | struct __copy_backward_normal<true, true> | |
9596 | { | |
9597 | template<typename _BI1, typename _BI2> | |
9598 | static _BI2 | |
9599 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
9600 | { return _BI2(std::__copy_backward_aux(__first.base(), __last.base(), | |
9601 | __result.base())); } | |
9602 | }; | |
9603 | # 502 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9604 | template <typename _BI1, typename _BI2> | |
9605 | inline _BI2 | |
9606 | copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) | |
9607 | { | |
9608 | ||
9609 | ||
9610 | ||
9611 | ||
9612 | ||
9613 | ||
9614 | ; | |
9615 | ||
9616 | const bool __bi1 = __is_normal_iterator<_BI1>::__value; | |
9617 | const bool __bi2 = __is_normal_iterator<_BI2>::__value; | |
9618 | return std::__copy_backward_normal<__bi1, __bi2>::copy_b_n(__first, __last, | |
9619 | __result); | |
9620 | } | |
9621 | ||
9622 | template<bool> | |
9623 | struct __fill | |
9624 | { | |
9625 | template<typename _ForwardIterator, typename _Tp> | |
9626 | static void | |
9627 | fill(_ForwardIterator __first, _ForwardIterator __last, | |
9628 | const _Tp& __value) | |
9629 | { | |
9630 | for (; __first != __last; ++__first) | |
9631 | *__first = __value; | |
9632 | } | |
9633 | }; | |
9634 | ||
9635 | template<> | |
9636 | struct __fill<true> | |
9637 | { | |
9638 | template<typename _ForwardIterator, typename _Tp> | |
9639 | static void | |
9640 | fill(_ForwardIterator __first, _ForwardIterator __last, | |
9641 | const _Tp& __value) | |
9642 | { | |
9643 | const _Tp __tmp = __value; | |
9644 | for (; __first != __last; ++__first) | |
9645 | *__first = __tmp; | |
9646 | } | |
9647 | }; | |
9648 | # 558 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9649 | template<typename _ForwardIterator, typename _Tp> | |
9650 | void | |
9651 | fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) | |
9652 | { | |
9653 | ||
9654 | ||
9655 | ||
9656 | ; | |
9657 | ||
9658 | const bool __scalar = __is_scalar<_Tp>::__value; | |
9659 | std::__fill<__scalar>::fill(__first, __last, __value); | |
9660 | } | |
9661 | ||
9662 | ||
9663 | inline void | |
9664 | fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c) | |
9665 | { | |
9666 | ; | |
9667 | const unsigned char __tmp = __c; | |
9668 | std::memset(__first, __tmp, __last - __first); | |
9669 | } | |
9670 | ||
9671 | inline void | |
9672 | fill(signed char* __first, signed char* __last, const signed char& __c) | |
9673 | { | |
9674 | ; | |
9675 | const signed char __tmp = __c; | |
9676 | std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first); | |
9677 | } | |
9678 | ||
9679 | inline void | |
9680 | fill(char* __first, char* __last, const char& __c) | |
9681 | { | |
9682 | ; | |
9683 | const char __tmp = __c; | |
9684 | std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first); | |
9685 | } | |
9686 | ||
9687 | template<bool> | |
9688 | struct __fill_n | |
9689 | { | |
9690 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
9691 | static _OutputIterator | |
9692 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
9693 | { | |
9694 | for (; __n > 0; --__n, ++__first) | |
9695 | *__first = __value; | |
9696 | return __first; | |
9697 | } | |
9698 | }; | |
9699 | ||
9700 | template<> | |
9701 | struct __fill_n<true> | |
9702 | { | |
9703 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
9704 | static _OutputIterator | |
9705 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
9706 | { | |
9707 | const _Tp __tmp = __value; | |
9708 | for (; __n > 0; --__n, ++__first) | |
9709 | *__first = __tmp; | |
9710 | return __first; | |
9711 | } | |
9712 | }; | |
9713 | # 634 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9714 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
9715 | _OutputIterator | |
9716 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
9717 | { | |
9718 | ||
9719 | ||
9720 | ||
9721 | const bool __scalar = __is_scalar<_Tp>::__value; | |
9722 | return std::__fill_n<__scalar>::fill_n(__first, __n, __value); | |
9723 | } | |
9724 | ||
9725 | template<typename _Size> | |
9726 | inline unsigned char* | |
9727 | fill_n(unsigned char* __first, _Size __n, const unsigned char& __c) | |
9728 | { | |
9729 | std::fill(__first, __first + __n, __c); | |
9730 | return __first + __n; | |
9731 | } | |
9732 | ||
9733 | template<typename _Size> | |
9734 | inline signed char* | |
9735 | fill_n(char* __first, _Size __n, const signed char& __c) | |
9736 | { | |
9737 | std::fill(__first, __first + __n, __c); | |
9738 | return __first + __n; | |
9739 | } | |
9740 | ||
9741 | template<typename _Size> | |
9742 | inline char* | |
9743 | fill_n(char* __first, _Size __n, const char& __c) | |
9744 | { | |
9745 | std::fill(__first, __first + __n, __c); | |
9746 | return __first + __n; | |
9747 | } | |
9748 | # 681 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9749 | template<typename _InputIterator1, typename _InputIterator2> | |
9750 | pair<_InputIterator1, _InputIterator2> | |
9751 | mismatch(_InputIterator1 __first1, _InputIterator1 __last1, | |
9752 | _InputIterator2 __first2) | |
9753 | { | |
9754 | ||
9755 | ||
9756 | ||
9757 | ||
9758 | ||
9759 | ||
9760 | ; | |
9761 | ||
9762 | while (__first1 != __last1 && *__first1 == *__first2) | |
9763 | { | |
9764 | ++__first1; | |
9765 | ++__first2; | |
9766 | } | |
9767 | return pair<_InputIterator1, _InputIterator2>(__first1, __first2); | |
9768 | } | |
9769 | # 716 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9770 | template<typename _InputIterator1, typename _InputIterator2, | |
9771 | typename _BinaryPredicate> | |
9772 | pair<_InputIterator1, _InputIterator2> | |
9773 | mismatch(_InputIterator1 __first1, _InputIterator1 __last1, | |
9774 | _InputIterator2 __first2, _BinaryPredicate __binary_pred) | |
9775 | { | |
9776 | ||
9777 | ||
9778 | ||
9779 | ; | |
9780 | ||
9781 | while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) | |
9782 | { | |
9783 | ++__first1; | |
9784 | ++__first2; | |
9785 | } | |
9786 | return pair<_InputIterator1, _InputIterator2>(__first1, __first2); | |
9787 | } | |
9788 | # 746 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9789 | template<typename _InputIterator1, typename _InputIterator2> | |
9790 | inline bool | |
9791 | equal(_InputIterator1 __first1, _InputIterator1 __last1, | |
9792 | _InputIterator2 __first2) | |
9793 | { | |
9794 | ||
9795 | ||
9796 | ||
9797 | ||
9798 | ||
9799 | ||
9800 | ; | |
9801 | ||
9802 | for (; __first1 != __last1; ++__first1, ++__first2) | |
9803 | if (!(*__first1 == *__first2)) | |
9804 | return false; | |
9805 | return true; | |
9806 | } | |
9807 | # 778 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9808 | template<typename _InputIterator1, typename _InputIterator2, | |
9809 | typename _BinaryPredicate> | |
9810 | inline bool | |
9811 | equal(_InputIterator1 __first1, _InputIterator1 __last1, | |
9812 | _InputIterator2 __first2, | |
9813 | _BinaryPredicate __binary_pred) | |
9814 | { | |
9815 | ||
9816 | ||
9817 | ||
9818 | ; | |
9819 | ||
9820 | for (; __first1 != __last1; ++__first1, ++__first2) | |
9821 | if (!__binary_pred(*__first1, *__first2)) | |
9822 | return false; | |
9823 | return true; | |
9824 | } | |
9825 | # 810 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9826 | template<typename _InputIterator1, typename _InputIterator2> | |
9827 | bool | |
9828 | lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, | |
9829 | _InputIterator2 __first2, _InputIterator2 __last2) | |
9830 | { | |
9831 | ||
9832 | ||
9833 | ||
9834 | ||
9835 | ||
9836 | ||
9837 | ||
9838 | ||
9839 | ||
9840 | ; | |
9841 | ; | |
9842 | ||
9843 | for (; __first1 != __last1 && __first2 != __last2; | |
9844 | ++__first1, ++__first2) | |
9845 | { | |
9846 | if (*__first1 < *__first2) | |
9847 | return true; | |
9848 | if (*__first2 < *__first1) | |
9849 | return false; | |
9850 | } | |
9851 | return __first1 == __last1 && __first2 != __last2; | |
9852 | } | |
9853 | # 850 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algobase.h" 3 | |
9854 | template<typename _InputIterator1, typename _InputIterator2, | |
9855 | typename _Compare> | |
9856 | bool | |
9857 | lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, | |
9858 | _InputIterator2 __first2, _InputIterator2 __last2, | |
9859 | _Compare __comp) | |
9860 | { | |
9861 | ||
9862 | ||
9863 | ||
9864 | ; | |
9865 | ; | |
9866 | ||
9867 | for (; __first1 != __last1 && __first2 != __last2; | |
9868 | ++__first1, ++__first2) | |
9869 | { | |
9870 | if (__comp(*__first1, *__first2)) | |
9871 | return true; | |
9872 | if (__comp(*__first2, *__first1)) | |
9873 | return false; | |
9874 | } | |
9875 | return __first1 == __last1 && __first2 != __last2; | |
9876 | } | |
9877 | ||
9878 | inline bool | |
9879 | lexicographical_compare(const unsigned char* __first1, | |
9880 | const unsigned char* __last1, | |
9881 | const unsigned char* __first2, | |
9882 | const unsigned char* __last2) | |
9883 | { | |
9884 | ; | |
9885 | ; | |
9886 | ||
9887 | const size_t __len1 = __last1 - __first1; | |
9888 | const size_t __len2 = __last2 - __first2; | |
9889 | const int __result = std::memcmp(__first1, __first2, | |
9890 | std::min(__len1, __len2)); | |
9891 | return __result != 0 ? __result < 0 : __len1 < __len2; | |
9892 | } | |
9893 | ||
9894 | inline bool | |
9895 | lexicographical_compare(const char* __first1, const char* __last1, | |
9896 | const char* __first2, const char* __last2) | |
9897 | { | |
9898 | ; | |
9899 | ; | |
9900 | ||
9901 | ||
9902 | ||
9903 | ||
9904 | ||
9905 | ||
9906 | ||
9907 | return std::lexicographical_compare((const unsigned char*) __first1, | |
9908 | (const unsigned char*) __last1, | |
9909 | (const unsigned char*) __first2, | |
9910 | (const unsigned char*) __last2); | |
9911 | ||
9912 | } | |
9913 | ||
9914 | } | |
9915 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/char_traits.h" 2 3 | |
9916 | ||
9917 | ||
9918 | namespace __gnu_cxx | |
9919 | { | |
9920 | # 61 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/char_traits.h" 3 | |
9921 | template <class _CharT> | |
9922 | struct _Char_types | |
9923 | { | |
9924 | typedef unsigned long int_type; | |
9925 | typedef std::streampos pos_type; | |
9926 | typedef std::streamoff off_type; | |
9927 | typedef std::mbstate_t state_type; | |
9928 | }; | |
9929 | # 86 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/char_traits.h" 3 | |
9930 | template<typename _CharT> | |
9931 | struct char_traits | |
9932 | { | |
9933 | typedef _CharT char_type; | |
9934 | typedef typename _Char_types<_CharT>::int_type int_type; | |
9935 | typedef typename _Char_types<_CharT>::pos_type pos_type; | |
9936 | typedef typename _Char_types<_CharT>::off_type off_type; | |
9937 | typedef typename _Char_types<_CharT>::state_type state_type; | |
9938 | ||
9939 | static void | |
9940 | assign(char_type& __c1, const char_type& __c2) | |
9941 | { __c1 = __c2; } | |
9942 | ||
9943 | static bool | |
9944 | eq(const char_type& __c1, const char_type& __c2) | |
9945 | { return __c1 == __c2; } | |
9946 | ||
9947 | static bool | |
9948 | lt(const char_type& __c1, const char_type& __c2) | |
9949 | { return __c1 < __c2; } | |
9950 | ||
9951 | static int | |
9952 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | |
9953 | ||
9954 | static std::size_t | |
9955 | length(const char_type* __s); | |
9956 | ||
9957 | static const char_type* | |
9958 | find(const char_type* __s, std::size_t __n, const char_type& __a); | |
9959 | ||
9960 | static char_type* | |
9961 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | |
9962 | ||
9963 | static char_type* | |
9964 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | |
9965 | ||
9966 | static char_type* | |
9967 | assign(char_type* __s, std::size_t __n, char_type __a); | |
9968 | ||
9969 | static char_type | |
9970 | to_char_type(const int_type& __c) | |
9971 | { return static_cast<char_type>(__c); } | |
9972 | ||
9973 | static int_type | |
9974 | to_int_type(const char_type& __c) | |
9975 | { return static_cast<int_type>(__c); } | |
9976 | ||
9977 | static bool | |
9978 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
9979 | { return __c1 == __c2; } | |
9980 | ||
9981 | static int_type | |
9982 | eof() | |
9983 | { return static_cast<int_type>((-1)); } | |
9984 | ||
9985 | static int_type | |
9986 | not_eof(const int_type& __c) | |
9987 | { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } | |
9988 | }; | |
9989 | ||
9990 | template<typename _CharT> | |
9991 | int | |
9992 | char_traits<_CharT>:: | |
9993 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | |
9994 | { | |
9995 | for (size_t __i = 0; __i < __n; ++__i) | |
9996 | if (lt(__s1[__i], __s2[__i])) | |
9997 | return -1; | |
9998 | else if (lt(__s2[__i], __s1[__i])) | |
9999 | return 1; | |
10000 | return 0; | |
10001 | } | |
10002 | ||
10003 | template<typename _CharT> | |
10004 | std::size_t | |
10005 | char_traits<_CharT>:: | |
10006 | length(const char_type* __p) | |
10007 | { | |
10008 | std::size_t __i = 0; | |
10009 | while (!eq(__p[__i], char_type())) | |
10010 | ++__i; | |
10011 | return __i; | |
10012 | } | |
10013 | ||
10014 | template<typename _CharT> | |
10015 | const typename char_traits<_CharT>::char_type* | |
10016 | char_traits<_CharT>:: | |
10017 | find(const char_type* __s, std::size_t __n, const char_type& __a) | |
10018 | { | |
10019 | for (std::size_t __i = 0; __i < __n; ++__i) | |
10020 | if (eq(__s[__i], __a)) | |
10021 | return __s + __i; | |
10022 | return 0; | |
10023 | } | |
10024 | ||
10025 | template<typename _CharT> | |
10026 | typename char_traits<_CharT>::char_type* | |
10027 | char_traits<_CharT>:: | |
10028 | move(char_type* __s1, const char_type* __s2, std::size_t __n) | |
10029 | { | |
10030 | return static_cast<_CharT*>(std::memmove(__s1, __s2, | |
10031 | __n * sizeof(char_type))); | |
10032 | } | |
10033 | ||
10034 | template<typename _CharT> | |
10035 | typename char_traits<_CharT>::char_type* | |
10036 | char_traits<_CharT>:: | |
10037 | copy(char_type* __s1, const char_type* __s2, std::size_t __n) | |
10038 | { | |
10039 | std::copy(__s2, __s2 + __n, __s1); | |
10040 | return __s1; | |
10041 | } | |
10042 | ||
10043 | template<typename _CharT> | |
10044 | typename char_traits<_CharT>::char_type* | |
10045 | char_traits<_CharT>:: | |
10046 | assign(char_type* __s, std::size_t __n, char_type __a) | |
10047 | { | |
10048 | std::fill_n(__s, __n, __a); | |
10049 | return __s; | |
10050 | } | |
10051 | } | |
10052 | ||
10053 | namespace std | |
10054 | { | |
10055 | # 224 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/char_traits.h" 3 | |
10056 | template<class _CharT> | |
10057 | struct char_traits : public __gnu_cxx::char_traits<_CharT> | |
10058 | { }; | |
10059 | ||
10060 | ||
10061 | ||
10062 | template<> | |
10063 | struct char_traits<char> | |
10064 | { | |
10065 | typedef char char_type; | |
10066 | typedef int int_type; | |
10067 | typedef streampos pos_type; | |
10068 | typedef streamoff off_type; | |
10069 | typedef mbstate_t state_type; | |
10070 | ||
10071 | static void | |
10072 | assign(char_type& __c1, const char_type& __c2) | |
10073 | { __c1 = __c2; } | |
10074 | ||
10075 | static bool | |
10076 | eq(const char_type& __c1, const char_type& __c2) | |
10077 | { return __c1 == __c2; } | |
10078 | ||
10079 | static bool | |
10080 | lt(const char_type& __c1, const char_type& __c2) | |
10081 | { return __c1 < __c2; } | |
10082 | ||
10083 | static int | |
10084 | compare(const char_type* __s1, const char_type* __s2, size_t __n) | |
10085 | { return memcmp(__s1, __s2, __n); } | |
10086 | ||
10087 | static size_t | |
10088 | length(const char_type* __s) | |
10089 | { return strlen(__s); } | |
10090 | ||
10091 | static const char_type* | |
10092 | find(const char_type* __s, size_t __n, const char_type& __a) | |
10093 | { return static_cast<const char_type*>(memchr(__s, __a, __n)); } | |
10094 | ||
10095 | static char_type* | |
10096 | move(char_type* __s1, const char_type* __s2, size_t __n) | |
10097 | { return static_cast<char_type*>(memmove(__s1, __s2, __n)); } | |
10098 | ||
10099 | static char_type* | |
10100 | copy(char_type* __s1, const char_type* __s2, size_t __n) | |
10101 | { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); } | |
10102 | ||
10103 | static char_type* | |
10104 | assign(char_type* __s, size_t __n, char_type __a) | |
10105 | { return static_cast<char_type*>(memset(__s, __a, __n)); } | |
10106 | ||
10107 | static char_type | |
10108 | to_char_type(const int_type& __c) | |
10109 | { return static_cast<char_type>(__c); } | |
10110 | ||
10111 | ||
10112 | ||
10113 | static int_type | |
10114 | to_int_type(const char_type& __c) | |
10115 | { return static_cast<int_type>(static_cast<unsigned char>(__c)); } | |
10116 | ||
10117 | static bool | |
10118 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
10119 | { return __c1 == __c2; } | |
10120 | ||
10121 | static int_type | |
10122 | eof() { return static_cast<int_type>((-1)); } | |
10123 | ||
10124 | static int_type | |
10125 | not_eof(const int_type& __c) | |
10126 | { return (__c == eof()) ? 0 : __c; } | |
10127 | }; | |
10128 | ||
10129 | ||
10130 | ||
10131 | ||
10132 | template<> | |
10133 | struct char_traits<wchar_t> | |
10134 | { | |
10135 | typedef wchar_t char_type; | |
10136 | typedef wint_t int_type; | |
10137 | typedef streamoff off_type; | |
10138 | typedef wstreampos pos_type; | |
10139 | typedef mbstate_t state_type; | |
10140 | ||
10141 | static void | |
10142 | assign(char_type& __c1, const char_type& __c2) | |
10143 | { __c1 = __c2; } | |
10144 | ||
10145 | static bool | |
10146 | eq(const char_type& __c1, const char_type& __c2) | |
10147 | { return __c1 == __c2; } | |
10148 | ||
10149 | static bool | |
10150 | lt(const char_type& __c1, const char_type& __c2) | |
10151 | { return __c1 < __c2; } | |
10152 | ||
10153 | static int | |
10154 | compare(const char_type* __s1, const char_type* __s2, size_t __n) | |
10155 | { return wmemcmp(__s1, __s2, __n); } | |
10156 | ||
10157 | static size_t | |
10158 | length(const char_type* __s) | |
10159 | { return wcslen(__s); } | |
10160 | ||
10161 | static const char_type* | |
10162 | find(const char_type* __s, size_t __n, const char_type& __a) | |
10163 | { return wmemchr(__s, __a, __n); } | |
10164 | ||
10165 | static char_type* | |
10166 | move(char_type* __s1, const char_type* __s2, size_t __n) | |
10167 | { return wmemmove(__s1, __s2, __n); } | |
10168 | ||
10169 | static char_type* | |
10170 | copy(char_type* __s1, const char_type* __s2, size_t __n) | |
10171 | { return wmemcpy(__s1, __s2, __n); } | |
10172 | ||
10173 | static char_type* | |
10174 | assign(char_type* __s, size_t __n, char_type __a) | |
10175 | { return wmemset(__s, __a, __n); } | |
10176 | ||
10177 | static char_type | |
10178 | to_char_type(const int_type& __c) { return char_type(__c); } | |
10179 | ||
10180 | static int_type | |
10181 | to_int_type(const char_type& __c) { return int_type(__c); } | |
10182 | ||
10183 | static bool | |
10184 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
10185 | { return __c1 == __c2; } | |
10186 | ||
10187 | static int_type | |
10188 | eof() { return static_cast<int_type>((0xffffffffu)); } | |
10189 | ||
10190 | static int_type | |
10191 | not_eof(const int_type& __c) | |
10192 | { return eq_int_type(__c, eof()) ? 0 : __c; } | |
10193 | }; | |
10194 | ||
10195 | ||
10196 | } | |
10197 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 2 3 | |
10198 | ||
10199 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/localefwd.h" 1 3 | |
10200 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/localefwd.h" 3 | |
10201 | ||
10202 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/localefwd.h" 3 | |
10203 | ||
10204 | ||
10205 | ||
10206 | ||
10207 | ||
10208 | ||
10209 | namespace std | |
10210 | { | |
10211 | ||
10212 | class locale; | |
10213 | ||
10214 | ||
10215 | template<typename _CharT> | |
10216 | inline bool | |
10217 | isspace(_CharT, const locale&); | |
10218 | ||
10219 | template<typename _CharT> | |
10220 | inline bool | |
10221 | isprint(_CharT, const locale&); | |
10222 | ||
10223 | template<typename _CharT> | |
10224 | inline bool | |
10225 | iscntrl(_CharT, const locale&); | |
10226 | ||
10227 | template<typename _CharT> | |
10228 | inline bool | |
10229 | isupper(_CharT, const locale&); | |
10230 | ||
10231 | template<typename _CharT> | |
10232 | inline bool | |
10233 | islower(_CharT, const locale&); | |
10234 | ||
10235 | template<typename _CharT> | |
10236 | inline bool | |
10237 | isalpha(_CharT, const locale&); | |
10238 | ||
10239 | template<typename _CharT> | |
10240 | inline bool | |
10241 | isdigit(_CharT, const locale&); | |
10242 | ||
10243 | template<typename _CharT> | |
10244 | inline bool | |
10245 | ispunct(_CharT, const locale&); | |
10246 | ||
10247 | template<typename _CharT> | |
10248 | inline bool | |
10249 | isxdigit(_CharT, const locale&); | |
10250 | ||
10251 | template<typename _CharT> | |
10252 | inline bool | |
10253 | isalnum(_CharT, const locale&); | |
10254 | ||
10255 | template<typename _CharT> | |
10256 | inline bool | |
10257 | isgraph(_CharT, const locale&); | |
10258 | ||
10259 | template<typename _CharT> | |
10260 | inline _CharT | |
10261 | toupper(_CharT, const locale&); | |
10262 | ||
10263 | template<typename _CharT> | |
10264 | inline _CharT | |
10265 | tolower(_CharT, const locale&); | |
10266 | ||
10267 | ||
10268 | class ctype_base; | |
10269 | template<typename _CharT> | |
10270 | class ctype; | |
10271 | template<> class ctype<char>; | |
10272 | ||
10273 | template<> class ctype<wchar_t>; | |
10274 | ||
10275 | template<typename _CharT> | |
10276 | class ctype_byname; | |
10277 | ||
10278 | ||
10279 | class codecvt_base; | |
10280 | class __enc_traits; | |
10281 | template<typename _InternT, typename _ExternT, typename _StateT> | |
10282 | class codecvt; | |
10283 | template<> class codecvt<char, char, mbstate_t>; | |
10284 | ||
10285 | template<> class codecvt<wchar_t, char, mbstate_t>; | |
10286 | ||
10287 | template<typename _InternT, typename _ExternT, typename _StateT> | |
10288 | class codecvt_byname; | |
10289 | ||
10290 | ||
10291 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
10292 | class num_get; | |
10293 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
10294 | class num_put; | |
10295 | template<typename _CharT> class numpunct; | |
10296 | template<typename _CharT> class numpunct_byname; | |
10297 | ||
10298 | ||
10299 | template<typename _CharT> | |
10300 | class collate; | |
10301 | template<typename _CharT> class | |
10302 | collate_byname; | |
10303 | ||
10304 | ||
10305 | class time_base; | |
10306 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
10307 | class time_get; | |
10308 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
10309 | class time_get_byname; | |
10310 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
10311 | class time_put; | |
10312 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
10313 | class time_put_byname; | |
10314 | ||
10315 | ||
10316 | class money_base; | |
10317 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
10318 | class money_get; | |
10319 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
10320 | class money_put; | |
10321 | template<typename _CharT, bool _Intl = false> | |
10322 | class moneypunct; | |
10323 | template<typename _CharT, bool _Intl = false> | |
10324 | class moneypunct_byname; | |
10325 | ||
10326 | ||
10327 | class messages_base; | |
10328 | template<typename _CharT> | |
10329 | class messages; | |
10330 | template<typename _CharT> | |
10331 | class messages_byname; | |
10332 | ||
10333 | template<typename _Facet> | |
10334 | bool | |
10335 | has_facet(const locale& __loc) throw(); | |
10336 | ||
10337 | template<typename _Facet> | |
10338 | const _Facet& | |
10339 | use_facet(const locale& __loc); | |
10340 | ||
10341 | template<typename _Facet> | |
10342 | inline const _Facet& | |
10343 | __check_facet(const _Facet* __f) | |
10344 | { | |
10345 | if (!__f) | |
10346 | __throw_bad_cast(); | |
10347 | return *__f; | |
10348 | } | |
10349 | } | |
10350 | # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 2 3 | |
10351 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 1 3 | |
10352 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
10353 | ||
10354 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
10355 | ||
10356 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/atomicity.h" 1 3 | |
10357 | # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/atomicity.h" 3 | |
10358 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/atomic_word.h" 1 3 | |
10359 | # 33 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/atomic_word.h" 3 | |
10360 | typedef int _Atomic_word; | |
10361 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/atomicity.h" 2 3 | |
10362 | ||
10363 | namespace __gnu_cxx | |
10364 | { | |
10365 | _Atomic_word | |
10366 | __attribute__ ((__unused__)) | |
10367 | __exchange_and_add(volatile _Atomic_word* __mem, int __val); | |
10368 | ||
10369 | void | |
10370 | __attribute__ ((__unused__)) | |
10371 | __atomic_add(volatile _Atomic_word* __mem, int __val); | |
10372 | } | |
10373 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 2 3 | |
10374 | ||
10375 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 1 3 | |
10376 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
10377 | ||
10378 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
10379 | ||
10380 | ||
10381 | ||
10382 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 1 3 | |
10383 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 3 | |
10384 | ||
10385 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 3 | |
10386 | #pragma GCC visibility push(default) | |
10387 | ||
10388 | ||
10389 | ||
10390 | ||
10391 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 1 3 | |
10392 | # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
10393 | ||
10394 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
10395 | #pragma GCC visibility push(default) | |
10396 | ||
10397 | ||
10398 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/allocator.h" 1 3 | |
10399 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/allocator.h" 3 | |
10400 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 1 3 | |
10401 | # 34 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 3 | |
10402 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ext/new_allocator.h" 1 3 | |
10403 | # 37 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ext/new_allocator.h" 3 | |
10404 | #pragma GCC visibility push(default) | |
10405 | ||
10406 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/new" 1 3 | |
10407 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/new" 3 | |
10408 | #pragma GCC visibility push(default) | |
10409 | ||
10410 | extern "C++" { | |
10411 | ||
10412 | namespace std | |
10413 | { | |
10414 | ||
10415 | ||
10416 | ||
10417 | ||
10418 | ||
10419 | class bad_alloc : public exception | |
10420 | { | |
10421 | public: | |
10422 | bad_alloc() throw() { } | |
10423 | ||
10424 | ||
10425 | virtual ~bad_alloc() throw(); | |
10426 | }; | |
10427 | ||
10428 | struct nothrow_t { }; | |
10429 | extern const nothrow_t nothrow; | |
10430 | ||
10431 | ||
10432 | typedef void (*new_handler)(); | |
10433 | ||
10434 | new_handler set_new_handler(new_handler) throw(); | |
10435 | } | |
10436 | # 84 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/new" 3 | |
10437 | void* operator new(std::size_t) throw (std::bad_alloc); | |
10438 | void* operator new[](std::size_t) throw (std::bad_alloc); | |
10439 | void operator delete(void*) throw(); | |
10440 | void operator delete[](void*) throw(); | |
10441 | void* operator new(std::size_t, const std::nothrow_t&) throw(); | |
10442 | void* operator new[](std::size_t, const std::nothrow_t&) throw(); | |
10443 | void operator delete(void*, const std::nothrow_t&) throw(); | |
10444 | void operator delete[](void*, const std::nothrow_t&) throw(); | |
10445 | ||
10446 | ||
10447 | inline void* operator new(std::size_t, void* __p) throw() { return __p; } | |
10448 | inline void* operator new[](std::size_t, void* __p) throw() { return __p; } | |
10449 | ||
10450 | ||
10451 | inline void operator delete (void*, void*) throw() { } | |
10452 | inline void operator delete[](void*, void*) throw() { } | |
10453 | ||
10454 | } | |
10455 | ||
10456 | #pragma GCC visibility pop | |
10457 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ext/new_allocator.h" 2 3 | |
10458 | ||
10459 | ||
10460 | namespace __gnu_cxx | |
10461 | { | |
10462 | ||
10463 | ||
10464 | ||
10465 | ||
10466 | ||
10467 | ||
10468 | ||
10469 | template<typename _Tp> | |
10470 | class new_allocator | |
10471 | { | |
10472 | public: | |
10473 | typedef size_t size_type; | |
10474 | typedef ptrdiff_t difference_type; | |
10475 | typedef _Tp* pointer; | |
10476 | typedef const _Tp* const_pointer; | |
10477 | typedef _Tp& reference; | |
10478 | typedef const _Tp& const_reference; | |
10479 | typedef _Tp value_type; | |
10480 | ||
10481 | template<typename _Tp1> | |
10482 | struct rebind | |
10483 | { typedef new_allocator<_Tp1> other; }; | |
10484 | ||
10485 | new_allocator() throw() { } | |
10486 | ||
10487 | new_allocator(const new_allocator&) throw() { } | |
10488 | ||
10489 | template<typename _Tp1> | |
10490 | new_allocator(const new_allocator<_Tp1>&) throw() { } | |
10491 | ||
10492 | ~new_allocator() throw() { } | |
10493 | ||
10494 | pointer | |
10495 | address(reference __x) const { return &__x; } | |
10496 | ||
10497 | const_pointer | |
10498 | address(const_reference __x) const { return &__x; } | |
10499 | ||
10500 | ||
10501 | ||
10502 | pointer | |
10503 | allocate(size_type __n, const void* = 0) | |
10504 | { | |
10505 | if (__builtin_expect(__n > this->max_size(), false)) | |
10506 | std::__throw_bad_alloc(); | |
10507 | ||
10508 | return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); | |
10509 | } | |
10510 | ||
10511 | ||
10512 | void | |
10513 | deallocate(pointer __p, size_type) | |
10514 | { ::operator delete(__p); } | |
10515 | ||
10516 | size_type | |
10517 | max_size() const throw() | |
10518 | { return size_t(-1) / sizeof(_Tp); } | |
10519 | ||
10520 | ||
10521 | ||
10522 | void | |
10523 | construct(pointer __p, const _Tp& __val) | |
10524 | { ::new(__p) _Tp(__val); } | |
10525 | ||
10526 | void | |
10527 | destroy(pointer __p) { __p->~_Tp(); } | |
10528 | }; | |
10529 | ||
10530 | template<typename _Tp> | |
10531 | inline bool | |
10532 | operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) | |
10533 | { return true; } | |
10534 | ||
10535 | template<typename _Tp> | |
10536 | inline bool | |
10537 | operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) | |
10538 | { return false; } | |
10539 | } | |
10540 | ||
10541 | #pragma GCC visibility pop | |
10542 | # 35 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 2 3 | |
10543 | # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/allocator.h" 2 3 | |
10544 | ||
10545 | namespace std | |
10546 | { | |
10547 | template<typename _Tp> | |
10548 | class allocator; | |
10549 | ||
10550 | ||
10551 | template<> | |
10552 | class allocator<void> | |
10553 | { | |
10554 | public: | |
10555 | typedef size_t size_type; | |
10556 | typedef ptrdiff_t difference_type; | |
10557 | typedef void* pointer; | |
10558 | typedef const void* const_pointer; | |
10559 | typedef void value_type; | |
10560 | ||
10561 | template<typename _Tp1> | |
10562 | struct rebind | |
10563 | { typedef allocator<_Tp1> other; }; | |
10564 | }; | |
10565 | ||
10566 | ||
10567 | ||
10568 | ||
10569 | ||
10570 | ||
10571 | ||
10572 | template<typename _Tp> | |
10573 | class allocator: public __gnu_cxx::new_allocator<_Tp> | |
10574 | { | |
10575 | public: | |
10576 | typedef size_t size_type; | |
10577 | typedef ptrdiff_t difference_type; | |
10578 | typedef _Tp* pointer; | |
10579 | typedef const _Tp* const_pointer; | |
10580 | typedef _Tp& reference; | |
10581 | typedef const _Tp& const_reference; | |
10582 | typedef _Tp value_type; | |
10583 | ||
10584 | template<typename _Tp1> | |
10585 | struct rebind | |
10586 | { typedef allocator<_Tp1> other; }; | |
10587 | ||
10588 | allocator() throw() { } | |
10589 | ||
10590 | allocator(const allocator& __a) throw() | |
10591 | : __gnu_cxx::new_allocator<_Tp>(__a) { } | |
10592 | ||
10593 | template<typename _Tp1> | |
10594 | allocator(const allocator<_Tp1>&) throw() { } | |
10595 | ||
10596 | ~allocator() throw() { } | |
10597 | ||
10598 | ||
10599 | }; | |
10600 | ||
10601 | template<typename _T1, typename _T2> | |
10602 | inline bool | |
10603 | operator==(const allocator<_T1>&, const allocator<_T2>&) | |
10604 | { return true; } | |
10605 | ||
10606 | template<typename _T1, typename _T2> | |
10607 | inline bool | |
10608 | operator!=(const allocator<_T1>&, const allocator<_T2>&) | |
10609 | { return false; } | |
10610 | ||
10611 | ||
10612 | ||
10613 | ||
10614 | ||
10615 | extern template class allocator<char>; | |
10616 | extern template class allocator<wchar_t>; | |
10617 | ||
10618 | ||
10619 | ||
10620 | ||
10621 | } | |
10622 | # 56 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 2 3 | |
10623 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h" 1 3 | |
10624 | # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h" 3 | |
10625 | namespace std | |
10626 | { | |
10627 | ||
10628 | ||
10629 | ||
10630 | ||
10631 | ||
10632 | ||
10633 | template<typename _T1, typename _T2> | |
10634 | inline void | |
10635 | _Construct(_T1* __p, const _T2& __value) | |
10636 | { | |
10637 | ||
10638 | ||
10639 | ::new(static_cast<void*>(__p)) _T1(__value); | |
10640 | } | |
10641 | ||
10642 | ||
10643 | ||
10644 | ||
10645 | ||
10646 | ||
10647 | ||
10648 | template<typename _T1> | |
10649 | inline void | |
10650 | _Construct(_T1* __p) | |
10651 | { | |
10652 | ||
10653 | ||
10654 | ::new(static_cast<void*>(__p)) _T1(); | |
10655 | } | |
10656 | ||
10657 | ||
10658 | ||
10659 | ||
10660 | ||
10661 | ||
10662 | template<typename _Tp> | |
10663 | inline void | |
10664 | _Destroy(_Tp* __pointer) | |
10665 | { __pointer->~_Tp(); } | |
10666 | # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h" 3 | |
10667 | template<typename _ForwardIterator> | |
10668 | inline void | |
10669 | __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, | |
10670 | __false_type) | |
10671 | { | |
10672 | for (; __first != __last; ++__first) | |
10673 | std::_Destroy(&*__first); | |
10674 | } | |
10675 | # 134 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h" 3 | |
10676 | template<typename _ForwardIterator> | |
10677 | inline void | |
10678 | __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) | |
10679 | { } | |
10680 | # 146 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h" 3 | |
10681 | template<typename _ForwardIterator> | |
10682 | inline void | |
10683 | _Destroy(_ForwardIterator __first, _ForwardIterator __last) | |
10684 | { | |
10685 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
10686 | _Value_type; | |
10687 | typedef typename std::__is_scalar<_Value_type>::__type | |
10688 | _Has_trivial_destructor; | |
10689 | ||
10690 | std::__destroy_aux(__first, __last, _Has_trivial_destructor()); | |
10691 | } | |
10692 | # 166 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h" 3 | |
10693 | template <typename _Tp> class allocator; | |
10694 | ||
10695 | template<typename _ForwardIterator, typename _Allocator> | |
10696 | void | |
10697 | _Destroy(_ForwardIterator __first, _ForwardIterator __last, | |
10698 | _Allocator __alloc) | |
10699 | { | |
10700 | for (; __first != __last; ++__first) | |
10701 | __alloc.destroy(&*__first); | |
10702 | } | |
10703 | ||
10704 | template<typename _ForwardIterator, typename _Tp> | |
10705 | inline void | |
10706 | _Destroy(_ForwardIterator __first, _ForwardIterator __last, | |
10707 | allocator<_Tp>) | |
10708 | { | |
10709 | _Destroy(__first, __last); | |
10710 | } | |
10711 | ||
10712 | ||
10713 | } | |
10714 | # 57 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 2 3 | |
10715 | ||
10716 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h" 1 3 | |
10717 | # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h" 3 | |
10718 | namespace std | |
10719 | { | |
10720 | ||
10721 | template<typename _InputIterator, typename _ForwardIterator> | |
10722 | inline _ForwardIterator | |
10723 | __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, | |
10724 | _ForwardIterator __result, | |
10725 | __true_type) | |
10726 | { return std::copy(__first, __last, __result); } | |
10727 | ||
10728 | template<typename _InputIterator, typename _ForwardIterator> | |
10729 | inline _ForwardIterator | |
10730 | __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, | |
10731 | _ForwardIterator __result, | |
10732 | __false_type) | |
10733 | { | |
10734 | _ForwardIterator __cur = __result; | |
10735 | try | |
10736 | { | |
10737 | for (; __first != __last; ++__first, ++__cur) | |
10738 | std::_Construct(&*__cur, *__first); | |
10739 | return __cur; | |
10740 | } | |
10741 | catch(...) | |
10742 | { | |
10743 | std::_Destroy(__result, __cur); | |
10744 | throw; | |
10745 | } | |
10746 | } | |
10747 | # 105 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h" 3 | |
10748 | template<typename _InputIterator, typename _ForwardIterator> | |
10749 | inline _ForwardIterator | |
10750 | uninitialized_copy(_InputIterator __first, _InputIterator __last, | |
10751 | _ForwardIterator __result) | |
10752 | { | |
10753 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
10754 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
10755 | return std::__uninitialized_copy_aux(__first, __last, __result, | |
10756 | _Is_POD()); | |
10757 | } | |
10758 | ||
10759 | inline char* | |
10760 | uninitialized_copy(const char* __first, const char* __last, char* __result) | |
10761 | { | |
10762 | std::memmove(__result, __first, __last - __first); | |
10763 | return __result + (__last - __first); | |
10764 | } | |
10765 | ||
10766 | inline wchar_t* | |
10767 | uninitialized_copy(const wchar_t* __first, const wchar_t* __last, | |
10768 | wchar_t* __result) | |
10769 | { | |
10770 | std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); | |
10771 | return __result + (__last - __first); | |
10772 | } | |
10773 | ||
10774 | ||
10775 | ||
10776 | template<typename _ForwardIterator, typename _Tp> | |
10777 | inline void | |
10778 | __uninitialized_fill_aux(_ForwardIterator __first, | |
10779 | _ForwardIterator __last, | |
10780 | const _Tp& __x, __true_type) | |
10781 | { std::fill(__first, __last, __x); } | |
10782 | ||
10783 | template<typename _ForwardIterator, typename _Tp> | |
10784 | void | |
10785 | __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, | |
10786 | const _Tp& __x, __false_type) | |
10787 | { | |
10788 | _ForwardIterator __cur = __first; | |
10789 | try | |
10790 | { | |
10791 | for (; __cur != __last; ++__cur) | |
10792 | std::_Construct(&*__cur, __x); | |
10793 | } | |
10794 | catch(...) | |
10795 | { | |
10796 | std::_Destroy(__first, __cur); | |
10797 | throw; | |
10798 | } | |
10799 | } | |
10800 | # 167 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h" 3 | |
10801 | template<typename _ForwardIterator, typename _Tp> | |
10802 | inline void | |
10803 | uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, | |
10804 | const _Tp& __x) | |
10805 | { | |
10806 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
10807 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
10808 | std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD()); | |
10809 | } | |
10810 | ||
10811 | ||
10812 | ||
10813 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
10814 | inline void | |
10815 | __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, | |
10816 | const _Tp& __x, __true_type) | |
10817 | { std::fill_n(__first, __n, __x); } | |
10818 | ||
10819 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
10820 | void | |
10821 | __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, | |
10822 | const _Tp& __x, __false_type) | |
10823 | { | |
10824 | _ForwardIterator __cur = __first; | |
10825 | try | |
10826 | { | |
10827 | for (; __n > 0; --__n, ++__cur) | |
10828 | std::_Construct(&*__cur, __x); | |
10829 | } | |
10830 | catch(...) | |
10831 | { | |
10832 | std::_Destroy(__first, __cur); | |
10833 | throw; | |
10834 | } | |
10835 | } | |
10836 | # 212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h" 3 | |
10837 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
10838 | inline void | |
10839 | uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) | |
10840 | { | |
10841 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
10842 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
10843 | std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); | |
10844 | } | |
10845 | ||
10846 | ||
10847 | ||
10848 | ||
10849 | ||
10850 | ||
10851 | ||
10852 | template<typename _InputIterator, typename _ForwardIterator, | |
10853 | typename _Allocator> | |
10854 | _ForwardIterator | |
10855 | __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, | |
10856 | _ForwardIterator __result, | |
10857 | _Allocator __alloc) | |
10858 | { | |
10859 | _ForwardIterator __cur = __result; | |
10860 | try | |
10861 | { | |
10862 | for (; __first != __last; ++__first, ++__cur) | |
10863 | __alloc.construct(&*__cur, *__first); | |
10864 | return __cur; | |
10865 | } | |
10866 | catch(...) | |
10867 | { | |
10868 | std::_Destroy(__result, __cur, __alloc); | |
10869 | throw; | |
10870 | } | |
10871 | } | |
10872 | ||
10873 | template<typename _InputIterator, typename _ForwardIterator, typename _Tp> | |
10874 | inline _ForwardIterator | |
10875 | __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, | |
10876 | _ForwardIterator __result, | |
10877 | allocator<_Tp>) | |
10878 | { | |
10879 | return std::uninitialized_copy(__first, __last, __result); | |
10880 | } | |
10881 | ||
10882 | template<typename _ForwardIterator, typename _Tp, typename _Allocator> | |
10883 | void | |
10884 | __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, | |
10885 | const _Tp& __x, _Allocator __alloc) | |
10886 | { | |
10887 | _ForwardIterator __cur = __first; | |
10888 | try | |
10889 | { | |
10890 | for (; __cur != __last; ++__cur) | |
10891 | __alloc.construct(&*__cur, __x); | |
10892 | } | |
10893 | catch(...) | |
10894 | { | |
10895 | std::_Destroy(__first, __cur, __alloc); | |
10896 | throw; | |
10897 | } | |
10898 | } | |
10899 | ||
10900 | template<typename _ForwardIterator, typename _Tp, typename _Tp2> | |
10901 | inline void | |
10902 | __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, | |
10903 | const _Tp& __x, allocator<_Tp2>) | |
10904 | { | |
10905 | std::uninitialized_fill(__first, __last, __x); | |
10906 | } | |
10907 | ||
10908 | template<typename _ForwardIterator, typename _Size, typename _Tp, | |
10909 | typename _Allocator> | |
10910 | void | |
10911 | __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, | |
10912 | const _Tp& __x, | |
10913 | _Allocator __alloc) | |
10914 | { | |
10915 | _ForwardIterator __cur = __first; | |
10916 | try | |
10917 | { | |
10918 | for (; __n > 0; --__n, ++__cur) | |
10919 | __alloc.construct(&*__cur, __x); | |
10920 | } | |
10921 | catch(...) | |
10922 | { | |
10923 | std::_Destroy(__first, __cur, __alloc); | |
10924 | throw; | |
10925 | } | |
10926 | } | |
10927 | ||
10928 | template<typename _ForwardIterator, typename _Size, typename _Tp, | |
10929 | typename _Tp2> | |
10930 | void | |
10931 | __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, | |
10932 | const _Tp& __x, | |
10933 | allocator<_Tp2>) | |
10934 | { | |
10935 | std::uninitialized_fill_n(__first, __n, __x); | |
10936 | } | |
10937 | # 323 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h" 3 | |
10938 | template<typename _InputIterator1, typename _InputIterator2, | |
10939 | typename _ForwardIterator, typename _Allocator> | |
10940 | inline _ForwardIterator | |
10941 | __uninitialized_copy_copy(_InputIterator1 __first1, | |
10942 | _InputIterator1 __last1, | |
10943 | _InputIterator2 __first2, | |
10944 | _InputIterator2 __last2, | |
10945 | _ForwardIterator __result, | |
10946 | _Allocator __alloc) | |
10947 | { | |
10948 | _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, | |
10949 | __result, | |
10950 | __alloc); | |
10951 | try | |
10952 | { | |
10953 | return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); | |
10954 | } | |
10955 | catch(...) | |
10956 | { | |
10957 | std::_Destroy(__result, __mid, __alloc); | |
10958 | throw; | |
10959 | } | |
10960 | } | |
10961 | ||
10962 | ||
10963 | ||
10964 | ||
10965 | template<typename _ForwardIterator, typename _Tp, typename _InputIterator, | |
10966 | typename _Allocator> | |
10967 | inline _ForwardIterator | |
10968 | __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid, | |
10969 | const _Tp& __x, _InputIterator __first, | |
10970 | _InputIterator __last, | |
10971 | _Allocator __alloc) | |
10972 | { | |
10973 | std::__uninitialized_fill_a(__result, __mid, __x, __alloc); | |
10974 | try | |
10975 | { | |
10976 | return std::__uninitialized_copy_a(__first, __last, __mid, __alloc); | |
10977 | } | |
10978 | catch(...) | |
10979 | { | |
10980 | std::_Destroy(__result, __mid, __alloc); | |
10981 | throw; | |
10982 | } | |
10983 | } | |
10984 | ||
10985 | ||
10986 | ||
10987 | ||
10988 | template<typename _InputIterator, typename _ForwardIterator, typename _Tp, | |
10989 | typename _Allocator> | |
10990 | inline void | |
10991 | __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1, | |
10992 | _ForwardIterator __first2, | |
10993 | _ForwardIterator __last2, const _Tp& __x, | |
10994 | _Allocator __alloc) | |
10995 | { | |
10996 | _ForwardIterator __mid2 = std::__uninitialized_copy_a(__first1, __last1, | |
10997 | __first2, | |
10998 | __alloc); | |
10999 | try | |
11000 | { | |
11001 | std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); | |
11002 | } | |
11003 | catch(...) | |
11004 | { | |
11005 | std::_Destroy(__first2, __mid2, __alloc); | |
11006 | throw; | |
11007 | } | |
11008 | } | |
11009 | ||
11010 | } | |
11011 | # 59 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 2 3 | |
11012 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_raw_storage_iter.h" 1 3 | |
11013 | # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_raw_storage_iter.h" 3 | |
11014 | namespace std | |
11015 | { | |
11016 | ||
11017 | ||
11018 | ||
11019 | ||
11020 | template <class _ForwardIterator, class _Tp> | |
11021 | class raw_storage_iterator | |
11022 | : public iterator<output_iterator_tag, void, void, void, void> | |
11023 | { | |
11024 | protected: | |
11025 | _ForwardIterator _M_iter; | |
11026 | ||
11027 | public: | |
11028 | explicit | |
11029 | raw_storage_iterator(_ForwardIterator __x) | |
11030 | : _M_iter(__x) {} | |
11031 | ||
11032 | raw_storage_iterator& | |
11033 | operator*() { return *this; } | |
11034 | ||
11035 | raw_storage_iterator& | |
11036 | operator=(const _Tp& __element) | |
11037 | { | |
11038 | std::_Construct(&*_M_iter, __element); | |
11039 | return *this; | |
11040 | } | |
11041 | ||
11042 | raw_storage_iterator<_ForwardIterator, _Tp>& | |
11043 | operator++() | |
11044 | { | |
11045 | ++_M_iter; | |
11046 | return *this; | |
11047 | } | |
11048 | ||
11049 | raw_storage_iterator<_ForwardIterator, _Tp> | |
11050 | operator++(int) | |
11051 | { | |
11052 | raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; | |
11053 | ++_M_iter; | |
11054 | return __tmp; | |
11055 | } | |
11056 | }; | |
11057 | } | |
11058 | # 60 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 2 3 | |
11059 | ||
11060 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/limits" 1 3 | |
11061 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/limits" 3 | |
11062 | ||
11063 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/limits" 3 | |
11064 | #pragma GCC visibility push(default) | |
11065 | # 151 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/limits" 3 | |
11066 | namespace std | |
11067 | { | |
11068 | ||
11069 | ||
11070 | ||
11071 | ||
11072 | ||
11073 | enum float_round_style | |
11074 | { | |
11075 | round_indeterminate = -1, | |
11076 | round_toward_zero = 0, | |
11077 | round_to_nearest = 1, | |
11078 | round_toward_infinity = 2, | |
11079 | round_toward_neg_infinity = 3 | |
11080 | }; | |
11081 | ||
11082 | ||
11083 | ||
11084 | ||
11085 | ||
11086 | ||
11087 | ||
11088 | enum float_denorm_style | |
11089 | { | |
11090 | ||
11091 | denorm_indeterminate = -1, | |
11092 | ||
11093 | denorm_absent = 0, | |
11094 | ||
11095 | denorm_present = 1 | |
11096 | }; | |
11097 | # 193 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/limits" 3 | |
11098 | struct __numeric_limits_base | |
11099 | { | |
11100 | ||
11101 | ||
11102 | static const bool is_specialized = false; | |
11103 | ||
11104 | ||
11105 | ||
11106 | ||
11107 | static const int digits = 0; | |
11108 | ||
11109 | static const int digits10 = 0; | |
11110 | ||
11111 | static const bool is_signed = false; | |
11112 | ||
11113 | ||
11114 | ||
11115 | ||
11116 | ||
11117 | static const bool is_integer = false; | |
11118 | ||
11119 | ||
11120 | ||
11121 | ||
11122 | static const bool is_exact = false; | |
11123 | ||
11124 | ||
11125 | static const int radix = 0; | |
11126 | ||
11127 | ||
11128 | ||
11129 | static const int min_exponent = 0; | |
11130 | ||
11131 | ||
11132 | static const int min_exponent10 = 0; | |
11133 | ||
11134 | ||
11135 | ||
11136 | static const int max_exponent = 0; | |
11137 | ||
11138 | ||
11139 | static const int max_exponent10 = 0; | |
11140 | ||
11141 | ||
11142 | static const bool has_infinity = false; | |
11143 | ||
11144 | ||
11145 | static const bool has_quiet_NaN = false; | |
11146 | ||
11147 | ||
11148 | static const bool has_signaling_NaN = false; | |
11149 | ||
11150 | static const float_denorm_style has_denorm = denorm_absent; | |
11151 | ||
11152 | ||
11153 | static const bool has_denorm_loss = false; | |
11154 | ||
11155 | ||
11156 | ||
11157 | static const bool is_iec559 = false; | |
11158 | ||
11159 | ||
11160 | ||
11161 | static const bool is_bounded = false; | |
11162 | ||
11163 | ||
11164 | ||
11165 | ||
11166 | static const bool is_modulo = false; | |
11167 | ||
11168 | ||
11169 | static const bool traps = false; | |
11170 | ||
11171 | static const bool tinyness_before = false; | |
11172 | ||
11173 | ||
11174 | ||
11175 | static const float_round_style round_style = round_toward_zero; | |
11176 | }; | |
11177 | # 286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/limits" 3 | |
11178 | template<typename _Tp> | |
11179 | struct numeric_limits : public __numeric_limits_base | |
11180 | { | |
11181 | ||
11182 | ||
11183 | static _Tp min() throw() { return static_cast<_Tp>(0); } | |
11184 | ||
11185 | static _Tp max() throw() { return static_cast<_Tp>(0); } | |
11186 | ||
11187 | ||
11188 | static _Tp epsilon() throw() { return static_cast<_Tp>(0); } | |
11189 | ||
11190 | static _Tp round_error() throw() { return static_cast<_Tp>(0); } | |
11191 | ||
11192 | static _Tp infinity() throw() { return static_cast<_Tp>(0); } | |
11193 | ||
11194 | static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } | |
11195 | ||
11196 | ||
11197 | static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } | |
11198 | ||
11199 | ||
11200 | ||
11201 | static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } | |
11202 | }; | |
11203 | ||
11204 | ||
11205 | ||
11206 | ||
11207 | ||
11208 | template<> | |
11209 | struct numeric_limits<bool> | |
11210 | { | |
11211 | static const bool is_specialized = true; | |
11212 | ||
11213 | static bool min() throw() | |
11214 | { return false; } | |
11215 | static bool max() throw() | |
11216 | { return true; } | |
11217 | ||
11218 | static const int digits = 1; | |
11219 | static const int digits10 = 0; | |
11220 | static const bool is_signed = false; | |
11221 | static const bool is_integer = true; | |
11222 | static const bool is_exact = true; | |
11223 | static const int radix = 2; | |
11224 | static bool epsilon() throw() | |
11225 | { return false; } | |
11226 | static bool round_error() throw() | |
11227 | { return false; } | |
11228 | ||
11229 | static const int min_exponent = 0; | |
11230 | static const int min_exponent10 = 0; | |
11231 | static const int max_exponent = 0; | |
11232 | static const int max_exponent10 = 0; | |
11233 | ||
11234 | static const bool has_infinity = false; | |
11235 | static const bool has_quiet_NaN = false; | |
11236 | static const bool has_signaling_NaN = false; | |
11237 | static const float_denorm_style has_denorm = denorm_absent; | |
11238 | static const bool has_denorm_loss = false; | |
11239 | ||
11240 | static bool infinity() throw() | |
11241 | { return false; } | |
11242 | static bool quiet_NaN() throw() | |
11243 | { return false; } | |
11244 | static bool signaling_NaN() throw() | |
11245 | { return false; } | |
11246 | static bool denorm_min() throw() | |
11247 | { return false; } | |
11248 | ||
11249 | static const bool is_iec559 = false; | |
11250 | static const bool is_bounded = true; | |
11251 | static const bool is_modulo = false; | |
11252 | ||
11253 | ||
11254 | ||
11255 | ||
11256 | static const bool traps = false; | |
11257 | static const bool tinyness_before = false; | |
11258 | static const float_round_style round_style = round_toward_zero; | |
11259 | }; | |
11260 | ||
11261 | ||
11262 | template<> | |
11263 | struct numeric_limits<char> | |
11264 | { | |
11265 | static const bool is_specialized = true; | |
11266 | ||
11267 | static char min() throw() | |
11268 | { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } | |
11269 | static char max() throw() | |
11270 | { return (((char)(-1) < 0) ? ((char)1 << (sizeof(char) * 8 - ((char)(-1) < 0))) - 1 : ~(char)0); } | |
11271 | ||
11272 | static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); | |
11273 | static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); | |
11274 | static const bool is_signed = ((char)(-1) < 0); | |
11275 | static const bool is_integer = true; | |
11276 | static const bool is_exact = true; | |
11277 | static const int radix = 2; | |
11278 | static char epsilon() throw() | |
11279 | { return 0; } | |
11280 | static char round_error() throw() | |
11281 | { return 0; } | |
11282 | ||
11283 | static const int min_exponent = 0; | |
11284 | static const int min_exponent10 = 0; | |
11285 | static const int max_exponent = 0; | |
11286 | static const int max_exponent10 = 0; | |
11287 | ||
11288 | static const bool has_infinity = false; | |
11289 | static const bool has_quiet_NaN = false; | |
11290 | static const bool has_signaling_NaN = false; | |
11291 | static const float_denorm_style has_denorm = denorm_absent; | |
11292 | static const bool has_denorm_loss = false; | |
11293 | ||
11294 | static char infinity() throw() | |
11295 | { return char(); } | |
11296 | static char quiet_NaN() throw() | |
11297 | { return char(); } | |
11298 | static char signaling_NaN() throw() | |
11299 | { return char(); } | |
11300 | static char denorm_min() throw() | |
11301 | { return static_cast<char>(0); } | |
11302 | ||
11303 | static const bool is_iec559 = false; | |
11304 | static const bool is_bounded = true; | |
11305 | static const bool is_modulo = true; | |
11306 | ||
11307 | static const bool traps = false; | |
11308 | static const bool tinyness_before = false; | |
11309 | static const float_round_style round_style = round_toward_zero; | |
11310 | }; | |
11311 | ||
11312 | ||
11313 | template<> | |
11314 | struct numeric_limits<signed char> | |
11315 | { | |
11316 | static const bool is_specialized = true; | |
11317 | ||
11318 | static signed char min() throw() | |
11319 | { return -127 - 1; } | |
11320 | static signed char max() throw() | |
11321 | { return 127; } | |
11322 | ||
11323 | static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); | |
11324 | static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); | |
11325 | static const bool is_signed = true; | |
11326 | static const bool is_integer = true; | |
11327 | static const bool is_exact = true; | |
11328 | static const int radix = 2; | |
11329 | static signed char epsilon() throw() | |
11330 | { return 0; } | |
11331 | static signed char round_error() throw() | |
11332 | { return 0; } | |
11333 | ||
11334 | static const int min_exponent = 0; | |
11335 | static const int min_exponent10 = 0; | |
11336 | static const int max_exponent = 0; | |
11337 | static const int max_exponent10 = 0; | |
11338 | ||
11339 | static const bool has_infinity = false; | |
11340 | static const bool has_quiet_NaN = false; | |
11341 | static const bool has_signaling_NaN = false; | |
11342 | static const float_denorm_style has_denorm = denorm_absent; | |
11343 | static const bool has_denorm_loss = false; | |
11344 | ||
11345 | static signed char infinity() throw() | |
11346 | { return static_cast<signed char>(0); } | |
11347 | static signed char quiet_NaN() throw() | |
11348 | { return static_cast<signed char>(0); } | |
11349 | static signed char signaling_NaN() throw() | |
11350 | { return static_cast<signed char>(0); } | |
11351 | static signed char denorm_min() throw() | |
11352 | { return static_cast<signed char>(0); } | |
11353 | ||
11354 | static const bool is_iec559 = false; | |
11355 | static const bool is_bounded = true; | |
11356 | static const bool is_modulo = true; | |
11357 | ||
11358 | static const bool traps = false; | |
11359 | static const bool tinyness_before = false; | |
11360 | static const float_round_style round_style = round_toward_zero; | |
11361 | }; | |
11362 | ||
11363 | ||
11364 | template<> | |
11365 | struct numeric_limits<unsigned char> | |
11366 | { | |
11367 | static const bool is_specialized = true; | |
11368 | ||
11369 | static unsigned char min() throw() | |
11370 | { return 0; } | |
11371 | static unsigned char max() throw() | |
11372 | { return 127 * 2U + 1; } | |
11373 | ||
11374 | static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); | |
11375 | static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); | |
11376 | static const bool is_signed = false; | |
11377 | static const bool is_integer = true; | |
11378 | static const bool is_exact = true; | |
11379 | static const int radix = 2; | |
11380 | static unsigned char epsilon() throw() | |
11381 | { return 0; } | |
11382 | static unsigned char round_error() throw() | |
11383 | { return 0; } | |
11384 | ||
11385 | static const int min_exponent = 0; | |
11386 | static const int min_exponent10 = 0; | |
11387 | static const int max_exponent = 0; | |
11388 | static const int max_exponent10 = 0; | |
11389 | ||
11390 | static const bool has_infinity = false; | |
11391 | static const bool has_quiet_NaN = false; | |
11392 | static const bool has_signaling_NaN = false; | |
11393 | static const float_denorm_style has_denorm = denorm_absent; | |
11394 | static const bool has_denorm_loss = false; | |
11395 | ||
11396 | static unsigned char infinity() throw() | |
11397 | { return static_cast<unsigned char>(0); } | |
11398 | static unsigned char quiet_NaN() throw() | |
11399 | { return static_cast<unsigned char>(0); } | |
11400 | static unsigned char signaling_NaN() throw() | |
11401 | { return static_cast<unsigned char>(0); } | |
11402 | static unsigned char denorm_min() throw() | |
11403 | { return static_cast<unsigned char>(0); } | |
11404 | ||
11405 | static const bool is_iec559 = false; | |
11406 | static const bool is_bounded = true; | |
11407 | static const bool is_modulo = true; | |
11408 | ||
11409 | static const bool traps = false; | |
11410 | static const bool tinyness_before = false; | |
11411 | static const float_round_style round_style = round_toward_zero; | |
11412 | }; | |
11413 | ||
11414 | ||
11415 | template<> | |
11416 | struct numeric_limits<wchar_t> | |
11417 | { | |
11418 | static const bool is_specialized = true; | |
11419 | ||
11420 | static wchar_t min() throw() | |
11421 | { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } | |
11422 | static wchar_t max() throw() | |
11423 | { return (((wchar_t)(-1) < 0) ? ((wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0))) - 1 : ~(wchar_t)0); } | |
11424 | ||
11425 | static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); | |
11426 | static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); | |
11427 | static const bool is_signed = ((wchar_t)(-1) < 0); | |
11428 | static const bool is_integer = true; | |
11429 | static const bool is_exact = true; | |
11430 | static const int radix = 2; | |
11431 | static wchar_t epsilon() throw() | |
11432 | { return 0; } | |
11433 | static wchar_t round_error() throw() | |
11434 | { return 0; } | |
11435 | ||
11436 | static const int min_exponent = 0; | |
11437 | static const int min_exponent10 = 0; | |
11438 | static const int max_exponent = 0; | |
11439 | static const int max_exponent10 = 0; | |
11440 | ||
11441 | static const bool has_infinity = false; | |
11442 | static const bool has_quiet_NaN = false; | |
11443 | static const bool has_signaling_NaN = false; | |
11444 | static const float_denorm_style has_denorm = denorm_absent; | |
11445 | static const bool has_denorm_loss = false; | |
11446 | ||
11447 | static wchar_t infinity() throw() | |
11448 | { return wchar_t(); } | |
11449 | static wchar_t quiet_NaN() throw() | |
11450 | { return wchar_t(); } | |
11451 | static wchar_t signaling_NaN() throw() | |
11452 | { return wchar_t(); } | |
11453 | static wchar_t denorm_min() throw() | |
11454 | { return wchar_t(); } | |
11455 | ||
11456 | static const bool is_iec559 = false; | |
11457 | static const bool is_bounded = true; | |
11458 | static const bool is_modulo = true; | |
11459 | ||
11460 | static const bool traps = false; | |
11461 | static const bool tinyness_before = false; | |
11462 | static const float_round_style round_style = round_toward_zero; | |
11463 | }; | |
11464 | ||
11465 | ||
11466 | template<> | |
11467 | struct numeric_limits<short> | |
11468 | { | |
11469 | static const bool is_specialized = true; | |
11470 | ||
11471 | static short min() throw() | |
11472 | { return -32767 - 1; } | |
11473 | static short max() throw() | |
11474 | { return 32767; } | |
11475 | ||
11476 | static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); | |
11477 | static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); | |
11478 | static const bool is_signed = true; | |
11479 | static const bool is_integer = true; | |
11480 | static const bool is_exact = true; | |
11481 | static const int radix = 2; | |
11482 | static short epsilon() throw() | |
11483 | { return 0; } | |
11484 | static short round_error() throw() | |
11485 | { return 0; } | |
11486 | ||
11487 | static const int min_exponent = 0; | |
11488 | static const int min_exponent10 = 0; | |
11489 | static const int max_exponent = 0; | |
11490 | static const int max_exponent10 = 0; | |
11491 | ||
11492 | static const bool has_infinity = false; | |
11493 | static const bool has_quiet_NaN = false; | |
11494 | static const bool has_signaling_NaN = false; | |
11495 | static const float_denorm_style has_denorm = denorm_absent; | |
11496 | static const bool has_denorm_loss = false; | |
11497 | ||
11498 | static short infinity() throw() | |
11499 | { return short(); } | |
11500 | static short quiet_NaN() throw() | |
11501 | { return short(); } | |
11502 | static short signaling_NaN() throw() | |
11503 | { return short(); } | |
11504 | static short denorm_min() throw() | |
11505 | { return short(); } | |
11506 | ||
11507 | static const bool is_iec559 = false; | |
11508 | static const bool is_bounded = true; | |
11509 | static const bool is_modulo = true; | |
11510 | ||
11511 | static const bool traps = false; | |
11512 | static const bool tinyness_before = false; | |
11513 | static const float_round_style round_style = round_toward_zero; | |
11514 | }; | |
11515 | ||
11516 | ||
11517 | template<> | |
11518 | struct numeric_limits<unsigned short> | |
11519 | { | |
11520 | static const bool is_specialized = true; | |
11521 | ||
11522 | static unsigned short min() throw() | |
11523 | { return 0; } | |
11524 | static unsigned short max() throw() | |
11525 | { return 32767 * 2U + 1; } | |
11526 | ||
11527 | static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); | |
11528 | static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); | |
11529 | static const bool is_signed = false; | |
11530 | static const bool is_integer = true; | |
11531 | static const bool is_exact = true; | |
11532 | static const int radix = 2; | |
11533 | static unsigned short epsilon() throw() | |
11534 | { return 0; } | |
11535 | static unsigned short round_error() throw() | |
11536 | { return 0; } | |
11537 | ||
11538 | static const int min_exponent = 0; | |
11539 | static const int min_exponent10 = 0; | |
11540 | static const int max_exponent = 0; | |
11541 | static const int max_exponent10 = 0; | |
11542 | ||
11543 | static const bool has_infinity = false; | |
11544 | static const bool has_quiet_NaN = false; | |
11545 | static const bool has_signaling_NaN = false; | |
11546 | static const float_denorm_style has_denorm = denorm_absent; | |
11547 | static const bool has_denorm_loss = false; | |
11548 | ||
11549 | static unsigned short infinity() throw() | |
11550 | { return static_cast<unsigned short>(0); } | |
11551 | static unsigned short quiet_NaN() throw() | |
11552 | { return static_cast<unsigned short>(0); } | |
11553 | static unsigned short signaling_NaN() throw() | |
11554 | { return static_cast<unsigned short>(0); } | |
11555 | static unsigned short denorm_min() throw() | |
11556 | { return static_cast<unsigned short>(0); } | |
11557 | ||
11558 | static const bool is_iec559 = false; | |
11559 | static const bool is_bounded = true; | |
11560 | static const bool is_modulo = true; | |
11561 | ||
11562 | static const bool traps = false; | |
11563 | static const bool tinyness_before = false; | |
11564 | static const float_round_style round_style = round_toward_zero; | |
11565 | }; | |
11566 | ||
11567 | ||
11568 | template<> | |
11569 | struct numeric_limits<int> | |
11570 | { | |
11571 | static const bool is_specialized = true; | |
11572 | ||
11573 | static int min() throw() | |
11574 | { return -2147483647 - 1; } | |
11575 | static int max() throw() | |
11576 | { return 2147483647; } | |
11577 | ||
11578 | static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); | |
11579 | static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); | |
11580 | static const bool is_signed = true; | |
11581 | static const bool is_integer = true; | |
11582 | static const bool is_exact = true; | |
11583 | static const int radix = 2; | |
11584 | static int epsilon() throw() | |
11585 | { return 0; } | |
11586 | static int round_error() throw() | |
11587 | { return 0; } | |
11588 | ||
11589 | static const int min_exponent = 0; | |
11590 | static const int min_exponent10 = 0; | |
11591 | static const int max_exponent = 0; | |
11592 | static const int max_exponent10 = 0; | |
11593 | ||
11594 | static const bool has_infinity = false; | |
11595 | static const bool has_quiet_NaN = false; | |
11596 | static const bool has_signaling_NaN = false; | |
11597 | static const float_denorm_style has_denorm = denorm_absent; | |
11598 | static const bool has_denorm_loss = false; | |
11599 | ||
11600 | static int infinity() throw() | |
11601 | { return static_cast<int>(0); } | |
11602 | static int quiet_NaN() throw() | |
11603 | { return static_cast<int>(0); } | |
11604 | static int signaling_NaN() throw() | |
11605 | { return static_cast<int>(0); } | |
11606 | static int denorm_min() throw() | |
11607 | { return static_cast<int>(0); } | |
11608 | ||
11609 | static const bool is_iec559 = false; | |
11610 | static const bool is_bounded = true; | |
11611 | static const bool is_modulo = true; | |
11612 | ||
11613 | static const bool traps = false; | |
11614 | static const bool tinyness_before = false; | |
11615 | static const float_round_style round_style = round_toward_zero; | |
11616 | }; | |
11617 | ||
11618 | ||
11619 | template<> | |
11620 | struct numeric_limits<unsigned int> | |
11621 | { | |
11622 | static const bool is_specialized = true; | |
11623 | ||
11624 | static unsigned int min() throw() | |
11625 | { return 0; } | |
11626 | static unsigned int max() throw() | |
11627 | { return 2147483647 * 2U + 1; } | |
11628 | ||
11629 | static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); | |
11630 | static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); | |
11631 | static const bool is_signed = false; | |
11632 | static const bool is_integer = true; | |
11633 | static const bool is_exact = true; | |
11634 | static const int radix = 2; | |
11635 | static unsigned int epsilon() throw() | |
11636 | { return 0; } | |
11637 | static unsigned int round_error() throw() | |
11638 | { return 0; } | |
11639 | ||
11640 | static const int min_exponent = 0; | |
11641 | static const int min_exponent10 = 0; | |
11642 | static const int max_exponent = 0; | |
11643 | static const int max_exponent10 = 0; | |
11644 | ||
11645 | static const bool has_infinity = false; | |
11646 | static const bool has_quiet_NaN = false; | |
11647 | static const bool has_signaling_NaN = false; | |
11648 | static const float_denorm_style has_denorm = denorm_absent; | |
11649 | static const bool has_denorm_loss = false; | |
11650 | ||
11651 | static unsigned int infinity() throw() | |
11652 | { return static_cast<unsigned int>(0); } | |
11653 | static unsigned int quiet_NaN() throw() | |
11654 | { return static_cast<unsigned int>(0); } | |
11655 | static unsigned int signaling_NaN() throw() | |
11656 | { return static_cast<unsigned int>(0); } | |
11657 | static unsigned int denorm_min() throw() | |
11658 | { return static_cast<unsigned int>(0); } | |
11659 | ||
11660 | static const bool is_iec559 = false; | |
11661 | static const bool is_bounded = true; | |
11662 | static const bool is_modulo = true; | |
11663 | ||
11664 | static const bool traps = false; | |
11665 | static const bool tinyness_before = false; | |
11666 | static const float_round_style round_style = round_toward_zero; | |
11667 | }; | |
11668 | ||
11669 | ||
11670 | template<> | |
11671 | struct numeric_limits<long> | |
11672 | { | |
11673 | static const bool is_specialized = true; | |
11674 | ||
11675 | static long min() throw() | |
11676 | { return -2147483647L - 1; } | |
11677 | static long max() throw() | |
11678 | { return 2147483647L; } | |
11679 | ||
11680 | static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); | |
11681 | static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); | |
11682 | static const bool is_signed = true; | |
11683 | static const bool is_integer = true; | |
11684 | static const bool is_exact = true; | |
11685 | static const int radix = 2; | |
11686 | static long epsilon() throw() | |
11687 | { return 0; } | |
11688 | static long round_error() throw() | |
11689 | { return 0; } | |
11690 | ||
11691 | static const int min_exponent = 0; | |
11692 | static const int min_exponent10 = 0; | |
11693 | static const int max_exponent = 0; | |
11694 | static const int max_exponent10 = 0; | |
11695 | ||
11696 | static const bool has_infinity = false; | |
11697 | static const bool has_quiet_NaN = false; | |
11698 | static const bool has_signaling_NaN = false; | |
11699 | static const float_denorm_style has_denorm = denorm_absent; | |
11700 | static const bool has_denorm_loss = false; | |
11701 | ||
11702 | static long infinity() throw() | |
11703 | { return static_cast<long>(0); } | |
11704 | static long quiet_NaN() throw() | |
11705 | { return static_cast<long>(0); } | |
11706 | static long signaling_NaN() throw() | |
11707 | { return static_cast<long>(0); } | |
11708 | static long denorm_min() throw() | |
11709 | { return static_cast<long>(0); } | |
11710 | ||
11711 | static const bool is_iec559 = false; | |
11712 | static const bool is_bounded = true; | |
11713 | static const bool is_modulo = true; | |
11714 | ||
11715 | static const bool traps = false; | |
11716 | static const bool tinyness_before = false; | |
11717 | static const float_round_style round_style = round_toward_zero; | |
11718 | }; | |
11719 | ||
11720 | ||
11721 | template<> | |
11722 | struct numeric_limits<unsigned long> | |
11723 | { | |
11724 | static const bool is_specialized = true; | |
11725 | ||
11726 | static unsigned long min() throw() | |
11727 | { return 0; } | |
11728 | static unsigned long max() throw() | |
11729 | { return 2147483647L * 2UL + 1; } | |
11730 | ||
11731 | static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); | |
11732 | static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); | |
11733 | static const bool is_signed = false; | |
11734 | static const bool is_integer = true; | |
11735 | static const bool is_exact = true; | |
11736 | static const int radix = 2; | |
11737 | static unsigned long epsilon() throw() | |
11738 | { return 0; } | |
11739 | static unsigned long round_error() throw() | |
11740 | { return 0; } | |
11741 | ||
11742 | static const int min_exponent = 0; | |
11743 | static const int min_exponent10 = 0; | |
11744 | static const int max_exponent = 0; | |
11745 | static const int max_exponent10 = 0; | |
11746 | ||
11747 | static const bool has_infinity = false; | |
11748 | static const bool has_quiet_NaN = false; | |
11749 | static const bool has_signaling_NaN = false; | |
11750 | static const float_denorm_style has_denorm = denorm_absent; | |
11751 | static const bool has_denorm_loss = false; | |
11752 | ||
11753 | static unsigned long infinity() throw() | |
11754 | { return static_cast<unsigned long>(0); } | |
11755 | static unsigned long quiet_NaN() throw() | |
11756 | { return static_cast<unsigned long>(0); } | |
11757 | static unsigned long signaling_NaN() throw() | |
11758 | { return static_cast<unsigned long>(0); } | |
11759 | static unsigned long denorm_min() throw() | |
11760 | { return static_cast<unsigned long>(0); } | |
11761 | ||
11762 | static const bool is_iec559 = false; | |
11763 | static const bool is_bounded = true; | |
11764 | static const bool is_modulo = true; | |
11765 | ||
11766 | static const bool traps = false; | |
11767 | static const bool tinyness_before = false; | |
11768 | static const float_round_style round_style = round_toward_zero; | |
11769 | }; | |
11770 | ||
11771 | ||
11772 | template<> | |
11773 | struct numeric_limits<long long> | |
11774 | { | |
11775 | static const bool is_specialized = true; | |
11776 | ||
11777 | static long long min() throw() | |
11778 | { return -9223372036854775807LL - 1; } | |
11779 | static long long max() throw() | |
11780 | { return 9223372036854775807LL; } | |
11781 | ||
11782 | static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); | |
11783 | static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); | |
11784 | static const bool is_signed = true; | |
11785 | static const bool is_integer = true; | |
11786 | static const bool is_exact = true; | |
11787 | static const int radix = 2; | |
11788 | static long long epsilon() throw() | |
11789 | { return 0; } | |
11790 | static long long round_error() throw() | |
11791 | { return 0; } | |
11792 | ||
11793 | static const int min_exponent = 0; | |
11794 | static const int min_exponent10 = 0; | |
11795 | static const int max_exponent = 0; | |
11796 | static const int max_exponent10 = 0; | |
11797 | ||
11798 | static const bool has_infinity = false; | |
11799 | static const bool has_quiet_NaN = false; | |
11800 | static const bool has_signaling_NaN = false; | |
11801 | static const float_denorm_style has_denorm = denorm_absent; | |
11802 | static const bool has_denorm_loss = false; | |
11803 | ||
11804 | static long long infinity() throw() | |
11805 | { return static_cast<long long>(0); } | |
11806 | static long long quiet_NaN() throw() | |
11807 | { return static_cast<long long>(0); } | |
11808 | static long long signaling_NaN() throw() | |
11809 | { return static_cast<long long>(0); } | |
11810 | static long long denorm_min() throw() | |
11811 | { return static_cast<long long>(0); } | |
11812 | ||
11813 | static const bool is_iec559 = false; | |
11814 | static const bool is_bounded = true; | |
11815 | static const bool is_modulo = true; | |
11816 | ||
11817 | static const bool traps = false; | |
11818 | static const bool tinyness_before = false; | |
11819 | static const float_round_style round_style = round_toward_zero; | |
11820 | }; | |
11821 | ||
11822 | ||
11823 | template<> | |
11824 | struct numeric_limits<unsigned long long> | |
11825 | { | |
11826 | static const bool is_specialized = true; | |
11827 | ||
11828 | static unsigned long long min() throw() | |
11829 | { return 0; } | |
11830 | static unsigned long long max() throw() | |
11831 | { return 9223372036854775807LL * 2ULL + 1; } | |
11832 | ||
11833 | static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); | |
11834 | static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); | |
11835 | static const bool is_signed = false; | |
11836 | static const bool is_integer = true; | |
11837 | static const bool is_exact = true; | |
11838 | static const int radix = 2; | |
11839 | static unsigned long long epsilon() throw() | |
11840 | { return 0; } | |
11841 | static unsigned long long round_error() throw() | |
11842 | { return 0; } | |
11843 | ||
11844 | static const int min_exponent = 0; | |
11845 | static const int min_exponent10 = 0; | |
11846 | static const int max_exponent = 0; | |
11847 | static const int max_exponent10 = 0; | |
11848 | ||
11849 | static const bool has_infinity = false; | |
11850 | static const bool has_quiet_NaN = false; | |
11851 | static const bool has_signaling_NaN = false; | |
11852 | static const float_denorm_style has_denorm = denorm_absent; | |
11853 | static const bool has_denorm_loss = false; | |
11854 | ||
11855 | static unsigned long long infinity() throw() | |
11856 | { return static_cast<unsigned long long>(0); } | |
11857 | static unsigned long long quiet_NaN() throw() | |
11858 | { return static_cast<unsigned long long>(0); } | |
11859 | static unsigned long long signaling_NaN() throw() | |
11860 | { return static_cast<unsigned long long>(0); } | |
11861 | static unsigned long long denorm_min() throw() | |
11862 | { return static_cast<unsigned long long>(0); } | |
11863 | ||
11864 | static const bool is_iec559 = false; | |
11865 | static const bool is_bounded = true; | |
11866 | static const bool is_modulo = true; | |
11867 | ||
11868 | static const bool traps = false; | |
11869 | static const bool tinyness_before = false; | |
11870 | static const float_round_style round_style = round_toward_zero; | |
11871 | }; | |
11872 | ||
11873 | ||
11874 | template<> | |
11875 | struct numeric_limits<float> | |
11876 | { | |
11877 | static const bool is_specialized = true; | |
11878 | ||
11879 | static float min() throw() | |
11880 | { return 1.17549435e-38F; } | |
11881 | static float max() throw() | |
11882 | { return 3.40282347e+38F; } | |
11883 | ||
11884 | static const int digits = 24; | |
11885 | static const int digits10 = 6; | |
11886 | static const bool is_signed = true; | |
11887 | static const bool is_integer = false; | |
11888 | static const bool is_exact = false; | |
11889 | static const int radix = 2; | |
11890 | static float epsilon() throw() | |
11891 | { return 1.19209290e-7F; } | |
11892 | static float round_error() throw() | |
11893 | { return 0.5F; } | |
11894 | ||
11895 | static const int min_exponent = (-125); | |
11896 | static const int min_exponent10 = (-37); | |
11897 | static const int max_exponent = 128; | |
11898 | static const int max_exponent10 = 38; | |
11899 | ||
11900 | static const bool has_infinity = 1; | |
11901 | static const bool has_quiet_NaN = 1; | |
11902 | static const bool has_signaling_NaN = has_quiet_NaN; | |
11903 | static const float_denorm_style has_denorm | |
11904 | = bool(1.40129846e-45F) ? denorm_present : denorm_absent; | |
11905 | static const bool has_denorm_loss = false; | |
11906 | ||
11907 | static float infinity() throw() | |
11908 | { return __builtin_huge_valf (); } | |
11909 | static float quiet_NaN() throw() | |
11910 | { return __builtin_nanf (""); } | |
11911 | static float signaling_NaN() throw() | |
11912 | { return __builtin_nansf (""); } | |
11913 | static float denorm_min() throw() | |
11914 | { return 1.40129846e-45F; } | |
11915 | ||
11916 | static const bool is_iec559 | |
11917 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
11918 | static const bool is_bounded = true; | |
11919 | static const bool is_modulo = false; | |
11920 | ||
11921 | static const bool traps = false; | |
11922 | static const bool tinyness_before = false; | |
11923 | static const float_round_style round_style = round_to_nearest; | |
11924 | }; | |
11925 | ||
11926 | ||
11927 | ||
11928 | ||
11929 | ||
11930 | ||
11931 | template<> | |
11932 | struct numeric_limits<double> | |
11933 | { | |
11934 | static const bool is_specialized = true; | |
11935 | ||
11936 | static double min() throw() | |
11937 | { return 2.2250738585072014e-308; } | |
11938 | static double max() throw() | |
11939 | { return 1.7976931348623157e+308; } | |
11940 | ||
11941 | static const int digits = 53; | |
11942 | static const int digits10 = 15; | |
11943 | static const bool is_signed = true; | |
11944 | static const bool is_integer = false; | |
11945 | static const bool is_exact = false; | |
11946 | static const int radix = 2; | |
11947 | static double epsilon() throw() | |
11948 | { return 2.2204460492503131e-16; } | |
11949 | static double round_error() throw() | |
11950 | { return 0.5; } | |
11951 | ||
11952 | static const int min_exponent = (-1021); | |
11953 | static const int min_exponent10 = (-307); | |
11954 | static const int max_exponent = 1024; | |
11955 | static const int max_exponent10 = 308; | |
11956 | ||
11957 | static const bool has_infinity = 1; | |
11958 | static const bool has_quiet_NaN = 1; | |
11959 | static const bool has_signaling_NaN = has_quiet_NaN; | |
11960 | static const float_denorm_style has_denorm | |
11961 | = bool(4.9406564584124654e-324) ? denorm_present : denorm_absent; | |
11962 | static const bool has_denorm_loss = false; | |
11963 | ||
11964 | static double infinity() throw() | |
11965 | { return __builtin_huge_val(); } | |
11966 | static double quiet_NaN() throw() | |
11967 | { return __builtin_nan (""); } | |
11968 | static double signaling_NaN() throw() | |
11969 | { return __builtin_nans (""); } | |
11970 | static double denorm_min() throw() | |
11971 | { return 4.9406564584124654e-324; } | |
11972 | ||
11973 | static const bool is_iec559 | |
11974 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
11975 | static const bool is_bounded = true; | |
11976 | static const bool is_modulo = false; | |
11977 | ||
11978 | static const bool traps = false; | |
11979 | static const bool tinyness_before = false; | |
11980 | static const float_round_style round_style = round_to_nearest; | |
11981 | }; | |
11982 | ||
11983 | ||
11984 | ||
11985 | ||
11986 | ||
11987 | ||
11988 | template<> | |
11989 | struct numeric_limits<long double> | |
11990 | { | |
11991 | static const bool is_specialized = true; | |
11992 | ||
11993 | static long double min() throw() | |
11994 | { return 2.2250738585072014e-308L; } | |
11995 | static long double max() throw() | |
11996 | { return 1.7976931348623157e+308L; } | |
11997 | ||
11998 | static const int digits = 53; | |
11999 | static const int digits10 = 15; | |
12000 | static const bool is_signed = true; | |
12001 | static const bool is_integer = false; | |
12002 | static const bool is_exact = false; | |
12003 | static const int radix = 2; | |
12004 | static long double epsilon() throw() | |
12005 | { return 2.2204460492503131e-16L; } | |
12006 | static long double round_error() throw() | |
12007 | { return 0.5L; } | |
12008 | ||
12009 | static const int min_exponent = (-1021); | |
12010 | static const int min_exponent10 = (-307); | |
12011 | static const int max_exponent = 1024; | |
12012 | static const int max_exponent10 = 308; | |
12013 | ||
12014 | static const bool has_infinity = 1; | |
12015 | static const bool has_quiet_NaN = 1; | |
12016 | static const bool has_signaling_NaN = has_quiet_NaN; | |
12017 | static const float_denorm_style has_denorm | |
12018 | = bool(4.9406564584124654e-324L) ? denorm_present : denorm_absent; | |
12019 | static const bool has_denorm_loss | |
12020 | = false; | |
12021 | ||
12022 | static long double infinity() throw() | |
12023 | { return __builtin_huge_vall (); } | |
12024 | static long double quiet_NaN() throw() | |
12025 | { return __builtin_nanl (""); } | |
12026 | static long double signaling_NaN() throw() | |
12027 | { return __builtin_nansl (""); } | |
12028 | static long double denorm_min() throw() | |
12029 | { return 4.9406564584124654e-324L; } | |
12030 | ||
12031 | static const bool is_iec559 | |
12032 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
12033 | static const bool is_bounded = true; | |
12034 | static const bool is_modulo = false; | |
12035 | ||
12036 | static const bool traps = false; | |
12037 | static const bool tinyness_before = false; | |
12038 | static const float_round_style round_style = round_to_nearest; | |
12039 | }; | |
12040 | ||
12041 | ||
12042 | ||
12043 | ||
12044 | ||
12045 | } | |
12046 | ||
12047 | ||
12048 | ||
12049 | ||
12050 | ||
12051 | ||
12052 | ||
12053 | #pragma GCC visibility pop | |
12054 | # 62 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 2 3 | |
12055 | ||
12056 | namespace std | |
12057 | { | |
12058 | # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12059 | template<typename _Tp> | |
12060 | pair<_Tp*, ptrdiff_t> | |
12061 | __get_temporary_buffer(ptrdiff_t __len, _Tp*) | |
12062 | { | |
12063 | const ptrdiff_t __max = numeric_limits<ptrdiff_t>::max() / sizeof(_Tp); | |
12064 | if (__len > __max) | |
12065 | __len = __max; | |
12066 | ||
12067 | while (__len > 0) | |
12068 | { | |
12069 | _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), | |
12070 | nothrow)); | |
12071 | if (__tmp != 0) | |
12072 | return pair<_Tp*, ptrdiff_t>(__tmp, __len); | |
12073 | __len /= 2; | |
12074 | } | |
12075 | return pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); | |
12076 | } | |
12077 | # 109 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12078 | template<typename _Tp> | |
12079 | inline pair<_Tp*, ptrdiff_t> | |
12080 | get_temporary_buffer(ptrdiff_t __len) | |
12081 | { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); } | |
12082 | # 121 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12083 | template<typename _Tp> | |
12084 | void | |
12085 | return_temporary_buffer(_Tp* __p) | |
12086 | { ::operator delete(__p, nothrow); } | |
12087 | # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12088 | template<typename _Tp1> | |
12089 | struct auto_ptr_ref | |
12090 | { | |
12091 | _Tp1* _M_ptr; | |
12092 | ||
12093 | explicit | |
12094 | auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } | |
12095 | }; | |
12096 | # 174 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12097 | template<typename _Tp> | |
12098 | class auto_ptr | |
12099 | { | |
12100 | private: | |
12101 | _Tp* _M_ptr; | |
12102 | ||
12103 | public: | |
12104 | ||
12105 | typedef _Tp element_type; | |
12106 | ||
12107 | ||
12108 | ||
12109 | ||
12110 | ||
12111 | ||
12112 | ||
12113 | explicit | |
12114 | auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } | |
12115 | # 200 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12116 | auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } | |
12117 | # 212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12118 | template<typename _Tp1> | |
12119 | auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } | |
12120 | # 223 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12121 | auto_ptr& | |
12122 | operator=(auto_ptr& __a) throw() | |
12123 | { | |
12124 | reset(__a.release()); | |
12125 | return *this; | |
12126 | } | |
12127 | # 240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12128 | template<typename _Tp1> | |
12129 | auto_ptr& | |
12130 | operator=(auto_ptr<_Tp1>& __a) throw() | |
12131 | { | |
12132 | reset(__a.release()); | |
12133 | return *this; | |
12134 | } | |
12135 | # 260 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12136 | ~auto_ptr() { delete _M_ptr; } | |
12137 | # 270 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12138 | element_type& | |
12139 | operator*() const throw() | |
12140 | { | |
12141 | ; | |
12142 | return *_M_ptr; | |
12143 | } | |
12144 | ||
12145 | ||
12146 | ||
12147 | ||
12148 | ||
12149 | ||
12150 | ||
12151 | element_type* | |
12152 | operator->() const throw() | |
12153 | { | |
12154 | ; | |
12155 | return _M_ptr; | |
12156 | } | |
12157 | # 300 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12158 | element_type* | |
12159 | get() const throw() { return _M_ptr; } | |
12160 | # 314 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12161 | element_type* | |
12162 | release() throw() | |
12163 | { | |
12164 | element_type* __tmp = _M_ptr; | |
12165 | _M_ptr = 0; | |
12166 | return __tmp; | |
12167 | } | |
12168 | # 329 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12169 | void | |
12170 | reset(element_type* __p = 0) throw() | |
12171 | { | |
12172 | if (__p != _M_ptr) | |
12173 | { | |
12174 | delete _M_ptr; | |
12175 | _M_ptr = __p; | |
12176 | } | |
12177 | } | |
12178 | # 350 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/memory" 3 | |
12179 | auto_ptr(auto_ptr_ref<element_type> __ref) throw() | |
12180 | : _M_ptr(__ref._M_ptr) { } | |
12181 | ||
12182 | auto_ptr& | |
12183 | operator=(auto_ptr_ref<element_type> __ref) throw() | |
12184 | { | |
12185 | if (__ref._M_ptr != this->get()) | |
12186 | { | |
12187 | delete _M_ptr; | |
12188 | _M_ptr = __ref._M_ptr; | |
12189 | } | |
12190 | return *this; | |
12191 | } | |
12192 | ||
12193 | template<typename _Tp1> | |
12194 | operator auto_ptr_ref<_Tp1>() throw() | |
12195 | { return auto_ptr_ref<_Tp1>(this->release()); } | |
12196 | ||
12197 | template<typename _Tp1> | |
12198 | operator auto_ptr<_Tp1>() throw() | |
12199 | { return auto_ptr<_Tp1>(this->release()); } | |
12200 | }; | |
12201 | } | |
12202 | ||
12203 | #pragma GCC visibility pop | |
12204 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 2 3 | |
12205 | ||
12206 | ||
12207 | ||
12208 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 1 3 | |
12209 | # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12210 | namespace std | |
12211 | { | |
12212 | # 101 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12213 | template <class _Arg, class _Result> | |
12214 | struct unary_function | |
12215 | { | |
12216 | typedef _Arg argument_type; | |
12217 | ||
12218 | ||
12219 | typedef _Result result_type; | |
12220 | }; | |
12221 | ||
12222 | ||
12223 | ||
12224 | ||
12225 | template <class _Arg1, class _Arg2, class _Result> | |
12226 | struct binary_function | |
12227 | { | |
12228 | typedef _Arg1 first_argument_type; | |
12229 | ||
12230 | ||
12231 | typedef _Arg2 second_argument_type; | |
12232 | typedef _Result result_type; | |
12233 | }; | |
12234 | # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12235 | template <class _Tp> | |
12236 | struct plus : public binary_function<_Tp, _Tp, _Tp> | |
12237 | { | |
12238 | _Tp | |
12239 | operator()(const _Tp& __x, const _Tp& __y) const | |
12240 | { return __x + __y; } | |
12241 | }; | |
12242 | ||
12243 | ||
12244 | template <class _Tp> | |
12245 | struct minus : public binary_function<_Tp, _Tp, _Tp> | |
12246 | { | |
12247 | _Tp | |
12248 | operator()(const _Tp& __x, const _Tp& __y) const | |
12249 | { return __x - __y; } | |
12250 | }; | |
12251 | ||
12252 | ||
12253 | template <class _Tp> | |
12254 | struct multiplies : public binary_function<_Tp, _Tp, _Tp> | |
12255 | { | |
12256 | _Tp | |
12257 | operator()(const _Tp& __x, const _Tp& __y) const | |
12258 | { return __x * __y; } | |
12259 | }; | |
12260 | ||
12261 | ||
12262 | template <class _Tp> | |
12263 | struct divides : public binary_function<_Tp, _Tp, _Tp> | |
12264 | { | |
12265 | _Tp | |
12266 | operator()(const _Tp& __x, const _Tp& __y) const | |
12267 | { return __x / __y; } | |
12268 | }; | |
12269 | ||
12270 | ||
12271 | template <class _Tp> | |
12272 | struct modulus : public binary_function<_Tp, _Tp, _Tp> | |
12273 | { | |
12274 | _Tp | |
12275 | operator()(const _Tp& __x, const _Tp& __y) const | |
12276 | { return __x % __y; } | |
12277 | }; | |
12278 | ||
12279 | ||
12280 | template <class _Tp> | |
12281 | struct negate : public unary_function<_Tp, _Tp> | |
12282 | { | |
12283 | _Tp | |
12284 | operator()(const _Tp& __x) const | |
12285 | { return -__x; } | |
12286 | }; | |
12287 | # 195 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12288 | template <class _Tp> | |
12289 | struct equal_to : public binary_function<_Tp, _Tp, bool> | |
12290 | { | |
12291 | bool | |
12292 | operator()(const _Tp& __x, const _Tp& __y) const | |
12293 | { return __x == __y; } | |
12294 | }; | |
12295 | ||
12296 | ||
12297 | template <class _Tp> | |
12298 | struct not_equal_to : public binary_function<_Tp, _Tp, bool> | |
12299 | { | |
12300 | bool | |
12301 | operator()(const _Tp& __x, const _Tp& __y) const | |
12302 | { return __x != __y; } | |
12303 | }; | |
12304 | ||
12305 | ||
12306 | template <class _Tp> | |
12307 | struct greater : public binary_function<_Tp, _Tp, bool> | |
12308 | { | |
12309 | bool | |
12310 | operator()(const _Tp& __x, const _Tp& __y) const | |
12311 | { return __x > __y; } | |
12312 | }; | |
12313 | ||
12314 | ||
12315 | template <class _Tp> | |
12316 | struct less : public binary_function<_Tp, _Tp, bool> | |
12317 | { | |
12318 | bool | |
12319 | operator()(const _Tp& __x, const _Tp& __y) const | |
12320 | { return __x < __y; } | |
12321 | }; | |
12322 | ||
12323 | ||
12324 | template <class _Tp> | |
12325 | struct greater_equal : public binary_function<_Tp, _Tp, bool> | |
12326 | { | |
12327 | bool | |
12328 | operator()(const _Tp& __x, const _Tp& __y) const | |
12329 | { return __x >= __y; } | |
12330 | }; | |
12331 | ||
12332 | ||
12333 | template <class _Tp> | |
12334 | struct less_equal : public binary_function<_Tp, _Tp, bool> | |
12335 | { | |
12336 | bool | |
12337 | operator()(const _Tp& __x, const _Tp& __y) const | |
12338 | { return __x <= __y; } | |
12339 | }; | |
12340 | # 256 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12341 | template <class _Tp> | |
12342 | struct logical_and : public binary_function<_Tp, _Tp, bool> | |
12343 | { | |
12344 | bool | |
12345 | operator()(const _Tp& __x, const _Tp& __y) const | |
12346 | { return __x && __y; } | |
12347 | }; | |
12348 | ||
12349 | ||
12350 | template <class _Tp> | |
12351 | struct logical_or : public binary_function<_Tp, _Tp, bool> | |
12352 | { | |
12353 | bool | |
12354 | operator()(const _Tp& __x, const _Tp& __y) const | |
12355 | { return __x || __y; } | |
12356 | }; | |
12357 | ||
12358 | ||
12359 | template <class _Tp> | |
12360 | struct logical_not : public unary_function<_Tp, bool> | |
12361 | { | |
12362 | bool | |
12363 | operator()(const _Tp& __x) const | |
12364 | { return !__x; } | |
12365 | }; | |
12366 | # 311 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12367 | template <class _Predicate> | |
12368 | class unary_negate | |
12369 | : public unary_function<typename _Predicate::argument_type, bool> | |
12370 | { | |
12371 | protected: | |
12372 | _Predicate _M_pred; | |
12373 | public: | |
12374 | explicit | |
12375 | unary_negate(const _Predicate& __x) : _M_pred(__x) {} | |
12376 | ||
12377 | bool | |
12378 | operator()(const typename _Predicate::argument_type& __x) const | |
12379 | { return !_M_pred(__x); } | |
12380 | }; | |
12381 | ||
12382 | ||
12383 | template <class _Predicate> | |
12384 | inline unary_negate<_Predicate> | |
12385 | not1(const _Predicate& __pred) | |
12386 | { return unary_negate<_Predicate>(__pred); } | |
12387 | ||
12388 | ||
12389 | template <class _Predicate> | |
12390 | class binary_negate | |
12391 | : public binary_function<typename _Predicate::first_argument_type, | |
12392 | typename _Predicate::second_argument_type, | |
12393 | bool> | |
12394 | { | |
12395 | protected: | |
12396 | _Predicate _M_pred; | |
12397 | public: | |
12398 | explicit | |
12399 | binary_negate(const _Predicate& __x) | |
12400 | : _M_pred(__x) { } | |
12401 | ||
12402 | bool | |
12403 | operator()(const typename _Predicate::first_argument_type& __x, | |
12404 | const typename _Predicate::second_argument_type& __y) const | |
12405 | { return !_M_pred(__x, __y); } | |
12406 | }; | |
12407 | ||
12408 | ||
12409 | template <class _Predicate> | |
12410 | inline binary_negate<_Predicate> | |
12411 | not2(const _Predicate& __pred) | |
12412 | { return binary_negate<_Predicate>(__pred); } | |
12413 | # 391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12414 | template <class _Operation> | |
12415 | class binder1st | |
12416 | : public unary_function<typename _Operation::second_argument_type, | |
12417 | typename _Operation::result_type> | |
12418 | { | |
12419 | protected: | |
12420 | _Operation op; | |
12421 | typename _Operation::first_argument_type value; | |
12422 | public: | |
12423 | binder1st(const _Operation& __x, | |
12424 | const typename _Operation::first_argument_type& __y) | |
12425 | : op(__x), value(__y) {} | |
12426 | ||
12427 | typename _Operation::result_type | |
12428 | operator()(const typename _Operation::second_argument_type& __x) const | |
12429 | { return op(value, __x); } | |
12430 | ||
12431 | ||
12432 | ||
12433 | typename _Operation::result_type | |
12434 | operator()(typename _Operation::second_argument_type& __x) const | |
12435 | { return op(value, __x); } | |
12436 | }; | |
12437 | ||
12438 | ||
12439 | template <class _Operation, class _Tp> | |
12440 | inline binder1st<_Operation> | |
12441 | bind1st(const _Operation& __fn, const _Tp& __x) | |
12442 | { | |
12443 | typedef typename _Operation::first_argument_type _Arg1_type; | |
12444 | return binder1st<_Operation>(__fn, _Arg1_type(__x)); | |
12445 | } | |
12446 | ||
12447 | ||
12448 | template <class _Operation> | |
12449 | class binder2nd | |
12450 | : public unary_function<typename _Operation::first_argument_type, | |
12451 | typename _Operation::result_type> | |
12452 | { | |
12453 | protected: | |
12454 | _Operation op; | |
12455 | typename _Operation::second_argument_type value; | |
12456 | public: | |
12457 | binder2nd(const _Operation& __x, | |
12458 | const typename _Operation::second_argument_type& __y) | |
12459 | : op(__x), value(__y) {} | |
12460 | ||
12461 | typename _Operation::result_type | |
12462 | operator()(const typename _Operation::first_argument_type& __x) const | |
12463 | { return op(__x, value); } | |
12464 | ||
12465 | ||
12466 | ||
12467 | typename _Operation::result_type | |
12468 | operator()(typename _Operation::first_argument_type& __x) const | |
12469 | { return op(__x, value); } | |
12470 | }; | |
12471 | ||
12472 | ||
12473 | template <class _Operation, class _Tp> | |
12474 | inline binder2nd<_Operation> | |
12475 | bind2nd(const _Operation& __fn, const _Tp& __x) | |
12476 | { | |
12477 | typedef typename _Operation::second_argument_type _Arg2_type; | |
12478 | return binder2nd<_Operation>(__fn, _Arg2_type(__x)); | |
12479 | } | |
12480 | # 480 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12481 | template <class _Arg, class _Result> | |
12482 | class pointer_to_unary_function : public unary_function<_Arg, _Result> | |
12483 | { | |
12484 | protected: | |
12485 | _Result (*_M_ptr)(_Arg); | |
12486 | public: | |
12487 | pointer_to_unary_function() {} | |
12488 | ||
12489 | explicit | |
12490 | pointer_to_unary_function(_Result (*__x)(_Arg)) | |
12491 | : _M_ptr(__x) {} | |
12492 | ||
12493 | _Result | |
12494 | operator()(_Arg __x) const | |
12495 | { return _M_ptr(__x); } | |
12496 | }; | |
12497 | ||
12498 | ||
12499 | template <class _Arg, class _Result> | |
12500 | inline pointer_to_unary_function<_Arg, _Result> | |
12501 | ptr_fun(_Result (*__x)(_Arg)) | |
12502 | { return pointer_to_unary_function<_Arg, _Result>(__x); } | |
12503 | ||
12504 | ||
12505 | template <class _Arg1, class _Arg2, class _Result> | |
12506 | class pointer_to_binary_function | |
12507 | : public binary_function<_Arg1, _Arg2, _Result> | |
12508 | { | |
12509 | protected: | |
12510 | _Result (*_M_ptr)(_Arg1, _Arg2); | |
12511 | public: | |
12512 | pointer_to_binary_function() {} | |
12513 | ||
12514 | explicit | |
12515 | pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) | |
12516 | : _M_ptr(__x) {} | |
12517 | ||
12518 | _Result | |
12519 | operator()(_Arg1 __x, _Arg2 __y) const | |
12520 | { return _M_ptr(__x, __y); } | |
12521 | }; | |
12522 | ||
12523 | ||
12524 | template <class _Arg1, class _Arg2, class _Result> | |
12525 | inline pointer_to_binary_function<_Arg1, _Arg2, _Result> | |
12526 | ptr_fun(_Result (*__x)(_Arg1, _Arg2)) | |
12527 | { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } | |
12528 | ||
12529 | ||
12530 | template <class _Tp> | |
12531 | struct _Identity : public unary_function<_Tp,_Tp> | |
12532 | { | |
12533 | _Tp& | |
12534 | operator()(_Tp& __x) const | |
12535 | { return __x; } | |
12536 | ||
12537 | const _Tp& | |
12538 | operator()(const _Tp& __x) const | |
12539 | { return __x; } | |
12540 | }; | |
12541 | ||
12542 | template <class _Pair> | |
12543 | struct _Select1st : public unary_function<_Pair, | |
12544 | typename _Pair::first_type> | |
12545 | { | |
12546 | typename _Pair::first_type& | |
12547 | operator()(_Pair& __x) const | |
12548 | { return __x.first; } | |
12549 | ||
12550 | const typename _Pair::first_type& | |
12551 | operator()(const _Pair& __x) const | |
12552 | { return __x.first; } | |
12553 | }; | |
12554 | ||
12555 | template <class _Pair> | |
12556 | struct _Select2nd : public unary_function<_Pair, | |
12557 | typename _Pair::second_type> | |
12558 | { | |
12559 | typename _Pair::second_type& | |
12560 | operator()(_Pair& __x) const | |
12561 | { return __x.second; } | |
12562 | ||
12563 | const typename _Pair::second_type& | |
12564 | operator()(const _Pair& __x) const | |
12565 | { return __x.second; } | |
12566 | }; | |
12567 | # 582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_function.h" 3 | |
12568 | template <class _Ret, class _Tp> | |
12569 | class mem_fun_t : public unary_function<_Tp*, _Ret> | |
12570 | { | |
12571 | public: | |
12572 | explicit | |
12573 | mem_fun_t(_Ret (_Tp::*__pf)()) | |
12574 | : _M_f(__pf) {} | |
12575 | ||
12576 | _Ret | |
12577 | operator()(_Tp* __p) const | |
12578 | { return (__p->*_M_f)(); } | |
12579 | private: | |
12580 | _Ret (_Tp::*_M_f)(); | |
12581 | }; | |
12582 | ||
12583 | ||
12584 | template <class _Ret, class _Tp> | |
12585 | class const_mem_fun_t : public unary_function<const _Tp*, _Ret> | |
12586 | { | |
12587 | public: | |
12588 | explicit | |
12589 | const_mem_fun_t(_Ret (_Tp::*__pf)() const) | |
12590 | : _M_f(__pf) {} | |
12591 | ||
12592 | _Ret | |
12593 | operator()(const _Tp* __p) const | |
12594 | { return (__p->*_M_f)(); } | |
12595 | private: | |
12596 | _Ret (_Tp::*_M_f)() const; | |
12597 | }; | |
12598 | ||
12599 | ||
12600 | template <class _Ret, class _Tp> | |
12601 | class mem_fun_ref_t : public unary_function<_Tp, _Ret> | |
12602 | { | |
12603 | public: | |
12604 | explicit | |
12605 | mem_fun_ref_t(_Ret (_Tp::*__pf)()) | |
12606 | : _M_f(__pf) {} | |
12607 | ||
12608 | _Ret | |
12609 | operator()(_Tp& __r) const | |
12610 | { return (__r.*_M_f)(); } | |
12611 | private: | |
12612 | _Ret (_Tp::*_M_f)(); | |
12613 | }; | |
12614 | ||
12615 | ||
12616 | template <class _Ret, class _Tp> | |
12617 | class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> | |
12618 | { | |
12619 | public: | |
12620 | explicit | |
12621 | const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) | |
12622 | : _M_f(__pf) {} | |
12623 | ||
12624 | _Ret | |
12625 | operator()(const _Tp& __r) const | |
12626 | { return (__r.*_M_f)(); } | |
12627 | private: | |
12628 | _Ret (_Tp::*_M_f)() const; | |
12629 | }; | |
12630 | ||
12631 | ||
12632 | template <class _Ret, class _Tp, class _Arg> | |
12633 | class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> | |
12634 | { | |
12635 | public: | |
12636 | explicit | |
12637 | mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) | |
12638 | : _M_f(__pf) {} | |
12639 | ||
12640 | _Ret | |
12641 | operator()(_Tp* __p, _Arg __x) const | |
12642 | { return (__p->*_M_f)(__x); } | |
12643 | private: | |
12644 | _Ret (_Tp::*_M_f)(_Arg); | |
12645 | }; | |
12646 | ||
12647 | ||
12648 | template <class _Ret, class _Tp, class _Arg> | |
12649 | class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret> | |
12650 | { | |
12651 | public: | |
12652 | explicit | |
12653 | const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) | |
12654 | : _M_f(__pf) {} | |
12655 | ||
12656 | _Ret | |
12657 | operator()(const _Tp* __p, _Arg __x) const | |
12658 | { return (__p->*_M_f)(__x); } | |
12659 | private: | |
12660 | _Ret (_Tp::*_M_f)(_Arg) const; | |
12661 | }; | |
12662 | ||
12663 | ||
12664 | template <class _Ret, class _Tp, class _Arg> | |
12665 | class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> | |
12666 | { | |
12667 | public: | |
12668 | explicit | |
12669 | mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) | |
12670 | : _M_f(__pf) {} | |
12671 | ||
12672 | _Ret | |
12673 | operator()(_Tp& __r, _Arg __x) const | |
12674 | { return (__r.*_M_f)(__x); } | |
12675 | private: | |
12676 | _Ret (_Tp::*_M_f)(_Arg); | |
12677 | }; | |
12678 | ||
12679 | ||
12680 | template <class _Ret, class _Tp, class _Arg> | |
12681 | class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> | |
12682 | { | |
12683 | public: | |
12684 | explicit | |
12685 | const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) | |
12686 | : _M_f(__pf) {} | |
12687 | ||
12688 | _Ret | |
12689 | operator()(const _Tp& __r, _Arg __x) const | |
12690 | { return (__r.*_M_f)(__x); } | |
12691 | private: | |
12692 | _Ret (_Tp::*_M_f)(_Arg) const; | |
12693 | }; | |
12694 | ||
12695 | ||
12696 | ||
12697 | template <class _Ret, class _Tp> | |
12698 | inline mem_fun_t<_Ret, _Tp> | |
12699 | mem_fun(_Ret (_Tp::*__f)()) | |
12700 | { return mem_fun_t<_Ret, _Tp>(__f); } | |
12701 | ||
12702 | template <class _Ret, class _Tp> | |
12703 | inline const_mem_fun_t<_Ret, _Tp> | |
12704 | mem_fun(_Ret (_Tp::*__f)() const) | |
12705 | { return const_mem_fun_t<_Ret, _Tp>(__f); } | |
12706 | ||
12707 | template <class _Ret, class _Tp> | |
12708 | inline mem_fun_ref_t<_Ret, _Tp> | |
12709 | mem_fun_ref(_Ret (_Tp::*__f)()) | |
12710 | { return mem_fun_ref_t<_Ret, _Tp>(__f); } | |
12711 | ||
12712 | template <class _Ret, class _Tp> | |
12713 | inline const_mem_fun_ref_t<_Ret, _Tp> | |
12714 | mem_fun_ref(_Ret (_Tp::*__f)() const) | |
12715 | { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } | |
12716 | ||
12717 | template <class _Ret, class _Tp, class _Arg> | |
12718 | inline mem_fun1_t<_Ret, _Tp, _Arg> | |
12719 | mem_fun(_Ret (_Tp::*__f)(_Arg)) | |
12720 | { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } | |
12721 | ||
12722 | template <class _Ret, class _Tp, class _Arg> | |
12723 | inline const_mem_fun1_t<_Ret, _Tp, _Arg> | |
12724 | mem_fun(_Ret (_Tp::*__f)(_Arg) const) | |
12725 | { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } | |
12726 | ||
12727 | template <class _Ret, class _Tp, class _Arg> | |
12728 | inline mem_fun1_ref_t<_Ret, _Tp, _Arg> | |
12729 | mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) | |
12730 | { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } | |
12731 | ||
12732 | template <class _Ret, class _Tp, class _Arg> | |
12733 | inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> | |
12734 | mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) | |
12735 | { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } | |
12736 | ||
12737 | ||
12738 | ||
12739 | } | |
12740 | # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 2 3 | |
12741 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 1 3 | |
12742 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
12743 | ||
12744 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
12745 | ||
12746 | ||
12747 | ||
12748 | ||
12749 | namespace std | |
12750 | { | |
12751 | # 109 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
12752 | template<typename _CharT, typename _Traits, typename _Alloc> | |
12753 | class basic_string | |
12754 | { | |
12755 | typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; | |
12756 | ||
12757 | ||
12758 | public: | |
12759 | typedef _Traits traits_type; | |
12760 | typedef typename _Traits::char_type value_type; | |
12761 | typedef _Alloc allocator_type; | |
12762 | typedef typename _CharT_alloc_type::size_type size_type; | |
12763 | typedef typename _CharT_alloc_type::difference_type difference_type; | |
12764 | typedef typename _CharT_alloc_type::reference reference; | |
12765 | typedef typename _CharT_alloc_type::const_reference const_reference; | |
12766 | typedef typename _CharT_alloc_type::pointer pointer; | |
12767 | typedef typename _CharT_alloc_type::const_pointer const_pointer; | |
12768 | typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; | |
12769 | typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> | |
12770 | const_iterator; | |
12771 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | |
12772 | typedef std::reverse_iterator<iterator> reverse_iterator; | |
12773 | ||
12774 | private: | |
12775 | # 146 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
12776 | struct _Rep_base | |
12777 | { | |
12778 | size_type _M_length; | |
12779 | size_type _M_capacity; | |
12780 | _Atomic_word _M_refcount; | |
12781 | }; | |
12782 | ||
12783 | struct _Rep : _Rep_base | |
12784 | { | |
12785 | ||
12786 | typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc; | |
12787 | # 171 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
12788 | static const size_type _S_max_size; | |
12789 | static const _CharT _S_terminal; | |
12790 | ||
12791 | ||
12792 | ||
12793 | static size_type _S_empty_rep_storage[]; | |
12794 | ||
12795 | static _Rep& | |
12796 | _S_empty_rep() | |
12797 | { | |
12798 | void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage); | |
12799 | return *reinterpret_cast<_Rep*>(__p); | |
12800 | } | |
12801 | ||
12802 | bool | |
12803 | _M_is_leaked() const | |
12804 | { return this->_M_refcount < 0; } | |
12805 | ||
12806 | bool | |
12807 | _M_is_shared() const | |
12808 | { return this->_M_refcount > 0; } | |
12809 | ||
12810 | void | |
12811 | _M_set_leaked() | |
12812 | { this->_M_refcount = -1; } | |
12813 | ||
12814 | void | |
12815 | _M_set_sharable() | |
12816 | { this->_M_refcount = 0; } | |
12817 | ||
12818 | void | |
12819 | _M_set_length_and_sharable(size_type __n) | |
12820 | { | |
12821 | this->_M_set_sharable(); | |
12822 | this->_M_length = __n; | |
12823 | traits_type::assign(this->_M_refdata()[__n], _S_terminal); | |
12824 | ||
12825 | ||
12826 | } | |
12827 | ||
12828 | _CharT* | |
12829 | _M_refdata() throw() | |
12830 | { return reinterpret_cast<_CharT*>(this + 1); } | |
12831 | ||
12832 | _CharT* | |
12833 | _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) | |
12834 | { | |
12835 | return (!_M_is_leaked() && __alloc1 == __alloc2) | |
12836 | ? _M_refcopy() : _M_clone(__alloc1); | |
12837 | } | |
12838 | ||
12839 | ||
12840 | static _Rep* | |
12841 | _S_create(size_type, size_type, const _Alloc&); | |
12842 | ||
12843 | void | |
12844 | _M_dispose(const _Alloc& __a) | |
12845 | { | |
12846 | ||
12847 | if (__builtin_expect(this != &_S_empty_rep(), false)) | |
12848 | ||
12849 | if (__gnu_cxx::__exchange_and_add(&this->_M_refcount, -1) <= 0) | |
12850 | _M_destroy(__a); | |
12851 | } | |
12852 | ||
12853 | void | |
12854 | _M_destroy(const _Alloc&) throw(); | |
12855 | ||
12856 | _CharT* | |
12857 | _M_refcopy() throw() | |
12858 | { | |
12859 | ||
12860 | if (__builtin_expect(this != &_S_empty_rep(), false)) | |
12861 | ||
12862 | __gnu_cxx::__atomic_add(&this->_M_refcount, 1); | |
12863 | return _M_refdata(); | |
12864 | } | |
12865 | ||
12866 | _CharT* | |
12867 | _M_clone(const _Alloc&, size_type __res = 0); | |
12868 | }; | |
12869 | ||
12870 | ||
12871 | struct _Alloc_hider : _Alloc | |
12872 | { | |
12873 | _Alloc_hider(_CharT* __dat, const _Alloc& __a) | |
12874 | : _Alloc(__a), _M_p(__dat) { } | |
12875 | ||
12876 | _CharT* _M_p; | |
12877 | }; | |
12878 | ||
12879 | public: | |
12880 | ||
12881 | ||
12882 | ||
12883 | ||
12884 | static const size_type npos = static_cast<size_type>(-1); | |
12885 | ||
12886 | private: | |
12887 | ||
12888 | mutable _Alloc_hider _M_dataplus; | |
12889 | ||
12890 | _CharT* | |
12891 | _M_data() const | |
12892 | { return _M_dataplus._M_p; } | |
12893 | ||
12894 | _CharT* | |
12895 | _M_data(_CharT* __p) | |
12896 | { return (_M_dataplus._M_p = __p); } | |
12897 | ||
12898 | _Rep* | |
12899 | _M_rep() const | |
12900 | { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } | |
12901 | ||
12902 | ||
12903 | ||
12904 | iterator | |
12905 | _M_ibegin() const | |
12906 | { return iterator(_M_data()); } | |
12907 | ||
12908 | iterator | |
12909 | _M_iend() const | |
12910 | { return iterator(_M_data() + this->size()); } | |
12911 | ||
12912 | void | |
12913 | _M_leak() | |
12914 | { | |
12915 | if (!_M_rep()->_M_is_leaked()) | |
12916 | _M_leak_hard(); | |
12917 | } | |
12918 | ||
12919 | size_type | |
12920 | _M_check(size_type __pos, const char* __s) const | |
12921 | { | |
12922 | if (__pos > this->size()) | |
12923 | __throw_out_of_range((__s)); | |
12924 | return __pos; | |
12925 | } | |
12926 | ||
12927 | void | |
12928 | _M_check_length(size_type __n1, size_type __n2, const char* __s) const | |
12929 | { | |
12930 | if (this->max_size() - (this->size() - __n1) < __n2) | |
12931 | __throw_length_error((__s)); | |
12932 | } | |
12933 | ||
12934 | ||
12935 | size_type | |
12936 | _M_limit(size_type __pos, size_type __off) const | |
12937 | { | |
12938 | const bool __testoff = __off < this->size() - __pos; | |
12939 | return __testoff ? __off : this->size() - __pos; | |
12940 | } | |
12941 | ||
12942 | ||
12943 | bool | |
12944 | _M_disjunct(const _CharT* __s) const | |
12945 | { | |
12946 | return (less<const _CharT*>()(__s, _M_data()) | |
12947 | || less<const _CharT*>()(_M_data() + this->size(), __s)); | |
12948 | } | |
12949 | ||
12950 | ||
12951 | ||
12952 | static void | |
12953 | _M_copy(_CharT* __d, const _CharT* __s, size_type __n) | |
12954 | { | |
12955 | if (__n == 1) | |
12956 | traits_type::assign(*__d, *__s); | |
12957 | else | |
12958 | traits_type::copy(__d, __s, __n); | |
12959 | } | |
12960 | ||
12961 | static void | |
12962 | _M_move(_CharT* __d, const _CharT* __s, size_type __n) | |
12963 | { | |
12964 | if (__n == 1) | |
12965 | traits_type::assign(*__d, *__s); | |
12966 | else | |
12967 | traits_type::move(__d, __s, __n); | |
12968 | } | |
12969 | ||
12970 | static void | |
12971 | _M_assign(_CharT* __d, size_type __n, _CharT __c) | |
12972 | { | |
12973 | if (__n == 1) | |
12974 | traits_type::assign(*__d, __c); | |
12975 | else | |
12976 | traits_type::assign(__d, __n, __c); | |
12977 | } | |
12978 | ||
12979 | ||
12980 | ||
12981 | template<class _Iterator> | |
12982 | static void | |
12983 | _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) | |
12984 | { | |
12985 | for (; __k1 != __k2; ++__k1, ++__p) | |
12986 | traits_type::assign(*__p, *__k1); | |
12987 | } | |
12988 | ||
12989 | static void | |
12990 | _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) | |
12991 | { _S_copy_chars(__p, __k1.base(), __k2.base()); } | |
12992 | ||
12993 | static void | |
12994 | _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) | |
12995 | { _S_copy_chars(__p, __k1.base(), __k2.base()); } | |
12996 | ||
12997 | static void | |
12998 | _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) | |
12999 | { _M_copy(__p, __k1, __k2 - __k1); } | |
13000 | ||
13001 | static void | |
13002 | _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) | |
13003 | { _M_copy(__p, __k1, __k2 - __k1); } | |
13004 | ||
13005 | void | |
13006 | _M_mutate(size_type __pos, size_type __len1, size_type __len2); | |
13007 | ||
13008 | void | |
13009 | _M_leak_hard(); | |
13010 | ||
13011 | static _Rep& | |
13012 | _S_empty_rep() | |
13013 | { return _Rep::_S_empty_rep(); } | |
13014 | ||
13015 | public: | |
13016 | ||
13017 | ||
13018 | ||
13019 | ||
13020 | ||
13021 | ||
13022 | ||
13023 | inline | |
13024 | basic_string(); | |
13025 | ||
13026 | ||
13027 | ||
13028 | ||
13029 | explicit | |
13030 | basic_string(const _Alloc& __a); | |
13031 | ||
13032 | ||
13033 | ||
13034 | ||
13035 | ||
13036 | ||
13037 | basic_string(const basic_string& __str); | |
13038 | ||
13039 | ||
13040 | ||
13041 | ||
13042 | ||
13043 | ||
13044 | basic_string(const basic_string& __str, size_type __pos, | |
13045 | size_type __n = npos); | |
13046 | ||
13047 | ||
13048 | ||
13049 | ||
13050 | ||
13051 | ||
13052 | ||
13053 | basic_string(const basic_string& __str, size_type __pos, | |
13054 | size_type __n, const _Alloc& __a); | |
13055 | # 448 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13056 | basic_string(const _CharT* __s, size_type __n, | |
13057 | const _Alloc& __a = _Alloc()); | |
13058 | ||
13059 | ||
13060 | ||
13061 | ||
13062 | ||
13063 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); | |
13064 | ||
13065 | ||
13066 | ||
13067 | ||
13068 | ||
13069 | ||
13070 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); | |
13071 | ||
13072 | ||
13073 | ||
13074 | ||
13075 | ||
13076 | ||
13077 | ||
13078 | template<class _InputIterator> | |
13079 | basic_string(_InputIterator __beg, _InputIterator __end, | |
13080 | const _Alloc& __a = _Alloc()); | |
13081 | ||
13082 | ||
13083 | ||
13084 | ||
13085 | ~basic_string() | |
13086 | { _M_rep()->_M_dispose(this->get_allocator()); } | |
13087 | ||
13088 | ||
13089 | ||
13090 | ||
13091 | ||
13092 | basic_string& | |
13093 | operator=(const basic_string& __str) | |
13094 | { return this->assign(__str); } | |
13095 | ||
13096 | ||
13097 | ||
13098 | ||
13099 | ||
13100 | basic_string& | |
13101 | operator=(const _CharT* __s) | |
13102 | { return this->assign(__s); } | |
13103 | # 503 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13104 | basic_string& | |
13105 | operator=(_CharT __c) | |
13106 | { | |
13107 | this->assign(1, __c); | |
13108 | return *this; | |
13109 | } | |
13110 | ||
13111 | ||
13112 | ||
13113 | ||
13114 | ||
13115 | ||
13116 | iterator | |
13117 | begin() | |
13118 | { | |
13119 | _M_leak(); | |
13120 | return iterator(_M_data()); | |
13121 | } | |
13122 | ||
13123 | ||
13124 | ||
13125 | ||
13126 | ||
13127 | const_iterator | |
13128 | begin() const | |
13129 | { return const_iterator(_M_data()); } | |
13130 | ||
13131 | ||
13132 | ||
13133 | ||
13134 | ||
13135 | iterator | |
13136 | end() | |
13137 | { | |
13138 | _M_leak(); | |
13139 | return iterator(_M_data() + this->size()); | |
13140 | } | |
13141 | ||
13142 | ||
13143 | ||
13144 | ||
13145 | ||
13146 | const_iterator | |
13147 | end() const | |
13148 | { return const_iterator(_M_data() + this->size()); } | |
13149 | ||
13150 | ||
13151 | ||
13152 | ||
13153 | ||
13154 | ||
13155 | reverse_iterator | |
13156 | rbegin() | |
13157 | { return reverse_iterator(this->end()); } | |
13158 | ||
13159 | ||
13160 | ||
13161 | ||
13162 | ||
13163 | ||
13164 | const_reverse_iterator | |
13165 | rbegin() const | |
13166 | { return const_reverse_iterator(this->end()); } | |
13167 | ||
13168 | ||
13169 | ||
13170 | ||
13171 | ||
13172 | ||
13173 | reverse_iterator | |
13174 | rend() | |
13175 | { return reverse_iterator(this->begin()); } | |
13176 | ||
13177 | ||
13178 | ||
13179 | ||
13180 | ||
13181 | ||
13182 | const_reverse_iterator | |
13183 | rend() const | |
13184 | { return const_reverse_iterator(this->begin()); } | |
13185 | ||
13186 | public: | |
13187 | ||
13188 | ||
13189 | ||
13190 | size_type | |
13191 | size() const | |
13192 | { return _M_rep()->_M_length; } | |
13193 | ||
13194 | ||
13195 | ||
13196 | size_type | |
13197 | length() const | |
13198 | { return _M_rep()->_M_length; } | |
13199 | ||
13200 | ||
13201 | size_type | |
13202 | max_size() const | |
13203 | { return _Rep::_S_max_size; } | |
13204 | # 614 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13205 | void | |
13206 | resize(size_type __n, _CharT __c); | |
13207 | # 627 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13208 | void | |
13209 | resize(size_type __n) | |
13210 | { this->resize(__n, _CharT()); } | |
13211 | ||
13212 | ||
13213 | ||
13214 | ||
13215 | ||
13216 | size_type | |
13217 | capacity() const | |
13218 | { return _M_rep()->_M_capacity; } | |
13219 | # 656 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13220 | void | |
13221 | reserve(size_type __res_arg = 0); | |
13222 | ||
13223 | ||
13224 | ||
13225 | ||
13226 | void | |
13227 | clear() | |
13228 | { _M_mutate(0, this->size(), 0); } | |
13229 | ||
13230 | ||
13231 | ||
13232 | ||
13233 | bool | |
13234 | empty() const | |
13235 | { return this->size() == 0; } | |
13236 | # 684 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13237 | const_reference | |
13238 | operator[] (size_type __pos) const | |
13239 | { | |
13240 | ; | |
13241 | return _M_data()[__pos]; | |
13242 | } | |
13243 | # 701 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13244 | reference | |
13245 | operator[](size_type __pos) | |
13246 | { | |
13247 | ||
13248 | ; | |
13249 | ||
13250 | ; | |
13251 | _M_leak(); | |
13252 | return _M_data()[__pos]; | |
13253 | } | |
13254 | # 722 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13255 | const_reference | |
13256 | at(size_type __n) const | |
13257 | { | |
13258 | if (__n >= this->size()) | |
13259 | __throw_out_of_range(("basic_string::at")); | |
13260 | return _M_data()[__n]; | |
13261 | } | |
13262 | # 741 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13263 | reference | |
13264 | at(size_type __n) | |
13265 | { | |
13266 | if (__n >= size()) | |
13267 | __throw_out_of_range(("basic_string::at")); | |
13268 | _M_leak(); | |
13269 | return _M_data()[__n]; | |
13270 | } | |
13271 | ||
13272 | ||
13273 | ||
13274 | ||
13275 | ||
13276 | ||
13277 | ||
13278 | basic_string& | |
13279 | operator+=(const basic_string& __str) | |
13280 | { return this->append(__str); } | |
13281 | ||
13282 | ||
13283 | ||
13284 | ||
13285 | ||
13286 | ||
13287 | basic_string& | |
13288 | operator+=(const _CharT* __s) | |
13289 | { return this->append(__s); } | |
13290 | ||
13291 | ||
13292 | ||
13293 | ||
13294 | ||
13295 | ||
13296 | basic_string& | |
13297 | operator+=(_CharT __c) | |
13298 | { | |
13299 | this->push_back(__c); | |
13300 | return *this; | |
13301 | } | |
13302 | ||
13303 | ||
13304 | ||
13305 | ||
13306 | ||
13307 | ||
13308 | basic_string& | |
13309 | append(const basic_string& __str); | |
13310 | # 801 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13311 | basic_string& | |
13312 | append(const basic_string& __str, size_type __pos, size_type __n); | |
13313 | ||
13314 | ||
13315 | ||
13316 | ||
13317 | ||
13318 | ||
13319 | ||
13320 | basic_string& | |
13321 | append(const _CharT* __s, size_type __n); | |
13322 | ||
13323 | ||
13324 | ||
13325 | ||
13326 | ||
13327 | ||
13328 | basic_string& | |
13329 | append(const _CharT* __s) | |
13330 | { | |
13331 | ; | |
13332 | return this->append(__s, traits_type::length(__s)); | |
13333 | } | |
13334 | # 833 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13335 | basic_string& | |
13336 | append(size_type __n, _CharT __c); | |
13337 | # 844 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13338 | template<class _InputIterator> | |
13339 | basic_string& | |
13340 | append(_InputIterator __first, _InputIterator __last) | |
13341 | { return this->replace(_M_iend(), _M_iend(), __first, __last); } | |
13342 | ||
13343 | ||
13344 | ||
13345 | ||
13346 | ||
13347 | void | |
13348 | push_back(_CharT __c) | |
13349 | { | |
13350 | const size_type __len = 1 + this->size(); | |
13351 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
13352 | this->reserve(__len); | |
13353 | traits_type::assign(_M_data()[this->size()], __c); | |
13354 | _M_rep()->_M_set_length_and_sharable(__len); | |
13355 | } | |
13356 | ||
13357 | ||
13358 | ||
13359 | ||
13360 | ||
13361 | ||
13362 | basic_string& | |
13363 | assign(const basic_string& __str); | |
13364 | # 883 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13365 | basic_string& | |
13366 | assign(const basic_string& __str, size_type __pos, size_type __n) | |
13367 | { return this->assign(__str._M_data() | |
13368 | + __str._M_check(__pos, "basic_string::assign"), | |
13369 | __str._M_limit(__pos, __n)); } | |
13370 | # 899 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13371 | basic_string& | |
13372 | assign(const _CharT* __s, size_type __n); | |
13373 | # 911 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13374 | basic_string& | |
13375 | assign(const _CharT* __s) | |
13376 | { | |
13377 | ; | |
13378 | return this->assign(__s, traits_type::length(__s)); | |
13379 | } | |
13380 | # 927 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13381 | basic_string& | |
13382 | assign(size_type __n, _CharT __c) | |
13383 | { return _M_replace_aux(size_type(0), this->size(), __n, __c); } | |
13384 | # 939 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13385 | template<class _InputIterator> | |
13386 | basic_string& | |
13387 | assign(_InputIterator __first, _InputIterator __last) | |
13388 | { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } | |
13389 | # 956 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13390 | void | |
13391 | insert(iterator __p, size_type __n, _CharT __c) | |
13392 | { this->replace(__p, __p, __n, __c); } | |
13393 | # 971 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13394 | template<class _InputIterator> | |
13395 | void | |
13396 | insert(iterator __p, _InputIterator __beg, _InputIterator __end) | |
13397 | { this->replace(__p, __p, __beg, __end); } | |
13398 | # 987 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13399 | basic_string& | |
13400 | insert(size_type __pos1, const basic_string& __str) | |
13401 | { return this->insert(__pos1, __str, size_type(0), __str.size()); } | |
13402 | # 1009 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13403 | basic_string& | |
13404 | insert(size_type __pos1, const basic_string& __str, | |
13405 | size_type __pos2, size_type __n) | |
13406 | { return this->insert(__pos1, __str._M_data() | |
13407 | + __str._M_check(__pos2, "basic_string::insert"), | |
13408 | __str._M_limit(__pos2, __n)); } | |
13409 | # 1032 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13410 | basic_string& | |
13411 | insert(size_type __pos, const _CharT* __s, size_type __n); | |
13412 | # 1050 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13413 | basic_string& | |
13414 | insert(size_type __pos, const _CharT* __s) | |
13415 | { | |
13416 | ; | |
13417 | return this->insert(__pos, __s, traits_type::length(__s)); | |
13418 | } | |
13419 | # 1073 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13420 | basic_string& | |
13421 | insert(size_type __pos, size_type __n, _CharT __c) | |
13422 | { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), | |
13423 | size_type(0), __n, __c); } | |
13424 | # 1090 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13425 | iterator | |
13426 | insert(iterator __p, _CharT __c) | |
13427 | { | |
13428 | ; | |
13429 | const size_type __pos = __p - _M_ibegin(); | |
13430 | _M_replace_aux(__pos, size_type(0), size_type(1), __c); | |
13431 | _M_rep()->_M_set_leaked(); | |
13432 | return this->_M_ibegin() + __pos; | |
13433 | } | |
13434 | # 1114 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13435 | basic_string& | |
13436 | erase(size_type __pos = 0, size_type __n = npos) | |
13437 | { | |
13438 | _M_mutate(_M_check(__pos, "basic_string::erase"), | |
13439 | _M_limit(__pos, __n), size_type(0)); | |
13440 | return *this; | |
13441 | } | |
13442 | # 1130 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13443 | iterator | |
13444 | erase(iterator __position) | |
13445 | { | |
13446 | ; | |
13447 | ||
13448 | const size_type __pos = __position - _M_ibegin(); | |
13449 | _M_mutate(__pos, size_type(1), size_type(0)); | |
13450 | _M_rep()->_M_set_leaked(); | |
13451 | return _M_ibegin() + __pos; | |
13452 | } | |
13453 | # 1150 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13454 | iterator | |
13455 | erase(iterator __first, iterator __last) | |
13456 | { | |
13457 | ; | |
13458 | ||
13459 | const size_type __pos = __first - _M_ibegin(); | |
13460 | _M_mutate(__pos, __last - __first, size_type(0)); | |
13461 | _M_rep()->_M_set_leaked(); | |
13462 | return _M_ibegin() + __pos; | |
13463 | } | |
13464 | # 1177 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13465 | basic_string& | |
13466 | replace(size_type __pos, size_type __n, const basic_string& __str) | |
13467 | { return this->replace(__pos, __n, __str._M_data(), __str.size()); } | |
13468 | # 1199 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13469 | basic_string& | |
13470 | replace(size_type __pos1, size_type __n1, const basic_string& __str, | |
13471 | size_type __pos2, size_type __n2) | |
13472 | { return this->replace(__pos1, __n1, __str._M_data() | |
13473 | + __str._M_check(__pos2, "basic_string::replace"), | |
13474 | __str._M_limit(__pos2, __n2)); } | |
13475 | # 1223 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13476 | basic_string& | |
13477 | replace(size_type __pos, size_type __n1, const _CharT* __s, | |
13478 | size_type __n2); | |
13479 | # 1242 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13480 | basic_string& | |
13481 | replace(size_type __pos, size_type __n1, const _CharT* __s) | |
13482 | { | |
13483 | ; | |
13484 | return this->replace(__pos, __n1, __s, traits_type::length(__s)); | |
13485 | } | |
13486 | # 1265 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13487 | basic_string& | |
13488 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) | |
13489 | { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), | |
13490 | _M_limit(__pos, __n1), __n2, __c); } | |
13491 | # 1283 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13492 | basic_string& | |
13493 | replace(iterator __i1, iterator __i2, const basic_string& __str) | |
13494 | { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } | |
13495 | # 1301 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13496 | basic_string& | |
13497 | replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) | |
13498 | { | |
13499 | ; | |
13500 | ||
13501 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); | |
13502 | } | |
13503 | # 1322 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13504 | basic_string& | |
13505 | replace(iterator __i1, iterator __i2, const _CharT* __s) | |
13506 | { | |
13507 | ; | |
13508 | return this->replace(__i1, __i2, __s, traits_type::length(__s)); | |
13509 | } | |
13510 | # 1343 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13511 | basic_string& | |
13512 | replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) | |
13513 | { | |
13514 | ; | |
13515 | ||
13516 | return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); | |
13517 | } | |
13518 | # 1365 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13519 | template<class _InputIterator> | |
13520 | basic_string& | |
13521 | replace(iterator __i1, iterator __i2, | |
13522 | _InputIterator __k1, _InputIterator __k2) | |
13523 | { | |
13524 | ; | |
13525 | ||
13526 | ; | |
13527 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
13528 | return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); | |
13529 | } | |
13530 | ||
13531 | ||
13532 | ||
13533 | basic_string& | |
13534 | replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) | |
13535 | { | |
13536 | ; | |
13537 | ||
13538 | ; | |
13539 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
13540 | __k1, __k2 - __k1); | |
13541 | } | |
13542 | ||
13543 | basic_string& | |
13544 | replace(iterator __i1, iterator __i2, | |
13545 | const _CharT* __k1, const _CharT* __k2) | |
13546 | { | |
13547 | ; | |
13548 | ||
13549 | ; | |
13550 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
13551 | __k1, __k2 - __k1); | |
13552 | } | |
13553 | ||
13554 | basic_string& | |
13555 | replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) | |
13556 | { | |
13557 | ; | |
13558 | ||
13559 | ; | |
13560 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
13561 | __k1.base(), __k2 - __k1); | |
13562 | } | |
13563 | ||
13564 | basic_string& | |
13565 | replace(iterator __i1, iterator __i2, | |
13566 | const_iterator __k1, const_iterator __k2) | |
13567 | { | |
13568 | ; | |
13569 | ||
13570 | ; | |
13571 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
13572 | __k1.base(), __k2 - __k1); | |
13573 | } | |
13574 | ||
13575 | private: | |
13576 | template<class _Integer> | |
13577 | basic_string& | |
13578 | _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, | |
13579 | _Integer __val, __true_type) | |
13580 | { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } | |
13581 | ||
13582 | template<class _InputIterator> | |
13583 | basic_string& | |
13584 | _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, | |
13585 | _InputIterator __k2, __false_type); | |
13586 | ||
13587 | basic_string& | |
13588 | _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, | |
13589 | _CharT __c); | |
13590 | ||
13591 | basic_string& | |
13592 | _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, | |
13593 | size_type __n2); | |
13594 | ||
13595 | ||
13596 | ||
13597 | template<class _InIterator> | |
13598 | static _CharT* | |
13599 | _S_construct_aux(_InIterator __beg, _InIterator __end, | |
13600 | const _Alloc& __a, __false_type) | |
13601 | { | |
13602 | typedef typename iterator_traits<_InIterator>::iterator_category _Tag; | |
13603 | return _S_construct(__beg, __end, __a, _Tag()); | |
13604 | } | |
13605 | ||
13606 | template<class _InIterator> | |
13607 | static _CharT* | |
13608 | _S_construct_aux(_InIterator __beg, _InIterator __end, | |
13609 | const _Alloc& __a, __true_type) | |
13610 | { return _S_construct(static_cast<size_type>(__beg), | |
13611 | static_cast<value_type>(__end), __a); } | |
13612 | ||
13613 | template<class _InIterator> | |
13614 | static _CharT* | |
13615 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) | |
13616 | { | |
13617 | typedef typename std::__is_integer<_InIterator>::__type _Integral; | |
13618 | return _S_construct_aux(__beg, __end, __a, _Integral()); | |
13619 | } | |
13620 | ||
13621 | ||
13622 | template<class _InIterator> | |
13623 | static _CharT* | |
13624 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
13625 | input_iterator_tag); | |
13626 | ||
13627 | ||
13628 | ||
13629 | template<class _FwdIterator> | |
13630 | static _CharT* | |
13631 | _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, | |
13632 | forward_iterator_tag); | |
13633 | ||
13634 | static _CharT* | |
13635 | _S_construct(size_type __req, _CharT __c, const _Alloc& __a); | |
13636 | ||
13637 | public: | |
13638 | # 1496 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13639 | size_type | |
13640 | copy(_CharT* __s, size_type __n, size_type __pos = 0) const; | |
13641 | # 1506 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13642 | void | |
13643 | swap(basic_string& __s); | |
13644 | # 1516 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13645 | const _CharT* | |
13646 | c_str() const | |
13647 | { return _M_data(); } | |
13648 | ||
13649 | ||
13650 | ||
13651 | ||
13652 | ||
13653 | ||
13654 | ||
13655 | const _CharT* | |
13656 | data() const | |
13657 | { return _M_data(); } | |
13658 | ||
13659 | ||
13660 | ||
13661 | ||
13662 | allocator_type | |
13663 | get_allocator() const | |
13664 | { return _M_dataplus; } | |
13665 | # 1548 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13666 | size_type | |
13667 | find(const _CharT* __s, size_type __pos, size_type __n) const; | |
13668 | # 1561 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13669 | size_type | |
13670 | find(const basic_string& __str, size_type __pos = 0) const | |
13671 | { return this->find(__str.data(), __pos, __str.size()); } | |
13672 | # 1575 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13673 | size_type | |
13674 | find(const _CharT* __s, size_type __pos = 0) const | |
13675 | { | |
13676 | ; | |
13677 | return this->find(__s, __pos, traits_type::length(__s)); | |
13678 | } | |
13679 | # 1592 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13680 | size_type | |
13681 | find(_CharT __c, size_type __pos = 0) const; | |
13682 | # 1605 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13683 | size_type | |
13684 | rfind(const basic_string& __str, size_type __pos = npos) const | |
13685 | { return this->rfind(__str.data(), __pos, __str.size()); } | |
13686 | # 1620 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13687 | size_type | |
13688 | rfind(const _CharT* __s, size_type __pos, size_type __n) const; | |
13689 | # 1633 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13690 | size_type | |
13691 | rfind(const _CharT* __s, size_type __pos = npos) const | |
13692 | { | |
13693 | ; | |
13694 | return this->rfind(__s, __pos, traits_type::length(__s)); | |
13695 | } | |
13696 | # 1650 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13697 | size_type | |
13698 | rfind(_CharT __c, size_type __pos = npos) const; | |
13699 | # 1663 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13700 | size_type | |
13701 | find_first_of(const basic_string& __str, size_type __pos = 0) const | |
13702 | { return this->find_first_of(__str.data(), __pos, __str.size()); } | |
13703 | # 1678 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13704 | size_type | |
13705 | find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; | |
13706 | # 1691 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13707 | size_type | |
13708 | find_first_of(const _CharT* __s, size_type __pos = 0) const | |
13709 | { | |
13710 | ; | |
13711 | return this->find_first_of(__s, __pos, traits_type::length(__s)); | |
13712 | } | |
13713 | # 1710 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13714 | size_type | |
13715 | find_first_of(_CharT __c, size_type __pos = 0) const | |
13716 | { return this->find(__c, __pos); } | |
13717 | # 1724 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13718 | size_type | |
13719 | find_last_of(const basic_string& __str, size_type __pos = npos) const | |
13720 | { return this->find_last_of(__str.data(), __pos, __str.size()); } | |
13721 | # 1739 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13722 | size_type | |
13723 | find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; | |
13724 | # 1752 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13725 | size_type | |
13726 | find_last_of(const _CharT* __s, size_type __pos = npos) const | |
13727 | { | |
13728 | ; | |
13729 | return this->find_last_of(__s, __pos, traits_type::length(__s)); | |
13730 | } | |
13731 | # 1771 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13732 | size_type | |
13733 | find_last_of(_CharT __c, size_type __pos = npos) const | |
13734 | { return this->rfind(__c, __pos); } | |
13735 | # 1785 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13736 | size_type | |
13737 | find_first_not_of(const basic_string& __str, size_type __pos = 0) const | |
13738 | { return this->find_first_not_of(__str.data(), __pos, __str.size()); } | |
13739 | # 1800 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13740 | size_type | |
13741 | find_first_not_of(const _CharT* __s, size_type __pos, | |
13742 | size_type __n) const; | |
13743 | # 1814 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13744 | size_type | |
13745 | find_first_not_of(const _CharT* __s, size_type __pos = 0) const | |
13746 | { | |
13747 | ; | |
13748 | return this->find_first_not_of(__s, __pos, traits_type::length(__s)); | |
13749 | } | |
13750 | # 1831 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13751 | size_type | |
13752 | find_first_not_of(_CharT __c, size_type __pos = 0) const; | |
13753 | # 1844 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13754 | size_type | |
13755 | find_last_not_of(const basic_string& __str, size_type __pos = npos) const | |
13756 | { return this->find_last_not_of(__str.data(), __pos, __str.size()); } | |
13757 | # 1860 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13758 | size_type | |
13759 | find_last_not_of(const _CharT* __s, size_type __pos, | |
13760 | size_type __n) const; | |
13761 | # 1873 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13762 | size_type | |
13763 | find_last_not_of(const _CharT* __s, size_type __pos = npos) const | |
13764 | { | |
13765 | ; | |
13766 | return this->find_last_not_of(__s, __pos, traits_type::length(__s)); | |
13767 | } | |
13768 | # 1890 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13769 | size_type | |
13770 | find_last_not_of(_CharT __c, size_type __pos = npos) const; | |
13771 | # 1905 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13772 | basic_string | |
13773 | substr(size_type __pos = 0, size_type __n = npos) const | |
13774 | { return basic_string(*this, | |
13775 | _M_check(__pos, "basic_string::substr"), __n); } | |
13776 | # 1923 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13777 | int | |
13778 | compare(const basic_string& __str) const | |
13779 | { | |
13780 | const size_type __size = this->size(); | |
13781 | const size_type __osize = __str.size(); | |
13782 | const size_type __len = std::min(__size, __osize); | |
13783 | ||
13784 | int __r = traits_type::compare(_M_data(), __str.data(), __len); | |
13785 | if (!__r) | |
13786 | __r = __size - __osize; | |
13787 | return __r; | |
13788 | } | |
13789 | # 1953 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13790 | int | |
13791 | compare(size_type __pos, size_type __n, const basic_string& __str) const; | |
13792 | # 1977 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13793 | int | |
13794 | compare(size_type __pos1, size_type __n1, const basic_string& __str, | |
13795 | size_type __pos2, size_type __n2) const; | |
13796 | # 1995 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13797 | int | |
13798 | compare(const _CharT* __s) const; | |
13799 | # 2018 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13800 | int | |
13801 | compare(size_type __pos, size_type __n1, const _CharT* __s) const; | |
13802 | # 2043 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13803 | int | |
13804 | compare(size_type __pos, size_type __n1, const _CharT* __s, | |
13805 | size_type __n2) const; | |
13806 | }; | |
13807 | ||
13808 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13809 | inline basic_string<_CharT, _Traits, _Alloc>:: | |
13810 | basic_string() | |
13811 | ||
13812 | : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } | |
13813 | # 2064 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13814 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13815 | basic_string<_CharT, _Traits, _Alloc> | |
13816 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13817 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13818 | { | |
13819 | basic_string<_CharT, _Traits, _Alloc> __str(__lhs); | |
13820 | __str.append(__rhs); | |
13821 | return __str; | |
13822 | } | |
13823 | ||
13824 | ||
13825 | ||
13826 | ||
13827 | ||
13828 | ||
13829 | ||
13830 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13831 | basic_string<_CharT,_Traits,_Alloc> | |
13832 | operator+(const _CharT* __lhs, | |
13833 | const basic_string<_CharT,_Traits,_Alloc>& __rhs); | |
13834 | ||
13835 | ||
13836 | ||
13837 | ||
13838 | ||
13839 | ||
13840 | ||
13841 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13842 | basic_string<_CharT,_Traits,_Alloc> | |
13843 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); | |
13844 | ||
13845 | ||
13846 | ||
13847 | ||
13848 | ||
13849 | ||
13850 | ||
13851 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13852 | inline basic_string<_CharT, _Traits, _Alloc> | |
13853 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13854 | const _CharT* __rhs) | |
13855 | { | |
13856 | basic_string<_CharT, _Traits, _Alloc> __str(__lhs); | |
13857 | __str.append(__rhs); | |
13858 | return __str; | |
13859 | } | |
13860 | ||
13861 | ||
13862 | ||
13863 | ||
13864 | ||
13865 | ||
13866 | ||
13867 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13868 | inline basic_string<_CharT, _Traits, _Alloc> | |
13869 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) | |
13870 | { | |
13871 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
13872 | typedef typename __string_type::size_type __size_type; | |
13873 | __string_type __str(__lhs); | |
13874 | __str.append(__size_type(1), __rhs); | |
13875 | return __str; | |
13876 | } | |
13877 | # 2135 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13878 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13879 | inline bool | |
13880 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13881 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13882 | { return __lhs.compare(__rhs) == 0; } | |
13883 | ||
13884 | ||
13885 | ||
13886 | ||
13887 | ||
13888 | ||
13889 | ||
13890 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13891 | inline bool | |
13892 | operator==(const _CharT* __lhs, | |
13893 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13894 | { return __rhs.compare(__lhs) == 0; } | |
13895 | ||
13896 | ||
13897 | ||
13898 | ||
13899 | ||
13900 | ||
13901 | ||
13902 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13903 | inline bool | |
13904 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13905 | const _CharT* __rhs) | |
13906 | { return __lhs.compare(__rhs) == 0; } | |
13907 | # 2172 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13908 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13909 | inline bool | |
13910 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13911 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13912 | { return __rhs.compare(__lhs) != 0; } | |
13913 | ||
13914 | ||
13915 | ||
13916 | ||
13917 | ||
13918 | ||
13919 | ||
13920 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13921 | inline bool | |
13922 | operator!=(const _CharT* __lhs, | |
13923 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13924 | { return __rhs.compare(__lhs) != 0; } | |
13925 | ||
13926 | ||
13927 | ||
13928 | ||
13929 | ||
13930 | ||
13931 | ||
13932 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13933 | inline bool | |
13934 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13935 | const _CharT* __rhs) | |
13936 | { return __lhs.compare(__rhs) != 0; } | |
13937 | # 2209 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13938 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13939 | inline bool | |
13940 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13941 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13942 | { return __lhs.compare(__rhs) < 0; } | |
13943 | ||
13944 | ||
13945 | ||
13946 | ||
13947 | ||
13948 | ||
13949 | ||
13950 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13951 | inline bool | |
13952 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13953 | const _CharT* __rhs) | |
13954 | { return __lhs.compare(__rhs) < 0; } | |
13955 | ||
13956 | ||
13957 | ||
13958 | ||
13959 | ||
13960 | ||
13961 | ||
13962 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13963 | inline bool | |
13964 | operator<(const _CharT* __lhs, | |
13965 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13966 | { return __rhs.compare(__lhs) > 0; } | |
13967 | # 2246 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13968 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13969 | inline bool | |
13970 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13971 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13972 | { return __lhs.compare(__rhs) > 0; } | |
13973 | ||
13974 | ||
13975 | ||
13976 | ||
13977 | ||
13978 | ||
13979 | ||
13980 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13981 | inline bool | |
13982 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
13983 | const _CharT* __rhs) | |
13984 | { return __lhs.compare(__rhs) > 0; } | |
13985 | ||
13986 | ||
13987 | ||
13988 | ||
13989 | ||
13990 | ||
13991 | ||
13992 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13993 | inline bool | |
13994 | operator>(const _CharT* __lhs, | |
13995 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
13996 | { return __rhs.compare(__lhs) < 0; } | |
13997 | # 2283 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
13998 | template<typename _CharT, typename _Traits, typename _Alloc> | |
13999 | inline bool | |
14000 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
14001 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
14002 | { return __lhs.compare(__rhs) <= 0; } | |
14003 | ||
14004 | ||
14005 | ||
14006 | ||
14007 | ||
14008 | ||
14009 | ||
14010 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14011 | inline bool | |
14012 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
14013 | const _CharT* __rhs) | |
14014 | { return __lhs.compare(__rhs) <= 0; } | |
14015 | ||
14016 | ||
14017 | ||
14018 | ||
14019 | ||
14020 | ||
14021 | ||
14022 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14023 | inline bool | |
14024 | operator<=(const _CharT* __lhs, | |
14025 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
14026 | { return __rhs.compare(__lhs) >= 0; } | |
14027 | # 2320 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
14028 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14029 | inline bool | |
14030 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
14031 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
14032 | { return __lhs.compare(__rhs) >= 0; } | |
14033 | ||
14034 | ||
14035 | ||
14036 | ||
14037 | ||
14038 | ||
14039 | ||
14040 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14041 | inline bool | |
14042 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
14043 | const _CharT* __rhs) | |
14044 | { return __lhs.compare(__rhs) >= 0; } | |
14045 | ||
14046 | ||
14047 | ||
14048 | ||
14049 | ||
14050 | ||
14051 | ||
14052 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14053 | inline bool | |
14054 | operator>=(const _CharT* __lhs, | |
14055 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
14056 | { return __rhs.compare(__lhs) <= 0; } | |
14057 | # 2357 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
14058 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14059 | inline void | |
14060 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
14061 | basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
14062 | { __lhs.swap(__rhs); } | |
14063 | # 2374 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
14064 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14065 | basic_istream<_CharT, _Traits>& | |
14066 | operator>>(basic_istream<_CharT, _Traits>& __is, | |
14067 | basic_string<_CharT, _Traits, _Alloc>& __str); | |
14068 | ||
14069 | template<> | |
14070 | basic_istream<char>& | |
14071 | operator>>(basic_istream<char>& __is, basic_string<char>& __str); | |
14072 | # 2392 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
14073 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14074 | basic_ostream<_CharT, _Traits>& | |
14075 | operator<<(basic_ostream<_CharT, _Traits>& __os, | |
14076 | const basic_string<_CharT, _Traits, _Alloc>& __str); | |
14077 | # 2410 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
14078 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14079 | basic_istream<_CharT, _Traits>& | |
14080 | getline(basic_istream<_CharT, _Traits>& __is, | |
14081 | basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); | |
14082 | # 2427 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.h" 3 | |
14083 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14084 | inline basic_istream<_CharT, _Traits>& | |
14085 | getline(basic_istream<_CharT, _Traits>& __is, | |
14086 | basic_string<_CharT, _Traits, _Alloc>& __str); | |
14087 | ||
14088 | template<> | |
14089 | basic_istream<char>& | |
14090 | getline(basic_istream<char>& __in, basic_string<char>& __str, | |
14091 | char __delim); | |
14092 | ||
14093 | ||
14094 | template<> | |
14095 | basic_istream<wchar_t>& | |
14096 | getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str, | |
14097 | wchar_t __delim); | |
14098 | ||
14099 | } | |
14100 | # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 2 3 | |
14101 | ||
14102 | ||
14103 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/algorithm" 1 3 | |
14104 | # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/algorithm" 3 | |
14105 | ||
14106 | # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/algorithm" 3 | |
14107 | #pragma GCC visibility push(default) | |
14108 | ||
14109 | ||
14110 | ||
14111 | ||
14112 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 1 3 | |
14113 | # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14114 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 1 3 | |
14115 | # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14116 | namespace std | |
14117 | { | |
14118 | ||
14119 | ||
14120 | ||
14121 | template<typename _RandomAccessIterator, typename _Distance> | |
14122 | bool | |
14123 | __is_heap(_RandomAccessIterator __first, _Distance __n) | |
14124 | { | |
14125 | _Distance __parent = 0; | |
14126 | for (_Distance __child = 1; __child < __n; ++__child) | |
14127 | { | |
14128 | if (__first[__parent] < __first[__child]) | |
14129 | return false; | |
14130 | if ((__child & 1) == 0) | |
14131 | ++__parent; | |
14132 | } | |
14133 | return true; | |
14134 | } | |
14135 | ||
14136 | template<typename _RandomAccessIterator, typename _Distance, | |
14137 | typename _StrictWeakOrdering> | |
14138 | bool | |
14139 | __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp, | |
14140 | _Distance __n) | |
14141 | { | |
14142 | _Distance __parent = 0; | |
14143 | for (_Distance __child = 1; __child < __n; ++__child) | |
14144 | { | |
14145 | if (__comp(__first[__parent], __first[__child])) | |
14146 | return false; | |
14147 | if ((__child & 1) == 0) | |
14148 | ++__parent; | |
14149 | } | |
14150 | return true; | |
14151 | } | |
14152 | ||
14153 | template<typename _RandomAccessIterator> | |
14154 | bool | |
14155 | __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
14156 | { return std::__is_heap(__first, std::distance(__first, __last)); } | |
14157 | ||
14158 | template<typename _RandomAccessIterator, typename _StrictWeakOrdering> | |
14159 | bool | |
14160 | __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14161 | _StrictWeakOrdering __comp) | |
14162 | { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } | |
14163 | ||
14164 | ||
14165 | ||
14166 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp> | |
14167 | void | |
14168 | __push_heap(_RandomAccessIterator __first, | |
14169 | _Distance __holeIndex, _Distance __topIndex, _Tp __value) | |
14170 | { | |
14171 | _Distance __parent = (__holeIndex - 1) / 2; | |
14172 | while (__holeIndex > __topIndex && *(__first + __parent) < __value) | |
14173 | { | |
14174 | *(__first + __holeIndex) = *(__first + __parent); | |
14175 | __holeIndex = __parent; | |
14176 | __parent = (__holeIndex - 1) / 2; | |
14177 | } | |
14178 | *(__first + __holeIndex) = __value; | |
14179 | } | |
14180 | # 139 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14181 | template<typename _RandomAccessIterator> | |
14182 | inline void | |
14183 | push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
14184 | { | |
14185 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14186 | _ValueType; | |
14187 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
14188 | _DistanceType; | |
14189 | ||
14190 | ||
14191 | ||
14192 | ||
14193 | ||
14194 | ; | |
14195 | ||
14196 | ||
14197 | std::__push_heap(__first, _DistanceType((__last - __first) - 1), | |
14198 | _DistanceType(0), _ValueType(*(__last - 1))); | |
14199 | } | |
14200 | ||
14201 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp, | |
14202 | typename _Compare> | |
14203 | void | |
14204 | __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
14205 | _Distance __topIndex, _Tp __value, _Compare __comp) | |
14206 | { | |
14207 | _Distance __parent = (__holeIndex - 1) / 2; | |
14208 | while (__holeIndex > __topIndex | |
14209 | && __comp(*(__first + __parent), __value)) | |
14210 | { | |
14211 | *(__first + __holeIndex) = *(__first + __parent); | |
14212 | __holeIndex = __parent; | |
14213 | __parent = (__holeIndex - 1) / 2; | |
14214 | } | |
14215 | *(__first + __holeIndex) = __value; | |
14216 | } | |
14217 | # 187 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14218 | template<typename _RandomAccessIterator, typename _Compare> | |
14219 | inline void | |
14220 | push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14221 | _Compare __comp) | |
14222 | { | |
14223 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14224 | _ValueType; | |
14225 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
14226 | _DistanceType; | |
14227 | ||
14228 | ||
14229 | ||
14230 | ||
14231 | ; | |
14232 | ; | |
14233 | ||
14234 | std::__push_heap(__first, _DistanceType((__last - __first) - 1), | |
14235 | _DistanceType(0), _ValueType(*(__last - 1)), __comp); | |
14236 | } | |
14237 | ||
14238 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp> | |
14239 | void | |
14240 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
14241 | _Distance __len, _Tp __value) | |
14242 | { | |
14243 | const _Distance __topIndex = __holeIndex; | |
14244 | _Distance __secondChild = 2 * __holeIndex + 2; | |
14245 | while (__secondChild < __len) | |
14246 | { | |
14247 | if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) | |
14248 | __secondChild--; | |
14249 | *(__first + __holeIndex) = *(__first + __secondChild); | |
14250 | __holeIndex = __secondChild; | |
14251 | __secondChild = 2 * (__secondChild + 1); | |
14252 | } | |
14253 | if (__secondChild == __len) | |
14254 | { | |
14255 | *(__first + __holeIndex) = *(__first + (__secondChild - 1)); | |
14256 | __holeIndex = __secondChild - 1; | |
14257 | } | |
14258 | std::__push_heap(__first, __holeIndex, __topIndex, __value); | |
14259 | } | |
14260 | ||
14261 | template<typename _RandomAccessIterator, typename _Tp> | |
14262 | inline void | |
14263 | __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14264 | _RandomAccessIterator __result, _Tp __value) | |
14265 | { | |
14266 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
14267 | _Distance; | |
14268 | *__result = *__first; | |
14269 | std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), | |
14270 | __value); | |
14271 | } | |
14272 | # 251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14273 | template<typename _RandomAccessIterator> | |
14274 | inline void | |
14275 | pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
14276 | { | |
14277 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14278 | _ValueType; | |
14279 | ||
14280 | ||
14281 | ||
14282 | ||
14283 | ||
14284 | ; | |
14285 | ; | |
14286 | ||
14287 | std::__pop_heap(__first, __last - 1, __last - 1, | |
14288 | _ValueType(*(__last - 1))); | |
14289 | } | |
14290 | ||
14291 | template<typename _RandomAccessIterator, typename _Distance, | |
14292 | typename _Tp, typename _Compare> | |
14293 | void | |
14294 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
14295 | _Distance __len, _Tp __value, _Compare __comp) | |
14296 | { | |
14297 | const _Distance __topIndex = __holeIndex; | |
14298 | _Distance __secondChild = 2 * __holeIndex + 2; | |
14299 | while (__secondChild < __len) | |
14300 | { | |
14301 | if (__comp(*(__first + __secondChild), | |
14302 | *(__first + (__secondChild - 1)))) | |
14303 | __secondChild--; | |
14304 | *(__first + __holeIndex) = *(__first + __secondChild); | |
14305 | __holeIndex = __secondChild; | |
14306 | __secondChild = 2 * (__secondChild + 1); | |
14307 | } | |
14308 | if (__secondChild == __len) | |
14309 | { | |
14310 | *(__first + __holeIndex) = *(__first + (__secondChild - 1)); | |
14311 | __holeIndex = __secondChild - 1; | |
14312 | } | |
14313 | std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp); | |
14314 | } | |
14315 | ||
14316 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
14317 | inline void | |
14318 | __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14319 | _RandomAccessIterator __result, _Tp __value, _Compare __comp) | |
14320 | { | |
14321 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
14322 | _Distance; | |
14323 | *__result = *__first; | |
14324 | std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), | |
14325 | __value, __comp); | |
14326 | } | |
14327 | # 317 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14328 | template<typename _RandomAccessIterator, typename _Compare> | |
14329 | inline void | |
14330 | pop_heap(_RandomAccessIterator __first, | |
14331 | _RandomAccessIterator __last, _Compare __comp) | |
14332 | { | |
14333 | ||
14334 | ||
14335 | ||
14336 | ; | |
14337 | ; | |
14338 | ||
14339 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14340 | _ValueType; | |
14341 | std::__pop_heap(__first, __last - 1, __last - 1, | |
14342 | _ValueType(*(__last - 1)), __comp); | |
14343 | } | |
14344 | # 342 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14345 | template<typename _RandomAccessIterator> | |
14346 | void | |
14347 | make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
14348 | { | |
14349 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14350 | _ValueType; | |
14351 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
14352 | _DistanceType; | |
14353 | ||
14354 | ||
14355 | ||
14356 | ||
14357 | ||
14358 | ; | |
14359 | ||
14360 | if (__last - __first < 2) | |
14361 | return; | |
14362 | ||
14363 | const _DistanceType __len = __last - __first; | |
14364 | _DistanceType __parent = (__len - 2) / 2; | |
14365 | while (true) | |
14366 | { | |
14367 | std::__adjust_heap(__first, __parent, __len, | |
14368 | _ValueType(*(__first + __parent))); | |
14369 | if (__parent == 0) | |
14370 | return; | |
14371 | __parent--; | |
14372 | } | |
14373 | } | |
14374 | # 382 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14375 | template<typename _RandomAccessIterator, typename _Compare> | |
14376 | inline void | |
14377 | make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14378 | _Compare __comp) | |
14379 | { | |
14380 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
14381 | _ValueType; | |
14382 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
14383 | _DistanceType; | |
14384 | ||
14385 | ||
14386 | ||
14387 | ||
14388 | ; | |
14389 | ||
14390 | if (__last - __first < 2) | |
14391 | return; | |
14392 | ||
14393 | const _DistanceType __len = __last - __first; | |
14394 | _DistanceType __parent = (__len - 2) / 2; | |
14395 | while (true) | |
14396 | { | |
14397 | std::__adjust_heap(__first, __parent, __len, | |
14398 | _ValueType(*(__first + __parent)), __comp); | |
14399 | if (__parent == 0) | |
14400 | return; | |
14401 | __parent--; | |
14402 | } | |
14403 | } | |
14404 | # 420 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14405 | template<typename _RandomAccessIterator> | |
14406 | void | |
14407 | sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
14408 | { | |
14409 | ||
14410 | ||
14411 | ||
14412 | ||
14413 | ||
14414 | ; | |
14415 | ||
14416 | ||
14417 | while (__last - __first > 1) | |
14418 | std::pop_heap(__first, __last--); | |
14419 | } | |
14420 | # 446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_heap.h" 3 | |
14421 | template<typename _RandomAccessIterator, typename _Compare> | |
14422 | void | |
14423 | sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14424 | _Compare __comp) | |
14425 | { | |
14426 | ||
14427 | ||
14428 | ||
14429 | ; | |
14430 | ; | |
14431 | ||
14432 | while (__last - __first > 1) | |
14433 | std::pop_heap(__first, __last--, __comp); | |
14434 | } | |
14435 | ||
14436 | } | |
14437 | # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 2 3 | |
14438 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_tempbuf.h" 1 3 | |
14439 | # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_tempbuf.h" 3 | |
14440 | namespace std | |
14441 | { | |
14442 | ||
14443 | ||
14444 | ||
14445 | ||
14446 | ||
14447 | ||
14448 | ||
14449 | template<typename _ForwardIterator, typename _Tp> | |
14450 | class _Temporary_buffer | |
14451 | { | |
14452 | ||
14453 | ||
14454 | ||
14455 | public: | |
14456 | typedef _Tp value_type; | |
14457 | typedef value_type* pointer; | |
14458 | typedef pointer iterator; | |
14459 | typedef ptrdiff_t size_type; | |
14460 | ||
14461 | protected: | |
14462 | size_type _M_original_len; | |
14463 | size_type _M_len; | |
14464 | pointer _M_buffer; | |
14465 | ||
14466 | void | |
14467 | _M_initialize_buffer(const _Tp&, __true_type) { } | |
14468 | ||
14469 | void | |
14470 | _M_initialize_buffer(const _Tp& val, __false_type) | |
14471 | { std::uninitialized_fill_n(_M_buffer, _M_len, val); } | |
14472 | ||
14473 | public: | |
14474 | ||
14475 | size_type | |
14476 | size() const | |
14477 | { return _M_len; } | |
14478 | ||
14479 | ||
14480 | size_type | |
14481 | requested_size() const | |
14482 | { return _M_original_len; } | |
14483 | ||
14484 | ||
14485 | iterator | |
14486 | begin() | |
14487 | { return _M_buffer; } | |
14488 | ||
14489 | ||
14490 | iterator | |
14491 | end() | |
14492 | { return _M_buffer + _M_len; } | |
14493 | ||
14494 | ||
14495 | ||
14496 | ||
14497 | ||
14498 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); | |
14499 | ||
14500 | ~_Temporary_buffer() | |
14501 | { | |
14502 | std::_Destroy(_M_buffer, _M_buffer + _M_len); | |
14503 | std::return_temporary_buffer(_M_buffer); | |
14504 | } | |
14505 | ||
14506 | private: | |
14507 | ||
14508 | _Temporary_buffer(const _Temporary_buffer&); | |
14509 | ||
14510 | void | |
14511 | operator=(const _Temporary_buffer&); | |
14512 | }; | |
14513 | ||
14514 | ||
14515 | template<typename _ForwardIterator, typename _Tp> | |
14516 | _Temporary_buffer<_ForwardIterator, _Tp>:: | |
14517 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) | |
14518 | : _M_original_len(std::distance(__first, __last)), | |
14519 | _M_len(0), _M_buffer(0) | |
14520 | { | |
14521 | ||
14522 | typedef typename std::__is_scalar<_Tp>::__type _Trivial; | |
14523 | ||
14524 | try | |
14525 | { | |
14526 | pair<pointer, size_type> __p(get_temporary_buffer< | |
14527 | value_type>(_M_original_len)); | |
14528 | _M_buffer = __p.first; | |
14529 | _M_len = __p.second; | |
14530 | if (_M_len > 0) | |
14531 | _M_initialize_buffer(*__first, _Trivial()); | |
14532 | } | |
14533 | catch(...) | |
14534 | { | |
14535 | std::return_temporary_buffer(_M_buffer); | |
14536 | _M_buffer = 0; | |
14537 | _M_len = 0; | |
14538 | throw; | |
14539 | } | |
14540 | } | |
14541 | } | |
14542 | # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 2 3 | |
14543 | ||
14544 | ||
14545 | ||
14546 | ||
14547 | namespace std | |
14548 | { | |
14549 | # 85 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14550 | template<typename _Tp> | |
14551 | inline const _Tp& | |
14552 | __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) | |
14553 | { | |
14554 | ||
14555 | ||
14556 | if (__a < __b) | |
14557 | if (__b < __c) | |
14558 | return __b; | |
14559 | else if (__a < __c) | |
14560 | return __c; | |
14561 | else | |
14562 | return __a; | |
14563 | else if (__a < __c) | |
14564 | return __a; | |
14565 | else if (__b < __c) | |
14566 | return __c; | |
14567 | else | |
14568 | return __b; | |
14569 | } | |
14570 | # 119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14571 | template<typename _Tp, typename _Compare> | |
14572 | inline const _Tp& | |
14573 | __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) | |
14574 | { | |
14575 | ||
14576 | ||
14577 | if (__comp(__a, __b)) | |
14578 | if (__comp(__b, __c)) | |
14579 | return __b; | |
14580 | else if (__comp(__a, __c)) | |
14581 | return __c; | |
14582 | else | |
14583 | return __a; | |
14584 | else if (__comp(__a, __c)) | |
14585 | return __a; | |
14586 | else if (__comp(__b, __c)) | |
14587 | return __c; | |
14588 | else | |
14589 | return __b; | |
14590 | } | |
14591 | # 151 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14592 | template<typename _InputIterator, typename _Function> | |
14593 | _Function | |
14594 | for_each(_InputIterator __first, _InputIterator __last, _Function __f) | |
14595 | { | |
14596 | ||
14597 | ||
14598 | ; | |
14599 | for ( ; __first != __last; ++__first) | |
14600 | __f(*__first); | |
14601 | return __f; | |
14602 | } | |
14603 | ||
14604 | ||
14605 | ||
14606 | ||
14607 | ||
14608 | ||
14609 | template<typename _InputIterator, typename _Tp> | |
14610 | inline _InputIterator | |
14611 | __find(_InputIterator __first, _InputIterator __last, | |
14612 | const _Tp& __val, input_iterator_tag) | |
14613 | { | |
14614 | while (__first != __last && !(*__first == __val)) | |
14615 | ++__first; | |
14616 | return __first; | |
14617 | } | |
14618 | ||
14619 | ||
14620 | ||
14621 | ||
14622 | ||
14623 | ||
14624 | template<typename _InputIterator, typename _Predicate> | |
14625 | inline _InputIterator | |
14626 | __find_if(_InputIterator __first, _InputIterator __last, | |
14627 | _Predicate __pred, input_iterator_tag) | |
14628 | { | |
14629 | while (__first != __last && !__pred(*__first)) | |
14630 | ++__first; | |
14631 | return __first; | |
14632 | } | |
14633 | ||
14634 | ||
14635 | ||
14636 | ||
14637 | ||
14638 | ||
14639 | template<typename _RandomAccessIterator, typename _Tp> | |
14640 | _RandomAccessIterator | |
14641 | __find(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14642 | const _Tp& __val, random_access_iterator_tag) | |
14643 | { | |
14644 | typename iterator_traits<_RandomAccessIterator>::difference_type | |
14645 | __trip_count = (__last - __first) >> 2; | |
14646 | ||
14647 | for ( ; __trip_count > 0 ; --__trip_count) | |
14648 | { | |
14649 | if (*__first == __val) | |
14650 | return __first; | |
14651 | ++__first; | |
14652 | ||
14653 | if (*__first == __val) | |
14654 | return __first; | |
14655 | ++__first; | |
14656 | ||
14657 | if (*__first == __val) | |
14658 | return __first; | |
14659 | ++__first; | |
14660 | ||
14661 | if (*__first == __val) | |
14662 | return __first; | |
14663 | ++__first; | |
14664 | } | |
14665 | ||
14666 | switch (__last - __first) | |
14667 | { | |
14668 | case 3: | |
14669 | if (*__first == __val) | |
14670 | return __first; | |
14671 | ++__first; | |
14672 | case 2: | |
14673 | if (*__first == __val) | |
14674 | return __first; | |
14675 | ++__first; | |
14676 | case 1: | |
14677 | if (*__first == __val) | |
14678 | return __first; | |
14679 | ++__first; | |
14680 | case 0: | |
14681 | default: | |
14682 | return __last; | |
14683 | } | |
14684 | } | |
14685 | ||
14686 | ||
14687 | ||
14688 | ||
14689 | ||
14690 | ||
14691 | template<typename _RandomAccessIterator, typename _Predicate> | |
14692 | _RandomAccessIterator | |
14693 | __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
14694 | _Predicate __pred, random_access_iterator_tag) | |
14695 | { | |
14696 | typename iterator_traits<_RandomAccessIterator>::difference_type | |
14697 | __trip_count = (__last - __first) >> 2; | |
14698 | ||
14699 | for ( ; __trip_count > 0 ; --__trip_count) | |
14700 | { | |
14701 | if (__pred(*__first)) | |
14702 | return __first; | |
14703 | ++__first; | |
14704 | ||
14705 | if (__pred(*__first)) | |
14706 | return __first; | |
14707 | ++__first; | |
14708 | ||
14709 | if (__pred(*__first)) | |
14710 | return __first; | |
14711 | ++__first; | |
14712 | ||
14713 | if (__pred(*__first)) | |
14714 | return __first; | |
14715 | ++__first; | |
14716 | } | |
14717 | ||
14718 | switch (__last - __first) | |
14719 | { | |
14720 | case 3: | |
14721 | if (__pred(*__first)) | |
14722 | return __first; | |
14723 | ++__first; | |
14724 | case 2: | |
14725 | if (__pred(*__first)) | |
14726 | return __first; | |
14727 | ++__first; | |
14728 | case 1: | |
14729 | if (__pred(*__first)) | |
14730 | return __first; | |
14731 | ++__first; | |
14732 | case 0: | |
14733 | default: | |
14734 | return __last; | |
14735 | } | |
14736 | } | |
14737 | # 305 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14738 | template<typename _InputIterator, typename _Tp> | |
14739 | inline _InputIterator | |
14740 | find(_InputIterator __first, _InputIterator __last, | |
14741 | const _Tp& __val) | |
14742 | { | |
14743 | ||
14744 | ||
14745 | ||
14746 | ||
14747 | ; | |
14748 | return std::__find(__first, __last, __val, | |
14749 | std::__iterator_category(__first)); | |
14750 | } | |
14751 | # 327 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14752 | template<typename _InputIterator, typename _Predicate> | |
14753 | inline _InputIterator | |
14754 | find_if(_InputIterator __first, _InputIterator __last, | |
14755 | _Predicate __pred) | |
14756 | { | |
14757 | ||
14758 | ||
14759 | ||
14760 | ||
14761 | ; | |
14762 | return std::__find_if(__first, __last, __pred, | |
14763 | std::__iterator_category(__first)); | |
14764 | } | |
14765 | # 349 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14766 | template<typename _ForwardIterator> | |
14767 | _ForwardIterator | |
14768 | adjacent_find(_ForwardIterator __first, _ForwardIterator __last) | |
14769 | { | |
14770 | ||
14771 | ||
14772 | ||
14773 | ||
14774 | ; | |
14775 | if (__first == __last) | |
14776 | return __last; | |
14777 | _ForwardIterator __next = __first; | |
14778 | while(++__next != __last) | |
14779 | { | |
14780 | if (*__first == *__next) | |
14781 | return __first; | |
14782 | __first = __next; | |
14783 | } | |
14784 | return __last; | |
14785 | } | |
14786 | # 380 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14787 | template<typename _ForwardIterator, typename _BinaryPredicate> | |
14788 | _ForwardIterator | |
14789 | adjacent_find(_ForwardIterator __first, _ForwardIterator __last, | |
14790 | _BinaryPredicate __binary_pred) | |
14791 | { | |
14792 | ||
14793 | ||
14794 | ||
14795 | ||
14796 | ||
14797 | ; | |
14798 | if (__first == __last) | |
14799 | return __last; | |
14800 | _ForwardIterator __next = __first; | |
14801 | while(++__next != __last) | |
14802 | { | |
14803 | if (__binary_pred(*__first, *__next)) | |
14804 | return __first; | |
14805 | __first = __next; | |
14806 | } | |
14807 | return __last; | |
14808 | } | |
14809 | # 411 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14810 | template<typename _InputIterator, typename _Tp> | |
14811 | typename iterator_traits<_InputIterator>::difference_type | |
14812 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value) | |
14813 | { | |
14814 | ||
14815 | ||
14816 | ||
14817 | ||
14818 | ; | |
14819 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
14820 | for ( ; __first != __last; ++__first) | |
14821 | if (*__first == __value) | |
14822 | ++__n; | |
14823 | return __n; | |
14824 | } | |
14825 | # 435 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14826 | template<typename _InputIterator, typename _Predicate> | |
14827 | typename iterator_traits<_InputIterator>::difference_type | |
14828 | count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) | |
14829 | { | |
14830 | ||
14831 | ||
14832 | ||
14833 | ||
14834 | ; | |
14835 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
14836 | for ( ; __first != __last; ++__first) | |
14837 | if (__pred(*__first)) | |
14838 | ++__n; | |
14839 | return __n; | |
14840 | } | |
14841 | # 474 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14842 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
14843 | _ForwardIterator1 | |
14844 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
14845 | _ForwardIterator2 __first2, _ForwardIterator2 __last2) | |
14846 | { | |
14847 | ||
14848 | ||
14849 | ||
14850 | ||
14851 | ||
14852 | ||
14853 | ; | |
14854 | ; | |
14855 | ||
14856 | if (__first1 == __last1 || __first2 == __last2) | |
14857 | return __first1; | |
14858 | ||
14859 | ||
14860 | _ForwardIterator2 __tmp(__first2); | |
14861 | ++__tmp; | |
14862 | if (__tmp == __last2) | |
14863 | return std::find(__first1, __last1, *__first2); | |
14864 | ||
14865 | ||
14866 | _ForwardIterator2 __p1, __p; | |
14867 | __p1 = __first2; ++__p1; | |
14868 | _ForwardIterator1 __current = __first1; | |
14869 | ||
14870 | while (__first1 != __last1) | |
14871 | { | |
14872 | __first1 = std::find(__first1, __last1, *__first2); | |
14873 | if (__first1 == __last1) | |
14874 | return __last1; | |
14875 | ||
14876 | __p = __p1; | |
14877 | __current = __first1; | |
14878 | if (++__current == __last1) | |
14879 | return __last1; | |
14880 | ||
14881 | while (*__current == *__p) | |
14882 | { | |
14883 | if (++__p == __last2) | |
14884 | return __first1; | |
14885 | if (++__current == __last1) | |
14886 | return __last1; | |
14887 | } | |
14888 | ++__first1; | |
14889 | } | |
14890 | return __first1; | |
14891 | } | |
14892 | # 545 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14893 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
14894 | typename _BinaryPredicate> | |
14895 | _ForwardIterator1 | |
14896 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
14897 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
14898 | _BinaryPredicate __predicate) | |
14899 | { | |
14900 | ||
14901 | ||
14902 | ||
14903 | ||
14904 | ||
14905 | ||
14906 | ; | |
14907 | ; | |
14908 | ||
14909 | ||
14910 | if (__first1 == __last1 || __first2 == __last2) | |
14911 | return __first1; | |
14912 | ||
14913 | ||
14914 | _ForwardIterator2 __tmp(__first2); | |
14915 | ++__tmp; | |
14916 | if (__tmp == __last2) | |
14917 | { | |
14918 | while (__first1 != __last1 && !__predicate(*__first1, *__first2)) | |
14919 | ++__first1; | |
14920 | return __first1; | |
14921 | } | |
14922 | ||
14923 | ||
14924 | _ForwardIterator2 __p1, __p; | |
14925 | __p1 = __first2; ++__p1; | |
14926 | _ForwardIterator1 __current = __first1; | |
14927 | ||
14928 | while (__first1 != __last1) | |
14929 | { | |
14930 | while (__first1 != __last1) | |
14931 | { | |
14932 | if (__predicate(*__first1, *__first2)) | |
14933 | break; | |
14934 | ++__first1; | |
14935 | } | |
14936 | while (__first1 != __last1 && !__predicate(*__first1, *__first2)) | |
14937 | ++__first1; | |
14938 | if (__first1 == __last1) | |
14939 | return __last1; | |
14940 | ||
14941 | __p = __p1; | |
14942 | __current = __first1; | |
14943 | if (++__current == __last1) | |
14944 | return __last1; | |
14945 | ||
14946 | while (__predicate(*__current, *__p)) | |
14947 | { | |
14948 | if (++__p == __last2) | |
14949 | return __first1; | |
14950 | if (++__current == __last1) | |
14951 | return __last1; | |
14952 | } | |
14953 | ++__first1; | |
14954 | } | |
14955 | return __first1; | |
14956 | } | |
14957 | # 617 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14958 | template<typename _ForwardIterator, typename _Integer, typename _Tp> | |
14959 | _ForwardIterator | |
14960 | __search_n(_ForwardIterator __first, _ForwardIterator __last, | |
14961 | _Integer __count, const _Tp& __val, | |
14962 | std::forward_iterator_tag) | |
14963 | { | |
14964 | __first = std::find(__first, __last, __val); | |
14965 | while (__first != __last) | |
14966 | { | |
14967 | typename iterator_traits<_ForwardIterator>::difference_type | |
14968 | __n = __count; | |
14969 | _ForwardIterator __i = __first; | |
14970 | ++__i; | |
14971 | while (__i != __last && __n != 1 && *__i == __val) | |
14972 | { | |
14973 | ++__i; | |
14974 | --__n; | |
14975 | } | |
14976 | if (__n == 1) | |
14977 | return __first; | |
14978 | if (__i == __last) | |
14979 | return __last; | |
14980 | __first = std::find(++__i, __last, __val); | |
14981 | } | |
14982 | return __last; | |
14983 | } | |
14984 | # 651 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
14985 | template<typename _RandomAccessIter, typename _Integer, typename _Tp> | |
14986 | _RandomAccessIter | |
14987 | __search_n(_RandomAccessIter __first, _RandomAccessIter __last, | |
14988 | _Integer __count, const _Tp& __val, | |
14989 | std::random_access_iterator_tag) | |
14990 | { | |
14991 | ||
14992 | typedef typename std::iterator_traits<_RandomAccessIter>::difference_type | |
14993 | _DistanceType; | |
14994 | ||
14995 | _DistanceType __tailSize = __last - __first; | |
14996 | const _DistanceType __pattSize = __count; | |
14997 | ||
14998 | if (__tailSize < __pattSize) | |
14999 | return __last; | |
15000 | ||
15001 | const _DistanceType __skipOffset = __pattSize - 1; | |
15002 | _RandomAccessIter __lookAhead = __first + __skipOffset; | |
15003 | __tailSize -= __pattSize; | |
15004 | ||
15005 | while (1) | |
15006 | { | |
15007 | ||
15008 | ||
15009 | while (!(*__lookAhead == __val)) | |
15010 | { | |
15011 | if (__tailSize < __pattSize) | |
15012 | return __last; | |
15013 | __lookAhead += __pattSize; | |
15014 | __tailSize -= __pattSize; | |
15015 | } | |
15016 | _DistanceType __remainder = __skipOffset; | |
15017 | for (_RandomAccessIter __backTrack = __lookAhead - 1; | |
15018 | *__backTrack == __val; --__backTrack) | |
15019 | { | |
15020 | if (--__remainder == 0) | |
15021 | return (__lookAhead - __skipOffset); | |
15022 | } | |
15023 | if (__remainder > __tailSize) | |
15024 | return __last; | |
15025 | __lookAhead += __remainder; | |
15026 | __tailSize -= __remainder; | |
15027 | } | |
15028 | } | |
15029 | # 709 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15030 | template<typename _ForwardIterator, typename _Integer, typename _Tp> | |
15031 | _ForwardIterator | |
15032 | search_n(_ForwardIterator __first, _ForwardIterator __last, | |
15033 | _Integer __count, const _Tp& __val) | |
15034 | { | |
15035 | ||
15036 | ||
15037 | ||
15038 | ||
15039 | ; | |
15040 | ||
15041 | if (__count <= 0) | |
15042 | return __first; | |
15043 | if (__count == 1) | |
15044 | return std::find(__first, __last, __val); | |
15045 | return std::__search_n(__first, __last, __count, __val, | |
15046 | std::__iterator_category(__first)); | |
15047 | } | |
15048 | # 736 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15049 | template<typename _ForwardIterator, typename _Integer, typename _Tp, | |
15050 | typename _BinaryPredicate> | |
15051 | _ForwardIterator | |
15052 | __search_n(_ForwardIterator __first, _ForwardIterator __last, | |
15053 | _Integer __count, const _Tp& __val, | |
15054 | _BinaryPredicate __binary_pred, std::forward_iterator_tag) | |
15055 | { | |
15056 | while (__first != __last && !__binary_pred(*__first, __val)) | |
15057 | ++__first; | |
15058 | ||
15059 | while (__first != __last) | |
15060 | { | |
15061 | typename iterator_traits<_ForwardIterator>::difference_type | |
15062 | __n = __count; | |
15063 | _ForwardIterator __i = __first; | |
15064 | ++__i; | |
15065 | while (__i != __last && __n != 1 && __binary_pred(*__i, __val)) | |
15066 | { | |
15067 | ++__i; | |
15068 | --__n; | |
15069 | } | |
15070 | if (__n == 1) | |
15071 | return __first; | |
15072 | if (__i == __last) | |
15073 | return __last; | |
15074 | __first = ++__i; | |
15075 | while (__first != __last && !__binary_pred(*__first, __val)) | |
15076 | ++__first; | |
15077 | } | |
15078 | return __last; | |
15079 | } | |
15080 | # 776 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15081 | template<typename _RandomAccessIter, typename _Integer, typename _Tp, | |
15082 | typename _BinaryPredicate> | |
15083 | _RandomAccessIter | |
15084 | __search_n(_RandomAccessIter __first, _RandomAccessIter __last, | |
15085 | _Integer __count, const _Tp& __val, | |
15086 | _BinaryPredicate __binary_pred, std::random_access_iterator_tag) | |
15087 | { | |
15088 | ||
15089 | typedef typename std::iterator_traits<_RandomAccessIter>::difference_type | |
15090 | _DistanceType; | |
15091 | ||
15092 | _DistanceType __tailSize = __last - __first; | |
15093 | const _DistanceType __pattSize = __count; | |
15094 | ||
15095 | if (__tailSize < __pattSize) | |
15096 | return __last; | |
15097 | ||
15098 | const _DistanceType __skipOffset = __pattSize - 1; | |
15099 | _RandomAccessIter __lookAhead = __first + __skipOffset; | |
15100 | __tailSize -= __pattSize; | |
15101 | ||
15102 | while (1) | |
15103 | { | |
15104 | ||
15105 | ||
15106 | while (!__binary_pred(*__lookAhead, __val)) | |
15107 | { | |
15108 | if (__tailSize < __pattSize) | |
15109 | return __last; | |
15110 | __lookAhead += __pattSize; | |
15111 | __tailSize -= __pattSize; | |
15112 | } | |
15113 | _DistanceType __remainder = __skipOffset; | |
15114 | for (_RandomAccessIter __backTrack = __lookAhead - 1; | |
15115 | __binary_pred(*__backTrack, __val); --__backTrack) | |
15116 | { | |
15117 | if (--__remainder == 0) | |
15118 | return (__lookAhead - __skipOffset); | |
15119 | } | |
15120 | if (__remainder > __tailSize) | |
15121 | return __last; | |
15122 | __lookAhead += __remainder; | |
15123 | __tailSize -= __remainder; | |
15124 | } | |
15125 | } | |
15126 | # 837 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15127 | template<typename _ForwardIterator, typename _Integer, typename _Tp, | |
15128 | typename _BinaryPredicate> | |
15129 | _ForwardIterator | |
15130 | search_n(_ForwardIterator __first, _ForwardIterator __last, | |
15131 | _Integer __count, const _Tp& __val, | |
15132 | _BinaryPredicate __binary_pred) | |
15133 | { | |
15134 | ||
15135 | ||
15136 | ||
15137 | ||
15138 | ; | |
15139 | ||
15140 | if (__count <= 0) | |
15141 | return __first; | |
15142 | if (__count == 1) | |
15143 | { | |
15144 | while (__first != __last && !__binary_pred(*__first, __val)) | |
15145 | ++__first; | |
15146 | return __first; | |
15147 | } | |
15148 | return std::__search_n(__first, __last, __count, __val, __binary_pred, | |
15149 | std::__iterator_category(__first)); | |
15150 | } | |
15151 | # 873 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15152 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
15153 | _ForwardIterator2 | |
15154 | swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
15155 | _ForwardIterator2 __first2) | |
15156 | { | |
15157 | ||
15158 | ||
15159 | ||
15160 | ||
15161 | ||
15162 | ||
15163 | ||
15164 | ||
15165 | ||
15166 | ||
15167 | ||
15168 | ; | |
15169 | ||
15170 | for ( ; __first1 != __last1; ++__first1, ++__first2) | |
15171 | std::iter_swap(__first1, __first2); | |
15172 | return __first2; | |
15173 | } | |
15174 | # 911 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15175 | template<typename _InputIterator, typename _OutputIterator, | |
15176 | typename _UnaryOperation> | |
15177 | _OutputIterator | |
15178 | transform(_InputIterator __first, _InputIterator __last, | |
15179 | _OutputIterator __result, _UnaryOperation __unary_op) | |
15180 | { | |
15181 | ||
15182 | ||
15183 | ||
15184 | ||
15185 | ||
15186 | ; | |
15187 | ||
15188 | for ( ; __first != __last; ++__first, ++__result) | |
15189 | *__result = __unary_op(*__first); | |
15190 | return __result; | |
15191 | } | |
15192 | # 946 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15193 | template<typename _InputIterator1, typename _InputIterator2, | |
15194 | typename _OutputIterator, typename _BinaryOperation> | |
15195 | _OutputIterator | |
15196 | transform(_InputIterator1 __first1, _InputIterator1 __last1, | |
15197 | _InputIterator2 __first2, _OutputIterator __result, | |
15198 | _BinaryOperation __binary_op) | |
15199 | { | |
15200 | ||
15201 | ||
15202 | ||
15203 | ||
15204 | ||
15205 | ||
15206 | ; | |
15207 | ||
15208 | for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) | |
15209 | *__result = __binary_op(*__first1, *__first2); | |
15210 | return __result; | |
15211 | } | |
15212 | # 978 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15213 | template<typename _ForwardIterator, typename _Tp> | |
15214 | void | |
15215 | replace(_ForwardIterator __first, _ForwardIterator __last, | |
15216 | const _Tp& __old_value, const _Tp& __new_value) | |
15217 | { | |
15218 | ||
15219 | ||
15220 | ||
15221 | ||
15222 | ||
15223 | ||
15224 | ||
15225 | ; | |
15226 | ||
15227 | for ( ; __first != __last; ++__first) | |
15228 | if (*__first == __old_value) | |
15229 | *__first = __new_value; | |
15230 | } | |
15231 | # 1009 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15232 | template<typename _ForwardIterator, typename _Predicate, typename _Tp> | |
15233 | void | |
15234 | replace_if(_ForwardIterator __first, _ForwardIterator __last, | |
15235 | _Predicate __pred, const _Tp& __new_value) | |
15236 | { | |
15237 | ||
15238 | ||
15239 | ||
15240 | ||
15241 | ||
15242 | ||
15243 | ||
15244 | ; | |
15245 | ||
15246 | for ( ; __first != __last; ++__first) | |
15247 | if (__pred(*__first)) | |
15248 | *__first = __new_value; | |
15249 | } | |
15250 | # 1042 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15251 | template<typename _InputIterator, typename _OutputIterator, typename _Tp> | |
15252 | _OutputIterator | |
15253 | replace_copy(_InputIterator __first, _InputIterator __last, | |
15254 | _OutputIterator __result, | |
15255 | const _Tp& __old_value, const _Tp& __new_value) | |
15256 | { | |
15257 | ||
15258 | ||
15259 | ||
15260 | ||
15261 | ||
15262 | ||
15263 | ; | |
15264 | ||
15265 | for ( ; __first != __last; ++__first, ++__result) | |
15266 | if (*__first == __old_value) | |
15267 | *__result = __new_value; | |
15268 | else | |
15269 | *__result = *__first; | |
15270 | return __result; | |
15271 | } | |
15272 | # 1078 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15273 | template<typename _InputIterator, typename _OutputIterator, | |
15274 | typename _Predicate, typename _Tp> | |
15275 | _OutputIterator | |
15276 | replace_copy_if(_InputIterator __first, _InputIterator __last, | |
15277 | _OutputIterator __result, | |
15278 | _Predicate __pred, const _Tp& __new_value) | |
15279 | { | |
15280 | ||
15281 | ||
15282 | ||
15283 | ||
15284 | ||
15285 | ||
15286 | ; | |
15287 | ||
15288 | for ( ; __first != __last; ++__first, ++__result) | |
15289 | if (__pred(*__first)) | |
15290 | *__result = __new_value; | |
15291 | else | |
15292 | *__result = *__first; | |
15293 | return __result; | |
15294 | } | |
15295 | # 1112 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15296 | template<typename _ForwardIterator, typename _Generator> | |
15297 | void | |
15298 | generate(_ForwardIterator __first, _ForwardIterator __last, | |
15299 | _Generator __gen) | |
15300 | { | |
15301 | ||
15302 | ||
15303 | ||
15304 | ||
15305 | ; | |
15306 | ||
15307 | for ( ; __first != __last; ++__first) | |
15308 | *__first = __gen(); | |
15309 | } | |
15310 | # 1138 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15311 | template<typename _OutputIterator, typename _Size, typename _Generator> | |
15312 | _OutputIterator | |
15313 | generate_n(_OutputIterator __first, _Size __n, _Generator __gen) | |
15314 | { | |
15315 | ||
15316 | ||
15317 | ||
15318 | ||
15319 | ||
15320 | for ( ; __n > 0; --__n, ++__first) | |
15321 | *__first = __gen(); | |
15322 | return __first; | |
15323 | } | |
15324 | # 1165 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15325 | template<typename _InputIterator, typename _OutputIterator, typename _Tp> | |
15326 | _OutputIterator | |
15327 | remove_copy(_InputIterator __first, _InputIterator __last, | |
15328 | _OutputIterator __result, const _Tp& __value) | |
15329 | { | |
15330 | ||
15331 | ||
15332 | ||
15333 | ||
15334 | ||
15335 | ||
15336 | ; | |
15337 | ||
15338 | for ( ; __first != __last; ++__first) | |
15339 | if (!(*__first == __value)) | |
15340 | { | |
15341 | *__result = *__first; | |
15342 | ++__result; | |
15343 | } | |
15344 | return __result; | |
15345 | } | |
15346 | # 1201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15347 | template<typename _InputIterator, typename _OutputIterator, | |
15348 | typename _Predicate> | |
15349 | _OutputIterator | |
15350 | remove_copy_if(_InputIterator __first, _InputIterator __last, | |
15351 | _OutputIterator __result, _Predicate __pred) | |
15352 | { | |
15353 | ||
15354 | ||
15355 | ||
15356 | ||
15357 | ||
15358 | ||
15359 | ; | |
15360 | ||
15361 | for ( ; __first != __last; ++__first) | |
15362 | if (!__pred(*__first)) | |
15363 | { | |
15364 | *__result = *__first; | |
15365 | ++__result; | |
15366 | } | |
15367 | return __result; | |
15368 | } | |
15369 | # 1240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15370 | template<typename _ForwardIterator, typename _Tp> | |
15371 | _ForwardIterator | |
15372 | remove(_ForwardIterator __first, _ForwardIterator __last, | |
15373 | const _Tp& __value) | |
15374 | { | |
15375 | ||
15376 | ||
15377 | ||
15378 | ||
15379 | ||
15380 | ; | |
15381 | ||
15382 | __first = std::find(__first, __last, __value); | |
15383 | _ForwardIterator __i = __first; | |
15384 | return __first == __last ? __first | |
15385 | : std::remove_copy(++__i, __last, | |
15386 | __first, __value); | |
15387 | } | |
15388 | # 1275 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15389 | template<typename _ForwardIterator, typename _Predicate> | |
15390 | _ForwardIterator | |
15391 | remove_if(_ForwardIterator __first, _ForwardIterator __last, | |
15392 | _Predicate __pred) | |
15393 | { | |
15394 | ||
15395 | ||
15396 | ||
15397 | ||
15398 | ||
15399 | ; | |
15400 | ||
15401 | __first = std::find_if(__first, __last, __pred); | |
15402 | _ForwardIterator __i = __first; | |
15403 | return __first == __last ? __first | |
15404 | : std::remove_copy_if(++__i, __last, | |
15405 | __first, __pred); | |
15406 | } | |
15407 | # 1301 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15408 | template<typename _InputIterator, typename _OutputIterator> | |
15409 | _OutputIterator | |
15410 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
15411 | _OutputIterator __result, | |
15412 | output_iterator_tag) | |
15413 | { | |
15414 | ||
15415 | typename iterator_traits<_InputIterator>::value_type __value = *__first; | |
15416 | *__result = __value; | |
15417 | while (++__first != __last) | |
15418 | if (!(__value == *__first)) | |
15419 | { | |
15420 | __value = *__first; | |
15421 | *++__result = __value; | |
15422 | } | |
15423 | return ++__result; | |
15424 | } | |
15425 | # 1326 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15426 | template<typename _InputIterator, typename _ForwardIterator> | |
15427 | _ForwardIterator | |
15428 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
15429 | _ForwardIterator __result, | |
15430 | forward_iterator_tag) | |
15431 | { | |
15432 | ||
15433 | *__result = *__first; | |
15434 | while (++__first != __last) | |
15435 | if (!(*__result == *__first)) | |
15436 | *++__result = *__first; | |
15437 | return ++__result; | |
15438 | } | |
15439 | # 1348 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15440 | template<typename _InputIterator, typename _OutputIterator, | |
15441 | typename _BinaryPredicate> | |
15442 | _OutputIterator | |
15443 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
15444 | _OutputIterator __result, | |
15445 | _BinaryPredicate __binary_pred, | |
15446 | output_iterator_tag) | |
15447 | { | |
15448 | ||
15449 | ||
15450 | ||
15451 | ||
15452 | ||
15453 | typename iterator_traits<_InputIterator>::value_type __value = *__first; | |
15454 | *__result = __value; | |
15455 | while (++__first != __last) | |
15456 | if (!__binary_pred(__value, *__first)) | |
15457 | { | |
15458 | __value = *__first; | |
15459 | *++__result = __value; | |
15460 | } | |
15461 | return ++__result; | |
15462 | } | |
15463 | # 1380 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15464 | template<typename _InputIterator, typename _ForwardIterator, | |
15465 | typename _BinaryPredicate> | |
15466 | _ForwardIterator | |
15467 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
15468 | _ForwardIterator __result, | |
15469 | _BinaryPredicate __binary_pred, | |
15470 | forward_iterator_tag) | |
15471 | { | |
15472 | ||
15473 | ||
15474 | ||
15475 | ||
15476 | ||
15477 | *__result = *__first; | |
15478 | while (++__first != __last) | |
15479 | if (!__binary_pred(*__result, *__first)) *++__result = *__first; | |
15480 | return ++__result; | |
15481 | } | |
15482 | # 1412 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15483 | template<typename _InputIterator, typename _OutputIterator> | |
15484 | inline _OutputIterator | |
15485 | unique_copy(_InputIterator __first, _InputIterator __last, | |
15486 | _OutputIterator __result) | |
15487 | { | |
15488 | ||
15489 | ||
15490 | ||
15491 | ||
15492 | ||
15493 | ||
15494 | ; | |
15495 | ||
15496 | typedef typename iterator_traits<_OutputIterator>::iterator_category | |
15497 | _IterType; | |
15498 | ||
15499 | if (__first == __last) return __result; | |
15500 | return std::__unique_copy(__first, __last, __result, _IterType()); | |
15501 | } | |
15502 | # 1447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15503 | template<typename _InputIterator, typename _OutputIterator, | |
15504 | typename _BinaryPredicate> | |
15505 | inline _OutputIterator | |
15506 | unique_copy(_InputIterator __first, _InputIterator __last, | |
15507 | _OutputIterator __result, | |
15508 | _BinaryPredicate __binary_pred) | |
15509 | { | |
15510 | ||
15511 | ||
15512 | ||
15513 | ||
15514 | ; | |
15515 | ||
15516 | typedef typename iterator_traits<_OutputIterator>::iterator_category | |
15517 | _IterType; | |
15518 | ||
15519 | if (__first == __last) return __result; | |
15520 | return std::__unique_copy(__first, __last, __result, | |
15521 | __binary_pred, _IterType()); | |
15522 | } | |
15523 | # 1481 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15524 | template<typename _ForwardIterator> | |
15525 | _ForwardIterator | |
15526 | unique(_ForwardIterator __first, _ForwardIterator __last) | |
15527 | { | |
15528 | ||
15529 | ||
15530 | ||
15531 | ||
15532 | ||
15533 | ; | |
15534 | ||
15535 | ||
15536 | __first = std::adjacent_find(__first, __last); | |
15537 | if (__first == __last) | |
15538 | return __last; | |
15539 | ||
15540 | ||
15541 | _ForwardIterator __dest = __first; | |
15542 | ++__first; | |
15543 | while (++__first != __last) | |
15544 | if (!(*__dest == *__first)) | |
15545 | *++__dest = *__first; | |
15546 | return ++__dest; | |
15547 | } | |
15548 | # 1520 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15549 | template<typename _ForwardIterator, typename _BinaryPredicate> | |
15550 | _ForwardIterator | |
15551 | unique(_ForwardIterator __first, _ForwardIterator __last, | |
15552 | _BinaryPredicate __binary_pred) | |
15553 | { | |
15554 | ||
15555 | ||
15556 | ||
15557 | ||
15558 | ||
15559 | ||
15560 | ; | |
15561 | ||
15562 | ||
15563 | __first = std::adjacent_find(__first, __last, __binary_pred); | |
15564 | if (__first == __last) | |
15565 | return __last; | |
15566 | ||
15567 | ||
15568 | _ForwardIterator __dest = __first; | |
15569 | ++__first; | |
15570 | while (++__first != __last) | |
15571 | if (!__binary_pred(*__dest, *__first)) | |
15572 | *++__dest = *__first; | |
15573 | return ++__dest; | |
15574 | } | |
15575 | # 1554 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15576 | template<typename _BidirectionalIterator> | |
15577 | void | |
15578 | __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
15579 | bidirectional_iterator_tag) | |
15580 | { | |
15581 | while (true) | |
15582 | if (__first == __last || __first == --__last) | |
15583 | return; | |
15584 | else | |
15585 | { | |
15586 | std::iter_swap(__first, __last); | |
15587 | ++__first; | |
15588 | } | |
15589 | } | |
15590 | # 1576 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15591 | template<typename _RandomAccessIterator> | |
15592 | void | |
15593 | __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
15594 | random_access_iterator_tag) | |
15595 | { | |
15596 | if (__first == __last) | |
15597 | return; | |
15598 | --__last; | |
15599 | while (__first < __last) | |
15600 | { | |
15601 | std::iter_swap(__first, __last); | |
15602 | ++__first; | |
15603 | --__last; | |
15604 | } | |
15605 | } | |
15606 | # 1603 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15607 | template<typename _BidirectionalIterator> | |
15608 | inline void | |
15609 | reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) | |
15610 | { | |
15611 | ||
15612 | ||
15613 | ||
15614 | ; | |
15615 | std::__reverse(__first, __last, std::__iterator_category(__first)); | |
15616 | } | |
15617 | # 1629 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15618 | template<typename _BidirectionalIterator, typename _OutputIterator> | |
15619 | _OutputIterator | |
15620 | reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
15621 | _OutputIterator __result) | |
15622 | { | |
15623 | ||
15624 | ||
15625 | ||
15626 | ||
15627 | ||
15628 | ; | |
15629 | ||
15630 | while (__first != __last) | |
15631 | { | |
15632 | --__last; | |
15633 | *__result = *__last; | |
15634 | ++__result; | |
15635 | } | |
15636 | return __result; | |
15637 | } | |
15638 | # 1657 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15639 | template<typename _EuclideanRingElement> | |
15640 | _EuclideanRingElement | |
15641 | __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) | |
15642 | { | |
15643 | while (__n != 0) | |
15644 | { | |
15645 | _EuclideanRingElement __t = __m % __n; | |
15646 | __m = __n; | |
15647 | __n = __t; | |
15648 | } | |
15649 | return __m; | |
15650 | } | |
15651 | ||
15652 | ||
15653 | ||
15654 | ||
15655 | ||
15656 | ||
15657 | template<typename _ForwardIterator> | |
15658 | void | |
15659 | __rotate(_ForwardIterator __first, | |
15660 | _ForwardIterator __middle, | |
15661 | _ForwardIterator __last, | |
15662 | forward_iterator_tag) | |
15663 | { | |
15664 | if (__first == __middle || __last == __middle) | |
15665 | return; | |
15666 | ||
15667 | _ForwardIterator __first2 = __middle; | |
15668 | do | |
15669 | { | |
15670 | swap(*__first, *__first2); | |
15671 | ++__first; | |
15672 | ++__first2; | |
15673 | if (__first == __middle) | |
15674 | __middle = __first2; | |
15675 | } | |
15676 | while (__first2 != __last); | |
15677 | ||
15678 | __first2 = __middle; | |
15679 | ||
15680 | while (__first2 != __last) | |
15681 | { | |
15682 | swap(*__first, *__first2); | |
15683 | ++__first; | |
15684 | ++__first2; | |
15685 | if (__first == __middle) | |
15686 | __middle = __first2; | |
15687 | else if (__first2 == __last) | |
15688 | __first2 = __middle; | |
15689 | } | |
15690 | } | |
15691 | ||
15692 | ||
15693 | ||
15694 | ||
15695 | ||
15696 | ||
15697 | template<typename _BidirectionalIterator> | |
15698 | void | |
15699 | __rotate(_BidirectionalIterator __first, | |
15700 | _BidirectionalIterator __middle, | |
15701 | _BidirectionalIterator __last, | |
15702 | bidirectional_iterator_tag) | |
15703 | { | |
15704 | ||
15705 | ||
15706 | ||
15707 | ||
15708 | if (__first == __middle || __last == __middle) | |
15709 | return; | |
15710 | ||
15711 | std::__reverse(__first, __middle, bidirectional_iterator_tag()); | |
15712 | std::__reverse(__middle, __last, bidirectional_iterator_tag()); | |
15713 | ||
15714 | while (__first != __middle && __middle != __last) | |
15715 | { | |
15716 | swap(*__first, *--__last); | |
15717 | ++__first; | |
15718 | } | |
15719 | ||
15720 | if (__first == __middle) | |
15721 | std::__reverse(__middle, __last, bidirectional_iterator_tag()); | |
15722 | else | |
15723 | std::__reverse(__first, __middle, bidirectional_iterator_tag()); | |
15724 | } | |
15725 | ||
15726 | ||
15727 | ||
15728 | ||
15729 | ||
15730 | ||
15731 | template<typename _RandomAccessIterator> | |
15732 | void | |
15733 | __rotate(_RandomAccessIterator __first, | |
15734 | _RandomAccessIterator __middle, | |
15735 | _RandomAccessIterator __last, | |
15736 | random_access_iterator_tag) | |
15737 | { | |
15738 | ||
15739 | ||
15740 | ||
15741 | ||
15742 | if (__first == __middle || __last == __middle) | |
15743 | return; | |
15744 | ||
15745 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
15746 | _Distance; | |
15747 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
15748 | _ValueType; | |
15749 | ||
15750 | const _Distance __n = __last - __first; | |
15751 | const _Distance __k = __middle - __first; | |
15752 | const _Distance __l = __n - __k; | |
15753 | ||
15754 | if (__k == __l) | |
15755 | { | |
15756 | std::swap_ranges(__first, __middle, __middle); | |
15757 | return; | |
15758 | } | |
15759 | ||
15760 | const _Distance __d = __gcd(__n, __k); | |
15761 | ||
15762 | for (_Distance __i = 0; __i < __d; __i++) | |
15763 | { | |
15764 | _ValueType __tmp = *__first; | |
15765 | _RandomAccessIterator __p = __first; | |
15766 | ||
15767 | if (__k < __l) | |
15768 | { | |
15769 | for (_Distance __j = 0; __j < __l / __d; __j++) | |
15770 | { | |
15771 | if (__p > __first + __l) | |
15772 | { | |
15773 | *__p = *(__p - __l); | |
15774 | __p -= __l; | |
15775 | } | |
15776 | ||
15777 | *__p = *(__p + __k); | |
15778 | __p += __k; | |
15779 | } | |
15780 | } | |
15781 | else | |
15782 | { | |
15783 | for (_Distance __j = 0; __j < __k / __d - 1; __j ++) | |
15784 | { | |
15785 | if (__p < __last - __k) | |
15786 | { | |
15787 | *__p = *(__p + __k); | |
15788 | __p += __k; | |
15789 | } | |
15790 | *__p = * (__p - __l); | |
15791 | __p -= __l; | |
15792 | } | |
15793 | } | |
15794 | ||
15795 | *__p = __tmp; | |
15796 | ++__first; | |
15797 | } | |
15798 | } | |
15799 | # 1836 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15800 | template<typename _ForwardIterator> | |
15801 | inline void | |
15802 | rotate(_ForwardIterator __first, _ForwardIterator __middle, | |
15803 | _ForwardIterator __last) | |
15804 | { | |
15805 | ||
15806 | ||
15807 | ||
15808 | ; | |
15809 | ; | |
15810 | ||
15811 | typedef typename iterator_traits<_ForwardIterator>::iterator_category | |
15812 | _IterType; | |
15813 | std::__rotate(__first, __middle, __last, _IterType()); | |
15814 | } | |
15815 | # 1869 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15816 | template<typename _ForwardIterator, typename _OutputIterator> | |
15817 | _OutputIterator | |
15818 | rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, | |
15819 | _ForwardIterator __last, _OutputIterator __result) | |
15820 | { | |
15821 | ||
15822 | ||
15823 | ||
15824 | ||
15825 | ; | |
15826 | ; | |
15827 | ||
15828 | return std::copy(__first, __middle, | |
15829 | std::copy(__middle, __last, __result)); | |
15830 | } | |
15831 | # 1895 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15832 | template<typename _RandomAccessIterator> | |
15833 | inline void | |
15834 | random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
15835 | { | |
15836 | ||
15837 | ||
15838 | ||
15839 | ; | |
15840 | ||
15841 | if (__first != __last) | |
15842 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
15843 | std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); | |
15844 | } | |
15845 | # 1922 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15846 | template<typename _RandomAccessIterator, typename _RandomNumberGenerator> | |
15847 | void | |
15848 | random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
15849 | _RandomNumberGenerator& __rand) | |
15850 | { | |
15851 | ||
15852 | ||
15853 | ||
15854 | ; | |
15855 | ||
15856 | if (__first == __last) | |
15857 | return; | |
15858 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
15859 | std::iter_swap(__i, __first + __rand((__i - __first) + 1)); | |
15860 | } | |
15861 | ||
15862 | ||
15863 | ||
15864 | ||
15865 | ||
15866 | ||
15867 | ||
15868 | template<typename _ForwardIterator, typename _Predicate> | |
15869 | _ForwardIterator | |
15870 | __partition(_ForwardIterator __first, _ForwardIterator __last, | |
15871 | _Predicate __pred, | |
15872 | forward_iterator_tag) | |
15873 | { | |
15874 | if (__first == __last) | |
15875 | return __first; | |
15876 | ||
15877 | while (__pred(*__first)) | |
15878 | if (++__first == __last) | |
15879 | return __first; | |
15880 | ||
15881 | _ForwardIterator __next = __first; | |
15882 | ||
15883 | while (++__next != __last) | |
15884 | if (__pred(*__next)) | |
15885 | { | |
15886 | swap(*__first, *__next); | |
15887 | ++__first; | |
15888 | } | |
15889 | ||
15890 | return __first; | |
15891 | } | |
15892 | ||
15893 | ||
15894 | ||
15895 | ||
15896 | ||
15897 | ||
15898 | template<typename _BidirectionalIterator, typename _Predicate> | |
15899 | _BidirectionalIterator | |
15900 | __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
15901 | _Predicate __pred, | |
15902 | bidirectional_iterator_tag) | |
15903 | { | |
15904 | while (true) | |
15905 | { | |
15906 | while (true) | |
15907 | if (__first == __last) | |
15908 | return __first; | |
15909 | else if (__pred(*__first)) | |
15910 | ++__first; | |
15911 | else | |
15912 | break; | |
15913 | --__last; | |
15914 | while (true) | |
15915 | if (__first == __last) | |
15916 | return __first; | |
15917 | else if (!__pred(*__last)) | |
15918 | --__last; | |
15919 | else | |
15920 | break; | |
15921 | std::iter_swap(__first, __last); | |
15922 | ++__first; | |
15923 | } | |
15924 | } | |
15925 | # 2016 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
15926 | template<typename _ForwardIterator, typename _Predicate> | |
15927 | inline _ForwardIterator | |
15928 | partition(_ForwardIterator __first, _ForwardIterator __last, | |
15929 | _Predicate __pred) | |
15930 | { | |
15931 | ||
15932 | ||
15933 | ||
15934 | ||
15935 | ||
15936 | ; | |
15937 | ||
15938 | return std::__partition(__first, __last, __pred, | |
15939 | std::__iterator_category(__first)); | |
15940 | } | |
15941 | ||
15942 | ||
15943 | ||
15944 | ||
15945 | ||
15946 | ||
15947 | ||
15948 | template<typename _ForwardIterator, typename _Predicate, typename _Distance> | |
15949 | _ForwardIterator | |
15950 | __inplace_stable_partition(_ForwardIterator __first, | |
15951 | _ForwardIterator __last, | |
15952 | _Predicate __pred, _Distance __len) | |
15953 | { | |
15954 | if (__len == 1) | |
15955 | return __pred(*__first) ? __last : __first; | |
15956 | _ForwardIterator __middle = __first; | |
15957 | std::advance(__middle, __len / 2); | |
15958 | _ForwardIterator __begin = std::__inplace_stable_partition(__first, | |
15959 | __middle, | |
15960 | __pred, | |
15961 | __len / 2); | |
15962 | _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, | |
15963 | __pred, | |
15964 | __len | |
15965 | - __len / 2); | |
15966 | std::rotate(__begin, __middle, __end); | |
15967 | std::advance(__begin, std::distance(__middle, __end)); | |
15968 | return __begin; | |
15969 | } | |
15970 | ||
15971 | ||
15972 | ||
15973 | ||
15974 | ||
15975 | ||
15976 | template<typename _ForwardIterator, typename _Pointer, typename _Predicate, | |
15977 | typename _Distance> | |
15978 | _ForwardIterator | |
15979 | __stable_partition_adaptive(_ForwardIterator __first, | |
15980 | _ForwardIterator __last, | |
15981 | _Predicate __pred, _Distance __len, | |
15982 | _Pointer __buffer, | |
15983 | _Distance __buffer_size) | |
15984 | { | |
15985 | if (__len <= __buffer_size) | |
15986 | { | |
15987 | _ForwardIterator __result1 = __first; | |
15988 | _Pointer __result2 = __buffer; | |
15989 | for ( ; __first != __last ; ++__first) | |
15990 | if (__pred(*__first)) | |
15991 | { | |
15992 | *__result1 = *__first; | |
15993 | ++__result1; | |
15994 | } | |
15995 | else | |
15996 | { | |
15997 | *__result2 = *__first; | |
15998 | ++__result2; | |
15999 | } | |
16000 | std::copy(__buffer, __result2, __result1); | |
16001 | return __result1; | |
16002 | } | |
16003 | else | |
16004 | { | |
16005 | _ForwardIterator __middle = __first; | |
16006 | std::advance(__middle, __len / 2); | |
16007 | _ForwardIterator __begin = | |
16008 | std::__stable_partition_adaptive(__first, __middle, __pred, | |
16009 | __len / 2, __buffer, | |
16010 | __buffer_size); | |
16011 | _ForwardIterator __end = | |
16012 | std::__stable_partition_adaptive(__middle, __last, __pred, | |
16013 | __len - __len / 2, | |
16014 | __buffer, __buffer_size); | |
16015 | std::rotate(__begin, __middle, __end); | |
16016 | std::advance(__begin, std::distance(__middle, __end)); | |
16017 | return __begin; | |
16018 | } | |
16019 | } | |
16020 | # 2127 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16021 | template<typename _ForwardIterator, typename _Predicate> | |
16022 | _ForwardIterator | |
16023 | stable_partition(_ForwardIterator __first, _ForwardIterator __last, | |
16024 | _Predicate __pred) | |
16025 | { | |
16026 | ||
16027 | ||
16028 | ||
16029 | ||
16030 | ||
16031 | ; | |
16032 | ||
16033 | if (__first == __last) | |
16034 | return __first; | |
16035 | else | |
16036 | { | |
16037 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
16038 | _ValueType; | |
16039 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
16040 | _DistanceType; | |
16041 | ||
16042 | _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, | |
16043 | __last); | |
16044 | if (__buf.size() > 0) | |
16045 | return | |
16046 | std::__stable_partition_adaptive(__first, __last, __pred, | |
16047 | _DistanceType(__buf.requested_size()), | |
16048 | __buf.begin(), __buf.size()); | |
16049 | else | |
16050 | return | |
16051 | std::__inplace_stable_partition(__first, __last, __pred, | |
16052 | _DistanceType(__buf.requested_size())); | |
16053 | } | |
16054 | } | |
16055 | ||
16056 | ||
16057 | ||
16058 | ||
16059 | ||
16060 | ||
16061 | template<typename _RandomAccessIterator, typename _Tp> | |
16062 | _RandomAccessIterator | |
16063 | __unguarded_partition(_RandomAccessIterator __first, | |
16064 | _RandomAccessIterator __last, _Tp __pivot) | |
16065 | { | |
16066 | while (true) | |
16067 | { | |
16068 | while (*__first < __pivot) | |
16069 | ++__first; | |
16070 | --__last; | |
16071 | while (__pivot < *__last) | |
16072 | --__last; | |
16073 | if (!(__first < __last)) | |
16074 | return __first; | |
16075 | std::iter_swap(__first, __last); | |
16076 | ++__first; | |
16077 | } | |
16078 | } | |
16079 | ||
16080 | ||
16081 | ||
16082 | ||
16083 | ||
16084 | ||
16085 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
16086 | _RandomAccessIterator | |
16087 | __unguarded_partition(_RandomAccessIterator __first, | |
16088 | _RandomAccessIterator __last, | |
16089 | _Tp __pivot, _Compare __comp) | |
16090 | { | |
16091 | while (true) | |
16092 | { | |
16093 | while (__comp(*__first, __pivot)) | |
16094 | ++__first; | |
16095 | --__last; | |
16096 | while (__comp(__pivot, *__last)) | |
16097 | --__last; | |
16098 | if (!(__first < __last)) | |
16099 | return __first; | |
16100 | std::iter_swap(__first, __last); | |
16101 | ++__first; | |
16102 | } | |
16103 | } | |
16104 | ||
16105 | ||
16106 | ||
16107 | ||
16108 | ||
16109 | ||
16110 | ||
16111 | enum { _S_threshold = 16 }; | |
16112 | ||
16113 | ||
16114 | ||
16115 | ||
16116 | ||
16117 | ||
16118 | template<typename _RandomAccessIterator, typename _Tp> | |
16119 | void | |
16120 | __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val) | |
16121 | { | |
16122 | _RandomAccessIterator __next = __last; | |
16123 | --__next; | |
16124 | while (__val < *__next) | |
16125 | { | |
16126 | *__last = *__next; | |
16127 | __last = __next; | |
16128 | --__next; | |
16129 | } | |
16130 | *__last = __val; | |
16131 | } | |
16132 | ||
16133 | ||
16134 | ||
16135 | ||
16136 | ||
16137 | ||
16138 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
16139 | void | |
16140 | __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val, | |
16141 | _Compare __comp) | |
16142 | { | |
16143 | _RandomAccessIterator __next = __last; | |
16144 | --__next; | |
16145 | while (__comp(__val, *__next)) | |
16146 | { | |
16147 | *__last = *__next; | |
16148 | __last = __next; | |
16149 | --__next; | |
16150 | } | |
16151 | *__last = __val; | |
16152 | } | |
16153 | ||
16154 | ||
16155 | ||
16156 | ||
16157 | ||
16158 | ||
16159 | template<typename _RandomAccessIterator> | |
16160 | void | |
16161 | __insertion_sort(_RandomAccessIterator __first, | |
16162 | _RandomAccessIterator __last) | |
16163 | { | |
16164 | if (__first == __last) | |
16165 | return; | |
16166 | ||
16167 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
16168 | { | |
16169 | typename iterator_traits<_RandomAccessIterator>::value_type | |
16170 | __val = *__i; | |
16171 | if (__val < *__first) | |
16172 | { | |
16173 | std::copy_backward(__first, __i, __i + 1); | |
16174 | *__first = __val; | |
16175 | } | |
16176 | else | |
16177 | std::__unguarded_linear_insert(__i, __val); | |
16178 | } | |
16179 | } | |
16180 | ||
16181 | ||
16182 | ||
16183 | ||
16184 | ||
16185 | ||
16186 | template<typename _RandomAccessIterator, typename _Compare> | |
16187 | void | |
16188 | __insertion_sort(_RandomAccessIterator __first, | |
16189 | _RandomAccessIterator __last, _Compare __comp) | |
16190 | { | |
16191 | if (__first == __last) return; | |
16192 | ||
16193 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
16194 | { | |
16195 | typename iterator_traits<_RandomAccessIterator>::value_type | |
16196 | __val = *__i; | |
16197 | if (__comp(__val, *__first)) | |
16198 | { | |
16199 | std::copy_backward(__first, __i, __i + 1); | |
16200 | *__first = __val; | |
16201 | } | |
16202 | else | |
16203 | std::__unguarded_linear_insert(__i, __val, __comp); | |
16204 | } | |
16205 | } | |
16206 | ||
16207 | ||
16208 | ||
16209 | ||
16210 | ||
16211 | ||
16212 | template<typename _RandomAccessIterator> | |
16213 | inline void | |
16214 | __unguarded_insertion_sort(_RandomAccessIterator __first, | |
16215 | _RandomAccessIterator __last) | |
16216 | { | |
16217 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16218 | _ValueType; | |
16219 | ||
16220 | for (_RandomAccessIterator __i = __first; __i != __last; ++__i) | |
16221 | std::__unguarded_linear_insert(__i, _ValueType(*__i)); | |
16222 | } | |
16223 | ||
16224 | ||
16225 | ||
16226 | ||
16227 | ||
16228 | ||
16229 | template<typename _RandomAccessIterator, typename _Compare> | |
16230 | inline void | |
16231 | __unguarded_insertion_sort(_RandomAccessIterator __first, | |
16232 | _RandomAccessIterator __last, _Compare __comp) | |
16233 | { | |
16234 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16235 | _ValueType; | |
16236 | ||
16237 | for (_RandomAccessIterator __i = __first; __i != __last; ++__i) | |
16238 | std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp); | |
16239 | } | |
16240 | ||
16241 | ||
16242 | ||
16243 | ||
16244 | ||
16245 | ||
16246 | template<typename _RandomAccessIterator> | |
16247 | void | |
16248 | __final_insertion_sort(_RandomAccessIterator __first, | |
16249 | _RandomAccessIterator __last) | |
16250 | { | |
16251 | if (__last - __first > int(_S_threshold)) | |
16252 | { | |
16253 | std::__insertion_sort(__first, __first + int(_S_threshold)); | |
16254 | std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); | |
16255 | } | |
16256 | else | |
16257 | std::__insertion_sort(__first, __last); | |
16258 | } | |
16259 | ||
16260 | ||
16261 | ||
16262 | ||
16263 | ||
16264 | ||
16265 | template<typename _RandomAccessIterator, typename _Compare> | |
16266 | void | |
16267 | __final_insertion_sort(_RandomAccessIterator __first, | |
16268 | _RandomAccessIterator __last, _Compare __comp) | |
16269 | { | |
16270 | if (__last - __first > int(_S_threshold)) | |
16271 | { | |
16272 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | |
16273 | std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, | |
16274 | __comp); | |
16275 | } | |
16276 | else | |
16277 | std::__insertion_sort(__first, __last, __comp); | |
16278 | } | |
16279 | ||
16280 | ||
16281 | ||
16282 | ||
16283 | ||
16284 | ||
16285 | template<typename _Size> | |
16286 | inline _Size | |
16287 | __lg(_Size __n) | |
16288 | { | |
16289 | _Size __k; | |
16290 | for (__k = 0; __n != 1; __n >>= 1) | |
16291 | ++__k; | |
16292 | return __k; | |
16293 | } | |
16294 | # 2416 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16295 | template<typename _RandomAccessIterator> | |
16296 | void | |
16297 | partial_sort(_RandomAccessIterator __first, | |
16298 | _RandomAccessIterator __middle, | |
16299 | _RandomAccessIterator __last) | |
16300 | { | |
16301 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16302 | _ValueType; | |
16303 | ||
16304 | ||
16305 | ||
16306 | ||
16307 | ||
16308 | ; | |
16309 | ; | |
16310 | ||
16311 | std::make_heap(__first, __middle); | |
16312 | for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) | |
16313 | if (*__i < *__first) | |
16314 | std::__pop_heap(__first, __middle, __i, _ValueType(*__i)); | |
16315 | std::sort_heap(__first, __middle); | |
16316 | } | |
16317 | # 2457 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16318 | template<typename _RandomAccessIterator, typename _Compare> | |
16319 | void | |
16320 | partial_sort(_RandomAccessIterator __first, | |
16321 | _RandomAccessIterator __middle, | |
16322 | _RandomAccessIterator __last, | |
16323 | _Compare __comp) | |
16324 | { | |
16325 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16326 | _ValueType; | |
16327 | ||
16328 | ||
16329 | ||
16330 | ||
16331 | ||
16332 | ||
16333 | ; | |
16334 | ; | |
16335 | ||
16336 | std::make_heap(__first, __middle, __comp); | |
16337 | for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) | |
16338 | if (__comp(*__i, *__first)) | |
16339 | std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp); | |
16340 | std::sort_heap(__first, __middle, __comp); | |
16341 | } | |
16342 | # 2499 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16343 | template<typename _InputIterator, typename _RandomAccessIterator> | |
16344 | _RandomAccessIterator | |
16345 | partial_sort_copy(_InputIterator __first, _InputIterator __last, | |
16346 | _RandomAccessIterator __result_first, | |
16347 | _RandomAccessIterator __result_last) | |
16348 | { | |
16349 | typedef typename iterator_traits<_InputIterator>::value_type | |
16350 | _InputValueType; | |
16351 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16352 | _OutputValueType; | |
16353 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16354 | _DistanceType; | |
16355 | ||
16356 | ||
16357 | ||
16358 | ||
16359 | ||
16360 | ||
16361 | ||
16362 | ; | |
16363 | ; | |
16364 | ||
16365 | if (__result_first == __result_last) | |
16366 | return __result_last; | |
16367 | _RandomAccessIterator __result_real_last = __result_first; | |
16368 | while(__first != __last && __result_real_last != __result_last) | |
16369 | { | |
16370 | *__result_real_last = *__first; | |
16371 | ++__result_real_last; | |
16372 | ++__first; | |
16373 | } | |
16374 | std::make_heap(__result_first, __result_real_last); | |
16375 | while (__first != __last) | |
16376 | { | |
16377 | if (*__first < *__result_first) | |
16378 | std::__adjust_heap(__result_first, _DistanceType(0), | |
16379 | _DistanceType(__result_real_last | |
16380 | - __result_first), | |
16381 | _InputValueType(*__first)); | |
16382 | ++__first; | |
16383 | } | |
16384 | std::sort_heap(__result_first, __result_real_last); | |
16385 | return __result_real_last; | |
16386 | } | |
16387 | # 2563 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16388 | template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare> | |
16389 | _RandomAccessIterator | |
16390 | partial_sort_copy(_InputIterator __first, _InputIterator __last, | |
16391 | _RandomAccessIterator __result_first, | |
16392 | _RandomAccessIterator __result_last, | |
16393 | _Compare __comp) | |
16394 | { | |
16395 | typedef typename iterator_traits<_InputIterator>::value_type | |
16396 | _InputValueType; | |
16397 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16398 | _OutputValueType; | |
16399 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16400 | _DistanceType; | |
16401 | ||
16402 | ||
16403 | ||
16404 | ||
16405 | ||
16406 | ||
16407 | ||
16408 | ||
16409 | ||
16410 | ; | |
16411 | ; | |
16412 | ||
16413 | if (__result_first == __result_last) | |
16414 | return __result_last; | |
16415 | _RandomAccessIterator __result_real_last = __result_first; | |
16416 | while(__first != __last && __result_real_last != __result_last) | |
16417 | { | |
16418 | *__result_real_last = *__first; | |
16419 | ++__result_real_last; | |
16420 | ++__first; | |
16421 | } | |
16422 | std::make_heap(__result_first, __result_real_last, __comp); | |
16423 | while (__first != __last) | |
16424 | { | |
16425 | if (__comp(*__first, *__result_first)) | |
16426 | std::__adjust_heap(__result_first, _DistanceType(0), | |
16427 | _DistanceType(__result_real_last | |
16428 | - __result_first), | |
16429 | _InputValueType(*__first), | |
16430 | __comp); | |
16431 | ++__first; | |
16432 | } | |
16433 | std::sort_heap(__result_first, __result_real_last, __comp); | |
16434 | return __result_real_last; | |
16435 | } | |
16436 | ||
16437 | ||
16438 | ||
16439 | ||
16440 | ||
16441 | ||
16442 | template<typename _RandomAccessIterator, typename _Size> | |
16443 | void | |
16444 | __introsort_loop(_RandomAccessIterator __first, | |
16445 | _RandomAccessIterator __last, | |
16446 | _Size __depth_limit) | |
16447 | { | |
16448 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16449 | _ValueType; | |
16450 | ||
16451 | while (__last - __first > int(_S_threshold)) | |
16452 | { | |
16453 | if (__depth_limit == 0) | |
16454 | { | |
16455 | std::partial_sort(__first, __last, __last); | |
16456 | return; | |
16457 | } | |
16458 | --__depth_limit; | |
16459 | _RandomAccessIterator __cut = | |
16460 | std::__unguarded_partition(__first, __last, | |
16461 | _ValueType(std::__median(*__first, | |
16462 | *(__first | |
16463 | + (__last | |
16464 | - __first) | |
16465 | / 2), | |
16466 | *(__last | |
16467 | - 1)))); | |
16468 | std::__introsort_loop(__cut, __last, __depth_limit); | |
16469 | __last = __cut; | |
16470 | } | |
16471 | } | |
16472 | ||
16473 | ||
16474 | ||
16475 | ||
16476 | ||
16477 | ||
16478 | template<typename _RandomAccessIterator, typename _Size, typename _Compare> | |
16479 | void | |
16480 | __introsort_loop(_RandomAccessIterator __first, | |
16481 | _RandomAccessIterator __last, | |
16482 | _Size __depth_limit, _Compare __comp) | |
16483 | { | |
16484 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16485 | _ValueType; | |
16486 | ||
16487 | while (__last - __first > int(_S_threshold)) | |
16488 | { | |
16489 | if (__depth_limit == 0) | |
16490 | { | |
16491 | std::partial_sort(__first, __last, __last, __comp); | |
16492 | return; | |
16493 | } | |
16494 | --__depth_limit; | |
16495 | _RandomAccessIterator __cut = | |
16496 | std::__unguarded_partition(__first, __last, | |
16497 | _ValueType(std::__median(*__first, | |
16498 | *(__first | |
16499 | + (__last | |
16500 | - __first) | |
16501 | / 2), | |
16502 | *(__last - 1), | |
16503 | __comp)), | |
16504 | __comp); | |
16505 | std::__introsort_loop(__cut, __last, __depth_limit, __comp); | |
16506 | __last = __cut; | |
16507 | } | |
16508 | } | |
16509 | # 2698 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16510 | template<typename _RandomAccessIterator> | |
16511 | inline void | |
16512 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
16513 | { | |
16514 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16515 | _ValueType; | |
16516 | ||
16517 | ||
16518 | ||
16519 | ||
16520 | ||
16521 | ; | |
16522 | ||
16523 | if (__first != __last) | |
16524 | { | |
16525 | std::__introsort_loop(__first, __last, __lg(__last - __first) * 2); | |
16526 | std::__final_insertion_sort(__first, __last); | |
16527 | } | |
16528 | } | |
16529 | # 2732 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16530 | template<typename _RandomAccessIterator, typename _Compare> | |
16531 | inline void | |
16532 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16533 | _Compare __comp) | |
16534 | { | |
16535 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16536 | _ValueType; | |
16537 | ||
16538 | ||
16539 | ||
16540 | ||
16541 | ||
16542 | ||
16543 | ; | |
16544 | ||
16545 | if (__first != __last) | |
16546 | { | |
16547 | std::__introsort_loop(__first, __last, __lg(__last - __first) * 2, | |
16548 | __comp); | |
16549 | std::__final_insertion_sort(__first, __last, __comp); | |
16550 | } | |
16551 | } | |
16552 | # 2765 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16553 | template<typename _ForwardIterator, typename _Tp> | |
16554 | _ForwardIterator | |
16555 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | |
16556 | const _Tp& __val) | |
16557 | { | |
16558 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
16559 | _ValueType; | |
16560 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
16561 | _DistanceType; | |
16562 | ||
16563 | ||
16564 | ||
16565 | ||
16566 | ||
16567 | ||
16568 | ||
16569 | ||
16570 | ||
16571 | ; | |
16572 | ||
16573 | _DistanceType __len = std::distance(__first, __last); | |
16574 | _DistanceType __half; | |
16575 | _ForwardIterator __middle; | |
16576 | ||
16577 | while (__len > 0) | |
16578 | { | |
16579 | __half = __len >> 1; | |
16580 | __middle = __first; | |
16581 | std::advance(__middle, __half); | |
16582 | if (*__middle < __val) | |
16583 | { | |
16584 | __first = __middle; | |
16585 | ++__first; | |
16586 | __len = __len - __half - 1; | |
16587 | } | |
16588 | else | |
16589 | __len = __half; | |
16590 | } | |
16591 | return __first; | |
16592 | } | |
16593 | # 2820 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16594 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
16595 | _ForwardIterator | |
16596 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | |
16597 | const _Tp& __val, _Compare __comp) | |
16598 | { | |
16599 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
16600 | _ValueType; | |
16601 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
16602 | _DistanceType; | |
16603 | ||
16604 | ||
16605 | ||
16606 | ||
16607 | ||
16608 | ; | |
16609 | ||
16610 | _DistanceType __len = std::distance(__first, __last); | |
16611 | _DistanceType __half; | |
16612 | _ForwardIterator __middle; | |
16613 | ||
16614 | while (__len > 0) | |
16615 | { | |
16616 | __half = __len >> 1; | |
16617 | __middle = __first; | |
16618 | std::advance(__middle, __half); | |
16619 | if (__comp(*__middle, __val)) | |
16620 | { | |
16621 | __first = __middle; | |
16622 | ++__first; | |
16623 | __len = __len - __half - 1; | |
16624 | } | |
16625 | else | |
16626 | __len = __half; | |
16627 | } | |
16628 | return __first; | |
16629 | } | |
16630 | # 2867 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16631 | template<typename _ForwardIterator, typename _Tp> | |
16632 | _ForwardIterator | |
16633 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | |
16634 | const _Tp& __val) | |
16635 | { | |
16636 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
16637 | _ValueType; | |
16638 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
16639 | _DistanceType; | |
16640 | ||
16641 | ||
16642 | ||
16643 | ||
16644 | ||
16645 | ||
16646 | ; | |
16647 | ||
16648 | _DistanceType __len = std::distance(__first, __last); | |
16649 | _DistanceType __half; | |
16650 | _ForwardIterator __middle; | |
16651 | ||
16652 | while (__len > 0) | |
16653 | { | |
16654 | __half = __len >> 1; | |
16655 | __middle = __first; | |
16656 | std::advance(__middle, __half); | |
16657 | if (__val < *__middle) | |
16658 | __len = __half; | |
16659 | else | |
16660 | { | |
16661 | __first = __middle; | |
16662 | ++__first; | |
16663 | __len = __len - __half - 1; | |
16664 | } | |
16665 | } | |
16666 | return __first; | |
16667 | } | |
16668 | # 2919 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16669 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
16670 | _ForwardIterator | |
16671 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | |
16672 | const _Tp& __val, _Compare __comp) | |
16673 | { | |
16674 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
16675 | _ValueType; | |
16676 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
16677 | _DistanceType; | |
16678 | ||
16679 | ||
16680 | ||
16681 | ||
16682 | ||
16683 | ; | |
16684 | ||
16685 | _DistanceType __len = std::distance(__first, __last); | |
16686 | _DistanceType __half; | |
16687 | _ForwardIterator __middle; | |
16688 | ||
16689 | while (__len > 0) | |
16690 | { | |
16691 | __half = __len >> 1; | |
16692 | __middle = __first; | |
16693 | std::advance(__middle, __half); | |
16694 | if (__comp(__val, *__middle)) | |
16695 | __len = __half; | |
16696 | else | |
16697 | { | |
16698 | __first = __middle; | |
16699 | ++__first; | |
16700 | __len = __len - __half - 1; | |
16701 | } | |
16702 | } | |
16703 | return __first; | |
16704 | } | |
16705 | ||
16706 | ||
16707 | ||
16708 | ||
16709 | ||
16710 | ||
16711 | template<typename _BidirectionalIterator, typename _Distance> | |
16712 | void | |
16713 | __merge_without_buffer(_BidirectionalIterator __first, | |
16714 | _BidirectionalIterator __middle, | |
16715 | _BidirectionalIterator __last, | |
16716 | _Distance __len1, _Distance __len2) | |
16717 | { | |
16718 | if (__len1 == 0 || __len2 == 0) | |
16719 | return; | |
16720 | if (__len1 + __len2 == 2) | |
16721 | { | |
16722 | if (*__middle < *__first) | |
16723 | std::iter_swap(__first, __middle); | |
16724 | return; | |
16725 | } | |
16726 | _BidirectionalIterator __first_cut = __first; | |
16727 | _BidirectionalIterator __second_cut = __middle; | |
16728 | _Distance __len11 = 0; | |
16729 | _Distance __len22 = 0; | |
16730 | if (__len1 > __len2) | |
16731 | { | |
16732 | __len11 = __len1 / 2; | |
16733 | std::advance(__first_cut, __len11); | |
16734 | __second_cut = std::lower_bound(__middle, __last, *__first_cut); | |
16735 | __len22 = std::distance(__middle, __second_cut); | |
16736 | } | |
16737 | else | |
16738 | { | |
16739 | __len22 = __len2 / 2; | |
16740 | std::advance(__second_cut, __len22); | |
16741 | __first_cut = std::upper_bound(__first, __middle, *__second_cut); | |
16742 | __len11 = std::distance(__first, __first_cut); | |
16743 | } | |
16744 | std::rotate(__first_cut, __middle, __second_cut); | |
16745 | _BidirectionalIterator __new_middle = __first_cut; | |
16746 | std::advance(__new_middle, std::distance(__middle, __second_cut)); | |
16747 | std::__merge_without_buffer(__first, __first_cut, __new_middle, | |
16748 | __len11, __len22); | |
16749 | std::__merge_without_buffer(__new_middle, __second_cut, __last, | |
16750 | __len1 - __len11, __len2 - __len22); | |
16751 | } | |
16752 | ||
16753 | ||
16754 | ||
16755 | ||
16756 | ||
16757 | ||
16758 | template<typename _BidirectionalIterator, typename _Distance, | |
16759 | typename _Compare> | |
16760 | void | |
16761 | __merge_without_buffer(_BidirectionalIterator __first, | |
16762 | _BidirectionalIterator __middle, | |
16763 | _BidirectionalIterator __last, | |
16764 | _Distance __len1, _Distance __len2, | |
16765 | _Compare __comp) | |
16766 | { | |
16767 | if (__len1 == 0 || __len2 == 0) | |
16768 | return; | |
16769 | if (__len1 + __len2 == 2) | |
16770 | { | |
16771 | if (__comp(*__middle, *__first)) | |
16772 | std::iter_swap(__first, __middle); | |
16773 | return; | |
16774 | } | |
16775 | _BidirectionalIterator __first_cut = __first; | |
16776 | _BidirectionalIterator __second_cut = __middle; | |
16777 | _Distance __len11 = 0; | |
16778 | _Distance __len22 = 0; | |
16779 | if (__len1 > __len2) | |
16780 | { | |
16781 | __len11 = __len1 / 2; | |
16782 | std::advance(__first_cut, __len11); | |
16783 | __second_cut = std::lower_bound(__middle, __last, *__first_cut, | |
16784 | __comp); | |
16785 | __len22 = std::distance(__middle, __second_cut); | |
16786 | } | |
16787 | else | |
16788 | { | |
16789 | __len22 = __len2 / 2; | |
16790 | std::advance(__second_cut, __len22); | |
16791 | __first_cut = std::upper_bound(__first, __middle, *__second_cut, | |
16792 | __comp); | |
16793 | __len11 = std::distance(__first, __first_cut); | |
16794 | } | |
16795 | std::rotate(__first_cut, __middle, __second_cut); | |
16796 | _BidirectionalIterator __new_middle = __first_cut; | |
16797 | std::advance(__new_middle, std::distance(__middle, __second_cut)); | |
16798 | std::__merge_without_buffer(__first, __first_cut, __new_middle, | |
16799 | __len11, __len22, __comp); | |
16800 | std::__merge_without_buffer(__new_middle, __second_cut, __last, | |
16801 | __len1 - __len11, __len2 - __len22, __comp); | |
16802 | } | |
16803 | ||
16804 | ||
16805 | ||
16806 | ||
16807 | ||
16808 | ||
16809 | template<typename _RandomAccessIterator> | |
16810 | void | |
16811 | __inplace_stable_sort(_RandomAccessIterator __first, | |
16812 | _RandomAccessIterator __last) | |
16813 | { | |
16814 | if (__last - __first < 15) | |
16815 | { | |
16816 | std::__insertion_sort(__first, __last); | |
16817 | return; | |
16818 | } | |
16819 | _RandomAccessIterator __middle = __first + (__last - __first) / 2; | |
16820 | std::__inplace_stable_sort(__first, __middle); | |
16821 | std::__inplace_stable_sort(__middle, __last); | |
16822 | std::__merge_without_buffer(__first, __middle, __last, | |
16823 | __middle - __first, | |
16824 | __last - __middle); | |
16825 | } | |
16826 | ||
16827 | ||
16828 | ||
16829 | ||
16830 | ||
16831 | ||
16832 | template<typename _RandomAccessIterator, typename _Compare> | |
16833 | void | |
16834 | __inplace_stable_sort(_RandomAccessIterator __first, | |
16835 | _RandomAccessIterator __last, _Compare __comp) | |
16836 | { | |
16837 | if (__last - __first < 15) | |
16838 | { | |
16839 | std::__insertion_sort(__first, __last, __comp); | |
16840 | return; | |
16841 | } | |
16842 | _RandomAccessIterator __middle = __first + (__last - __first) / 2; | |
16843 | std::__inplace_stable_sort(__first, __middle, __comp); | |
16844 | std::__inplace_stable_sort(__middle, __last, __comp); | |
16845 | std::__merge_without_buffer(__first, __middle, __last, | |
16846 | __middle - __first, | |
16847 | __last - __middle, | |
16848 | __comp); | |
16849 | } | |
16850 | # 3117 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16851 | template<typename _InputIterator1, typename _InputIterator2, | |
16852 | typename _OutputIterator> | |
16853 | _OutputIterator | |
16854 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | |
16855 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16856 | _OutputIterator __result) | |
16857 | { | |
16858 | ||
16859 | ||
16860 | ||
16861 | ||
16862 | ||
16863 | ||
16864 | ||
16865 | ||
16866 | ||
16867 | ||
16868 | ; | |
16869 | ; | |
16870 | ||
16871 | while (__first1 != __last1 && __first2 != __last2) | |
16872 | { | |
16873 | if (*__first2 < *__first1) | |
16874 | { | |
16875 | *__result = *__first2; | |
16876 | ++__first2; | |
16877 | } | |
16878 | else | |
16879 | { | |
16880 | *__result = *__first1; | |
16881 | ++__first1; | |
16882 | } | |
16883 | ++__result; | |
16884 | } | |
16885 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
16886 | __result)); | |
16887 | } | |
16888 | # 3175 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
16889 | template<typename _InputIterator1, typename _InputIterator2, | |
16890 | typename _OutputIterator, typename _Compare> | |
16891 | _OutputIterator | |
16892 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | |
16893 | _InputIterator2 __first2, _InputIterator2 __last2, | |
16894 | _OutputIterator __result, _Compare __comp) | |
16895 | { | |
16896 | ||
16897 | ||
16898 | ||
16899 | ||
16900 | ||
16901 | ||
16902 | ||
16903 | ||
16904 | ||
16905 | ||
16906 | ||
16907 | ; | |
16908 | ; | |
16909 | ||
16910 | while (__first1 != __last1 && __first2 != __last2) | |
16911 | { | |
16912 | if (__comp(*__first2, *__first1)) | |
16913 | { | |
16914 | *__result = *__first2; | |
16915 | ++__first2; | |
16916 | } | |
16917 | else | |
16918 | { | |
16919 | *__result = *__first1; | |
16920 | ++__first1; | |
16921 | } | |
16922 | ++__result; | |
16923 | } | |
16924 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
16925 | __result)); | |
16926 | } | |
16927 | ||
16928 | template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, | |
16929 | typename _Distance> | |
16930 | void | |
16931 | __merge_sort_loop(_RandomAccessIterator1 __first, | |
16932 | _RandomAccessIterator1 __last, | |
16933 | _RandomAccessIterator2 __result, | |
16934 | _Distance __step_size) | |
16935 | { | |
16936 | const _Distance __two_step = 2 * __step_size; | |
16937 | ||
16938 | while (__last - __first >= __two_step) | |
16939 | { | |
16940 | __result = std::merge(__first, __first + __step_size, | |
16941 | __first + __step_size, __first + __two_step, | |
16942 | __result); | |
16943 | __first += __two_step; | |
16944 | } | |
16945 | ||
16946 | __step_size = std::min(_Distance(__last - __first), __step_size); | |
16947 | std::merge(__first, __first + __step_size, __first + __step_size, __last, | |
16948 | __result); | |
16949 | } | |
16950 | ||
16951 | template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, | |
16952 | typename _Distance, typename _Compare> | |
16953 | void | |
16954 | __merge_sort_loop(_RandomAccessIterator1 __first, | |
16955 | _RandomAccessIterator1 __last, | |
16956 | _RandomAccessIterator2 __result, _Distance __step_size, | |
16957 | _Compare __comp) | |
16958 | { | |
16959 | const _Distance __two_step = 2 * __step_size; | |
16960 | ||
16961 | while (__last - __first >= __two_step) | |
16962 | { | |
16963 | __result = std::merge(__first, __first + __step_size, | |
16964 | __first + __step_size, __first + __two_step, | |
16965 | __result, | |
16966 | __comp); | |
16967 | __first += __two_step; | |
16968 | } | |
16969 | __step_size = std::min(_Distance(__last - __first), __step_size); | |
16970 | ||
16971 | std::merge(__first, __first + __step_size, | |
16972 | __first + __step_size, __last, | |
16973 | __result, | |
16974 | __comp); | |
16975 | } | |
16976 | ||
16977 | enum { _S_chunk_size = 7 }; | |
16978 | ||
16979 | template<typename _RandomAccessIterator, typename _Distance> | |
16980 | void | |
16981 | __chunk_insertion_sort(_RandomAccessIterator __first, | |
16982 | _RandomAccessIterator __last, | |
16983 | _Distance __chunk_size) | |
16984 | { | |
16985 | while (__last - __first >= __chunk_size) | |
16986 | { | |
16987 | std::__insertion_sort(__first, __first + __chunk_size); | |
16988 | __first += __chunk_size; | |
16989 | } | |
16990 | std::__insertion_sort(__first, __last); | |
16991 | } | |
16992 | ||
16993 | template<typename _RandomAccessIterator, typename _Distance, typename _Compare> | |
16994 | void | |
16995 | __chunk_insertion_sort(_RandomAccessIterator __first, | |
16996 | _RandomAccessIterator __last, | |
16997 | _Distance __chunk_size, _Compare __comp) | |
16998 | { | |
16999 | while (__last - __first >= __chunk_size) | |
17000 | { | |
17001 | std::__insertion_sort(__first, __first + __chunk_size, __comp); | |
17002 | __first += __chunk_size; | |
17003 | } | |
17004 | std::__insertion_sort(__first, __last, __comp); | |
17005 | } | |
17006 | ||
17007 | template<typename _RandomAccessIterator, typename _Pointer> | |
17008 | void | |
17009 | __merge_sort_with_buffer(_RandomAccessIterator __first, | |
17010 | _RandomAccessIterator __last, | |
17011 | _Pointer __buffer) | |
17012 | { | |
17013 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
17014 | _Distance; | |
17015 | ||
17016 | const _Distance __len = __last - __first; | |
17017 | const _Pointer __buffer_last = __buffer + __len; | |
17018 | ||
17019 | _Distance __step_size = _S_chunk_size; | |
17020 | std::__chunk_insertion_sort(__first, __last, __step_size); | |
17021 | ||
17022 | while (__step_size < __len) | |
17023 | { | |
17024 | std::__merge_sort_loop(__first, __last, __buffer, __step_size); | |
17025 | __step_size *= 2; | |
17026 | std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); | |
17027 | __step_size *= 2; | |
17028 | } | |
17029 | } | |
17030 | ||
17031 | template<typename _RandomAccessIterator, typename _Pointer, typename _Compare> | |
17032 | void | |
17033 | __merge_sort_with_buffer(_RandomAccessIterator __first, | |
17034 | _RandomAccessIterator __last, | |
17035 | _Pointer __buffer, _Compare __comp) | |
17036 | { | |
17037 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
17038 | _Distance; | |
17039 | ||
17040 | const _Distance __len = __last - __first; | |
17041 | const _Pointer __buffer_last = __buffer + __len; | |
17042 | ||
17043 | _Distance __step_size = _S_chunk_size; | |
17044 | std::__chunk_insertion_sort(__first, __last, __step_size, __comp); | |
17045 | ||
17046 | while (__step_size < __len) | |
17047 | { | |
17048 | std::__merge_sort_loop(__first, __last, __buffer, | |
17049 | __step_size, __comp); | |
17050 | __step_size *= 2; | |
17051 | std::__merge_sort_loop(__buffer, __buffer_last, __first, | |
17052 | __step_size, __comp); | |
17053 | __step_size *= 2; | |
17054 | } | |
17055 | } | |
17056 | ||
17057 | ||
17058 | ||
17059 | ||
17060 | ||
17061 | ||
17062 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
17063 | typename _BidirectionalIterator3> | |
17064 | _BidirectionalIterator3 | |
17065 | __merge_backward(_BidirectionalIterator1 __first1, | |
17066 | _BidirectionalIterator1 __last1, | |
17067 | _BidirectionalIterator2 __first2, | |
17068 | _BidirectionalIterator2 __last2, | |
17069 | _BidirectionalIterator3 __result) | |
17070 | { | |
17071 | if (__first1 == __last1) | |
17072 | return std::copy_backward(__first2, __last2, __result); | |
17073 | if (__first2 == __last2) | |
17074 | return std::copy_backward(__first1, __last1, __result); | |
17075 | --__last1; | |
17076 | --__last2; | |
17077 | while (true) | |
17078 | { | |
17079 | if (*__last2 < *__last1) | |
17080 | { | |
17081 | *--__result = *__last1; | |
17082 | if (__first1 == __last1) | |
17083 | return std::copy_backward(__first2, ++__last2, __result); | |
17084 | --__last1; | |
17085 | } | |
17086 | else | |
17087 | { | |
17088 | *--__result = *__last2; | |
17089 | if (__first2 == __last2) | |
17090 | return std::copy_backward(__first1, ++__last1, __result); | |
17091 | --__last2; | |
17092 | } | |
17093 | } | |
17094 | } | |
17095 | ||
17096 | ||
17097 | ||
17098 | ||
17099 | ||
17100 | ||
17101 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
17102 | typename _BidirectionalIterator3, typename _Compare> | |
17103 | _BidirectionalIterator3 | |
17104 | __merge_backward(_BidirectionalIterator1 __first1, | |
17105 | _BidirectionalIterator1 __last1, | |
17106 | _BidirectionalIterator2 __first2, | |
17107 | _BidirectionalIterator2 __last2, | |
17108 | _BidirectionalIterator3 __result, | |
17109 | _Compare __comp) | |
17110 | { | |
17111 | if (__first1 == __last1) | |
17112 | return std::copy_backward(__first2, __last2, __result); | |
17113 | if (__first2 == __last2) | |
17114 | return std::copy_backward(__first1, __last1, __result); | |
17115 | --__last1; | |
17116 | --__last2; | |
17117 | while (true) | |
17118 | { | |
17119 | if (__comp(*__last2, *__last1)) | |
17120 | { | |
17121 | *--__result = *__last1; | |
17122 | if (__first1 == __last1) | |
17123 | return std::copy_backward(__first2, ++__last2, __result); | |
17124 | --__last1; | |
17125 | } | |
17126 | else | |
17127 | { | |
17128 | *--__result = *__last2; | |
17129 | if (__first2 == __last2) | |
17130 | return std::copy_backward(__first1, ++__last1, __result); | |
17131 | --__last2; | |
17132 | } | |
17133 | } | |
17134 | } | |
17135 | ||
17136 | ||
17137 | ||
17138 | ||
17139 | ||
17140 | ||
17141 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
17142 | typename _Distance> | |
17143 | _BidirectionalIterator1 | |
17144 | __rotate_adaptive(_BidirectionalIterator1 __first, | |
17145 | _BidirectionalIterator1 __middle, | |
17146 | _BidirectionalIterator1 __last, | |
17147 | _Distance __len1, _Distance __len2, | |
17148 | _BidirectionalIterator2 __buffer, | |
17149 | _Distance __buffer_size) | |
17150 | { | |
17151 | _BidirectionalIterator2 __buffer_end; | |
17152 | if (__len1 > __len2 && __len2 <= __buffer_size) | |
17153 | { | |
17154 | __buffer_end = std::copy(__middle, __last, __buffer); | |
17155 | std::copy_backward(__first, __middle, __last); | |
17156 | return std::copy(__buffer, __buffer_end, __first); | |
17157 | } | |
17158 | else if (__len1 <= __buffer_size) | |
17159 | { | |
17160 | __buffer_end = std::copy(__first, __middle, __buffer); | |
17161 | std::copy(__middle, __last, __first); | |
17162 | return std::copy_backward(__buffer, __buffer_end, __last); | |
17163 | } | |
17164 | else | |
17165 | { | |
17166 | std::rotate(__first, __middle, __last); | |
17167 | std::advance(__first, std::distance(__middle, __last)); | |
17168 | return __first; | |
17169 | } | |
17170 | } | |
17171 | ||
17172 | ||
17173 | ||
17174 | ||
17175 | ||
17176 | ||
17177 | template<typename _BidirectionalIterator, typename _Distance, | |
17178 | typename _Pointer> | |
17179 | void | |
17180 | __merge_adaptive(_BidirectionalIterator __first, | |
17181 | _BidirectionalIterator __middle, | |
17182 | _BidirectionalIterator __last, | |
17183 | _Distance __len1, _Distance __len2, | |
17184 | _Pointer __buffer, _Distance __buffer_size) | |
17185 | { | |
17186 | if (__len1 <= __len2 && __len1 <= __buffer_size) | |
17187 | { | |
17188 | _Pointer __buffer_end = std::copy(__first, __middle, __buffer); | |
17189 | std::merge(__buffer, __buffer_end, __middle, __last, __first); | |
17190 | } | |
17191 | else if (__len2 <= __buffer_size) | |
17192 | { | |
17193 | _Pointer __buffer_end = std::copy(__middle, __last, __buffer); | |
17194 | std::__merge_backward(__first, __middle, __buffer, | |
17195 | __buffer_end, __last); | |
17196 | } | |
17197 | else | |
17198 | { | |
17199 | _BidirectionalIterator __first_cut = __first; | |
17200 | _BidirectionalIterator __second_cut = __middle; | |
17201 | _Distance __len11 = 0; | |
17202 | _Distance __len22 = 0; | |
17203 | if (__len1 > __len2) | |
17204 | { | |
17205 | __len11 = __len1 / 2; | |
17206 | std::advance(__first_cut, __len11); | |
17207 | __second_cut = std::lower_bound(__middle, __last, | |
17208 | *__first_cut); | |
17209 | __len22 = std::distance(__middle, __second_cut); | |
17210 | } | |
17211 | else | |
17212 | { | |
17213 | __len22 = __len2 / 2; | |
17214 | std::advance(__second_cut, __len22); | |
17215 | __first_cut = std::upper_bound(__first, __middle, | |
17216 | *__second_cut); | |
17217 | __len11 = std::distance(__first, __first_cut); | |
17218 | } | |
17219 | _BidirectionalIterator __new_middle = | |
17220 | std::__rotate_adaptive(__first_cut, __middle, __second_cut, | |
17221 | __len1 - __len11, __len22, __buffer, | |
17222 | __buffer_size); | |
17223 | std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, | |
17224 | __len22, __buffer, __buffer_size); | |
17225 | std::__merge_adaptive(__new_middle, __second_cut, __last, | |
17226 | __len1 - __len11, | |
17227 | __len2 - __len22, __buffer, __buffer_size); | |
17228 | } | |
17229 | } | |
17230 | ||
17231 | ||
17232 | ||
17233 | ||
17234 | ||
17235 | ||
17236 | template<typename _BidirectionalIterator, typename _Distance, typename _Pointer, | |
17237 | typename _Compare> | |
17238 | void | |
17239 | __merge_adaptive(_BidirectionalIterator __first, | |
17240 | _BidirectionalIterator __middle, | |
17241 | _BidirectionalIterator __last, | |
17242 | _Distance __len1, _Distance __len2, | |
17243 | _Pointer __buffer, _Distance __buffer_size, | |
17244 | _Compare __comp) | |
17245 | { | |
17246 | if (__len1 <= __len2 && __len1 <= __buffer_size) | |
17247 | { | |
17248 | _Pointer __buffer_end = std::copy(__first, __middle, __buffer); | |
17249 | std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp); | |
17250 | } | |
17251 | else if (__len2 <= __buffer_size) | |
17252 | { | |
17253 | _Pointer __buffer_end = std::copy(__middle, __last, __buffer); | |
17254 | std::__merge_backward(__first, __middle, __buffer, __buffer_end, | |
17255 | __last, __comp); | |
17256 | } | |
17257 | else | |
17258 | { | |
17259 | _BidirectionalIterator __first_cut = __first; | |
17260 | _BidirectionalIterator __second_cut = __middle; | |
17261 | _Distance __len11 = 0; | |
17262 | _Distance __len22 = 0; | |
17263 | if (__len1 > __len2) | |
17264 | { | |
17265 | __len11 = __len1 / 2; | |
17266 | std::advance(__first_cut, __len11); | |
17267 | __second_cut = std::lower_bound(__middle, __last, *__first_cut, | |
17268 | __comp); | |
17269 | __len22 = std::distance(__middle, __second_cut); | |
17270 | } | |
17271 | else | |
17272 | { | |
17273 | __len22 = __len2 / 2; | |
17274 | std::advance(__second_cut, __len22); | |
17275 | __first_cut = std::upper_bound(__first, __middle, *__second_cut, | |
17276 | __comp); | |
17277 | __len11 = std::distance(__first, __first_cut); | |
17278 | } | |
17279 | _BidirectionalIterator __new_middle = | |
17280 | std::__rotate_adaptive(__first_cut, __middle, __second_cut, | |
17281 | __len1 - __len11, __len22, __buffer, | |
17282 | __buffer_size); | |
17283 | std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, | |
17284 | __len22, __buffer, __buffer_size, __comp); | |
17285 | std::__merge_adaptive(__new_middle, __second_cut, __last, | |
17286 | __len1 - __len11, | |
17287 | __len2 - __len22, __buffer, | |
17288 | __buffer_size, __comp); | |
17289 | } | |
17290 | } | |
17291 | # 3595 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17292 | template<typename _BidirectionalIterator> | |
17293 | void | |
17294 | inplace_merge(_BidirectionalIterator __first, | |
17295 | _BidirectionalIterator __middle, | |
17296 | _BidirectionalIterator __last) | |
17297 | { | |
17298 | typedef typename iterator_traits<_BidirectionalIterator>::value_type | |
17299 | _ValueType; | |
17300 | typedef typename iterator_traits<_BidirectionalIterator>::difference_type | |
17301 | _DistanceType; | |
17302 | ||
17303 | ||
17304 | ||
17305 | ||
17306 | ||
17307 | ; | |
17308 | ; | |
17309 | ||
17310 | if (__first == __middle || __middle == __last) | |
17311 | return; | |
17312 | ||
17313 | _DistanceType __len1 = std::distance(__first, __middle); | |
17314 | _DistanceType __len2 = std::distance(__middle, __last); | |
17315 | ||
17316 | _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, | |
17317 | __last); | |
17318 | if (__buf.begin() == 0) | |
17319 | std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); | |
17320 | else | |
17321 | std::__merge_adaptive(__first, __middle, __last, __len1, __len2, | |
17322 | __buf.begin(), _DistanceType(__buf.size())); | |
17323 | } | |
17324 | # 3649 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17325 | template<typename _BidirectionalIterator, typename _Compare> | |
17326 | void | |
17327 | inplace_merge(_BidirectionalIterator __first, | |
17328 | _BidirectionalIterator __middle, | |
17329 | _BidirectionalIterator __last, | |
17330 | _Compare __comp) | |
17331 | { | |
17332 | typedef typename iterator_traits<_BidirectionalIterator>::value_type | |
17333 | _ValueType; | |
17334 | typedef typename iterator_traits<_BidirectionalIterator>::difference_type | |
17335 | _DistanceType; | |
17336 | ||
17337 | ||
17338 | ||
17339 | ||
17340 | ||
17341 | ||
17342 | ; | |
17343 | ; | |
17344 | ||
17345 | if (__first == __middle || __middle == __last) | |
17346 | return; | |
17347 | ||
17348 | const _DistanceType __len1 = std::distance(__first, __middle); | |
17349 | const _DistanceType __len2 = std::distance(__middle, __last); | |
17350 | ||
17351 | _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, | |
17352 | __last); | |
17353 | if (__buf.begin() == 0) | |
17354 | std::__merge_without_buffer(__first, __middle, __last, __len1, | |
17355 | __len2, __comp); | |
17356 | else | |
17357 | std::__merge_adaptive(__first, __middle, __last, __len1, __len2, | |
17358 | __buf.begin(), _DistanceType(__buf.size()), | |
17359 | __comp); | |
17360 | } | |
17361 | ||
17362 | template<typename _RandomAccessIterator, typename _Pointer, | |
17363 | typename _Distance> | |
17364 | void | |
17365 | __stable_sort_adaptive(_RandomAccessIterator __first, | |
17366 | _RandomAccessIterator __last, | |
17367 | _Pointer __buffer, _Distance __buffer_size) | |
17368 | { | |
17369 | const _Distance __len = (__last - __first + 1) / 2; | |
17370 | const _RandomAccessIterator __middle = __first + __len; | |
17371 | if (__len > __buffer_size) | |
17372 | { | |
17373 | std::__stable_sort_adaptive(__first, __middle, | |
17374 | __buffer, __buffer_size); | |
17375 | std::__stable_sort_adaptive(__middle, __last, | |
17376 | __buffer, __buffer_size); | |
17377 | } | |
17378 | else | |
17379 | { | |
17380 | std::__merge_sort_with_buffer(__first, __middle, __buffer); | |
17381 | std::__merge_sort_with_buffer(__middle, __last, __buffer); | |
17382 | } | |
17383 | std::__merge_adaptive(__first, __middle, __last, | |
17384 | _Distance(__middle - __first), | |
17385 | _Distance(__last - __middle), | |
17386 | __buffer, __buffer_size); | |
17387 | } | |
17388 | ||
17389 | template<typename _RandomAccessIterator, typename _Pointer, | |
17390 | typename _Distance, typename _Compare> | |
17391 | void | |
17392 | __stable_sort_adaptive(_RandomAccessIterator __first, | |
17393 | _RandomAccessIterator __last, | |
17394 | _Pointer __buffer, _Distance __buffer_size, | |
17395 | _Compare __comp) | |
17396 | { | |
17397 | const _Distance __len = (__last - __first + 1) / 2; | |
17398 | const _RandomAccessIterator __middle = __first + __len; | |
17399 | if (__len > __buffer_size) | |
17400 | { | |
17401 | std::__stable_sort_adaptive(__first, __middle, __buffer, | |
17402 | __buffer_size, __comp); | |
17403 | std::__stable_sort_adaptive(__middle, __last, __buffer, | |
17404 | __buffer_size, __comp); | |
17405 | } | |
17406 | else | |
17407 | { | |
17408 | std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); | |
17409 | std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); | |
17410 | } | |
17411 | std::__merge_adaptive(__first, __middle, __last, | |
17412 | _Distance(__middle - __first), | |
17413 | _Distance(__last - __middle), | |
17414 | __buffer, __buffer_size, | |
17415 | __comp); | |
17416 | } | |
17417 | # 3758 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17418 | template<typename _RandomAccessIterator> | |
17419 | inline void | |
17420 | stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
17421 | { | |
17422 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
17423 | _ValueType; | |
17424 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
17425 | _DistanceType; | |
17426 | ||
17427 | ||
17428 | ||
17429 | ||
17430 | ||
17431 | ; | |
17432 | ||
17433 | _Temporary_buffer<_RandomAccessIterator, _ValueType> | |
17434 | buf(__first, __last); | |
17435 | if (buf.begin() == 0) | |
17436 | std::__inplace_stable_sort(__first, __last); | |
17437 | else | |
17438 | std::__stable_sort_adaptive(__first, __last, buf.begin(), | |
17439 | _DistanceType(buf.size())); | |
17440 | } | |
17441 | # 3799 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17442 | template<typename _RandomAccessIterator, typename _Compare> | |
17443 | inline void | |
17444 | stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
17445 | _Compare __comp) | |
17446 | { | |
17447 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
17448 | _ValueType; | |
17449 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
17450 | _DistanceType; | |
17451 | ||
17452 | ||
17453 | ||
17454 | ||
17455 | ||
17456 | ||
17457 | ||
17458 | ; | |
17459 | ||
17460 | _Temporary_buffer<_RandomAccessIterator, _ValueType> buf(__first, __last); | |
17461 | if (buf.begin() == 0) | |
17462 | std::__inplace_stable_sort(__first, __last, __comp); | |
17463 | else | |
17464 | std::__stable_sort_adaptive(__first, __last, buf.begin(), | |
17465 | _DistanceType(buf.size()), __comp); | |
17466 | } | |
17467 | # 3840 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17468 | template<typename _RandomAccessIterator> | |
17469 | void | |
17470 | nth_element(_RandomAccessIterator __first, | |
17471 | _RandomAccessIterator __nth, | |
17472 | _RandomAccessIterator __last) | |
17473 | { | |
17474 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
17475 | _ValueType; | |
17476 | ||
17477 | ||
17478 | ||
17479 | ||
17480 | ||
17481 | ; | |
17482 | ; | |
17483 | ||
17484 | while (__last - __first > 3) | |
17485 | { | |
17486 | _RandomAccessIterator __cut = | |
17487 | std::__unguarded_partition(__first, __last, | |
17488 | _ValueType(std::__median(*__first, | |
17489 | *(__first | |
17490 | + (__last | |
17491 | - __first) | |
17492 | / 2), | |
17493 | *(__last | |
17494 | - 1)))); | |
17495 | if (__cut <= __nth) | |
17496 | __first = __cut; | |
17497 | else | |
17498 | __last = __cut; | |
17499 | } | |
17500 | std::__insertion_sort(__first, __last); | |
17501 | } | |
17502 | # 3891 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17503 | template<typename _RandomAccessIterator, typename _Compare> | |
17504 | void | |
17505 | nth_element(_RandomAccessIterator __first, | |
17506 | _RandomAccessIterator __nth, | |
17507 | _RandomAccessIterator __last, | |
17508 | _Compare __comp) | |
17509 | { | |
17510 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
17511 | _ValueType; | |
17512 | ||
17513 | ||
17514 | ||
17515 | ||
17516 | ||
17517 | ||
17518 | ; | |
17519 | ; | |
17520 | ||
17521 | while (__last - __first > 3) | |
17522 | { | |
17523 | _RandomAccessIterator __cut = | |
17524 | std::__unguarded_partition(__first, __last, | |
17525 | _ValueType(std::__median(*__first, | |
17526 | *(__first | |
17527 | + (__last | |
17528 | - __first) | |
17529 | / 2), | |
17530 | *(__last - 1), | |
17531 | __comp)), __comp); | |
17532 | if (__cut <= __nth) | |
17533 | __first = __cut; | |
17534 | else | |
17535 | __last = __cut; | |
17536 | } | |
17537 | std::__insertion_sort(__first, __last, __comp); | |
17538 | } | |
17539 | # 3944 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17540 | template<typename _ForwardIterator, typename _Tp> | |
17541 | pair<_ForwardIterator, _ForwardIterator> | |
17542 | equal_range(_ForwardIterator __first, _ForwardIterator __last, | |
17543 | const _Tp& __val) | |
17544 | { | |
17545 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
17546 | _ValueType; | |
17547 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
17548 | _DistanceType; | |
17549 | ||
17550 | ||
17551 | ||
17552 | ||
17553 | ||
17554 | ||
17555 | ; | |
17556 | ||
17557 | _DistanceType __len = std::distance(__first, __last); | |
17558 | _DistanceType __half; | |
17559 | _ForwardIterator __middle, __left, __right; | |
17560 | ||
17561 | while (__len > 0) | |
17562 | { | |
17563 | __half = __len >> 1; | |
17564 | __middle = __first; | |
17565 | std::advance(__middle, __half); | |
17566 | if (*__middle < __val) | |
17567 | { | |
17568 | __first = __middle; | |
17569 | ++__first; | |
17570 | __len = __len - __half - 1; | |
17571 | } | |
17572 | else if (__val < *__middle) | |
17573 | __len = __half; | |
17574 | else | |
17575 | { | |
17576 | __left = std::lower_bound(__first, __middle, __val); | |
17577 | std::advance(__first, __len); | |
17578 | __right = std::upper_bound(++__middle, __first, __val); | |
17579 | return pair<_ForwardIterator, _ForwardIterator>(__left, __right); | |
17580 | } | |
17581 | } | |
17582 | return pair<_ForwardIterator, _ForwardIterator>(__first, __first); | |
17583 | } | |
17584 | # 4006 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17585 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
17586 | pair<_ForwardIterator, _ForwardIterator> | |
17587 | equal_range(_ForwardIterator __first, _ForwardIterator __last, | |
17588 | const _Tp& __val, | |
17589 | _Compare __comp) | |
17590 | { | |
17591 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
17592 | _ValueType; | |
17593 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
17594 | _DistanceType; | |
17595 | ||
17596 | ||
17597 | ||
17598 | ||
17599 | ||
17600 | ||
17601 | ||
17602 | ; | |
17603 | ||
17604 | _DistanceType __len = std::distance(__first, __last); | |
17605 | _DistanceType __half; | |
17606 | _ForwardIterator __middle, __left, __right; | |
17607 | ||
17608 | while (__len > 0) | |
17609 | { | |
17610 | __half = __len >> 1; | |
17611 | __middle = __first; | |
17612 | std::advance(__middle, __half); | |
17613 | if (__comp(*__middle, __val)) | |
17614 | { | |
17615 | __first = __middle; | |
17616 | ++__first; | |
17617 | __len = __len - __half - 1; | |
17618 | } | |
17619 | else if (__comp(__val, *__middle)) | |
17620 | __len = __half; | |
17621 | else | |
17622 | { | |
17623 | __left = std::lower_bound(__first, __middle, __val, __comp); | |
17624 | std::advance(__first, __len); | |
17625 | __right = std::upper_bound(++__middle, __first, __val, __comp); | |
17626 | return pair<_ForwardIterator, _ForwardIterator>(__left, __right); | |
17627 | } | |
17628 | } | |
17629 | return pair<_ForwardIterator, _ForwardIterator>(__first, __first); | |
17630 | } | |
17631 | # 4064 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17632 | template<typename _ForwardIterator, typename _Tp> | |
17633 | bool | |
17634 | binary_search(_ForwardIterator __first, _ForwardIterator __last, | |
17635 | const _Tp& __val) | |
17636 | { | |
17637 | ||
17638 | ||
17639 | ||
17640 | ||
17641 | ||
17642 | ||
17643 | ; | |
17644 | ||
17645 | _ForwardIterator __i = std::lower_bound(__first, __last, __val); | |
17646 | return __i != __last && !(__val < *__i); | |
17647 | } | |
17648 | # 4096 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17649 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
17650 | bool | |
17651 | binary_search(_ForwardIterator __first, _ForwardIterator __last, | |
17652 | const _Tp& __val, _Compare __comp) | |
17653 | { | |
17654 | ||
17655 | ||
17656 | ||
17657 | ||
17658 | ||
17659 | ||
17660 | ; | |
17661 | ||
17662 | _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); | |
17663 | return __i != __last && !__comp(__val, *__i); | |
17664 | } | |
17665 | # 4134 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17666 | template<typename _InputIterator1, typename _InputIterator2> | |
17667 | bool | |
17668 | includes(_InputIterator1 __first1, _InputIterator1 __last1, | |
17669 | _InputIterator2 __first2, _InputIterator2 __last2) | |
17670 | { | |
17671 | ||
17672 | ||
17673 | ||
17674 | ||
17675 | ||
17676 | ||
17677 | ||
17678 | ||
17679 | ; | |
17680 | ; | |
17681 | ||
17682 | while (__first1 != __last1 && __first2 != __last2) | |
17683 | if (*__first2 < *__first1) | |
17684 | return false; | |
17685 | else if(*__first1 < *__first2) | |
17686 | ++__first1; | |
17687 | else | |
17688 | ++__first1, ++__first2; | |
17689 | ||
17690 | return __first2 == __last2; | |
17691 | } | |
17692 | # 4180 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17693 | template<typename _InputIterator1, typename _InputIterator2, | |
17694 | typename _Compare> | |
17695 | bool | |
17696 | includes(_InputIterator1 __first1, _InputIterator1 __last1, | |
17697 | _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) | |
17698 | { | |
17699 | ||
17700 | ||
17701 | ||
17702 | ||
17703 | ||
17704 | ||
17705 | ||
17706 | ||
17707 | ||
17708 | ; | |
17709 | ; | |
17710 | ||
17711 | while (__first1 != __last1 && __first2 != __last2) | |
17712 | if (__comp(*__first2, *__first1)) | |
17713 | return false; | |
17714 | else if(__comp(*__first1, *__first2)) | |
17715 | ++__first1; | |
17716 | else | |
17717 | ++__first1, ++__first2; | |
17718 | ||
17719 | return __first2 == __last2; | |
17720 | } | |
17721 | # 4226 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17722 | template<typename _InputIterator1, typename _InputIterator2, | |
17723 | typename _OutputIterator> | |
17724 | _OutputIterator | |
17725 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, | |
17726 | _InputIterator2 __first2, _InputIterator2 __last2, | |
17727 | _OutputIterator __result) | |
17728 | { | |
17729 | ||
17730 | ||
17731 | ||
17732 | ||
17733 | ||
17734 | ||
17735 | ||
17736 | ||
17737 | ||
17738 | ||
17739 | ; | |
17740 | ; | |
17741 | ||
17742 | while (__first1 != __last1 && __first2 != __last2) | |
17743 | { | |
17744 | if (*__first1 < *__first2) | |
17745 | { | |
17746 | *__result = *__first1; | |
17747 | ++__first1; | |
17748 | } | |
17749 | else if (*__first2 < *__first1) | |
17750 | { | |
17751 | *__result = *__first2; | |
17752 | ++__first2; | |
17753 | } | |
17754 | else | |
17755 | { | |
17756 | *__result = *__first1; | |
17757 | ++__first1; | |
17758 | ++__first2; | |
17759 | } | |
17760 | ++__result; | |
17761 | } | |
17762 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
17763 | __result)); | |
17764 | } | |
17765 | # 4288 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17766 | template<typename _InputIterator1, typename _InputIterator2, | |
17767 | typename _OutputIterator, typename _Compare> | |
17768 | _OutputIterator | |
17769 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, | |
17770 | _InputIterator2 __first2, _InputIterator2 __last2, | |
17771 | _OutputIterator __result, _Compare __comp) | |
17772 | { | |
17773 | ||
17774 | ||
17775 | ||
17776 | ||
17777 | ||
17778 | ||
17779 | ||
17780 | ||
17781 | ||
17782 | ||
17783 | ||
17784 | ; | |
17785 | ; | |
17786 | ||
17787 | while (__first1 != __last1 && __first2 != __last2) | |
17788 | { | |
17789 | if (__comp(*__first1, *__first2)) | |
17790 | { | |
17791 | *__result = *__first1; | |
17792 | ++__first1; | |
17793 | } | |
17794 | else if (__comp(*__first2, *__first1)) | |
17795 | { | |
17796 | *__result = *__first2; | |
17797 | ++__first2; | |
17798 | } | |
17799 | else | |
17800 | { | |
17801 | *__result = *__first1; | |
17802 | ++__first1; | |
17803 | ++__first2; | |
17804 | } | |
17805 | ++__result; | |
17806 | } | |
17807 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
17808 | __result)); | |
17809 | } | |
17810 | # 4349 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17811 | template<typename _InputIterator1, typename _InputIterator2, | |
17812 | typename _OutputIterator> | |
17813 | _OutputIterator | |
17814 | set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, | |
17815 | _InputIterator2 __first2, _InputIterator2 __last2, | |
17816 | _OutputIterator __result) | |
17817 | { | |
17818 | ||
17819 | ||
17820 | ||
17821 | ||
17822 | ||
17823 | ||
17824 | ||
17825 | ||
17826 | ||
17827 | ||
17828 | ; | |
17829 | ; | |
17830 | ||
17831 | while (__first1 != __last1 && __first2 != __last2) | |
17832 | if (*__first1 < *__first2) | |
17833 | ++__first1; | |
17834 | else if (*__first2 < *__first1) | |
17835 | ++__first2; | |
17836 | else | |
17837 | { | |
17838 | *__result = *__first1; | |
17839 | ++__first1; | |
17840 | ++__first2; | |
17841 | ++__result; | |
17842 | } | |
17843 | return __result; | |
17844 | } | |
17845 | # 4403 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17846 | template<typename _InputIterator1, typename _InputIterator2, | |
17847 | typename _OutputIterator, typename _Compare> | |
17848 | _OutputIterator | |
17849 | set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, | |
17850 | _InputIterator2 __first2, _InputIterator2 __last2, | |
17851 | _OutputIterator __result, _Compare __comp) | |
17852 | { | |
17853 | ||
17854 | ||
17855 | ||
17856 | ||
17857 | ||
17858 | ||
17859 | ||
17860 | ||
17861 | ||
17862 | ||
17863 | ||
17864 | ; | |
17865 | ; | |
17866 | ||
17867 | while (__first1 != __last1 && __first2 != __last2) | |
17868 | if (__comp(*__first1, *__first2)) | |
17869 | ++__first1; | |
17870 | else if (__comp(*__first2, *__first1)) | |
17871 | ++__first2; | |
17872 | else | |
17873 | { | |
17874 | *__result = *__first1; | |
17875 | ++__first1; | |
17876 | ++__first2; | |
17877 | ++__result; | |
17878 | } | |
17879 | return __result; | |
17880 | } | |
17881 | # 4457 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17882 | template<typename _InputIterator1, typename _InputIterator2, | |
17883 | typename _OutputIterator> | |
17884 | _OutputIterator | |
17885 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
17886 | _InputIterator2 __first2, _InputIterator2 __last2, | |
17887 | _OutputIterator __result) | |
17888 | { | |
17889 | ||
17890 | ||
17891 | ||
17892 | ||
17893 | ||
17894 | ||
17895 | ||
17896 | ||
17897 | ||
17898 | ||
17899 | ; | |
17900 | ; | |
17901 | ||
17902 | while (__first1 != __last1 && __first2 != __last2) | |
17903 | if (*__first1 < *__first2) | |
17904 | { | |
17905 | *__result = *__first1; | |
17906 | ++__first1; | |
17907 | ++__result; | |
17908 | } | |
17909 | else if (*__first2 < *__first1) | |
17910 | ++__first2; | |
17911 | else | |
17912 | { | |
17913 | ++__first1; | |
17914 | ++__first2; | |
17915 | } | |
17916 | return std::copy(__first1, __last1, __result); | |
17917 | } | |
17918 | # 4515 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17919 | template<typename _InputIterator1, typename _InputIterator2, | |
17920 | typename _OutputIterator, typename _Compare> | |
17921 | _OutputIterator | |
17922 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
17923 | _InputIterator2 __first2, _InputIterator2 __last2, | |
17924 | _OutputIterator __result, _Compare __comp) | |
17925 | { | |
17926 | ||
17927 | ||
17928 | ||
17929 | ||
17930 | ||
17931 | ||
17932 | ||
17933 | ||
17934 | ||
17935 | ||
17936 | ||
17937 | ; | |
17938 | ; | |
17939 | ||
17940 | while (__first1 != __last1 && __first2 != __last2) | |
17941 | if (__comp(*__first1, *__first2)) | |
17942 | { | |
17943 | *__result = *__first1; | |
17944 | ++__first1; | |
17945 | ++__result; | |
17946 | } | |
17947 | else if (__comp(*__first2, *__first1)) | |
17948 | ++__first2; | |
17949 | else | |
17950 | { | |
17951 | ++__first1; | |
17952 | ++__first2; | |
17953 | } | |
17954 | return std::copy(__first1, __last1, __result); | |
17955 | } | |
17956 | # 4569 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17957 | template<typename _InputIterator1, typename _InputIterator2, | |
17958 | typename _OutputIterator> | |
17959 | _OutputIterator | |
17960 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
17961 | _InputIterator2 __first2, _InputIterator2 __last2, | |
17962 | _OutputIterator __result) | |
17963 | { | |
17964 | ||
17965 | ||
17966 | ||
17967 | ||
17968 | ||
17969 | ||
17970 | ||
17971 | ||
17972 | ||
17973 | ||
17974 | ; | |
17975 | ; | |
17976 | ||
17977 | while (__first1 != __last1 && __first2 != __last2) | |
17978 | if (*__first1 < *__first2) | |
17979 | { | |
17980 | *__result = *__first1; | |
17981 | ++__first1; | |
17982 | ++__result; | |
17983 | } | |
17984 | else if (*__first2 < *__first1) | |
17985 | { | |
17986 | *__result = *__first2; | |
17987 | ++__first2; | |
17988 | ++__result; | |
17989 | } | |
17990 | else | |
17991 | { | |
17992 | ++__first1; | |
17993 | ++__first2; | |
17994 | } | |
17995 | return std::copy(__first2, __last2, std::copy(__first1, | |
17996 | __last1, __result)); | |
17997 | } | |
17998 | # 4630 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
17999 | template<typename _InputIterator1, typename _InputIterator2, | |
18000 | typename _OutputIterator, typename _Compare> | |
18001 | _OutputIterator | |
18002 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
18003 | _InputIterator2 __first2, _InputIterator2 __last2, | |
18004 | _OutputIterator __result, | |
18005 | _Compare __comp) | |
18006 | { | |
18007 | ||
18008 | ||
18009 | ||
18010 | ||
18011 | ||
18012 | ||
18013 | ||
18014 | ||
18015 | ||
18016 | ||
18017 | ||
18018 | ; | |
18019 | ; | |
18020 | ||
18021 | while (__first1 != __last1 && __first2 != __last2) | |
18022 | if (__comp(*__first1, *__first2)) | |
18023 | { | |
18024 | *__result = *__first1; | |
18025 | ++__first1; | |
18026 | ++__result; | |
18027 | } | |
18028 | else if (__comp(*__first2, *__first1)) | |
18029 | { | |
18030 | *__result = *__first2; | |
18031 | ++__first2; | |
18032 | ++__result; | |
18033 | } | |
18034 | else | |
18035 | { | |
18036 | ++__first1; | |
18037 | ++__first2; | |
18038 | } | |
18039 | return std::copy(__first2, __last2, std::copy(__first1, | |
18040 | __last1, __result)); | |
18041 | } | |
18042 | # 4683 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18043 | template<typename _ForwardIterator> | |
18044 | _ForwardIterator | |
18045 | max_element(_ForwardIterator __first, _ForwardIterator __last) | |
18046 | { | |
18047 | ||
18048 | ||
18049 | ||
18050 | ||
18051 | ; | |
18052 | ||
18053 | if (__first == __last) | |
18054 | return __first; | |
18055 | _ForwardIterator __result = __first; | |
18056 | while (++__first != __last) | |
18057 | if (*__result < *__first) | |
18058 | __result = __first; | |
18059 | return __result; | |
18060 | } | |
18061 | # 4710 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18062 | template<typename _ForwardIterator, typename _Compare> | |
18063 | _ForwardIterator | |
18064 | max_element(_ForwardIterator __first, _ForwardIterator __last, | |
18065 | _Compare __comp) | |
18066 | { | |
18067 | ||
18068 | ||
18069 | ||
18070 | ||
18071 | ||
18072 | ; | |
18073 | ||
18074 | if (__first == __last) return __first; | |
18075 | _ForwardIterator __result = __first; | |
18076 | while (++__first != __last) | |
18077 | if (__comp(*__result, *__first)) __result = __first; | |
18078 | return __result; | |
18079 | } | |
18080 | ||
18081 | ||
18082 | ||
18083 | ||
18084 | ||
18085 | ||
18086 | ||
18087 | template<typename _ForwardIterator> | |
18088 | _ForwardIterator | |
18089 | min_element(_ForwardIterator __first, _ForwardIterator __last) | |
18090 | { | |
18091 | ||
18092 | ||
18093 | ||
18094 | ||
18095 | ; | |
18096 | ||
18097 | if (__first == __last) | |
18098 | return __first; | |
18099 | _ForwardIterator __result = __first; | |
18100 | while (++__first != __last) | |
18101 | if (*__first < *__result) | |
18102 | __result = __first; | |
18103 | return __result; | |
18104 | } | |
18105 | # 4762 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18106 | template<typename _ForwardIterator, typename _Compare> | |
18107 | _ForwardIterator | |
18108 | min_element(_ForwardIterator __first, _ForwardIterator __last, | |
18109 | _Compare __comp) | |
18110 | { | |
18111 | ||
18112 | ||
18113 | ||
18114 | ||
18115 | ||
18116 | ; | |
18117 | ||
18118 | if (__first == __last) | |
18119 | return __first; | |
18120 | _ForwardIterator __result = __first; | |
18121 | while (++__first != __last) | |
18122 | if (__comp(*__first, *__result)) | |
18123 | __result = __first; | |
18124 | return __result; | |
18125 | } | |
18126 | # 4797 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18127 | template<typename _BidirectionalIterator> | |
18128 | bool | |
18129 | next_permutation(_BidirectionalIterator __first, | |
18130 | _BidirectionalIterator __last) | |
18131 | { | |
18132 | ||
18133 | ||
18134 | ||
18135 | ||
18136 | ||
18137 | ; | |
18138 | ||
18139 | if (__first == __last) | |
18140 | return false; | |
18141 | _BidirectionalIterator __i = __first; | |
18142 | ++__i; | |
18143 | if (__i == __last) | |
18144 | return false; | |
18145 | __i = __last; | |
18146 | --__i; | |
18147 | ||
18148 | for(;;) | |
18149 | { | |
18150 | _BidirectionalIterator __ii = __i; | |
18151 | --__i; | |
18152 | if (*__i < *__ii) | |
18153 | { | |
18154 | _BidirectionalIterator __j = __last; | |
18155 | while (!(*__i < *--__j)) | |
18156 | {} | |
18157 | std::iter_swap(__i, __j); | |
18158 | std::reverse(__ii, __last); | |
18159 | return true; | |
18160 | } | |
18161 | if (__i == __first) | |
18162 | { | |
18163 | std::reverse(__first, __last); | |
18164 | return false; | |
18165 | } | |
18166 | } | |
18167 | } | |
18168 | # 4853 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18169 | template<typename _BidirectionalIterator, typename _Compare> | |
18170 | bool | |
18171 | next_permutation(_BidirectionalIterator __first, | |
18172 | _BidirectionalIterator __last, _Compare __comp) | |
18173 | { | |
18174 | ||
18175 | ||
18176 | ||
18177 | ||
18178 | ||
18179 | ||
18180 | ; | |
18181 | ||
18182 | if (__first == __last) | |
18183 | return false; | |
18184 | _BidirectionalIterator __i = __first; | |
18185 | ++__i; | |
18186 | if (__i == __last) | |
18187 | return false; | |
18188 | __i = __last; | |
18189 | --__i; | |
18190 | ||
18191 | for(;;) | |
18192 | { | |
18193 | _BidirectionalIterator __ii = __i; | |
18194 | --__i; | |
18195 | if (__comp(*__i, *__ii)) | |
18196 | { | |
18197 | _BidirectionalIterator __j = __last; | |
18198 | while (!__comp(*__i, *--__j)) | |
18199 | {} | |
18200 | std::iter_swap(__i, __j); | |
18201 | std::reverse(__ii, __last); | |
18202 | return true; | |
18203 | } | |
18204 | if (__i == __first) | |
18205 | { | |
18206 | std::reverse(__first, __last); | |
18207 | return false; | |
18208 | } | |
18209 | } | |
18210 | } | |
18211 | # 4908 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18212 | template<typename _BidirectionalIterator> | |
18213 | bool | |
18214 | prev_permutation(_BidirectionalIterator __first, | |
18215 | _BidirectionalIterator __last) | |
18216 | { | |
18217 | ||
18218 | ||
18219 | ||
18220 | ||
18221 | ||
18222 | ; | |
18223 | ||
18224 | if (__first == __last) | |
18225 | return false; | |
18226 | _BidirectionalIterator __i = __first; | |
18227 | ++__i; | |
18228 | if (__i == __last) | |
18229 | return false; | |
18230 | __i = __last; | |
18231 | --__i; | |
18232 | ||
18233 | for(;;) | |
18234 | { | |
18235 | _BidirectionalIterator __ii = __i; | |
18236 | --__i; | |
18237 | if (*__ii < *__i) | |
18238 | { | |
18239 | _BidirectionalIterator __j = __last; | |
18240 | while (!(*--__j < *__i)) | |
18241 | {} | |
18242 | std::iter_swap(__i, __j); | |
18243 | std::reverse(__ii, __last); | |
18244 | return true; | |
18245 | } | |
18246 | if (__i == __first) | |
18247 | { | |
18248 | std::reverse(__first, __last); | |
18249 | return false; | |
18250 | } | |
18251 | } | |
18252 | } | |
18253 | # 4964 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18254 | template<typename _BidirectionalIterator, typename _Compare> | |
18255 | bool | |
18256 | prev_permutation(_BidirectionalIterator __first, | |
18257 | _BidirectionalIterator __last, _Compare __comp) | |
18258 | { | |
18259 | ||
18260 | ||
18261 | ||
18262 | ||
18263 | ||
18264 | ||
18265 | ; | |
18266 | ||
18267 | if (__first == __last) | |
18268 | return false; | |
18269 | _BidirectionalIterator __i = __first; | |
18270 | ++__i; | |
18271 | if (__i == __last) | |
18272 | return false; | |
18273 | __i = __last; | |
18274 | --__i; | |
18275 | ||
18276 | for(;;) | |
18277 | { | |
18278 | _BidirectionalIterator __ii = __i; | |
18279 | --__i; | |
18280 | if (__comp(*__ii, *__i)) | |
18281 | { | |
18282 | _BidirectionalIterator __j = __last; | |
18283 | while (!__comp(*--__j, *__i)) | |
18284 | {} | |
18285 | std::iter_swap(__i, __j); | |
18286 | std::reverse(__ii, __last); | |
18287 | return true; | |
18288 | } | |
18289 | if (__i == __first) | |
18290 | { | |
18291 | std::reverse(__first, __last); | |
18292 | return false; | |
18293 | } | |
18294 | } | |
18295 | } | |
18296 | # 5023 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18297 | template<typename _InputIterator, typename _ForwardIterator> | |
18298 | _InputIterator | |
18299 | find_first_of(_InputIterator __first1, _InputIterator __last1, | |
18300 | _ForwardIterator __first2, _ForwardIterator __last2) | |
18301 | { | |
18302 | ||
18303 | ||
18304 | ||
18305 | ||
18306 | ||
18307 | ||
18308 | ; | |
18309 | ; | |
18310 | ||
18311 | for ( ; __first1 != __last1; ++__first1) | |
18312 | for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) | |
18313 | if (*__first1 == *__iter) | |
18314 | return __first1; | |
18315 | return __last1; | |
18316 | } | |
18317 | # 5059 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18318 | template<typename _InputIterator, typename _ForwardIterator, | |
18319 | typename _BinaryPredicate> | |
18320 | _InputIterator | |
18321 | find_first_of(_InputIterator __first1, _InputIterator __last1, | |
18322 | _ForwardIterator __first2, _ForwardIterator __last2, | |
18323 | _BinaryPredicate __comp) | |
18324 | { | |
18325 | ||
18326 | ||
18327 | ||
18328 | ||
18329 | ||
18330 | ||
18331 | ; | |
18332 | ; | |
18333 | ||
18334 | for ( ; __first1 != __last1; ++__first1) | |
18335 | for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) | |
18336 | if (__comp(*__first1, *__iter)) | |
18337 | return __first1; | |
18338 | return __last1; | |
18339 | } | |
18340 | # 5089 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18341 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
18342 | _ForwardIterator1 | |
18343 | __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
18344 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
18345 | forward_iterator_tag, forward_iterator_tag) | |
18346 | { | |
18347 | if (__first2 == __last2) | |
18348 | return __last1; | |
18349 | else | |
18350 | { | |
18351 | _ForwardIterator1 __result = __last1; | |
18352 | while (1) | |
18353 | { | |
18354 | _ForwardIterator1 __new_result | |
18355 | = std::search(__first1, __last1, __first2, __last2); | |
18356 | if (__new_result == __last1) | |
18357 | return __result; | |
18358 | else | |
18359 | { | |
18360 | __result = __new_result; | |
18361 | __first1 = __new_result; | |
18362 | ++__first1; | |
18363 | } | |
18364 | } | |
18365 | } | |
18366 | } | |
18367 | ||
18368 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
18369 | typename _BinaryPredicate> | |
18370 | _ForwardIterator1 | |
18371 | __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
18372 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
18373 | forward_iterator_tag, forward_iterator_tag, | |
18374 | _BinaryPredicate __comp) | |
18375 | { | |
18376 | if (__first2 == __last2) | |
18377 | return __last1; | |
18378 | else | |
18379 | { | |
18380 | _ForwardIterator1 __result = __last1; | |
18381 | while (1) | |
18382 | { | |
18383 | _ForwardIterator1 __new_result | |
18384 | = std::search(__first1, __last1, __first2, __last2, __comp); | |
18385 | if (__new_result == __last1) | |
18386 | return __result; | |
18387 | else | |
18388 | { | |
18389 | __result = __new_result; | |
18390 | __first1 = __new_result; | |
18391 | ++__first1; | |
18392 | } | |
18393 | } | |
18394 | } | |
18395 | } | |
18396 | ||
18397 | ||
18398 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2> | |
18399 | _BidirectionalIterator1 | |
18400 | __find_end(_BidirectionalIterator1 __first1, | |
18401 | _BidirectionalIterator1 __last1, | |
18402 | _BidirectionalIterator2 __first2, | |
18403 | _BidirectionalIterator2 __last2, | |
18404 | bidirectional_iterator_tag, bidirectional_iterator_tag) | |
18405 | { | |
18406 | ||
18407 | ||
18408 | ||
18409 | ||
18410 | ||
18411 | ||
18412 | typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; | |
18413 | typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; | |
18414 | ||
18415 | _RevIterator1 __rlast1(__first1); | |
18416 | _RevIterator2 __rlast2(__first2); | |
18417 | _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, | |
18418 | _RevIterator2(__last2), __rlast2); | |
18419 | ||
18420 | if (__rresult == __rlast1) | |
18421 | return __last1; | |
18422 | else | |
18423 | { | |
18424 | _BidirectionalIterator1 __result = __rresult.base(); | |
18425 | std::advance(__result, -std::distance(__first2, __last2)); | |
18426 | return __result; | |
18427 | } | |
18428 | } | |
18429 | ||
18430 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
18431 | typename _BinaryPredicate> | |
18432 | _BidirectionalIterator1 | |
18433 | __find_end(_BidirectionalIterator1 __first1, | |
18434 | _BidirectionalIterator1 __last1, | |
18435 | _BidirectionalIterator2 __first2, | |
18436 | _BidirectionalIterator2 __last2, | |
18437 | bidirectional_iterator_tag, bidirectional_iterator_tag, | |
18438 | _BinaryPredicate __comp) | |
18439 | { | |
18440 | ||
18441 | ||
18442 | ||
18443 | ||
18444 | ||
18445 | ||
18446 | typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; | |
18447 | typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; | |
18448 | ||
18449 | _RevIterator1 __rlast1(__first1); | |
18450 | _RevIterator2 __rlast2(__first2); | |
18451 | _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, | |
18452 | _RevIterator2(__last2), __rlast2, | |
18453 | __comp); | |
18454 | ||
18455 | if (__rresult == __rlast1) | |
18456 | return __last1; | |
18457 | else | |
18458 | { | |
18459 | _BidirectionalIterator1 __result = __rresult.base(); | |
18460 | std::advance(__result, -std::distance(__first2, __last2)); | |
18461 | return __result; | |
18462 | } | |
18463 | } | |
18464 | # 5239 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18465 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
18466 | inline _ForwardIterator1 | |
18467 | find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
18468 | _ForwardIterator2 __first2, _ForwardIterator2 __last2) | |
18469 | { | |
18470 | ||
18471 | ||
18472 | ||
18473 | ||
18474 | ||
18475 | ||
18476 | ; | |
18477 | ; | |
18478 | ||
18479 | return std::__find_end(__first1, __last1, __first2, __last2, | |
18480 | std::__iterator_category(__first1), | |
18481 | std::__iterator_category(__first2)); | |
18482 | } | |
18483 | # 5284 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/stl_algo.h" 3 | |
18484 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
18485 | typename _BinaryPredicate> | |
18486 | inline _ForwardIterator1 | |
18487 | find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
18488 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
18489 | _BinaryPredicate __comp) | |
18490 | { | |
18491 | ||
18492 | ||
18493 | ||
18494 | ||
18495 | ||
18496 | ||
18497 | ; | |
18498 | ; | |
18499 | ||
18500 | return std::__find_end(__first1, __last1, __first2, __last2, | |
18501 | std::__iterator_category(__first1), | |
18502 | std::__iterator_category(__first2), | |
18503 | __comp); | |
18504 | } | |
18505 | ||
18506 | } | |
18507 | # 70 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/algorithm" 2 3 | |
18508 | ||
18509 | #pragma GCC visibility pop | |
18510 | # 57 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 2 3 | |
18511 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.tcc" 1 3 | |
18512 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.tcc" 3 | |
18513 | ||
18514 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.tcc" 3 | |
18515 | ||
18516 | namespace std | |
18517 | { | |
18518 | template<typename _Type> | |
18519 | inline bool | |
18520 | __is_null_pointer(_Type* __ptr) | |
18521 | { return __ptr == 0; } | |
18522 | ||
18523 | template<typename _Type> | |
18524 | inline bool | |
18525 | __is_null_pointer(_Type) | |
18526 | { return false; } | |
18527 | ||
18528 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18529 | const typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
18530 | basic_string<_CharT, _Traits, _Alloc>:: | |
18531 | _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; | |
18532 | ||
18533 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18534 | const _CharT | |
18535 | basic_string<_CharT, _Traits, _Alloc>:: | |
18536 | _Rep::_S_terminal = _CharT(); | |
18537 | ||
18538 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18539 | const typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
18540 | basic_string<_CharT, _Traits, _Alloc>::npos; | |
18541 | ||
18542 | ||
18543 | ||
18544 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18545 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
18546 | basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ | |
18547 | (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / | |
18548 | sizeof(size_type)]; | |
18549 | ||
18550 | ||
18551 | ||
18552 | ||
18553 | ||
18554 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18555 | template<typename _InIterator> | |
18556 | _CharT* | |
18557 | basic_string<_CharT, _Traits, _Alloc>:: | |
18558 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
18559 | input_iterator_tag) | |
18560 | { | |
18561 | ||
18562 | if (__beg == __end && __a == _Alloc()) | |
18563 | return _S_empty_rep()._M_refdata(); | |
18564 | ||
18565 | ||
18566 | _CharT __buf[128]; | |
18567 | size_type __len = 0; | |
18568 | while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) | |
18569 | { | |
18570 | __buf[__len++] = *__beg; | |
18571 | ++__beg; | |
18572 | } | |
18573 | _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); | |
18574 | _M_copy(__r->_M_refdata(), __buf, __len); | |
18575 | try | |
18576 | { | |
18577 | while (__beg != __end) | |
18578 | { | |
18579 | if (__len == __r->_M_capacity) | |
18580 | { | |
18581 | ||
18582 | _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); | |
18583 | _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); | |
18584 | __r->_M_destroy(__a); | |
18585 | __r = __another; | |
18586 | } | |
18587 | __r->_M_refdata()[__len++] = *__beg; | |
18588 | ++__beg; | |
18589 | } | |
18590 | } | |
18591 | catch(...) | |
18592 | { | |
18593 | __r->_M_destroy(__a); | |
18594 | throw; | |
18595 | } | |
18596 | __r->_M_set_length_and_sharable(__len); | |
18597 | return __r->_M_refdata(); | |
18598 | } | |
18599 | ||
18600 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18601 | template <typename _InIterator> | |
18602 | _CharT* | |
18603 | basic_string<_CharT, _Traits, _Alloc>:: | |
18604 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
18605 | forward_iterator_tag) | |
18606 | { | |
18607 | ||
18608 | if (__beg == __end && __a == _Alloc()) | |
18609 | return _S_empty_rep()._M_refdata(); | |
18610 | ||
18611 | ||
18612 | if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0)) | |
18613 | __throw_logic_error(("basic_string::_S_construct NULL not valid")); | |
18614 | ||
18615 | const size_type __dnew = static_cast<size_type>(std::distance(__beg, | |
18616 | __end)); | |
18617 | ||
18618 | _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); | |
18619 | try | |
18620 | { _S_copy_chars(__r->_M_refdata(), __beg, __end); } | |
18621 | catch(...) | |
18622 | { | |
18623 | __r->_M_destroy(__a); | |
18624 | throw; | |
18625 | } | |
18626 | __r->_M_set_length_and_sharable(__dnew); | |
18627 | return __r->_M_refdata(); | |
18628 | } | |
18629 | ||
18630 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18631 | _CharT* | |
18632 | basic_string<_CharT, _Traits, _Alloc>:: | |
18633 | _S_construct(size_type __n, _CharT __c, const _Alloc& __a) | |
18634 | { | |
18635 | ||
18636 | if (__n == 0 && __a == _Alloc()) | |
18637 | return _S_empty_rep()._M_refdata(); | |
18638 | ||
18639 | ||
18640 | _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); | |
18641 | if (__n) | |
18642 | _M_assign(__r->_M_refdata(), __n, __c); | |
18643 | ||
18644 | __r->_M_set_length_and_sharable(__n); | |
18645 | return __r->_M_refdata(); | |
18646 | } | |
18647 | ||
18648 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18649 | basic_string<_CharT, _Traits, _Alloc>:: | |
18650 | basic_string(const basic_string& __str) | |
18651 | : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), | |
18652 | __str.get_allocator()), | |
18653 | __str.get_allocator()) | |
18654 | { } | |
18655 | ||
18656 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18657 | basic_string<_CharT, _Traits, _Alloc>:: | |
18658 | basic_string(const _Alloc& __a) | |
18659 | : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) | |
18660 | { } | |
18661 | ||
18662 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18663 | basic_string<_CharT, _Traits, _Alloc>:: | |
18664 | basic_string(const basic_string& __str, size_type __pos, size_type __n) | |
18665 | : _M_dataplus(_S_construct(__str._M_data() | |
18666 | + __str._M_check(__pos, | |
18667 | "basic_string::basic_string"), | |
18668 | __str._M_data() + __str._M_limit(__pos, __n) | |
18669 | + __pos, _Alloc()), _Alloc()) | |
18670 | { } | |
18671 | ||
18672 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18673 | basic_string<_CharT, _Traits, _Alloc>:: | |
18674 | basic_string(const basic_string& __str, size_type __pos, | |
18675 | size_type __n, const _Alloc& __a) | |
18676 | : _M_dataplus(_S_construct(__str._M_data() | |
18677 | + __str._M_check(__pos, | |
18678 | "basic_string::basic_string"), | |
18679 | __str._M_data() + __str._M_limit(__pos, __n) | |
18680 | + __pos, __a), __a) | |
18681 | { } | |
18682 | ||
18683 | ||
18684 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18685 | basic_string<_CharT, _Traits, _Alloc>:: | |
18686 | basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) | |
18687 | : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) | |
18688 | { } | |
18689 | ||
18690 | ||
18691 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18692 | basic_string<_CharT, _Traits, _Alloc>:: | |
18693 | basic_string(const _CharT* __s, const _Alloc& __a) | |
18694 | : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : | |
18695 | __s + npos, __a), __a) | |
18696 | { } | |
18697 | ||
18698 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18699 | basic_string<_CharT, _Traits, _Alloc>:: | |
18700 | basic_string(size_type __n, _CharT __c, const _Alloc& __a) | |
18701 | : _M_dataplus(_S_construct(__n, __c, __a), __a) | |
18702 | { } | |
18703 | ||
18704 | ||
18705 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18706 | template<typename _InputIterator> | |
18707 | basic_string<_CharT, _Traits, _Alloc>:: | |
18708 | basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) | |
18709 | : _M_dataplus(_S_construct(__beg, __end, __a), __a) | |
18710 | { } | |
18711 | ||
18712 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18713 | basic_string<_CharT, _Traits, _Alloc>& | |
18714 | basic_string<_CharT, _Traits, _Alloc>:: | |
18715 | assign(const basic_string& __str) | |
18716 | { | |
18717 | if (_M_rep() != __str._M_rep()) | |
18718 | { | |
18719 | ||
18720 | const allocator_type __a = this->get_allocator(); | |
18721 | _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); | |
18722 | _M_rep()->_M_dispose(__a); | |
18723 | _M_data(__tmp); | |
18724 | } | |
18725 | return *this; | |
18726 | } | |
18727 | ||
18728 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18729 | basic_string<_CharT, _Traits, _Alloc>& | |
18730 | basic_string<_CharT, _Traits, _Alloc>:: | |
18731 | assign(const _CharT* __s, size_type __n) | |
18732 | { | |
18733 | ; | |
18734 | _M_check_length(this->size(), __n, "basic_string::assign"); | |
18735 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
18736 | return _M_replace_safe(size_type(0), this->size(), __s, __n); | |
18737 | else | |
18738 | { | |
18739 | ||
18740 | const size_type __pos = __s - _M_data(); | |
18741 | if (__pos >= __n) | |
18742 | _M_copy(_M_data(), __s, __n); | |
18743 | else if (__pos) | |
18744 | _M_move(_M_data(), __s, __n); | |
18745 | _M_rep()->_M_set_length_and_sharable(__n); | |
18746 | return *this; | |
18747 | } | |
18748 | } | |
18749 | ||
18750 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18751 | basic_string<_CharT, _Traits, _Alloc>& | |
18752 | basic_string<_CharT, _Traits, _Alloc>:: | |
18753 | append(size_type __n, _CharT __c) | |
18754 | { | |
18755 | if (__n) | |
18756 | { | |
18757 | _M_check_length(size_type(0), __n, "basic_string::append"); | |
18758 | const size_type __len = __n + this->size(); | |
18759 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
18760 | this->reserve(__len); | |
18761 | _M_assign(_M_data() + this->size(), __n, __c); | |
18762 | _M_rep()->_M_set_length_and_sharable(__len); | |
18763 | } | |
18764 | return *this; | |
18765 | } | |
18766 | ||
18767 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18768 | basic_string<_CharT, _Traits, _Alloc>& | |
18769 | basic_string<_CharT, _Traits, _Alloc>:: | |
18770 | append(const _CharT* __s, size_type __n) | |
18771 | { | |
18772 | ; | |
18773 | if (__n) | |
18774 | { | |
18775 | _M_check_length(size_type(0), __n, "basic_string::append"); | |
18776 | const size_type __len = __n + this->size(); | |
18777 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
18778 | { | |
18779 | if (_M_disjunct(__s)) | |
18780 | this->reserve(__len); | |
18781 | else | |
18782 | { | |
18783 | const size_type __off = __s - _M_data(); | |
18784 | this->reserve(__len); | |
18785 | __s = _M_data() + __off; | |
18786 | } | |
18787 | } | |
18788 | _M_copy(_M_data() + this->size(), __s, __n); | |
18789 | _M_rep()->_M_set_length_and_sharable(__len); | |
18790 | } | |
18791 | return *this; | |
18792 | } | |
18793 | ||
18794 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18795 | basic_string<_CharT, _Traits, _Alloc>& | |
18796 | basic_string<_CharT, _Traits, _Alloc>:: | |
18797 | append(const basic_string& __str) | |
18798 | { | |
18799 | const size_type __size = __str.size(); | |
18800 | if (__size) | |
18801 | { | |
18802 | const size_type __len = __size + this->size(); | |
18803 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
18804 | this->reserve(__len); | |
18805 | _M_copy(_M_data() + this->size(), __str._M_data(), __size); | |
18806 | _M_rep()->_M_set_length_and_sharable(__len); | |
18807 | } | |
18808 | return *this; | |
18809 | } | |
18810 | ||
18811 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18812 | basic_string<_CharT, _Traits, _Alloc>& | |
18813 | basic_string<_CharT, _Traits, _Alloc>:: | |
18814 | append(const basic_string& __str, size_type __pos, size_type __n) | |
18815 | { | |
18816 | __str._M_check(__pos, "basic_string::append"); | |
18817 | __n = __str._M_limit(__pos, __n); | |
18818 | if (__n) | |
18819 | { | |
18820 | const size_type __len = __n + this->size(); | |
18821 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
18822 | this->reserve(__len); | |
18823 | _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); | |
18824 | _M_rep()->_M_set_length_and_sharable(__len); | |
18825 | } | |
18826 | return *this; | |
18827 | } | |
18828 | ||
18829 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18830 | basic_string<_CharT, _Traits, _Alloc>& | |
18831 | basic_string<_CharT, _Traits, _Alloc>:: | |
18832 | insert(size_type __pos, const _CharT* __s, size_type __n) | |
18833 | { | |
18834 | ; | |
18835 | _M_check(__pos, "basic_string::insert"); | |
18836 | _M_check_length(size_type(0), __n, "basic_string::insert"); | |
18837 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
18838 | return _M_replace_safe(__pos, size_type(0), __s, __n); | |
18839 | else | |
18840 | { | |
18841 | ||
18842 | const size_type __off = __s - _M_data(); | |
18843 | _M_mutate(__pos, 0, __n); | |
18844 | __s = _M_data() + __off; | |
18845 | _CharT* __p = _M_data() + __pos; | |
18846 | if (__s + __n <= __p) | |
18847 | _M_copy(__p, __s, __n); | |
18848 | else if (__s >= __p) | |
18849 | _M_copy(__p, __s + __n, __n); | |
18850 | else | |
18851 | { | |
18852 | const size_type __nleft = __p - __s; | |
18853 | _M_copy(__p, __s, __nleft); | |
18854 | _M_copy(__p + __nleft, __p + __n, __n - __nleft); | |
18855 | } | |
18856 | return *this; | |
18857 | } | |
18858 | } | |
18859 | ||
18860 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18861 | basic_string<_CharT, _Traits, _Alloc>& | |
18862 | basic_string<_CharT, _Traits, _Alloc>:: | |
18863 | replace(size_type __pos, size_type __n1, const _CharT* __s, | |
18864 | size_type __n2) | |
18865 | { | |
18866 | ; | |
18867 | _M_check(__pos, "basic_string::replace"); | |
18868 | __n1 = _M_limit(__pos, __n1); | |
18869 | _M_check_length(__n1, __n2, "basic_string::replace"); | |
18870 | bool __left; | |
18871 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
18872 | return _M_replace_safe(__pos, __n1, __s, __n2); | |
18873 | else if ((__left = __s + __n2 <= _M_data() + __pos) | |
18874 | || _M_data() + __pos + __n1 <= __s) | |
18875 | { | |
18876 | ||
18877 | size_type __off = __s - _M_data(); | |
18878 | __left ? __off : (__off += __n2 - __n1); | |
18879 | _M_mutate(__pos, __n1, __n2); | |
18880 | _M_copy(_M_data() + __pos, _M_data() + __off, __n2); | |
18881 | return *this; | |
18882 | } | |
18883 | else | |
18884 | { | |
18885 | ||
18886 | const basic_string __tmp(__s, __n2); | |
18887 | return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); | |
18888 | } | |
18889 | } | |
18890 | ||
18891 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18892 | void | |
18893 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
18894 | _M_destroy(const _Alloc& __a) throw () | |
18895 | { | |
18896 | const size_type __size = sizeof(_Rep_base) + | |
18897 | (this->_M_capacity + 1) * sizeof(_CharT); | |
18898 | _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size); | |
18899 | } | |
18900 | ||
18901 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18902 | void | |
18903 | basic_string<_CharT, _Traits, _Alloc>:: | |
18904 | _M_leak_hard() | |
18905 | { | |
18906 | ||
18907 | if (_M_rep() == &_S_empty_rep()) | |
18908 | return; | |
18909 | ||
18910 | if (_M_rep()->_M_is_shared()) | |
18911 | _M_mutate(0, 0, 0); | |
18912 | _M_rep()->_M_set_leaked(); | |
18913 | } | |
18914 | ||
18915 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18916 | void | |
18917 | basic_string<_CharT, _Traits, _Alloc>:: | |
18918 | _M_mutate(size_type __pos, size_type __len1, size_type __len2) | |
18919 | { | |
18920 | const size_type __old_size = this->size(); | |
18921 | const size_type __new_size = __old_size + __len2 - __len1; | |
18922 | const size_type __how_much = __old_size - __pos - __len1; | |
18923 | ||
18924 | if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) | |
18925 | { | |
18926 | ||
18927 | const allocator_type __a = get_allocator(); | |
18928 | _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); | |
18929 | ||
18930 | if (__pos) | |
18931 | _M_copy(__r->_M_refdata(), _M_data(), __pos); | |
18932 | if (__how_much) | |
18933 | _M_copy(__r->_M_refdata() + __pos + __len2, | |
18934 | _M_data() + __pos + __len1, __how_much); | |
18935 | ||
18936 | _M_rep()->_M_dispose(__a); | |
18937 | _M_data(__r->_M_refdata()); | |
18938 | } | |
18939 | else if (__how_much && __len1 != __len2) | |
18940 | { | |
18941 | ||
18942 | _M_move(_M_data() + __pos + __len2, | |
18943 | _M_data() + __pos + __len1, __how_much); | |
18944 | } | |
18945 | _M_rep()->_M_set_length_and_sharable(__new_size); | |
18946 | } | |
18947 | ||
18948 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18949 | void | |
18950 | basic_string<_CharT, _Traits, _Alloc>:: | |
18951 | reserve(size_type __res) | |
18952 | { | |
18953 | if (__res != this->capacity() || _M_rep()->_M_is_shared()) | |
18954 | { | |
18955 | ||
18956 | if (__res < this->size()) | |
18957 | __res = this->size(); | |
18958 | const allocator_type __a = get_allocator(); | |
18959 | _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); | |
18960 | _M_rep()->_M_dispose(__a); | |
18961 | _M_data(__tmp); | |
18962 | } | |
18963 | } | |
18964 | ||
18965 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18966 | void | |
18967 | basic_string<_CharT, _Traits, _Alloc>:: | |
18968 | swap(basic_string& __s) | |
18969 | { | |
18970 | if (_M_rep()->_M_is_leaked()) | |
18971 | _M_rep()->_M_set_sharable(); | |
18972 | if (__s._M_rep()->_M_is_leaked()) | |
18973 | __s._M_rep()->_M_set_sharable(); | |
18974 | if (this->get_allocator() == __s.get_allocator()) | |
18975 | { | |
18976 | _CharT* __tmp = _M_data(); | |
18977 | _M_data(__s._M_data()); | |
18978 | __s._M_data(__tmp); | |
18979 | } | |
18980 | ||
18981 | else | |
18982 | { | |
18983 | const basic_string __tmp1(_M_ibegin(), _M_iend(), | |
18984 | __s.get_allocator()); | |
18985 | const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), | |
18986 | this->get_allocator()); | |
18987 | *this = __tmp2; | |
18988 | __s = __tmp1; | |
18989 | } | |
18990 | } | |
18991 | ||
18992 | template<typename _CharT, typename _Traits, typename _Alloc> | |
18993 | typename basic_string<_CharT, _Traits, _Alloc>::_Rep* | |
18994 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
18995 | _S_create(size_type __capacity, size_type __old_capacity, | |
18996 | const _Alloc& __alloc) | |
18997 | { | |
18998 | ||
18999 | ||
19000 | if (__capacity > _S_max_size) | |
19001 | __throw_length_error(("basic_string::_S_create")); | |
19002 | # 558 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_string.tcc" 3 | |
19003 | const size_type __pagesize = 4096; | |
19004 | const size_type __malloc_header_size = 4 * sizeof(void*); | |
19005 | ||
19006 | ||
19007 | ||
19008 | ||
19009 | ||
19010 | ||
19011 | ||
19012 | if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) | |
19013 | __capacity = 2 * __old_capacity; | |
19014 | ||
19015 | ||
19016 | ||
19017 | ||
19018 | size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); | |
19019 | ||
19020 | const size_type __adj_size = __size + __malloc_header_size; | |
19021 | if (__adj_size > __pagesize && __capacity > __old_capacity) | |
19022 | { | |
19023 | const size_type __extra = __pagesize - __adj_size % __pagesize; | |
19024 | __capacity += __extra / sizeof(_CharT); | |
19025 | ||
19026 | if (__capacity > _S_max_size) | |
19027 | __capacity = _S_max_size; | |
19028 | __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); | |
19029 | } | |
19030 | ||
19031 | ||
19032 | ||
19033 | void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); | |
19034 | _Rep *__p = new (__place) _Rep; | |
19035 | __p->_M_capacity = __capacity; | |
19036 | ||
19037 | ||
19038 | ||
19039 | ||
19040 | ||
19041 | ||
19042 | ||
19043 | __p->_M_set_sharable(); | |
19044 | return __p; | |
19045 | } | |
19046 | ||
19047 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19048 | _CharT* | |
19049 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
19050 | _M_clone(const _Alloc& __alloc, size_type __res) | |
19051 | { | |
19052 | ||
19053 | const size_type __requested_cap = this->_M_length + __res; | |
19054 | _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, | |
19055 | __alloc); | |
19056 | if (this->_M_length) | |
19057 | _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); | |
19058 | ||
19059 | __r->_M_set_length_and_sharable(this->_M_length); | |
19060 | return __r->_M_refdata(); | |
19061 | } | |
19062 | ||
19063 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19064 | void | |
19065 | basic_string<_CharT, _Traits, _Alloc>:: | |
19066 | resize(size_type __n, _CharT __c) | |
19067 | { | |
19068 | const size_type __size = this->size(); | |
19069 | _M_check_length(__size, __n, "basic_string::resize"); | |
19070 | if (__size < __n) | |
19071 | this->append(__n - __size, __c); | |
19072 | else if (__n < __size) | |
19073 | this->erase(__n); | |
19074 | ||
19075 | } | |
19076 | ||
19077 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19078 | template<typename _InputIterator> | |
19079 | basic_string<_CharT, _Traits, _Alloc>& | |
19080 | basic_string<_CharT, _Traits, _Alloc>:: | |
19081 | _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, | |
19082 | _InputIterator __k2, __false_type) | |
19083 | { | |
19084 | const basic_string __s(__k1, __k2); | |
19085 | const size_type __n1 = __i2 - __i1; | |
19086 | _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); | |
19087 | return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), | |
19088 | __s.size()); | |
19089 | } | |
19090 | ||
19091 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19092 | basic_string<_CharT, _Traits, _Alloc>& | |
19093 | basic_string<_CharT, _Traits, _Alloc>:: | |
19094 | _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, | |
19095 | _CharT __c) | |
19096 | { | |
19097 | _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); | |
19098 | _M_mutate(__pos1, __n1, __n2); | |
19099 | if (__n2) | |
19100 | _M_assign(_M_data() + __pos1, __n2, __c); | |
19101 | return *this; | |
19102 | } | |
19103 | ||
19104 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19105 | basic_string<_CharT, _Traits, _Alloc>& | |
19106 | basic_string<_CharT, _Traits, _Alloc>:: | |
19107 | _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, | |
19108 | size_type __n2) | |
19109 | { | |
19110 | _M_mutate(__pos1, __n1, __n2); | |
19111 | if (__n2) | |
19112 | _M_copy(_M_data() + __pos1, __s, __n2); | |
19113 | return *this; | |
19114 | } | |
19115 | ||
19116 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19117 | basic_string<_CharT, _Traits, _Alloc> | |
19118 | operator+(const _CharT* __lhs, | |
19119 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
19120 | { | |
19121 | ; | |
19122 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
19123 | typedef typename __string_type::size_type __size_type; | |
19124 | const __size_type __len = _Traits::length(__lhs); | |
19125 | __string_type __str; | |
19126 | __str.reserve(__len + __rhs.size()); | |
19127 | __str.append(__lhs, __len); | |
19128 | __str.append(__rhs); | |
19129 | return __str; | |
19130 | } | |
19131 | ||
19132 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19133 | basic_string<_CharT, _Traits, _Alloc> | |
19134 | operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
19135 | { | |
19136 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
19137 | typedef typename __string_type::size_type __size_type; | |
19138 | __string_type __str; | |
19139 | const __size_type __len = __rhs.size(); | |
19140 | __str.reserve(__len + 1); | |
19141 | __str.append(__size_type(1), __lhs); | |
19142 | __str.append(__rhs); | |
19143 | return __str; | |
19144 | } | |
19145 | ||
19146 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19147 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19148 | basic_string<_CharT, _Traits, _Alloc>:: | |
19149 | copy(_CharT* __s, size_type __n, size_type __pos) const | |
19150 | { | |
19151 | _M_check(__pos, "basic_string::copy"); | |
19152 | __n = _M_limit(__pos, __n); | |
19153 | ; | |
19154 | if (__n) | |
19155 | _M_copy(__s, _M_data() + __pos, __n); | |
19156 | ||
19157 | return __n; | |
19158 | } | |
19159 | ||
19160 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19161 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19162 | basic_string<_CharT, _Traits, _Alloc>:: | |
19163 | find(const _CharT* __s, size_type __pos, size_type __n) const | |
19164 | { | |
19165 | ; | |
19166 | size_type __ret = npos; | |
19167 | const size_type __size = this->size(); | |
19168 | if (__pos + __n <= __size) | |
19169 | { | |
19170 | const _CharT* __data = _M_data(); | |
19171 | const _CharT* __p = std::search(__data + __pos, __data + __size, | |
19172 | __s, __s + __n, traits_type::eq); | |
19173 | if (__p != __data + __size || __n == 0) | |
19174 | __ret = __p - __data; | |
19175 | } | |
19176 | return __ret; | |
19177 | } | |
19178 | ||
19179 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19180 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19181 | basic_string<_CharT, _Traits, _Alloc>:: | |
19182 | find(_CharT __c, size_type __pos) const | |
19183 | { | |
19184 | size_type __ret = npos; | |
19185 | const size_type __size = this->size(); | |
19186 | if (__pos < __size) | |
19187 | { | |
19188 | const _CharT* __data = _M_data(); | |
19189 | const size_type __n = __size - __pos; | |
19190 | const _CharT* __p = traits_type::find(__data + __pos, __n, __c); | |
19191 | if (__p) | |
19192 | __ret = __p - __data; | |
19193 | } | |
19194 | return __ret; | |
19195 | } | |
19196 | ||
19197 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19198 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19199 | basic_string<_CharT, _Traits, _Alloc>:: | |
19200 | rfind(const _CharT* __s, size_type __pos, size_type __n) const | |
19201 | { | |
19202 | ; | |
19203 | const size_type __size = this->size(); | |
19204 | if (__n <= __size) | |
19205 | { | |
19206 | __pos = std::min(size_type(__size - __n), __pos); | |
19207 | const _CharT* __data = _M_data(); | |
19208 | do | |
19209 | { | |
19210 | if (traits_type::compare(__data + __pos, __s, __n) == 0) | |
19211 | return __pos; | |
19212 | } | |
19213 | while (__pos-- > 0); | |
19214 | } | |
19215 | return npos; | |
19216 | } | |
19217 | ||
19218 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19219 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19220 | basic_string<_CharT, _Traits, _Alloc>:: | |
19221 | rfind(_CharT __c, size_type __pos) const | |
19222 | { | |
19223 | size_type __size = this->size(); | |
19224 | if (__size) | |
19225 | { | |
19226 | if (--__size > __pos) | |
19227 | __size = __pos; | |
19228 | for (++__size; __size-- > 0; ) | |
19229 | if (traits_type::eq(_M_data()[__size], __c)) | |
19230 | return __size; | |
19231 | } | |
19232 | return npos; | |
19233 | } | |
19234 | ||
19235 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19236 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19237 | basic_string<_CharT, _Traits, _Alloc>:: | |
19238 | find_first_of(const _CharT* __s, size_type __pos, size_type __n) const | |
19239 | { | |
19240 | ; | |
19241 | for (; __n && __pos < this->size(); ++__pos) | |
19242 | { | |
19243 | const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); | |
19244 | if (__p) | |
19245 | return __pos; | |
19246 | } | |
19247 | return npos; | |
19248 | } | |
19249 | ||
19250 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19251 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19252 | basic_string<_CharT, _Traits, _Alloc>:: | |
19253 | find_last_of(const _CharT* __s, size_type __pos, size_type __n) const | |
19254 | { | |
19255 | ; | |
19256 | size_type __size = this->size(); | |
19257 | if (__size && __n) | |
19258 | { | |
19259 | if (--__size > __pos) | |
19260 | __size = __pos; | |
19261 | do | |
19262 | { | |
19263 | if (traits_type::find(__s, __n, _M_data()[__size])) | |
19264 | return __size; | |
19265 | } | |
19266 | while (__size-- != 0); | |
19267 | } | |
19268 | return npos; | |
19269 | } | |
19270 | ||
19271 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19272 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19273 | basic_string<_CharT, _Traits, _Alloc>:: | |
19274 | find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const | |
19275 | { | |
19276 | ; | |
19277 | for (; __pos < this->size(); ++__pos) | |
19278 | if (!traits_type::find(__s, __n, _M_data()[__pos])) | |
19279 | return __pos; | |
19280 | return npos; | |
19281 | } | |
19282 | ||
19283 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19284 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19285 | basic_string<_CharT, _Traits, _Alloc>:: | |
19286 | find_first_not_of(_CharT __c, size_type __pos) const | |
19287 | { | |
19288 | for (; __pos < this->size(); ++__pos) | |
19289 | if (!traits_type::eq(_M_data()[__pos], __c)) | |
19290 | return __pos; | |
19291 | return npos; | |
19292 | } | |
19293 | ||
19294 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19295 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19296 | basic_string<_CharT, _Traits, _Alloc>:: | |
19297 | find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const | |
19298 | { | |
19299 | ; | |
19300 | size_type __size = this->size(); | |
19301 | if (__size) | |
19302 | { | |
19303 | if (--__size > __pos) | |
19304 | __size = __pos; | |
19305 | do | |
19306 | { | |
19307 | if (!traits_type::find(__s, __n, _M_data()[__size])) | |
19308 | return __size; | |
19309 | } | |
19310 | while (__size--); | |
19311 | } | |
19312 | return npos; | |
19313 | } | |
19314 | ||
19315 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19316 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
19317 | basic_string<_CharT, _Traits, _Alloc>:: | |
19318 | find_last_not_of(_CharT __c, size_type __pos) const | |
19319 | { | |
19320 | size_type __size = this->size(); | |
19321 | if (__size) | |
19322 | { | |
19323 | if (--__size > __pos) | |
19324 | __size = __pos; | |
19325 | do | |
19326 | { | |
19327 | if (!traits_type::eq(_M_data()[__size], __c)) | |
19328 | return __size; | |
19329 | } | |
19330 | while (__size--); | |
19331 | } | |
19332 | return npos; | |
19333 | } | |
19334 | ||
19335 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19336 | int | |
19337 | basic_string<_CharT, _Traits, _Alloc>:: | |
19338 | compare(size_type __pos, size_type __n, const basic_string& __str) const | |
19339 | { | |
19340 | _M_check(__pos, "basic_string::compare"); | |
19341 | __n = _M_limit(__pos, __n); | |
19342 | const size_type __osize = __str.size(); | |
19343 | const size_type __len = std::min(__n, __osize); | |
19344 | int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); | |
19345 | if (!__r) | |
19346 | __r = __n - __osize; | |
19347 | return __r; | |
19348 | } | |
19349 | ||
19350 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19351 | int | |
19352 | basic_string<_CharT, _Traits, _Alloc>:: | |
19353 | compare(size_type __pos1, size_type __n1, const basic_string& __str, | |
19354 | size_type __pos2, size_type __n2) const | |
19355 | { | |
19356 | _M_check(__pos1, "basic_string::compare"); | |
19357 | __str._M_check(__pos2, "basic_string::compare"); | |
19358 | __n1 = _M_limit(__pos1, __n1); | |
19359 | __n2 = __str._M_limit(__pos2, __n2); | |
19360 | const size_type __len = std::min(__n1, __n2); | |
19361 | int __r = traits_type::compare(_M_data() + __pos1, | |
19362 | __str.data() + __pos2, __len); | |
19363 | if (!__r) | |
19364 | __r = __n1 - __n2; | |
19365 | return __r; | |
19366 | } | |
19367 | ||
19368 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19369 | int | |
19370 | basic_string<_CharT, _Traits, _Alloc>:: | |
19371 | compare(const _CharT* __s) const | |
19372 | { | |
19373 | ; | |
19374 | const size_type __size = this->size(); | |
19375 | const size_type __osize = traits_type::length(__s); | |
19376 | const size_type __len = std::min(__size, __osize); | |
19377 | int __r = traits_type::compare(_M_data(), __s, __len); | |
19378 | if (!__r) | |
19379 | __r = __size - __osize; | |
19380 | return __r; | |
19381 | } | |
19382 | ||
19383 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19384 | int | |
19385 | basic_string <_CharT, _Traits, _Alloc>:: | |
19386 | compare(size_type __pos, size_type __n1, const _CharT* __s) const | |
19387 | { | |
19388 | ; | |
19389 | _M_check(__pos, "basic_string::compare"); | |
19390 | __n1 = _M_limit(__pos, __n1); | |
19391 | const size_type __osize = traits_type::length(__s); | |
19392 | const size_type __len = std::min(__n1, __osize); | |
19393 | int __r = traits_type::compare(_M_data() + __pos, __s, __len); | |
19394 | if (!__r) | |
19395 | __r = __n1 - __osize; | |
19396 | return __r; | |
19397 | } | |
19398 | ||
19399 | template<typename _CharT, typename _Traits, typename _Alloc> | |
19400 | int | |
19401 | basic_string <_CharT, _Traits, _Alloc>:: | |
19402 | compare(size_type __pos, size_type __n1, const _CharT* __s, | |
19403 | size_type __n2) const | |
19404 | { | |
19405 | ; | |
19406 | _M_check(__pos, "basic_string::compare"); | |
19407 | __n1 = _M_limit(__pos, __n1); | |
19408 | const size_type __len = std::min(__n1, __n2); | |
19409 | int __r = traits_type::compare(_M_data() + __pos, __s, __len); | |
19410 | if (!__r) | |
19411 | __r = __n1 - __n2; | |
19412 | return __r; | |
19413 | } | |
19414 | ||
19415 | ||
19416 | ||
19417 | ||
19418 | ||
19419 | extern template class basic_string<char>; | |
19420 | extern template | |
19421 | basic_istream<char>& | |
19422 | operator>>(basic_istream<char>&, string&); | |
19423 | extern template | |
19424 | basic_ostream<char>& | |
19425 | operator<<(basic_ostream<char>&, const string&); | |
19426 | extern template | |
19427 | basic_istream<char>& | |
19428 | getline(basic_istream<char>&, string&, char); | |
19429 | extern template | |
19430 | basic_istream<char>& | |
19431 | getline(basic_istream<char>&, string&); | |
19432 | ||
19433 | ||
19434 | extern template class basic_string<wchar_t>; | |
19435 | extern template | |
19436 | basic_istream<wchar_t>& | |
19437 | operator>>(basic_istream<wchar_t>&, wstring&); | |
19438 | extern template | |
19439 | basic_ostream<wchar_t>& | |
19440 | operator<<(basic_ostream<wchar_t>&, const wstring&); | |
19441 | extern template | |
19442 | basic_istream<wchar_t>& | |
19443 | getline(basic_istream<wchar_t>&, wstring&, wchar_t); | |
19444 | extern template | |
19445 | basic_istream<wchar_t>& | |
19446 | getline(basic_istream<wchar_t>&, wstring&); | |
19447 | ||
19448 | ||
19449 | } | |
19450 | # 58 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/string" 2 3 | |
19451 | ||
19452 | ||
19453 | #pragma GCC visibility pop | |
19454 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 2 3 | |
19455 | ||
19456 | ||
19457 | ||
19458 | namespace std | |
19459 | { | |
19460 | # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19461 | class locale | |
19462 | { | |
19463 | public: | |
19464 | ||
19465 | ||
19466 | typedef int category; | |
19467 | ||
19468 | ||
19469 | class facet; | |
19470 | class id; | |
19471 | class _Impl; | |
19472 | ||
19473 | friend class facet; | |
19474 | friend class _Impl; | |
19475 | ||
19476 | template<typename _Facet> | |
19477 | friend bool | |
19478 | has_facet(const locale&) throw(); | |
19479 | ||
19480 | template<typename _Facet> | |
19481 | friend const _Facet& | |
19482 | use_facet(const locale&); | |
19483 | ||
19484 | template<typename _Cache> | |
19485 | friend struct __use_cache; | |
19486 | # 105 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19487 | static const category none = 0; | |
19488 | static const category ctype = 1L << 0; | |
19489 | static const category numeric = 1L << 1; | |
19490 | static const category collate = 1L << 2; | |
19491 | static const category time = 1L << 3; | |
19492 | static const category monetary = 1L << 4; | |
19493 | static const category messages = 1L << 5; | |
19494 | static const category all = (ctype | numeric | collate | | |
19495 | time | monetary | messages); | |
19496 | # 124 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19497 | locale() throw(); | |
19498 | # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19499 | locale(const locale& __other) throw(); | |
19500 | # 143 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19501 | explicit | |
19502 | locale(const char* __s); | |
19503 | # 158 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19504 | locale(const locale& __base, const char* __s, category __cat); | |
19505 | # 171 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19506 | locale(const locale& __base, const locale& __add, category __cat); | |
19507 | # 183 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19508 | template<typename _Facet> | |
19509 | locale(const locale& __other, _Facet* __f); | |
19510 | ||
19511 | ||
19512 | ~locale() throw(); | |
19513 | # 197 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19514 | const locale& | |
19515 | operator=(const locale& __other) throw(); | |
19516 | # 212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19517 | template<typename _Facet> | |
19518 | locale | |
19519 | combine(const locale& __other) const; | |
19520 | ||
19521 | ||
19522 | ||
19523 | ||
19524 | ||
19525 | ||
19526 | string | |
19527 | name() const; | |
19528 | # 231 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19529 | bool | |
19530 | operator==(const locale& __other) const throw (); | |
19531 | ||
19532 | ||
19533 | ||
19534 | ||
19535 | ||
19536 | ||
19537 | ||
19538 | inline bool | |
19539 | operator!=(const locale& __other) const throw () | |
19540 | { return !(this->operator==(__other)); } | |
19541 | # 259 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19542 | template<typename _Char, typename _Traits, typename _Alloc> | |
19543 | bool | |
19544 | operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, | |
19545 | const basic_string<_Char, _Traits, _Alloc>& __s2) const; | |
19546 | # 275 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19547 | static locale | |
19548 | global(const locale&); | |
19549 | ||
19550 | ||
19551 | ||
19552 | ||
19553 | static const locale& | |
19554 | classic(); | |
19555 | ||
19556 | private: | |
19557 | ||
19558 | _Impl* _M_impl; | |
19559 | ||
19560 | ||
19561 | static _Impl* _S_classic; | |
19562 | ||
19563 | ||
19564 | static _Impl* _S_global; | |
19565 | ||
19566 | ||
19567 | ||
19568 | ||
19569 | ||
19570 | static const char* const* const _S_categories; | |
19571 | # 310 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19572 | enum { _S_categories_size = 6 + 6 }; | |
19573 | ||
19574 | ||
19575 | static __gthread_once_t _S_once; | |
19576 | ||
19577 | ||
19578 | explicit | |
19579 | locale(_Impl*) throw(); | |
19580 | ||
19581 | static void | |
19582 | _S_initialize(); | |
19583 | ||
19584 | static void | |
19585 | _S_initialize_once(); | |
19586 | ||
19587 | static category | |
19588 | _S_normalize_category(category); | |
19589 | ||
19590 | void | |
19591 | _M_coalesce(const locale& __base, const locale& __add, category __cat); | |
19592 | }; | |
19593 | # 343 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19594 | class locale::facet | |
19595 | { | |
19596 | private: | |
19597 | friend class locale; | |
19598 | friend class locale::_Impl; | |
19599 | ||
19600 | mutable _Atomic_word _M_refcount; | |
19601 | ||
19602 | ||
19603 | static __c_locale _S_c_locale; | |
19604 | ||
19605 | ||
19606 | static const char _S_c_name[2]; | |
19607 | ||
19608 | ||
19609 | static __gthread_once_t _S_once; | |
19610 | ||
19611 | ||
19612 | static void | |
19613 | _S_initialize_once(); | |
19614 | ||
19615 | protected: | |
19616 | # 374 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19617 | explicit | |
19618 | facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) | |
19619 | { } | |
19620 | ||
19621 | ||
19622 | virtual | |
19623 | ~facet(); | |
19624 | ||
19625 | static void | |
19626 | _S_create_c_locale(__c_locale& __cloc, const char* __s, | |
19627 | __c_locale __old = 0); | |
19628 | ||
19629 | static __c_locale | |
19630 | _S_clone_c_locale(__c_locale& __cloc); | |
19631 | ||
19632 | static void | |
19633 | _S_destroy_c_locale(__c_locale& __cloc); | |
19634 | ||
19635 | ||
19636 | ||
19637 | static __c_locale | |
19638 | _S_get_c_locale(); | |
19639 | ||
19640 | static const char* | |
19641 | _S_get_c_name(); | |
19642 | ||
19643 | private: | |
19644 | inline void | |
19645 | _M_add_reference() const throw() | |
19646 | { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
19647 | ||
19648 | inline void | |
19649 | _M_remove_reference() const throw() | |
19650 | { | |
19651 | if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1) | |
19652 | { | |
19653 | try | |
19654 | { delete this; } | |
19655 | catch (...) | |
19656 | { } | |
19657 | } | |
19658 | } | |
19659 | ||
19660 | facet(const facet&); | |
19661 | ||
19662 | facet& | |
19663 | operator=(const facet&); | |
19664 | }; | |
19665 | # 434 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_classes.h" 3 | |
19666 | class locale::id | |
19667 | { | |
19668 | private: | |
19669 | friend class locale; | |
19670 | friend class locale::_Impl; | |
19671 | ||
19672 | template<typename _Facet> | |
19673 | friend const _Facet& | |
19674 | use_facet(const locale&); | |
19675 | ||
19676 | template<typename _Facet> | |
19677 | friend bool | |
19678 | has_facet(const locale&) throw (); | |
19679 | ||
19680 | ||
19681 | ||
19682 | ||
19683 | mutable size_t _M_index; | |
19684 | ||
19685 | ||
19686 | static _Atomic_word _S_refcount; | |
19687 | ||
19688 | void | |
19689 | operator=(const id&); | |
19690 | ||
19691 | id(const id&); | |
19692 | ||
19693 | public: | |
19694 | ||
19695 | ||
19696 | ||
19697 | id() { } | |
19698 | ||
19699 | size_t | |
19700 | _M_id() const; | |
19701 | }; | |
19702 | ||
19703 | ||
19704 | ||
19705 | class locale::_Impl | |
19706 | { | |
19707 | public: | |
19708 | ||
19709 | friend class locale; | |
19710 | friend class locale::facet; | |
19711 | ||
19712 | template<typename _Facet> | |
19713 | friend bool | |
19714 | has_facet(const locale&) throw(); | |
19715 | ||
19716 | template<typename _Facet> | |
19717 | friend const _Facet& | |
19718 | use_facet(const locale&); | |
19719 | ||
19720 | template<typename _Cache> | |
19721 | friend struct __use_cache; | |
19722 | ||
19723 | private: | |
19724 | ||
19725 | _Atomic_word _M_refcount; | |
19726 | const facet** _M_facets; | |
19727 | size_t _M_facets_size; | |
19728 | const facet** _M_caches; | |
19729 | char** _M_names; | |
19730 | static const locale::id* const _S_id_ctype[]; | |
19731 | static const locale::id* const _S_id_numeric[]; | |
19732 | static const locale::id* const _S_id_collate[]; | |
19733 | static const locale::id* const _S_id_time[]; | |
19734 | static const locale::id* const _S_id_monetary[]; | |
19735 | static const locale::id* const _S_id_messages[]; | |
19736 | static const locale::id* const* const _S_facet_categories[]; | |
19737 | ||
19738 | inline void | |
19739 | _M_add_reference() throw() | |
19740 | { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
19741 | ||
19742 | inline void | |
19743 | _M_remove_reference() throw() | |
19744 | { | |
19745 | if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1) | |
19746 | { | |
19747 | try | |
19748 | { delete this; } | |
19749 | catch(...) | |
19750 | { } | |
19751 | } | |
19752 | } | |
19753 | ||
19754 | _Impl(const _Impl&, size_t); | |
19755 | _Impl(const char*, size_t); | |
19756 | _Impl(size_t) throw(); | |
19757 | ||
19758 | ~_Impl() throw(); | |
19759 | ||
19760 | _Impl(const _Impl&); | |
19761 | ||
19762 | void | |
19763 | operator=(const _Impl&); | |
19764 | ||
19765 | inline bool | |
19766 | _M_check_same_name() | |
19767 | { | |
19768 | bool __ret = true; | |
19769 | if (_M_names[1]) | |
19770 | ||
19771 | for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) | |
19772 | __ret = std::strcmp(_M_names[__i], _M_names[__i + 1]) == 0; | |
19773 | return __ret; | |
19774 | } | |
19775 | ||
19776 | void | |
19777 | _M_replace_categories(const _Impl*, category); | |
19778 | ||
19779 | void | |
19780 | _M_replace_category(const _Impl*, const locale::id* const*); | |
19781 | ||
19782 | void | |
19783 | _M_replace_facet(const _Impl*, const locale::id*); | |
19784 | ||
19785 | void | |
19786 | _M_install_facet(const locale::id*, const facet*); | |
19787 | ||
19788 | template<typename _Facet> | |
19789 | inline void | |
19790 | _M_init_facet(_Facet* __facet) | |
19791 | { _M_install_facet(&_Facet::id, __facet); } | |
19792 | ||
19793 | void | |
19794 | _M_install_cache(const facet*, size_t); | |
19795 | }; | |
19796 | ||
19797 | template<typename _Facet> | |
19798 | locale::locale(const locale& __other, _Facet* __f) | |
19799 | { | |
19800 | _M_impl = new _Impl(*__other._M_impl, 1); | |
19801 | ||
19802 | try | |
19803 | { _M_impl->_M_install_facet(&_Facet::id, __f); } | |
19804 | catch(...) | |
19805 | { | |
19806 | _M_impl->_M_remove_reference(); | |
19807 | throw; | |
19808 | } | |
19809 | delete [] _M_impl->_M_names[0]; | |
19810 | _M_impl->_M_names[0] = 0; | |
19811 | } | |
19812 | } | |
19813 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 2 3 | |
19814 | ||
19815 | namespace std | |
19816 | { | |
19817 | ||
19818 | ||
19819 | ||
19820 | ||
19821 | enum _Ios_Fmtflags | |
19822 | { | |
19823 | _S_boolalpha = 1L << 0, | |
19824 | _S_dec = 1L << 1, | |
19825 | _S_fixed = 1L << 2, | |
19826 | _S_hex = 1L << 3, | |
19827 | _S_internal = 1L << 4, | |
19828 | _S_left = 1L << 5, | |
19829 | _S_oct = 1L << 6, | |
19830 | _S_right = 1L << 7, | |
19831 | _S_scientific = 1L << 8, | |
19832 | _S_showbase = 1L << 9, | |
19833 | _S_showpoint = 1L << 10, | |
19834 | _S_showpos = 1L << 11, | |
19835 | _S_skipws = 1L << 12, | |
19836 | _S_unitbuf = 1L << 13, | |
19837 | _S_uppercase = 1L << 14, | |
19838 | _S_adjustfield = _S_left | _S_right | _S_internal, | |
19839 | _S_basefield = _S_dec | _S_oct | _S_hex, | |
19840 | _S_floatfield = _S_scientific | _S_fixed, | |
19841 | _S_ios_fmtflags_end = 1L << 16 | |
19842 | }; | |
19843 | ||
19844 | inline _Ios_Fmtflags | |
19845 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
19846 | { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); } | |
19847 | ||
19848 | inline _Ios_Fmtflags | |
19849 | operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
19850 | { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); } | |
19851 | ||
19852 | inline _Ios_Fmtflags | |
19853 | operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
19854 | { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
19855 | ||
19856 | inline _Ios_Fmtflags& | |
19857 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
19858 | { return __a = __a | __b; } | |
19859 | ||
19860 | inline _Ios_Fmtflags& | |
19861 | operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
19862 | { return __a = __a & __b; } | |
19863 | ||
19864 | inline _Ios_Fmtflags& | |
19865 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
19866 | { return __a = __a ^ __b; } | |
19867 | ||
19868 | inline _Ios_Fmtflags | |
19869 | operator~(_Ios_Fmtflags __a) | |
19870 | { return _Ios_Fmtflags(~static_cast<int>(__a)); } | |
19871 | ||
19872 | ||
19873 | enum _Ios_Openmode | |
19874 | { | |
19875 | _S_app = 1L << 0, | |
19876 | _S_ate = 1L << 1, | |
19877 | _S_bin = 1L << 2, | |
19878 | _S_in = 1L << 3, | |
19879 | _S_out = 1L << 4, | |
19880 | _S_trunc = 1L << 5, | |
19881 | _S_ios_openmode_end = 1L << 16 | |
19882 | }; | |
19883 | ||
19884 | inline _Ios_Openmode | |
19885 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) | |
19886 | { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); } | |
19887 | ||
19888 | inline _Ios_Openmode | |
19889 | operator|(_Ios_Openmode __a, _Ios_Openmode __b) | |
19890 | { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); } | |
19891 | ||
19892 | inline _Ios_Openmode | |
19893 | operator^(_Ios_Openmode __a, _Ios_Openmode __b) | |
19894 | { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
19895 | ||
19896 | inline _Ios_Openmode& | |
19897 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
19898 | { return __a = __a | __b; } | |
19899 | ||
19900 | inline _Ios_Openmode& | |
19901 | operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
19902 | { return __a = __a & __b; } | |
19903 | ||
19904 | inline _Ios_Openmode& | |
19905 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
19906 | { return __a = __a ^ __b; } | |
19907 | ||
19908 | inline _Ios_Openmode | |
19909 | operator~(_Ios_Openmode __a) | |
19910 | { return _Ios_Openmode(~static_cast<int>(__a)); } | |
19911 | ||
19912 | ||
19913 | enum _Ios_Iostate | |
19914 | { | |
19915 | _S_goodbit = 0, | |
19916 | _S_badbit = 1L << 0, | |
19917 | _S_eofbit = 1L << 1, | |
19918 | _S_failbit = 1L << 2, | |
19919 | _S_ios_iostate_end = 1L << 16 | |
19920 | }; | |
19921 | ||
19922 | inline _Ios_Iostate | |
19923 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) | |
19924 | { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); } | |
19925 | ||
19926 | inline _Ios_Iostate | |
19927 | operator|(_Ios_Iostate __a, _Ios_Iostate __b) | |
19928 | { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); } | |
19929 | ||
19930 | inline _Ios_Iostate | |
19931 | operator^(_Ios_Iostate __a, _Ios_Iostate __b) | |
19932 | { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
19933 | ||
19934 | inline _Ios_Iostate& | |
19935 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
19936 | { return __a = __a | __b; } | |
19937 | ||
19938 | inline _Ios_Iostate& | |
19939 | operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
19940 | { return __a = __a & __b; } | |
19941 | ||
19942 | inline _Ios_Iostate& | |
19943 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
19944 | { return __a = __a ^ __b; } | |
19945 | ||
19946 | inline _Ios_Iostate | |
19947 | operator~(_Ios_Iostate __a) | |
19948 | { return _Ios_Iostate(~static_cast<int>(__a)); } | |
19949 | ||
19950 | enum _Ios_Seekdir | |
19951 | { | |
19952 | _S_beg = 0, | |
19953 | _S_cur = 1, | |
19954 | _S_end = 2, | |
19955 | _S_ios_seekdir_end = 1L << 16 | |
19956 | }; | |
19957 | # 201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
19958 | class ios_base | |
19959 | { | |
19960 | public: | |
19961 | ||
19962 | ||
19963 | ||
19964 | class failure : public exception | |
19965 | { | |
19966 | public: | |
19967 | ||
19968 | ||
19969 | explicit | |
19970 | failure(const string& __str) throw(); | |
19971 | ||
19972 | ||
19973 | ||
19974 | virtual | |
19975 | ~failure() throw(); | |
19976 | ||
19977 | virtual const char* | |
19978 | what() const throw(); | |
19979 | ||
19980 | private: | |
19981 | string _M_msg; | |
19982 | }; | |
19983 | # 253 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
19984 | typedef _Ios_Fmtflags fmtflags; | |
19985 | ||
19986 | ||
19987 | static const fmtflags boolalpha = _S_boolalpha; | |
19988 | ||
19989 | ||
19990 | static const fmtflags dec = _S_dec; | |
19991 | ||
19992 | ||
19993 | static const fmtflags fixed = _S_fixed; | |
19994 | ||
19995 | ||
19996 | static const fmtflags hex = _S_hex; | |
19997 | ||
19998 | ||
19999 | ||
20000 | ||
20001 | static const fmtflags internal = _S_internal; | |
20002 | ||
20003 | ||
20004 | ||
20005 | static const fmtflags left = _S_left; | |
20006 | ||
20007 | ||
20008 | static const fmtflags oct = _S_oct; | |
20009 | ||
20010 | ||
20011 | ||
20012 | static const fmtflags right = _S_right; | |
20013 | ||
20014 | ||
20015 | static const fmtflags scientific = _S_scientific; | |
20016 | ||
20017 | ||
20018 | ||
20019 | static const fmtflags showbase = _S_showbase; | |
20020 | ||
20021 | ||
20022 | ||
20023 | static const fmtflags showpoint = _S_showpoint; | |
20024 | ||
20025 | ||
20026 | static const fmtflags showpos = _S_showpos; | |
20027 | ||
20028 | ||
20029 | static const fmtflags skipws = _S_skipws; | |
20030 | ||
20031 | ||
20032 | static const fmtflags unitbuf = _S_unitbuf; | |
20033 | ||
20034 | ||
20035 | ||
20036 | static const fmtflags uppercase = _S_uppercase; | |
20037 | ||
20038 | ||
20039 | static const fmtflags adjustfield = _S_adjustfield; | |
20040 | ||
20041 | ||
20042 | static const fmtflags basefield = _S_basefield; | |
20043 | ||
20044 | ||
20045 | static const fmtflags floatfield = _S_floatfield; | |
20046 | # 328 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20047 | typedef _Ios_Iostate iostate; | |
20048 | ||
20049 | ||
20050 | ||
20051 | static const iostate badbit = _S_badbit; | |
20052 | ||
20053 | ||
20054 | static const iostate eofbit = _S_eofbit; | |
20055 | ||
20056 | ||
20057 | ||
20058 | ||
20059 | static const iostate failbit = _S_failbit; | |
20060 | ||
20061 | ||
20062 | static const iostate goodbit = _S_goodbit; | |
20063 | # 359 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20064 | typedef _Ios_Openmode openmode; | |
20065 | ||
20066 | ||
20067 | static const openmode app = _S_app; | |
20068 | ||
20069 | ||
20070 | static const openmode ate = _S_ate; | |
20071 | ||
20072 | ||
20073 | ||
20074 | ||
20075 | ||
20076 | static const openmode binary = _S_bin; | |
20077 | ||
20078 | ||
20079 | static const openmode in = _S_in; | |
20080 | ||
20081 | ||
20082 | static const openmode out = _S_out; | |
20083 | ||
20084 | ||
20085 | static const openmode trunc = _S_trunc; | |
20086 | # 392 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20087 | typedef _Ios_Seekdir seekdir; | |
20088 | ||
20089 | ||
20090 | static const seekdir beg = _S_beg; | |
20091 | ||
20092 | ||
20093 | static const seekdir cur = _S_cur; | |
20094 | ||
20095 | ||
20096 | static const seekdir end = _S_end; | |
20097 | ||
20098 | ||
20099 | typedef int io_state; | |
20100 | typedef int open_mode; | |
20101 | typedef int seek_dir; | |
20102 | ||
20103 | typedef std::streampos streampos; | |
20104 | typedef std::streamoff streamoff; | |
20105 | # 418 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20106 | enum event | |
20107 | { | |
20108 | erase_event, | |
20109 | imbue_event, | |
20110 | copyfmt_event | |
20111 | }; | |
20112 | # 435 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20113 | typedef void (*event_callback) (event, ios_base&, int); | |
20114 | # 447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20115 | void | |
20116 | register_callback(event_callback __fn, int __index); | |
20117 | ||
20118 | protected: | |
20119 | ||
20120 | ||
20121 | ||
20122 | ||
20123 | ||
20124 | ||
20125 | streamsize _M_precision; | |
20126 | streamsize _M_width; | |
20127 | fmtflags _M_flags; | |
20128 | iostate _M_exception; | |
20129 | iostate _M_streambuf_state; | |
20130 | ||
20131 | ||
20132 | ||
20133 | ||
20134 | struct _Callback_list | |
20135 | { | |
20136 | ||
20137 | _Callback_list* _M_next; | |
20138 | ios_base::event_callback _M_fn; | |
20139 | int _M_index; | |
20140 | _Atomic_word _M_refcount; | |
20141 | ||
20142 | _Callback_list(ios_base::event_callback __fn, int __index, | |
20143 | _Callback_list* __cb) | |
20144 | : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } | |
20145 | ||
20146 | void | |
20147 | _M_add_reference() { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
20148 | ||
20149 | ||
20150 | int | |
20151 | _M_remove_reference() | |
20152 | { return __gnu_cxx::__exchange_and_add(&_M_refcount, -1); } | |
20153 | }; | |
20154 | ||
20155 | _Callback_list* _M_callbacks; | |
20156 | ||
20157 | void | |
20158 | _M_call_callbacks(event __ev) throw(); | |
20159 | ||
20160 | void | |
20161 | _M_dispose_callbacks(void); | |
20162 | ||
20163 | ||
20164 | struct _Words | |
20165 | { | |
20166 | void* _M_pword; | |
20167 | long _M_iword; | |
20168 | _Words() : _M_pword(0), _M_iword(0) { } | |
20169 | }; | |
20170 | ||
20171 | ||
20172 | _Words _M_word_zero; | |
20173 | ||
20174 | ||
20175 | ||
20176 | enum { _S_local_word_size = 8 }; | |
20177 | _Words _M_local_word[_S_local_word_size]; | |
20178 | ||
20179 | ||
20180 | int _M_word_size; | |
20181 | _Words* _M_word; | |
20182 | ||
20183 | _Words& | |
20184 | _M_grow_words(int __index, bool __iword); | |
20185 | ||
20186 | ||
20187 | locale _M_ios_locale; | |
20188 | ||
20189 | void | |
20190 | _M_init(); | |
20191 | ||
20192 | public: | |
20193 | ||
20194 | ||
20195 | ||
20196 | ||
20197 | ||
20198 | class Init | |
20199 | { | |
20200 | friend class ios_base; | |
20201 | public: | |
20202 | Init(); | |
20203 | ~Init(); | |
20204 | ||
20205 | private: | |
20206 | static _Atomic_word _S_refcount; | |
20207 | static bool _S_synced_with_stdio; | |
20208 | }; | |
20209 | ||
20210 | ||
20211 | ||
20212 | ||
20213 | ||
20214 | ||
20215 | inline fmtflags | |
20216 | flags() const { return _M_flags; } | |
20217 | # 557 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20218 | inline fmtflags | |
20219 | flags(fmtflags __fmtfl) | |
20220 | { | |
20221 | fmtflags __old = _M_flags; | |
20222 | _M_flags = __fmtfl; | |
20223 | return __old; | |
20224 | } | |
20225 | # 573 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20226 | inline fmtflags | |
20227 | setf(fmtflags __fmtfl) | |
20228 | { | |
20229 | fmtflags __old = _M_flags; | |
20230 | _M_flags |= __fmtfl; | |
20231 | return __old; | |
20232 | } | |
20233 | # 590 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20234 | inline fmtflags | |
20235 | setf(fmtflags __fmtfl, fmtflags __mask) | |
20236 | { | |
20237 | fmtflags __old = _M_flags; | |
20238 | _M_flags &= ~__mask; | |
20239 | _M_flags |= (__fmtfl & __mask); | |
20240 | return __old; | |
20241 | } | |
20242 | ||
20243 | ||
20244 | ||
20245 | ||
20246 | ||
20247 | ||
20248 | ||
20249 | inline void | |
20250 | unsetf(fmtflags __mask) { _M_flags &= ~__mask; } | |
20251 | # 617 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20252 | inline streamsize | |
20253 | precision() const { return _M_precision; } | |
20254 | ||
20255 | ||
20256 | ||
20257 | ||
20258 | ||
20259 | ||
20260 | inline streamsize | |
20261 | precision(streamsize __prec) | |
20262 | { | |
20263 | streamsize __old = _M_precision; | |
20264 | _M_precision = __prec; | |
20265 | return __old; | |
20266 | } | |
20267 | ||
20268 | ||
20269 | ||
20270 | ||
20271 | ||
20272 | ||
20273 | ||
20274 | inline streamsize | |
20275 | width() const { return _M_width; } | |
20276 | ||
20277 | ||
20278 | ||
20279 | ||
20280 | ||
20281 | ||
20282 | inline streamsize | |
20283 | width(streamsize __wide) | |
20284 | { | |
20285 | streamsize __old = _M_width; | |
20286 | _M_width = __wide; | |
20287 | return __old; | |
20288 | } | |
20289 | # 666 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20290 | static bool | |
20291 | sync_with_stdio(bool __sync = true); | |
20292 | # 678 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20293 | locale | |
20294 | imbue(const locale& __loc); | |
20295 | # 689 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20296 | inline locale | |
20297 | getloc() const { return _M_ios_locale; } | |
20298 | # 699 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20299 | inline const locale& | |
20300 | _M_getloc() const { return _M_ios_locale; } | |
20301 | # 717 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20302 | static int | |
20303 | xalloc() throw(); | |
20304 | # 733 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20305 | inline long& | |
20306 | iword(int __ix) | |
20307 | { | |
20308 | _Words& __word = (__ix < _M_word_size) | |
20309 | ? _M_word[__ix] : _M_grow_words(__ix, true); | |
20310 | return __word._M_iword; | |
20311 | } | |
20312 | # 754 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20313 | inline void*& | |
20314 | pword(int __ix) | |
20315 | { | |
20316 | _Words& __word = (__ix < _M_word_size) | |
20317 | ? _M_word[__ix] : _M_grow_words(__ix, false); | |
20318 | return __word._M_pword; | |
20319 | } | |
20320 | # 771 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ios_base.h" 3 | |
20321 | virtual ~ios_base(); | |
20322 | ||
20323 | protected: | |
20324 | ios_base(); | |
20325 | ||
20326 | ||
20327 | ||
20328 | private: | |
20329 | ios_base(const ios_base&); | |
20330 | ||
20331 | ios_base& | |
20332 | operator=(const ios_base&); | |
20333 | }; | |
20334 | ||
20335 | ||
20336 | ||
20337 | inline ios_base& | |
20338 | boolalpha(ios_base& __base) | |
20339 | { | |
20340 | __base.setf(ios_base::boolalpha); | |
20341 | return __base; | |
20342 | } | |
20343 | ||
20344 | ||
20345 | inline ios_base& | |
20346 | noboolalpha(ios_base& __base) | |
20347 | { | |
20348 | __base.unsetf(ios_base::boolalpha); | |
20349 | return __base; | |
20350 | } | |
20351 | ||
20352 | ||
20353 | inline ios_base& | |
20354 | showbase(ios_base& __base) | |
20355 | { | |
20356 | __base.setf(ios_base::showbase); | |
20357 | return __base; | |
20358 | } | |
20359 | ||
20360 | ||
20361 | inline ios_base& | |
20362 | noshowbase(ios_base& __base) | |
20363 | { | |
20364 | __base.unsetf(ios_base::showbase); | |
20365 | return __base; | |
20366 | } | |
20367 | ||
20368 | ||
20369 | inline ios_base& | |
20370 | showpoint(ios_base& __base) | |
20371 | { | |
20372 | __base.setf(ios_base::showpoint); | |
20373 | return __base; | |
20374 | } | |
20375 | ||
20376 | ||
20377 | inline ios_base& | |
20378 | noshowpoint(ios_base& __base) | |
20379 | { | |
20380 | __base.unsetf(ios_base::showpoint); | |
20381 | return __base; | |
20382 | } | |
20383 | ||
20384 | ||
20385 | inline ios_base& | |
20386 | showpos(ios_base& __base) | |
20387 | { | |
20388 | __base.setf(ios_base::showpos); | |
20389 | return __base; | |
20390 | } | |
20391 | ||
20392 | ||
20393 | inline ios_base& | |
20394 | noshowpos(ios_base& __base) | |
20395 | { | |
20396 | __base.unsetf(ios_base::showpos); | |
20397 | return __base; | |
20398 | } | |
20399 | ||
20400 | ||
20401 | inline ios_base& | |
20402 | skipws(ios_base& __base) | |
20403 | { | |
20404 | __base.setf(ios_base::skipws); | |
20405 | return __base; | |
20406 | } | |
20407 | ||
20408 | ||
20409 | inline ios_base& | |
20410 | noskipws(ios_base& __base) | |
20411 | { | |
20412 | __base.unsetf(ios_base::skipws); | |
20413 | return __base; | |
20414 | } | |
20415 | ||
20416 | ||
20417 | inline ios_base& | |
20418 | uppercase(ios_base& __base) | |
20419 | { | |
20420 | __base.setf(ios_base::uppercase); | |
20421 | return __base; | |
20422 | } | |
20423 | ||
20424 | ||
20425 | inline ios_base& | |
20426 | nouppercase(ios_base& __base) | |
20427 | { | |
20428 | __base.unsetf(ios_base::uppercase); | |
20429 | return __base; | |
20430 | } | |
20431 | ||
20432 | ||
20433 | inline ios_base& | |
20434 | unitbuf(ios_base& __base) | |
20435 | { | |
20436 | __base.setf(ios_base::unitbuf); | |
20437 | return __base; | |
20438 | } | |
20439 | ||
20440 | ||
20441 | inline ios_base& | |
20442 | nounitbuf(ios_base& __base) | |
20443 | { | |
20444 | __base.unsetf(ios_base::unitbuf); | |
20445 | return __base; | |
20446 | } | |
20447 | ||
20448 | ||
20449 | ||
20450 | inline ios_base& | |
20451 | internal(ios_base& __base) | |
20452 | { | |
20453 | __base.setf(ios_base::internal, ios_base::adjustfield); | |
20454 | return __base; | |
20455 | } | |
20456 | ||
20457 | ||
20458 | inline ios_base& | |
20459 | left(ios_base& __base) | |
20460 | { | |
20461 | __base.setf(ios_base::left, ios_base::adjustfield); | |
20462 | return __base; | |
20463 | } | |
20464 | ||
20465 | ||
20466 | inline ios_base& | |
20467 | right(ios_base& __base) | |
20468 | { | |
20469 | __base.setf(ios_base::right, ios_base::adjustfield); | |
20470 | return __base; | |
20471 | } | |
20472 | ||
20473 | ||
20474 | ||
20475 | inline ios_base& | |
20476 | dec(ios_base& __base) | |
20477 | { | |
20478 | __base.setf(ios_base::dec, ios_base::basefield); | |
20479 | return __base; | |
20480 | } | |
20481 | ||
20482 | ||
20483 | inline ios_base& | |
20484 | hex(ios_base& __base) | |
20485 | { | |
20486 | __base.setf(ios_base::hex, ios_base::basefield); | |
20487 | return __base; | |
20488 | } | |
20489 | ||
20490 | ||
20491 | inline ios_base& | |
20492 | oct(ios_base& __base) | |
20493 | { | |
20494 | __base.setf(ios_base::oct, ios_base::basefield); | |
20495 | return __base; | |
20496 | } | |
20497 | ||
20498 | ||
20499 | ||
20500 | inline ios_base& | |
20501 | fixed(ios_base& __base) | |
20502 | { | |
20503 | __base.setf(ios_base::fixed, ios_base::floatfield); | |
20504 | return __base; | |
20505 | } | |
20506 | ||
20507 | ||
20508 | inline ios_base& | |
20509 | scientific(ios_base& __base) | |
20510 | { | |
20511 | __base.setf(ios_base::scientific, ios_base::floatfield); | |
20512 | return __base; | |
20513 | } | |
20514 | } | |
20515 | # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 2 3 | |
20516 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 1 3 | |
20517 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20518 | ||
20519 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20520 | #pragma GCC visibility push(default) | |
20521 | ||
20522 | ||
20523 | ||
20524 | ||
20525 | ||
20526 | ||
20527 | namespace std | |
20528 | { | |
20529 | ||
20530 | ||
20531 | ||
20532 | ||
20533 | ||
20534 | template<typename _CharT, typename _Traits> | |
20535 | streamsize | |
20536 | __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, | |
20537 | basic_streambuf<_CharT, _Traits>* __sbout); | |
20538 | # 122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20539 | template<typename _CharT, typename _Traits> | |
20540 | class basic_streambuf | |
20541 | { | |
20542 | public: | |
20543 | ||
20544 | ||
20545 | ||
20546 | ||
20547 | ||
20548 | ||
20549 | typedef _CharT char_type; | |
20550 | typedef _Traits traits_type; | |
20551 | typedef typename traits_type::int_type int_type; | |
20552 | typedef typename traits_type::pos_type pos_type; | |
20553 | typedef typename traits_type::off_type off_type; | |
20554 | # 145 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20555 | typedef basic_streambuf<char_type, traits_type> __streambuf_type; | |
20556 | ||
20557 | ||
20558 | friend class basic_ios<char_type, traits_type>; | |
20559 | friend class basic_istream<char_type, traits_type>; | |
20560 | friend class basic_ostream<char_type, traits_type>; | |
20561 | friend class istreambuf_iterator<char_type, traits_type>; | |
20562 | friend class ostreambuf_iterator<char_type, traits_type>; | |
20563 | ||
20564 | friend streamsize | |
20565 | __copy_streambufs<>(__streambuf_type* __sbin, | |
20566 | __streambuf_type* __sbout); | |
20567 | ||
20568 | template<typename _CharT2, typename _Traits2> | |
20569 | friend basic_istream<_CharT2, _Traits2>& | |
20570 | operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); | |
20571 | ||
20572 | template<typename _CharT2, typename _Traits2, typename _Alloc> | |
20573 | friend basic_istream<_CharT2, _Traits2>& | |
20574 | operator>>(basic_istream<_CharT2, _Traits2>&, | |
20575 | basic_string<_CharT2, _Traits2, _Alloc>&); | |
20576 | ||
20577 | template<typename _CharT2, typename _Traits2, typename _Alloc> | |
20578 | friend basic_istream<_CharT2, _Traits2>& | |
20579 | getline(basic_istream<_CharT2, _Traits2>&, | |
20580 | basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); | |
20581 | ||
20582 | protected: | |
20583 | # 183 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20584 | char_type* _M_in_beg; | |
20585 | char_type* _M_in_cur; | |
20586 | char_type* _M_in_end; | |
20587 | char_type* _M_out_beg; | |
20588 | char_type* _M_out_cur; | |
20589 | char_type* _M_out_end; | |
20590 | ||
20591 | ||
20592 | ||
20593 | ||
20594 | ||
20595 | ||
20596 | locale _M_buf_locale; | |
20597 | ||
20598 | public: | |
20599 | ||
20600 | virtual | |
20601 | ~basic_streambuf() | |
20602 | { } | |
20603 | # 211 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20604 | locale | |
20605 | pubimbue(const locale &__loc) | |
20606 | { | |
20607 | locale __tmp(this->getloc()); | |
20608 | this->imbue(__loc); | |
20609 | _M_buf_locale = __loc; | |
20610 | return __tmp; | |
20611 | } | |
20612 | # 228 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20613 | locale | |
20614 | getloc() const | |
20615 | { return _M_buf_locale; } | |
20616 | # 241 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20617 | __streambuf_type* | |
20618 | pubsetbuf(char_type* __s, streamsize __n) | |
20619 | { return this->setbuf(__s, __n); } | |
20620 | ||
20621 | pos_type | |
20622 | pubseekoff(off_type __off, ios_base::seekdir __way, | |
20623 | ios_base::openmode __mode = ios_base::in | ios_base::out) | |
20624 | { return this->seekoff(__off, __way, __mode); } | |
20625 | ||
20626 | pos_type | |
20627 | pubseekpos(pos_type __sp, | |
20628 | ios_base::openmode __mode = ios_base::in | ios_base::out) | |
20629 | { return this->seekpos(__sp, __mode); } | |
20630 | ||
20631 | int | |
20632 | pubsync() { return this->sync(); } | |
20633 | # 268 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20634 | streamsize | |
20635 | in_avail() | |
20636 | { | |
20637 | const streamsize __ret = this->egptr() - this->gptr(); | |
20638 | return __ret ? __ret : this->showmanyc(); | |
20639 | } | |
20640 | # 282 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20641 | int_type | |
20642 | snextc() | |
20643 | { | |
20644 | int_type __ret = traits_type::eof(); | |
20645 | if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), | |
20646 | __ret), true)) | |
20647 | __ret = this->sgetc(); | |
20648 | return __ret; | |
20649 | } | |
20650 | # 300 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20651 | int_type | |
20652 | sbumpc() | |
20653 | { | |
20654 | int_type __ret; | |
20655 | if (__builtin_expect(this->gptr() < this->egptr(), true)) | |
20656 | { | |
20657 | __ret = traits_type::to_int_type(*this->gptr()); | |
20658 | this->gbump(1); | |
20659 | } | |
20660 | else | |
20661 | __ret = this->uflow(); | |
20662 | return __ret; | |
20663 | } | |
20664 | # 322 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20665 | int_type | |
20666 | sgetc() | |
20667 | { | |
20668 | int_type __ret; | |
20669 | if (__builtin_expect(this->gptr() < this->egptr(), true)) | |
20670 | __ret = traits_type::to_int_type(*this->gptr()); | |
20671 | else | |
20672 | __ret = this->underflow(); | |
20673 | return __ret; | |
20674 | } | |
20675 | # 341 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20676 | streamsize | |
20677 | sgetn(char_type* __s, streamsize __n) | |
20678 | { return this->xsgetn(__s, __n); } | |
20679 | # 355 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20680 | int_type | |
20681 | sputbackc(char_type __c) | |
20682 | { | |
20683 | int_type __ret; | |
20684 | const bool __testpos = this->eback() < this->gptr(); | |
20685 | if (__builtin_expect(!__testpos || | |
20686 | !traits_type::eq(__c, this->gptr()[-1]), false)) | |
20687 | __ret = this->pbackfail(traits_type::to_int_type(__c)); | |
20688 | else | |
20689 | { | |
20690 | this->gbump(-1); | |
20691 | __ret = traits_type::to_int_type(*this->gptr()); | |
20692 | } | |
20693 | return __ret; | |
20694 | } | |
20695 | # 380 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20696 | int_type | |
20697 | sungetc() | |
20698 | { | |
20699 | int_type __ret; | |
20700 | if (__builtin_expect(this->eback() < this->gptr(), true)) | |
20701 | { | |
20702 | this->gbump(-1); | |
20703 | __ret = traits_type::to_int_type(*this->gptr()); | |
20704 | } | |
20705 | else | |
20706 | __ret = this->pbackfail(); | |
20707 | return __ret; | |
20708 | } | |
20709 | # 407 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20710 | int_type | |
20711 | sputc(char_type __c) | |
20712 | { | |
20713 | int_type __ret; | |
20714 | if (__builtin_expect(this->pptr() < this->epptr(), true)) | |
20715 | { | |
20716 | *this->pptr() = __c; | |
20717 | this->pbump(1); | |
20718 | __ret = traits_type::to_int_type(__c); | |
20719 | } | |
20720 | else | |
20721 | __ret = this->overflow(traits_type::to_int_type(__c)); | |
20722 | return __ret; | |
20723 | } | |
20724 | # 433 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20725 | streamsize | |
20726 | sputn(const char_type* __s, streamsize __n) | |
20727 | { return this->xsputn(__s, __n); } | |
20728 | ||
20729 | protected: | |
20730 | # 447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20731 | basic_streambuf() | |
20732 | : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), | |
20733 | _M_out_beg(0), _M_out_cur(0), _M_out_end(0), | |
20734 | _M_buf_locale(locale()) | |
20735 | { } | |
20736 | # 465 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20737 | char_type* | |
20738 | eback() const { return _M_in_beg; } | |
20739 | ||
20740 | char_type* | |
20741 | gptr() const { return _M_in_cur; } | |
20742 | ||
20743 | char_type* | |
20744 | egptr() const { return _M_in_end; } | |
20745 | # 481 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20746 | void | |
20747 | gbump(int __n) { _M_in_cur += __n; } | |
20748 | # 492 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20749 | void | |
20750 | setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) | |
20751 | { | |
20752 | _M_in_beg = __gbeg; | |
20753 | _M_in_cur = __gnext; | |
20754 | _M_in_end = __gend; | |
20755 | } | |
20756 | # 512 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20757 | char_type* | |
20758 | pbase() const { return _M_out_beg; } | |
20759 | ||
20760 | char_type* | |
20761 | pptr() const { return _M_out_cur; } | |
20762 | ||
20763 | char_type* | |
20764 | epptr() const { return _M_out_end; } | |
20765 | # 528 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20766 | void | |
20767 | pbump(int __n) { _M_out_cur += __n; } | |
20768 | # 538 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20769 | void | |
20770 | setp(char_type* __pbeg, char_type* __pend) | |
20771 | { | |
20772 | _M_out_beg = _M_out_cur = __pbeg; | |
20773 | _M_out_end = __pend; | |
20774 | } | |
20775 | # 559 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20776 | virtual void | |
20777 | imbue(const locale&) | |
20778 | { } | |
20779 | # 574 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20780 | virtual basic_streambuf<char_type,_Traits>* | |
20781 | setbuf(char_type*, streamsize) | |
20782 | { return this; } | |
20783 | # 585 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20784 | virtual pos_type | |
20785 | seekoff(off_type, ios_base::seekdir, | |
20786 | ios_base::openmode = ios_base::in | ios_base::out) | |
20787 | { return pos_type(off_type(-1)); } | |
20788 | # 597 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20789 | virtual pos_type | |
20790 | seekpos(pos_type, | |
20791 | ios_base::openmode = ios_base::in | ios_base::out) | |
20792 | { return pos_type(off_type(-1)); } | |
20793 | # 610 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20794 | virtual int | |
20795 | sync() { return 0; } | |
20796 | # 632 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20797 | virtual streamsize | |
20798 | showmanyc() { return 0; } | |
20799 | # 648 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20800 | virtual streamsize | |
20801 | xsgetn(char_type* __s, streamsize __n); | |
20802 | # 670 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20803 | virtual int_type | |
20804 | underflow() | |
20805 | { return traits_type::eof(); } | |
20806 | # 683 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20807 | virtual int_type | |
20808 | uflow() | |
20809 | { | |
20810 | int_type __ret = traits_type::eof(); | |
20811 | const bool __testeof = traits_type::eq_int_type(this->underflow(), | |
20812 | __ret); | |
20813 | if (!__testeof) | |
20814 | { | |
20815 | __ret = traits_type::to_int_type(*this->gptr()); | |
20816 | this->gbump(1); | |
20817 | } | |
20818 | return __ret; | |
20819 | } | |
20820 | # 707 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20821 | virtual int_type | |
20822 | pbackfail(int_type = traits_type::eof()) | |
20823 | { return traits_type::eof(); } | |
20824 | # 725 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20825 | virtual streamsize | |
20826 | xsputn(const char_type* __s, streamsize __n); | |
20827 | # 750 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20828 | virtual int_type | |
20829 | overflow(int_type = traits_type::eof()) | |
20830 | { return traits_type::eof(); } | |
20831 | # 779 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 3 | |
20832 | private: | |
20833 | ||
20834 | ||
20835 | basic_streambuf(const __streambuf_type& __sb) | |
20836 | : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), | |
20837 | _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), | |
20838 | _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), | |
20839 | _M_buf_locale(__sb._M_buf_locale) | |
20840 | { } | |
20841 | ||
20842 | __streambuf_type& | |
20843 | operator=(const __streambuf_type&) { return *this; }; | |
20844 | }; | |
20845 | ||
20846 | ||
20847 | template<> | |
20848 | streamsize | |
20849 | __copy_streambufs(basic_streambuf<char>* __sbin, | |
20850 | basic_streambuf<char>* __sbout); | |
20851 | ||
20852 | template<> | |
20853 | streamsize | |
20854 | __copy_streambufs(basic_streambuf<wchar_t>* __sbin, | |
20855 | basic_streambuf<wchar_t>* __sbout); | |
20856 | ||
20857 | } | |
20858 | ||
20859 | ||
20860 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/streambuf.tcc" 1 3 | |
20861 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/streambuf.tcc" 3 | |
20862 | ||
20863 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/streambuf.tcc" 3 | |
20864 | ||
20865 | namespace std | |
20866 | { | |
20867 | template<typename _CharT, typename _Traits> | |
20868 | streamsize | |
20869 | basic_streambuf<_CharT, _Traits>:: | |
20870 | xsgetn(char_type* __s, streamsize __n) | |
20871 | { | |
20872 | streamsize __ret = 0; | |
20873 | while (__ret < __n) | |
20874 | { | |
20875 | const streamsize __buf_len = this->egptr() - this->gptr(); | |
20876 | if (__buf_len) | |
20877 | { | |
20878 | const streamsize __remaining = __n - __ret; | |
20879 | const streamsize __len = std::min(__buf_len, __remaining); | |
20880 | traits_type::copy(__s, this->gptr(), __len); | |
20881 | __ret += __len; | |
20882 | __s += __len; | |
20883 | this->gbump(__len); | |
20884 | } | |
20885 | ||
20886 | if (__ret < __n) | |
20887 | { | |
20888 | const int_type __c = this->uflow(); | |
20889 | if (!traits_type::eq_int_type(__c, traits_type::eof())) | |
20890 | { | |
20891 | traits_type::assign(*__s++, traits_type::to_char_type(__c)); | |
20892 | ++__ret; | |
20893 | } | |
20894 | else | |
20895 | break; | |
20896 | } | |
20897 | } | |
20898 | return __ret; | |
20899 | } | |
20900 | ||
20901 | template<typename _CharT, typename _Traits> | |
20902 | streamsize | |
20903 | basic_streambuf<_CharT, _Traits>:: | |
20904 | xsputn(const char_type* __s, streamsize __n) | |
20905 | { | |
20906 | streamsize __ret = 0; | |
20907 | while (__ret < __n) | |
20908 | { | |
20909 | const streamsize __buf_len = this->epptr() - this->pptr(); | |
20910 | if (__buf_len) | |
20911 | { | |
20912 | const streamsize __remaining = __n - __ret; | |
20913 | const streamsize __len = std::min(__buf_len, __remaining); | |
20914 | traits_type::copy(this->pptr(), __s, __len); | |
20915 | __ret += __len; | |
20916 | __s += __len; | |
20917 | this->pbump(__len); | |
20918 | } | |
20919 | ||
20920 | if (__ret < __n) | |
20921 | { | |
20922 | int_type __c = this->overflow(traits_type::to_int_type(*__s)); | |
20923 | if (!traits_type::eq_int_type(__c, traits_type::eof())) | |
20924 | { | |
20925 | ++__ret; | |
20926 | ++__s; | |
20927 | } | |
20928 | else | |
20929 | break; | |
20930 | } | |
20931 | } | |
20932 | return __ret; | |
20933 | } | |
20934 | ||
20935 | ||
20936 | ||
20937 | ||
20938 | template<typename _CharT, typename _Traits> | |
20939 | streamsize | |
20940 | __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, | |
20941 | basic_streambuf<_CharT, _Traits>* __sbout) | |
20942 | { | |
20943 | streamsize __ret = 0; | |
20944 | typename _Traits::int_type __c = __sbin->sgetc(); | |
20945 | while (!_Traits::eq_int_type(__c, _Traits::eof())) | |
20946 | { | |
20947 | __c = __sbout->sputc(_Traits::to_char_type(__c)); | |
20948 | if (_Traits::eq_int_type(__c, _Traits::eof())) | |
20949 | break; | |
20950 | ++__ret; | |
20951 | __c = __sbin->snextc(); | |
20952 | } | |
20953 | return __ret; | |
20954 | } | |
20955 | ||
20956 | ||
20957 | ||
20958 | ||
20959 | ||
20960 | extern template class basic_streambuf<char>; | |
20961 | extern template | |
20962 | streamsize | |
20963 | __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*); | |
20964 | ||
20965 | ||
20966 | extern template class basic_streambuf<wchar_t>; | |
20967 | extern template | |
20968 | streamsize | |
20969 | __copy_streambufs(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*); | |
20970 | ||
20971 | ||
20972 | } | |
20973 | # 808 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/streambuf" 2 3 | |
20974 | ||
20975 | ||
20976 | #pragma GCC visibility pop | |
20977 | # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 2 3 | |
20978 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 1 3 | |
20979 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
20980 | ||
20981 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
20982 | ||
20983 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/streambuf_iterator.h" 1 3 | |
20984 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/streambuf_iterator.h" 3 | |
20985 | ||
20986 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/streambuf_iterator.h" 3 | |
20987 | ||
20988 | ||
20989 | ||
20990 | ||
20991 | ||
20992 | ||
20993 | namespace std | |
20994 | { | |
20995 | ||
20996 | ||
20997 | template<typename _CharT, typename _Traits> | |
20998 | class istreambuf_iterator | |
20999 | : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, | |
21000 | _CharT*, _CharT&> | |
21001 | { | |
21002 | public: | |
21003 | ||
21004 | ||
21005 | ||
21006 | typedef _CharT char_type; | |
21007 | typedef _Traits traits_type; | |
21008 | typedef typename _Traits::int_type int_type; | |
21009 | typedef basic_streambuf<_CharT, _Traits> streambuf_type; | |
21010 | typedef basic_istream<_CharT, _Traits> istream_type; | |
21011 | ||
21012 | ||
21013 | private: | |
21014 | ||
21015 | ||
21016 | ||
21017 | ||
21018 | ||
21019 | ||
21020 | ||
21021 | mutable streambuf_type* _M_sbuf; | |
21022 | mutable int_type _M_c; | |
21023 | ||
21024 | public: | |
21025 | ||
21026 | istreambuf_iterator() throw() | |
21027 | : _M_sbuf(0), _M_c(traits_type::eof()) { } | |
21028 | ||
21029 | ||
21030 | istreambuf_iterator(istream_type& __s) throw() | |
21031 | : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } | |
21032 | ||
21033 | ||
21034 | istreambuf_iterator(streambuf_type* __s) throw() | |
21035 | : _M_sbuf(__s), _M_c(traits_type::eof()) { } | |
21036 | ||
21037 | ||
21038 | ||
21039 | ||
21040 | char_type | |
21041 | operator*() const | |
21042 | { | |
21043 | ||
21044 | ||
21045 | ||
21046 | ||
21047 | ||
21048 | ||
21049 | ||
21050 | return traits_type::to_char_type(_M_get()); | |
21051 | } | |
21052 | ||
21053 | ||
21054 | istreambuf_iterator& | |
21055 | operator++() | |
21056 | { | |
21057 | ; | |
21058 | ||
21059 | ||
21060 | if (_M_sbuf) | |
21061 | { | |
21062 | _M_sbuf->sbumpc(); | |
21063 | _M_c = traits_type::eof(); | |
21064 | } | |
21065 | return *this; | |
21066 | } | |
21067 | ||
21068 | ||
21069 | istreambuf_iterator | |
21070 | operator++(int) | |
21071 | { | |
21072 | ; | |
21073 | ||
21074 | ||
21075 | ||
21076 | istreambuf_iterator __old = *this; | |
21077 | if (_M_sbuf) | |
21078 | { | |
21079 | __old._M_c = _M_sbuf->sbumpc(); | |
21080 | _M_c = traits_type::eof(); | |
21081 | } | |
21082 | return __old; | |
21083 | } | |
21084 | ||
21085 | ||
21086 | ||
21087 | ||
21088 | ||
21089 | bool | |
21090 | equal(const istreambuf_iterator& __b) const | |
21091 | { | |
21092 | const bool __thiseof = _M_at_eof(); | |
21093 | const bool __beof = __b._M_at_eof(); | |
21094 | return (__thiseof && __beof || (!__thiseof && !__beof)); | |
21095 | } | |
21096 | ||
21097 | private: | |
21098 | int_type | |
21099 | _M_get() const | |
21100 | { | |
21101 | const int_type __eof = traits_type::eof(); | |
21102 | int_type __ret = __eof; | |
21103 | if (_M_sbuf) | |
21104 | { | |
21105 | if (!traits_type::eq_int_type(_M_c, __eof)) | |
21106 | __ret = _M_c; | |
21107 | else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), | |
21108 | __eof)) | |
21109 | _M_c = __ret; | |
21110 | else | |
21111 | _M_sbuf = 0; | |
21112 | } | |
21113 | return __ret; | |
21114 | } | |
21115 | ||
21116 | bool | |
21117 | _M_at_eof() const | |
21118 | { | |
21119 | const int_type __eof = traits_type::eof(); | |
21120 | return traits_type::eq_int_type(_M_get(), __eof); | |
21121 | } | |
21122 | }; | |
21123 | ||
21124 | template<typename _CharT, typename _Traits> | |
21125 | inline bool | |
21126 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | |
21127 | const istreambuf_iterator<_CharT, _Traits>& __b) | |
21128 | { return __a.equal(__b); } | |
21129 | ||
21130 | template<typename _CharT, typename _Traits> | |
21131 | inline bool | |
21132 | operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, | |
21133 | const istreambuf_iterator<_CharT, _Traits>& __b) | |
21134 | { return !__a.equal(__b); } | |
21135 | ||
21136 | ||
21137 | template<typename _CharT, typename _Traits> | |
21138 | class ostreambuf_iterator | |
21139 | : public iterator<output_iterator_tag, void, void, void, void> | |
21140 | { | |
21141 | public: | |
21142 | ||
21143 | ||
21144 | ||
21145 | typedef _CharT char_type; | |
21146 | typedef _Traits traits_type; | |
21147 | typedef basic_streambuf<_CharT, _Traits> streambuf_type; | |
21148 | typedef basic_ostream<_CharT, _Traits> ostream_type; | |
21149 | ||
21150 | ||
21151 | private: | |
21152 | streambuf_type* _M_sbuf; | |
21153 | bool _M_failed; | |
21154 | ||
21155 | public: | |
21156 | ||
21157 | ostreambuf_iterator(ostream_type& __s) throw () | |
21158 | : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } | |
21159 | ||
21160 | ||
21161 | ostreambuf_iterator(streambuf_type* __s) throw () | |
21162 | : _M_sbuf(__s), _M_failed(!_M_sbuf) { } | |
21163 | ||
21164 | ||
21165 | ostreambuf_iterator& | |
21166 | operator=(_CharT __c) | |
21167 | { | |
21168 | if (!_M_failed && | |
21169 | _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) | |
21170 | _M_failed = true; | |
21171 | return *this; | |
21172 | } | |
21173 | ||
21174 | ||
21175 | ostreambuf_iterator& | |
21176 | operator*() | |
21177 | { return *this; } | |
21178 | ||
21179 | ||
21180 | ostreambuf_iterator& | |
21181 | operator++(int) | |
21182 | { return *this; } | |
21183 | ||
21184 | ||
21185 | ostreambuf_iterator& | |
21186 | operator++() | |
21187 | { return *this; } | |
21188 | ||
21189 | ||
21190 | bool | |
21191 | failed() const throw() | |
21192 | { return _M_failed; } | |
21193 | ||
21194 | ostreambuf_iterator& | |
21195 | _M_put(const _CharT* __ws, streamsize __len) | |
21196 | { | |
21197 | if (__builtin_expect(!_M_failed, true) | |
21198 | && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, | |
21199 | false)) | |
21200 | _M_failed = true; | |
21201 | return *this; | |
21202 | } | |
21203 | }; | |
21204 | } | |
21205 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 2 3 | |
21206 | ||
21207 | ||
21208 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 1 3 | |
21209 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21210 | ||
21211 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21212 | ||
21213 | ||
21214 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwctype" 1 3 | |
21215 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwctype" 3 | |
21216 | ||
21217 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwctype" 3 | |
21218 | #pragma GCC visibility push(default) | |
21219 | ||
21220 | ||
21221 | ||
21222 | ||
21223 | # 1 "/usr/include/wctype.h" 1 3 4 | |
21224 | # 35 "/usr/include/wctype.h" 3 4 | |
21225 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/stddef.h" 1 3 4 | |
21226 | # 36 "/usr/include/wctype.h" 2 3 4 | |
21227 | # 45 "/usr/include/wctype.h" 3 4 | |
21228 | ||
21229 | # 63 "/usr/include/wctype.h" 3 4 | |
21230 | ||
21231 | ||
21232 | ||
21233 | typedef unsigned long int wctype_t; | |
21234 | ||
21235 | # 85 "/usr/include/wctype.h" 3 4 | |
21236 | enum | |
21237 | { | |
21238 | __ISwupper = 0, | |
21239 | __ISwlower = 1, | |
21240 | __ISwalpha = 2, | |
21241 | __ISwdigit = 3, | |
21242 | __ISwxdigit = 4, | |
21243 | __ISwspace = 5, | |
21244 | __ISwprint = 6, | |
21245 | __ISwgraph = 7, | |
21246 | __ISwblank = 8, | |
21247 | __ISwcntrl = 9, | |
21248 | __ISwpunct = 10, | |
21249 | __ISwalnum = 11, | |
21250 | ||
21251 | _ISwupper = (1 << (__ISwupper)), | |
21252 | _ISwlower = (1 << (__ISwlower)), | |
21253 | _ISwalpha = (1 << (__ISwalpha)), | |
21254 | _ISwdigit = (1 << (__ISwdigit)), | |
21255 | _ISwxdigit = (1 << (__ISwxdigit)), | |
21256 | _ISwspace = (1 << (__ISwspace)), | |
21257 | _ISwprint = (1 << (__ISwprint)), | |
21258 | _ISwgraph = (1 << (__ISwgraph)), | |
21259 | _ISwblank = (1 << (__ISwblank)), | |
21260 | _ISwcntrl = (1 << (__ISwcntrl)), | |
21261 | _ISwpunct = (1 << (__ISwpunct)), | |
21262 | _ISwalnum = (1 << (__ISwalnum)) | |
21263 | }; | |
21264 | ||
21265 | ||
21266 | ||
21267 | extern "C" { | |
21268 | ||
21269 | ||
21270 | ||
21271 | ||
21272 | ||
21273 | ||
21274 | ||
21275 | ||
21276 | extern int iswalnum (wint_t __wc) throw (); | |
21277 | ||
21278 | ||
21279 | ||
21280 | ||
21281 | ||
21282 | extern int iswalpha (wint_t __wc) throw (); | |
21283 | ||
21284 | ||
21285 | extern int iswcntrl (wint_t __wc) throw (); | |
21286 | ||
21287 | ||
21288 | ||
21289 | extern int iswdigit (wint_t __wc) throw (); | |
21290 | ||
21291 | ||
21292 | ||
21293 | extern int iswgraph (wint_t __wc) throw (); | |
21294 | ||
21295 | ||
21296 | ||
21297 | ||
21298 | extern int iswlower (wint_t __wc) throw (); | |
21299 | ||
21300 | ||
21301 | extern int iswprint (wint_t __wc) throw (); | |
21302 | ||
21303 | ||
21304 | ||
21305 | ||
21306 | extern int iswpunct (wint_t __wc) throw (); | |
21307 | ||
21308 | ||
21309 | ||
21310 | ||
21311 | extern int iswspace (wint_t __wc) throw (); | |
21312 | ||
21313 | ||
21314 | ||
21315 | ||
21316 | extern int iswupper (wint_t __wc) throw (); | |
21317 | ||
21318 | ||
21319 | ||
21320 | ||
21321 | extern int iswxdigit (wint_t __wc) throw (); | |
21322 | ||
21323 | ||
21324 | ||
21325 | ||
21326 | ||
21327 | extern int iswblank (wint_t __wc) throw (); | |
21328 | # 185 "/usr/include/wctype.h" 3 4 | |
21329 | extern wctype_t wctype (__const char *__property) throw (); | |
21330 | ||
21331 | ||
21332 | ||
21333 | extern int iswctype (wint_t __wc, wctype_t __desc) throw (); | |
21334 | ||
21335 | ||
21336 | ||
21337 | ||
21338 | ||
21339 | ||
21340 | ||
21341 | ||
21342 | ||
21343 | ||
21344 | typedef __const __int32_t *wctrans_t; | |
21345 | ||
21346 | ||
21347 | ||
21348 | ||
21349 | ||
21350 | ||
21351 | ||
21352 | extern wint_t towlower (wint_t __wc) throw (); | |
21353 | ||
21354 | ||
21355 | extern wint_t towupper (wint_t __wc) throw (); | |
21356 | ||
21357 | ||
21358 | } | |
21359 | # 227 "/usr/include/wctype.h" 3 4 | |
21360 | extern "C" { | |
21361 | ||
21362 | ||
21363 | ||
21364 | ||
21365 | extern wctrans_t wctrans (__const char *__property) throw (); | |
21366 | ||
21367 | ||
21368 | extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); | |
21369 | ||
21370 | ||
21371 | ||
21372 | ||
21373 | ||
21374 | ||
21375 | ||
21376 | ||
21377 | extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); | |
21378 | ||
21379 | ||
21380 | ||
21381 | ||
21382 | ||
21383 | extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); | |
21384 | ||
21385 | ||
21386 | extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); | |
21387 | ||
21388 | ||
21389 | ||
21390 | extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); | |
21391 | ||
21392 | ||
21393 | ||
21394 | extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); | |
21395 | ||
21396 | ||
21397 | ||
21398 | ||
21399 | extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); | |
21400 | ||
21401 | ||
21402 | extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); | |
21403 | ||
21404 | ||
21405 | ||
21406 | ||
21407 | extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); | |
21408 | ||
21409 | ||
21410 | ||
21411 | ||
21412 | extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); | |
21413 | ||
21414 | ||
21415 | ||
21416 | ||
21417 | extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); | |
21418 | ||
21419 | ||
21420 | ||
21421 | ||
21422 | extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); | |
21423 | ||
21424 | ||
21425 | ||
21426 | ||
21427 | extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); | |
21428 | ||
21429 | ||
21430 | ||
21431 | extern wctype_t wctype_l (__const char *__property, __locale_t __locale) | |
21432 | throw (); | |
21433 | ||
21434 | ||
21435 | ||
21436 | extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) | |
21437 | throw (); | |
21438 | ||
21439 | ||
21440 | ||
21441 | ||
21442 | ||
21443 | ||
21444 | ||
21445 | extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); | |
21446 | ||
21447 | ||
21448 | extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); | |
21449 | ||
21450 | ||
21451 | ||
21452 | extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) | |
21453 | throw (); | |
21454 | ||
21455 | ||
21456 | extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, | |
21457 | __locale_t __locale) throw (); | |
21458 | ||
21459 | ||
21460 | ||
21461 | } | |
21462 | # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwctype" 2 3 | |
21463 | # 80 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/cwctype" 3 | |
21464 | namespace std | |
21465 | { | |
21466 | using ::wint_t; | |
21467 | ||
21468 | using ::wctype_t; | |
21469 | using ::wctrans_t; | |
21470 | ||
21471 | using ::iswalnum; | |
21472 | using ::iswalpha; | |
21473 | ||
21474 | using ::iswblank; | |
21475 | ||
21476 | using ::iswcntrl; | |
21477 | using ::iswctype; | |
21478 | using ::iswdigit; | |
21479 | using ::iswgraph; | |
21480 | using ::iswlower; | |
21481 | using ::iswprint; | |
21482 | using ::iswpunct; | |
21483 | using ::iswspace; | |
21484 | using ::iswupper; | |
21485 | using ::iswxdigit; | |
21486 | using ::towctrans; | |
21487 | using ::towlower; | |
21488 | using ::towupper; | |
21489 | using ::wctrans; | |
21490 | using ::wctype; | |
21491 | } | |
21492 | ||
21493 | ||
21494 | #pragma GCC visibility pop | |
21495 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 2 3 | |
21496 | ||
21497 | ||
21498 | ||
21499 | ||
21500 | namespace std | |
21501 | { | |
21502 | # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21503 | template<typename _Tv> | |
21504 | void | |
21505 | __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err, | |
21506 | const __c_locale& __cloc); | |
21507 | ||
21508 | ||
21509 | template<> | |
21510 | void | |
21511 | __convert_to_v(const char*, float&, ios_base::iostate&, | |
21512 | const __c_locale&); | |
21513 | ||
21514 | template<> | |
21515 | void | |
21516 | __convert_to_v(const char*, double&, ios_base::iostate&, | |
21517 | const __c_locale&); | |
21518 | ||
21519 | template<> | |
21520 | void | |
21521 | __convert_to_v(const char*, long double&, ios_base::iostate&, | |
21522 | const __c_locale&); | |
21523 | ||
21524 | ||
21525 | ||
21526 | template<typename _CharT, typename _Traits> | |
21527 | struct __pad | |
21528 | { | |
21529 | static void | |
21530 | _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, | |
21531 | const _CharT* __olds, const streamsize __newlen, | |
21532 | const streamsize __oldlen, const bool __num); | |
21533 | }; | |
21534 | ||
21535 | ||
21536 | ||
21537 | ||
21538 | ||
21539 | ||
21540 | template<typename _CharT> | |
21541 | _CharT* | |
21542 | __add_grouping(_CharT* __s, _CharT __sep, | |
21543 | const char* __gbeg, size_t __gsize, | |
21544 | const _CharT* __first, const _CharT* __last); | |
21545 | ||
21546 | ||
21547 | ||
21548 | ||
21549 | template<typename _CharT> | |
21550 | inline | |
21551 | ostreambuf_iterator<_CharT> | |
21552 | __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) | |
21553 | { | |
21554 | __s._M_put(__ws, __len); | |
21555 | return __s; | |
21556 | } | |
21557 | ||
21558 | ||
21559 | template<typename _CharT, typename _OutIter> | |
21560 | inline | |
21561 | _OutIter | |
21562 | __write(_OutIter __s, const _CharT* __ws, int __len) | |
21563 | { | |
21564 | for (int __j = 0; __j < __len; __j++, ++__s) | |
21565 | *__s = __ws[__j]; | |
21566 | return __s; | |
21567 | } | |
21568 | ||
21569 | ||
21570 | ||
21571 | ||
21572 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_base.h" 1 3 | |
21573 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_base.h" 3 | |
21574 | struct ctype_base | |
21575 | { | |
21576 | ||
21577 | typedef const int* __to_type; | |
21578 | ||
21579 | ||
21580 | ||
21581 | typedef unsigned short mask; | |
21582 | static const mask upper = _ISupper; | |
21583 | static const mask lower = _ISlower; | |
21584 | static const mask alpha = _ISalpha; | |
21585 | static const mask digit = _ISdigit; | |
21586 | static const mask xdigit = _ISxdigit; | |
21587 | static const mask space = _ISspace; | |
21588 | static const mask print = _ISprint; | |
21589 | static const mask graph = _ISalpha | _ISdigit | _ISpunct; | |
21590 | static const mask cntrl = _IScntrl; | |
21591 | static const mask punct = _ISpunct; | |
21592 | static const mask alnum = _ISalpha | _ISdigit; | |
21593 | }; | |
21594 | # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 2 3 | |
21595 | # 144 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21596 | template<typename _CharT> | |
21597 | class __ctype_abstract_base : public locale::facet, public ctype_base | |
21598 | { | |
21599 | public: | |
21600 | ||
21601 | ||
21602 | typedef _CharT char_type; | |
21603 | # 162 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21604 | bool | |
21605 | is(mask __m, char_type __c) const | |
21606 | { return this->do_is(__m, __c); } | |
21607 | # 179 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21608 | const char_type* | |
21609 | is(const char_type *__lo, const char_type *__hi, mask *__vec) const | |
21610 | { return this->do_is(__lo, __hi, __vec); } | |
21611 | # 195 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21612 | const char_type* | |
21613 | scan_is(mask __m, const char_type* __lo, const char_type* __hi) const | |
21614 | { return this->do_scan_is(__m, __lo, __hi); } | |
21615 | # 211 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21616 | const char_type* | |
21617 | scan_not(mask __m, const char_type* __lo, const char_type* __hi) const | |
21618 | { return this->do_scan_not(__m, __lo, __hi); } | |
21619 | # 225 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21620 | char_type | |
21621 | toupper(char_type __c) const | |
21622 | { return this->do_toupper(__c); } | |
21623 | # 240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21624 | const char_type* | |
21625 | toupper(char_type *__lo, const char_type* __hi) const | |
21626 | { return this->do_toupper(__lo, __hi); } | |
21627 | # 254 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21628 | char_type | |
21629 | tolower(char_type __c) const | |
21630 | { return this->do_tolower(__c); } | |
21631 | # 269 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21632 | const char_type* | |
21633 | tolower(char_type* __lo, const char_type* __hi) const | |
21634 | { return this->do_tolower(__lo, __hi); } | |
21635 | # 286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21636 | char_type | |
21637 | widen(char __c) const | |
21638 | { return this->do_widen(__c); } | |
21639 | # 305 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21640 | const char* | |
21641 | widen(const char* __lo, const char* __hi, char_type* __to) const | |
21642 | { return this->do_widen(__lo, __hi, __to); } | |
21643 | # 324 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21644 | char | |
21645 | narrow(char_type __c, char __dfault) const | |
21646 | { return this->do_narrow(__c, __dfault); } | |
21647 | # 346 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21648 | const char_type* | |
21649 | narrow(const char_type* __lo, const char_type* __hi, | |
21650 | char __dfault, char *__to) const | |
21651 | { return this->do_narrow(__lo, __hi, __dfault, __to); } | |
21652 | ||
21653 | protected: | |
21654 | explicit | |
21655 | __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } | |
21656 | ||
21657 | virtual | |
21658 | ~__ctype_abstract_base() { } | |
21659 | # 371 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21660 | virtual bool | |
21661 | do_is(mask __m, char_type __c) const = 0; | |
21662 | # 390 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21663 | virtual const char_type* | |
21664 | do_is(const char_type* __lo, const char_type* __hi, | |
21665 | mask* __vec) const = 0; | |
21666 | # 409 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21667 | virtual const char_type* | |
21668 | do_scan_is(mask __m, const char_type* __lo, | |
21669 | const char_type* __hi) const = 0; | |
21670 | # 428 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21671 | virtual const char_type* | |
21672 | do_scan_not(mask __m, const char_type* __lo, | |
21673 | const char_type* __hi) const = 0; | |
21674 | # 446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21675 | virtual char_type | |
21676 | do_toupper(char_type) const = 0; | |
21677 | # 463 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21678 | virtual const char_type* | |
21679 | do_toupper(char_type* __lo, const char_type* __hi) const = 0; | |
21680 | # 479 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21681 | virtual char_type | |
21682 | do_tolower(char_type) const = 0; | |
21683 | # 496 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21684 | virtual const char_type* | |
21685 | do_tolower(char_type* __lo, const char_type* __hi) const = 0; | |
21686 | # 515 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21687 | virtual char_type | |
21688 | do_widen(char) const = 0; | |
21689 | # 536 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21690 | virtual const char* | |
21691 | do_widen(const char* __lo, const char* __hi, | |
21692 | char_type* __dest) const = 0; | |
21693 | # 558 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21694 | virtual char | |
21695 | do_narrow(char_type, char __dfault) const = 0; | |
21696 | # 582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21697 | virtual const char_type* | |
21698 | do_narrow(const char_type* __lo, const char_type* __hi, | |
21699 | char __dfault, char* __dest) const = 0; | |
21700 | }; | |
21701 | # 605 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21702 | template<typename _CharT> | |
21703 | class ctype : public __ctype_abstract_base<_CharT> | |
21704 | { | |
21705 | public: | |
21706 | ||
21707 | typedef _CharT char_type; | |
21708 | typedef typename __ctype_abstract_base<_CharT>::mask mask; | |
21709 | ||
21710 | ||
21711 | static locale::id id; | |
21712 | ||
21713 | explicit | |
21714 | ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } | |
21715 | ||
21716 | protected: | |
21717 | virtual | |
21718 | ~ctype(); | |
21719 | ||
21720 | virtual bool | |
21721 | do_is(mask __m, char_type __c) const; | |
21722 | ||
21723 | virtual const char_type* | |
21724 | do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; | |
21725 | ||
21726 | virtual const char_type* | |
21727 | do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; | |
21728 | ||
21729 | virtual const char_type* | |
21730 | do_scan_not(mask __m, const char_type* __lo, | |
21731 | const char_type* __hi) const; | |
21732 | ||
21733 | virtual char_type | |
21734 | do_toupper(char_type __c) const; | |
21735 | ||
21736 | virtual const char_type* | |
21737 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
21738 | ||
21739 | virtual char_type | |
21740 | do_tolower(char_type __c) const; | |
21741 | ||
21742 | virtual const char_type* | |
21743 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
21744 | ||
21745 | virtual char_type | |
21746 | do_widen(char __c) const; | |
21747 | ||
21748 | virtual const char* | |
21749 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const; | |
21750 | ||
21751 | virtual char | |
21752 | do_narrow(char_type, char __dfault) const; | |
21753 | ||
21754 | virtual const char_type* | |
21755 | do_narrow(const char_type* __lo, const char_type* __hi, | |
21756 | char __dfault, char* __dest) const; | |
21757 | }; | |
21758 | ||
21759 | template<typename _CharT> | |
21760 | locale::id ctype<_CharT>::id; | |
21761 | # 674 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21762 | template<> | |
21763 | class ctype<char> : public locale::facet, public ctype_base | |
21764 | { | |
21765 | public: | |
21766 | ||
21767 | ||
21768 | typedef char char_type; | |
21769 | ||
21770 | protected: | |
21771 | ||
21772 | __c_locale _M_c_locale_ctype; | |
21773 | bool _M_del; | |
21774 | __to_type _M_toupper; | |
21775 | __to_type _M_tolower; | |
21776 | const mask* _M_table; | |
21777 | mutable char _M_widen_ok; | |
21778 | mutable char _M_widen[1 + static_cast<unsigned char>(-1)]; | |
21779 | mutable char _M_narrow[1 + static_cast<unsigned char>(-1)]; | |
21780 | mutable char _M_narrow_ok; | |
21781 | ||
21782 | ||
21783 | public: | |
21784 | ||
21785 | static locale::id id; | |
21786 | ||
21787 | static const size_t table_size = 1 + static_cast<unsigned char>(-1); | |
21788 | # 711 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21789 | explicit | |
21790 | ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); | |
21791 | # 724 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21792 | explicit | |
21793 | ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, | |
21794 | size_t __refs = 0); | |
21795 | # 737 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21796 | inline bool | |
21797 | is(mask __m, char __c) const; | |
21798 | # 752 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21799 | inline const char* | |
21800 | is(const char* __lo, const char* __hi, mask* __vec) const; | |
21801 | # 766 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21802 | inline const char* | |
21803 | scan_is(mask __m, const char* __lo, const char* __hi) const; | |
21804 | # 780 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21805 | inline const char* | |
21806 | scan_not(mask __m, const char* __lo, const char* __hi) const; | |
21807 | # 795 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21808 | char_type | |
21809 | toupper(char_type __c) const | |
21810 | { return this->do_toupper(__c); } | |
21811 | # 812 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21812 | const char_type* | |
21813 | toupper(char_type *__lo, const char_type* __hi) const | |
21814 | { return this->do_toupper(__lo, __hi); } | |
21815 | # 828 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21816 | char_type | |
21817 | tolower(char_type __c) const | |
21818 | { return this->do_tolower(__c); } | |
21819 | # 845 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21820 | const char_type* | |
21821 | tolower(char_type* __lo, const char_type* __hi) const | |
21822 | { return this->do_tolower(__lo, __hi); } | |
21823 | # 865 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21824 | char_type | |
21825 | widen(char __c) const | |
21826 | { | |
21827 | if (_M_widen_ok) | |
21828 | return _M_widen[static_cast<unsigned char>(__c)]; | |
21829 | this->_M_widen_init(); | |
21830 | return this->do_widen(__c); | |
21831 | } | |
21832 | # 892 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21833 | const char* | |
21834 | widen(const char* __lo, const char* __hi, char_type* __to) const | |
21835 | { | |
21836 | if (_M_widen_ok == 1) | |
21837 | { | |
21838 | memcpy(__to, __lo, __hi - __lo); | |
21839 | return __hi; | |
21840 | } | |
21841 | if (!_M_widen_ok) | |
21842 | _M_widen_init(); | |
21843 | return this->do_widen(__lo, __hi, __to); | |
21844 | } | |
21845 | # 923 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21846 | char | |
21847 | narrow(char_type __c, char __dfault) const | |
21848 | { | |
21849 | if (_M_narrow[static_cast<unsigned char>(__c)]) | |
21850 | return _M_narrow[static_cast<unsigned char>(__c)]; | |
21851 | const char __t = do_narrow(__c, __dfault); | |
21852 | if (__t != __dfault) | |
21853 | _M_narrow[static_cast<unsigned char>(__c)] = __t; | |
21854 | return __t; | |
21855 | } | |
21856 | # 956 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21857 | const char_type* | |
21858 | narrow(const char_type* __lo, const char_type* __hi, | |
21859 | char __dfault, char *__to) const | |
21860 | { | |
21861 | if (__builtin_expect(_M_narrow_ok == 1, true)) | |
21862 | { | |
21863 | memcpy(__to, __lo, __hi - __lo); | |
21864 | return __hi; | |
21865 | } | |
21866 | if (!_M_narrow_ok) | |
21867 | _M_narrow_init(); | |
21868 | return this->do_narrow(__lo, __hi, __dfault, __to); | |
21869 | } | |
21870 | ||
21871 | protected: | |
21872 | ||
21873 | ||
21874 | const mask* | |
21875 | table() const throw() | |
21876 | { return _M_table; } | |
21877 | ||
21878 | ||
21879 | static const mask* | |
21880 | classic_table() throw(); | |
21881 | ||
21882 | ||
21883 | ||
21884 | ||
21885 | ||
21886 | ||
21887 | ||
21888 | virtual | |
21889 | ~ctype(); | |
21890 | # 1003 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21891 | virtual char_type | |
21892 | do_toupper(char_type) const; | |
21893 | # 1020 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21894 | virtual const char_type* | |
21895 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
21896 | # 1036 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21897 | virtual char_type | |
21898 | do_tolower(char_type) const; | |
21899 | # 1053 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21900 | virtual const char_type* | |
21901 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
21902 | # 1073 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21903 | virtual char_type | |
21904 | do_widen(char __c) const | |
21905 | { return __c; } | |
21906 | # 1096 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21907 | virtual const char* | |
21908 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const | |
21909 | { | |
21910 | memcpy(__dest, __lo, __hi - __lo); | |
21911 | return __hi; | |
21912 | } | |
21913 | # 1122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21914 | virtual char | |
21915 | do_narrow(char_type __c, char) const | |
21916 | { return __c; } | |
21917 | # 1148 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21918 | virtual const char_type* | |
21919 | do_narrow(const char_type* __lo, const char_type* __hi, | |
21920 | char, char* __dest) const | |
21921 | { | |
21922 | memcpy(__dest, __lo, __hi - __lo); | |
21923 | return __hi; | |
21924 | } | |
21925 | ||
21926 | private: | |
21927 | ||
21928 | void _M_widen_init() const | |
21929 | { | |
21930 | char __tmp[sizeof(_M_widen)]; | |
21931 | for (size_t __i = 0; __i < sizeof(_M_widen); ++__i) | |
21932 | __tmp[__i] = __i; | |
21933 | do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); | |
21934 | ||
21935 | _M_widen_ok = 1; | |
21936 | ||
21937 | if (memcmp(__tmp, _M_widen, sizeof(_M_widen))) | |
21938 | _M_widen_ok = 2; | |
21939 | } | |
21940 | ||
21941 | ||
21942 | ||
21943 | ||
21944 | void _M_narrow_init() const | |
21945 | { | |
21946 | char __tmp[sizeof(_M_narrow)]; | |
21947 | for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i) | |
21948 | __tmp[__i] = __i; | |
21949 | do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow); | |
21950 | ||
21951 | _M_narrow_ok = 1; | |
21952 | if (memcmp(__tmp, _M_narrow, sizeof(_M_narrow))) | |
21953 | _M_narrow_ok = 2; | |
21954 | else | |
21955 | { | |
21956 | ||
21957 | ||
21958 | char __c; | |
21959 | do_narrow(__tmp, __tmp + 1, 1, &__c); | |
21960 | if (__c == 1) | |
21961 | _M_narrow_ok = 2; | |
21962 | } | |
21963 | } | |
21964 | }; | |
21965 | ||
21966 | template<> | |
21967 | const ctype<char>& | |
21968 | use_facet<ctype<char> >(const locale& __loc); | |
21969 | # 1212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21970 | template<> | |
21971 | class ctype<wchar_t> : public __ctype_abstract_base<wchar_t> | |
21972 | { | |
21973 | public: | |
21974 | ||
21975 | ||
21976 | typedef wchar_t char_type; | |
21977 | typedef wctype_t __wmask_type; | |
21978 | ||
21979 | protected: | |
21980 | __c_locale _M_c_locale_ctype; | |
21981 | ||
21982 | ||
21983 | bool _M_narrow_ok; | |
21984 | char _M_narrow[128]; | |
21985 | wint_t _M_widen[1 + static_cast<unsigned char>(-1)]; | |
21986 | ||
21987 | ||
21988 | mask _M_bit[16]; | |
21989 | __wmask_type _M_wmask[16]; | |
21990 | ||
21991 | public: | |
21992 | ||
21993 | ||
21994 | static locale::id id; | |
21995 | # 1245 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21996 | explicit | |
21997 | ctype(size_t __refs = 0); | |
21998 | # 1256 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
21999 | explicit | |
22000 | ctype(__c_locale __cloc, size_t __refs = 0); | |
22001 | ||
22002 | protected: | |
22003 | __wmask_type | |
22004 | _M_convert_to_wmask(const mask __m) const; | |
22005 | ||
22006 | ||
22007 | virtual | |
22008 | ~ctype(); | |
22009 | # 1280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22010 | virtual bool | |
22011 | do_is(mask __m, char_type __c) const; | |
22012 | # 1299 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22013 | virtual const char_type* | |
22014 | do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; | |
22015 | # 1317 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22016 | virtual const char_type* | |
22017 | do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; | |
22018 | # 1335 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22019 | virtual const char_type* | |
22020 | do_scan_not(mask __m, const char_type* __lo, | |
22021 | const char_type* __hi) const; | |
22022 | # 1352 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22023 | virtual char_type | |
22024 | do_toupper(char_type) const; | |
22025 | # 1369 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22026 | virtual const char_type* | |
22027 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
22028 | # 1385 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22029 | virtual char_type | |
22030 | do_tolower(char_type) const; | |
22031 | # 1402 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22032 | virtual const char_type* | |
22033 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
22034 | # 1422 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22035 | virtual char_type | |
22036 | do_widen(char) const; | |
22037 | # 1444 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22038 | virtual const char* | |
22039 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const; | |
22040 | # 1467 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22041 | virtual char | |
22042 | do_narrow(char_type, char __dfault) const; | |
22043 | # 1493 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22044 | virtual const char_type* | |
22045 | do_narrow(const char_type* __lo, const char_type* __hi, | |
22046 | char __dfault, char* __dest) const; | |
22047 | ||
22048 | ||
22049 | void | |
22050 | _M_initialize_ctype(); | |
22051 | }; | |
22052 | ||
22053 | template<> | |
22054 | const ctype<wchar_t>& | |
22055 | use_facet<ctype<wchar_t> >(const locale& __loc); | |
22056 | ||
22057 | ||
22058 | ||
22059 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_inline.h" 1 3 | |
22060 | # 37 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_inline.h" 3 | |
22061 | bool | |
22062 | ctype<char>:: | |
22063 | is(mask __m, char __c) const | |
22064 | { return _M_table[static_cast<unsigned char>(__c)] & __m; } | |
22065 | ||
22066 | const char* | |
22067 | ctype<char>:: | |
22068 | is(const char* __low, const char* __high, mask* __vec) const | |
22069 | { | |
22070 | while (__low < __high) | |
22071 | *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; | |
22072 | return __high; | |
22073 | } | |
22074 | ||
22075 | const char* | |
22076 | ctype<char>:: | |
22077 | scan_is(mask __m, const char* __low, const char* __high) const | |
22078 | { | |
22079 | while (__low < __high | |
22080 | && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) | |
22081 | ++__low; | |
22082 | return __low; | |
22083 | } | |
22084 | ||
22085 | const char* | |
22086 | ctype<char>:: | |
22087 | scan_not(mask __m, const char* __low, const char* __high) const | |
22088 | { | |
22089 | while (__low < __high | |
22090 | && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) | |
22091 | ++__low; | |
22092 | return __low; | |
22093 | } | |
22094 | # 1509 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 2 3 | |
22095 | ||
22096 | ||
22097 | template<typename _CharT> | |
22098 | class ctype_byname : public ctype<_CharT> | |
22099 | { | |
22100 | public: | |
22101 | typedef _CharT char_type; | |
22102 | ||
22103 | explicit | |
22104 | ctype_byname(const char* __s, size_t __refs = 0); | |
22105 | ||
22106 | protected: | |
22107 | virtual | |
22108 | ~ctype_byname() { }; | |
22109 | }; | |
22110 | ||
22111 | ||
22112 | template<> | |
22113 | ctype_byname<char>::ctype_byname(const char*, size_t refs); | |
22114 | ||
22115 | template<> | |
22116 | ctype_byname<wchar_t>::ctype_byname(const char*, size_t refs); | |
22117 | ||
22118 | ||
22119 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 1 3 | |
22120 | # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 3 | |
22121 | ||
22122 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 3 | |
22123 | ||
22124 | ||
22125 | class codecvt_base | |
22126 | { | |
22127 | public: | |
22128 | enum result | |
22129 | { | |
22130 | ok, | |
22131 | partial, | |
22132 | error, | |
22133 | noconv | |
22134 | }; | |
22135 | }; | |
22136 | # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 3 | |
22137 | template<typename _InternT, typename _ExternT, typename _StateT> | |
22138 | class __codecvt_abstract_base | |
22139 | : public locale::facet, public codecvt_base | |
22140 | { | |
22141 | public: | |
22142 | ||
22143 | typedef codecvt_base::result result; | |
22144 | typedef _InternT intern_type; | |
22145 | typedef _ExternT extern_type; | |
22146 | typedef _StateT state_type; | |
22147 | # 117 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 3 | |
22148 | result | |
22149 | out(state_type& __state, const intern_type* __from, | |
22150 | const intern_type* __from_end, const intern_type*& __from_next, | |
22151 | extern_type* __to, extern_type* __to_end, | |
22152 | extern_type*& __to_next) const | |
22153 | { | |
22154 | return this->do_out(__state, __from, __from_end, __from_next, | |
22155 | __to, __to_end, __to_next); | |
22156 | } | |
22157 | # 156 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 3 | |
22158 | result | |
22159 | unshift(state_type& __state, extern_type* __to, extern_type* __to_end, | |
22160 | extern_type*& __to_next) const | |
22161 | { return this->do_unshift(__state, __to,__to_end,__to_next); } | |
22162 | # 197 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 3 | |
22163 | result | |
22164 | in(state_type& __state, const extern_type* __from, | |
22165 | const extern_type* __from_end, const extern_type*& __from_next, | |
22166 | intern_type* __to, intern_type* __to_end, | |
22167 | intern_type*& __to_next) const | |
22168 | { | |
22169 | return this->do_in(__state, __from, __from_end, __from_next, | |
22170 | __to, __to_end, __to_next); | |
22171 | } | |
22172 | ||
22173 | int | |
22174 | encoding() const throw() | |
22175 | { return this->do_encoding(); } | |
22176 | ||
22177 | bool | |
22178 | always_noconv() const throw() | |
22179 | { return this->do_always_noconv(); } | |
22180 | ||
22181 | int | |
22182 | length(state_type& __state, const extern_type* __from, | |
22183 | const extern_type* __end, size_t __max) const | |
22184 | { return this->do_length(__state, __from, __end, __max); } | |
22185 | ||
22186 | int | |
22187 | max_length() const throw() | |
22188 | { return this->do_max_length(); } | |
22189 | ||
22190 | protected: | |
22191 | explicit | |
22192 | __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } | |
22193 | ||
22194 | virtual | |
22195 | ~__codecvt_abstract_base() { } | |
22196 | # 238 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/codecvt.h" 3 | |
22197 | virtual result | |
22198 | do_out(state_type& __state, const intern_type* __from, | |
22199 | const intern_type* __from_end, const intern_type*& __from_next, | |
22200 | extern_type* __to, extern_type* __to_end, | |
22201 | extern_type*& __to_next) const = 0; | |
22202 | ||
22203 | virtual result | |
22204 | do_unshift(state_type& __state, extern_type* __to, | |
22205 | extern_type* __to_end, extern_type*& __to_next) const = 0; | |
22206 | ||
22207 | virtual result | |
22208 | do_in(state_type& __state, const extern_type* __from, | |
22209 | const extern_type* __from_end, const extern_type*& __from_next, | |
22210 | intern_type* __to, intern_type* __to_end, | |
22211 | intern_type*& __to_next) const = 0; | |
22212 | ||
22213 | virtual int | |
22214 | do_encoding() const throw() = 0; | |
22215 | ||
22216 | virtual bool | |
22217 | do_always_noconv() const throw() = 0; | |
22218 | ||
22219 | virtual int | |
22220 | do_length(state_type&, const extern_type* __from, | |
22221 | const extern_type* __end, size_t __max) const = 0; | |
22222 | ||
22223 | virtual int | |
22224 | do_max_length() const throw() = 0; | |
22225 | }; | |
22226 | ||
22227 | ||
22228 | ||
22229 | template<typename _InternT, typename _ExternT, typename _StateT> | |
22230 | class codecvt | |
22231 | : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> | |
22232 | { | |
22233 | public: | |
22234 | ||
22235 | typedef codecvt_base::result result; | |
22236 | typedef _InternT intern_type; | |
22237 | typedef _ExternT extern_type; | |
22238 | typedef _StateT state_type; | |
22239 | ||
22240 | protected: | |
22241 | __c_locale _M_c_locale_codecvt; | |
22242 | ||
22243 | public: | |
22244 | static locale::id id; | |
22245 | ||
22246 | explicit | |
22247 | codecvt(size_t __refs = 0) | |
22248 | : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } | |
22249 | ||
22250 | explicit | |
22251 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
22252 | ||
22253 | protected: | |
22254 | virtual | |
22255 | ~codecvt() { } | |
22256 | ||
22257 | virtual result | |
22258 | do_out(state_type& __state, const intern_type* __from, | |
22259 | const intern_type* __from_end, const intern_type*& __from_next, | |
22260 | extern_type* __to, extern_type* __to_end, | |
22261 | extern_type*& __to_next) const; | |
22262 | ||
22263 | virtual result | |
22264 | do_unshift(state_type& __state, extern_type* __to, | |
22265 | extern_type* __to_end, extern_type*& __to_next) const; | |
22266 | ||
22267 | virtual result | |
22268 | do_in(state_type& __state, const extern_type* __from, | |
22269 | const extern_type* __from_end, const extern_type*& __from_next, | |
22270 | intern_type* __to, intern_type* __to_end, | |
22271 | intern_type*& __to_next) const; | |
22272 | ||
22273 | virtual int | |
22274 | do_encoding() const throw(); | |
22275 | ||
22276 | virtual bool | |
22277 | do_always_noconv() const throw(); | |
22278 | ||
22279 | virtual int | |
22280 | do_length(state_type&, const extern_type* __from, | |
22281 | const extern_type* __end, size_t __max) const; | |
22282 | ||
22283 | virtual int | |
22284 | do_max_length() const throw(); | |
22285 | }; | |
22286 | ||
22287 | template<typename _InternT, typename _ExternT, typename _StateT> | |
22288 | locale::id codecvt<_InternT, _ExternT, _StateT>::id; | |
22289 | ||
22290 | ||
22291 | template<> | |
22292 | class codecvt<char, char, mbstate_t> | |
22293 | : public __codecvt_abstract_base<char, char, mbstate_t> | |
22294 | { | |
22295 | public: | |
22296 | ||
22297 | typedef char intern_type; | |
22298 | typedef char extern_type; | |
22299 | typedef mbstate_t state_type; | |
22300 | ||
22301 | protected: | |
22302 | __c_locale _M_c_locale_codecvt; | |
22303 | ||
22304 | public: | |
22305 | static locale::id id; | |
22306 | ||
22307 | explicit | |
22308 | codecvt(size_t __refs = 0); | |
22309 | ||
22310 | explicit | |
22311 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
22312 | ||
22313 | protected: | |
22314 | virtual | |
22315 | ~codecvt(); | |
22316 | ||
22317 | virtual result | |
22318 | do_out(state_type& __state, const intern_type* __from, | |
22319 | const intern_type* __from_end, const intern_type*& __from_next, | |
22320 | extern_type* __to, extern_type* __to_end, | |
22321 | extern_type*& __to_next) const; | |
22322 | ||
22323 | virtual result | |
22324 | do_unshift(state_type& __state, extern_type* __to, | |
22325 | extern_type* __to_end, extern_type*& __to_next) const; | |
22326 | ||
22327 | virtual result | |
22328 | do_in(state_type& __state, const extern_type* __from, | |
22329 | const extern_type* __from_end, const extern_type*& __from_next, | |
22330 | intern_type* __to, intern_type* __to_end, | |
22331 | intern_type*& __to_next) const; | |
22332 | ||
22333 | virtual int | |
22334 | do_encoding() const throw(); | |
22335 | ||
22336 | virtual bool | |
22337 | do_always_noconv() const throw(); | |
22338 | ||
22339 | virtual int | |
22340 | do_length(state_type&, const extern_type* __from, | |
22341 | const extern_type* __end, size_t __max) const; | |
22342 | ||
22343 | virtual int | |
22344 | do_max_length() const throw(); | |
22345 | }; | |
22346 | ||
22347 | ||
22348 | ||
22349 | template<> | |
22350 | class codecvt<wchar_t, char, mbstate_t> | |
22351 | : public __codecvt_abstract_base<wchar_t, char, mbstate_t> | |
22352 | { | |
22353 | public: | |
22354 | ||
22355 | typedef wchar_t intern_type; | |
22356 | typedef char extern_type; | |
22357 | typedef mbstate_t state_type; | |
22358 | ||
22359 | protected: | |
22360 | __c_locale _M_c_locale_codecvt; | |
22361 | ||
22362 | public: | |
22363 | static locale::id id; | |
22364 | ||
22365 | explicit | |
22366 | codecvt(size_t __refs = 0); | |
22367 | ||
22368 | explicit | |
22369 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
22370 | ||
22371 | protected: | |
22372 | virtual | |
22373 | ~codecvt(); | |
22374 | ||
22375 | virtual result | |
22376 | do_out(state_type& __state, const intern_type* __from, | |
22377 | const intern_type* __from_end, const intern_type*& __from_next, | |
22378 | extern_type* __to, extern_type* __to_end, | |
22379 | extern_type*& __to_next) const; | |
22380 | ||
22381 | virtual result | |
22382 | do_unshift(state_type& __state, | |
22383 | extern_type* __to, extern_type* __to_end, | |
22384 | extern_type*& __to_next) const; | |
22385 | ||
22386 | virtual result | |
22387 | do_in(state_type& __state, | |
22388 | const extern_type* __from, const extern_type* __from_end, | |
22389 | const extern_type*& __from_next, | |
22390 | intern_type* __to, intern_type* __to_end, | |
22391 | intern_type*& __to_next) const; | |
22392 | ||
22393 | virtual | |
22394 | int do_encoding() const throw(); | |
22395 | ||
22396 | virtual | |
22397 | bool do_always_noconv() const throw(); | |
22398 | ||
22399 | virtual | |
22400 | int do_length(state_type&, const extern_type* __from, | |
22401 | const extern_type* __end, size_t __max) const; | |
22402 | ||
22403 | virtual int | |
22404 | do_max_length() const throw(); | |
22405 | }; | |
22406 | ||
22407 | ||
22408 | ||
22409 | template<typename _InternT, typename _ExternT, typename _StateT> | |
22410 | class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> | |
22411 | { | |
22412 | public: | |
22413 | explicit | |
22414 | codecvt_byname(const char* __s, size_t __refs = 0) | |
22415 | : codecvt<_InternT, _ExternT, _StateT>(__refs) | |
22416 | { | |
22417 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
22418 | { | |
22419 | this->_S_destroy_c_locale(this->_M_c_locale_codecvt); | |
22420 | this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); | |
22421 | } | |
22422 | } | |
22423 | ||
22424 | protected: | |
22425 | virtual | |
22426 | ~codecvt_byname() { } | |
22427 | }; | |
22428 | # 1534 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 2 3 | |
22429 | ||
22430 | ||
22431 | class __num_base | |
22432 | { | |
22433 | public: | |
22434 | ||
22435 | ||
22436 | enum | |
22437 | { | |
22438 | _S_ominus, | |
22439 | _S_oplus, | |
22440 | _S_ox, | |
22441 | _S_oX, | |
22442 | _S_odigits, | |
22443 | _S_odigits_end = _S_odigits + 16, | |
22444 | _S_oudigits = _S_odigits_end, | |
22445 | _S_oudigits_end = _S_oudigits + 16, | |
22446 | _S_oe = _S_odigits + 14, | |
22447 | _S_oE = _S_oudigits + 14, | |
22448 | _S_oend = _S_oudigits_end | |
22449 | }; | |
22450 | ||
22451 | ||
22452 | ||
22453 | ||
22454 | ||
22455 | ||
22456 | static const char* _S_atoms_out; | |
22457 | ||
22458 | ||
22459 | ||
22460 | static const char* _S_atoms_in; | |
22461 | ||
22462 | enum | |
22463 | { | |
22464 | _S_iminus, | |
22465 | _S_iplus, | |
22466 | _S_ix, | |
22467 | _S_iX, | |
22468 | _S_izero, | |
22469 | _S_ie = _S_izero + 14, | |
22470 | _S_iE = _S_izero + 20, | |
22471 | _S_iend = 26 | |
22472 | }; | |
22473 | ||
22474 | ||
22475 | ||
22476 | static void | |
22477 | _S_format_float(const ios_base& __io, char* __fptr, char __mod); | |
22478 | }; | |
22479 | ||
22480 | template<typename _CharT> | |
22481 | struct __numpunct_cache : public locale::facet | |
22482 | { | |
22483 | const char* _M_grouping; | |
22484 | size_t _M_grouping_size; | |
22485 | bool _M_use_grouping; | |
22486 | const _CharT* _M_truename; | |
22487 | size_t _M_truename_size; | |
22488 | const _CharT* _M_falsename; | |
22489 | size_t _M_falsename_size; | |
22490 | _CharT _M_decimal_point; | |
22491 | _CharT _M_thousands_sep; | |
22492 | ||
22493 | ||
22494 | ||
22495 | ||
22496 | ||
22497 | _CharT _M_atoms_out[__num_base::_S_oend]; | |
22498 | ||
22499 | ||
22500 | ||
22501 | ||
22502 | ||
22503 | _CharT _M_atoms_in[__num_base::_S_iend]; | |
22504 | ||
22505 | bool _M_allocated; | |
22506 | ||
22507 | __numpunct_cache(size_t __refs = 0) : facet(__refs), | |
22508 | _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), | |
22509 | _M_truename(__null), _M_truename_size(0), _M_falsename(__null), | |
22510 | _M_falsename_size(0), _M_decimal_point(_CharT()), | |
22511 | _M_thousands_sep(_CharT()), _M_allocated(false) | |
22512 | { } | |
22513 | ||
22514 | ~__numpunct_cache(); | |
22515 | ||
22516 | void | |
22517 | _M_cache(const locale& __loc); | |
22518 | ||
22519 | private: | |
22520 | __numpunct_cache& | |
22521 | operator=(const __numpunct_cache&); | |
22522 | ||
22523 | explicit | |
22524 | __numpunct_cache(const __numpunct_cache&); | |
22525 | }; | |
22526 | ||
22527 | template<typename _CharT> | |
22528 | __numpunct_cache<_CharT>::~__numpunct_cache() | |
22529 | { | |
22530 | if (_M_allocated) | |
22531 | { | |
22532 | delete [] _M_grouping; | |
22533 | delete [] _M_truename; | |
22534 | delete [] _M_falsename; | |
22535 | } | |
22536 | } | |
22537 | # 1656 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22538 | template<typename _CharT> | |
22539 | class numpunct : public locale::facet | |
22540 | { | |
22541 | public: | |
22542 | ||
22543 | ||
22544 | ||
22545 | typedef _CharT char_type; | |
22546 | typedef basic_string<_CharT> string_type; | |
22547 | ||
22548 | typedef __numpunct_cache<_CharT> __cache_type; | |
22549 | ||
22550 | protected: | |
22551 | __cache_type* _M_data; | |
22552 | ||
22553 | public: | |
22554 | ||
22555 | static locale::id id; | |
22556 | ||
22557 | ||
22558 | ||
22559 | ||
22560 | ||
22561 | ||
22562 | explicit | |
22563 | numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) | |
22564 | { _M_initialize_numpunct(); } | |
22565 | # 1693 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22566 | explicit | |
22567 | numpunct(__cache_type* __cache, size_t __refs = 0) | |
22568 | : facet(__refs), _M_data(__cache) | |
22569 | { _M_initialize_numpunct(); } | |
22570 | # 1707 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22571 | explicit | |
22572 | numpunct(__c_locale __cloc, size_t __refs = 0) | |
22573 | : facet(__refs), _M_data(__null) | |
22574 | { _M_initialize_numpunct(__cloc); } | |
22575 | # 1721 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22576 | char_type | |
22577 | decimal_point() const | |
22578 | { return this->do_decimal_point(); } | |
22579 | # 1734 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22580 | char_type | |
22581 | thousands_sep() const | |
22582 | { return this->do_thousands_sep(); } | |
22583 | # 1765 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22584 | string | |
22585 | grouping() const | |
22586 | { return this->do_grouping(); } | |
22587 | # 1778 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22588 | string_type | |
22589 | truename() const | |
22590 | { return this->do_truename(); } | |
22591 | # 1791 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22592 | string_type | |
22593 | falsename() const | |
22594 | { return this->do_falsename(); } | |
22595 | ||
22596 | protected: | |
22597 | ||
22598 | virtual | |
22599 | ~numpunct(); | |
22600 | # 1808 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22601 | virtual char_type | |
22602 | do_decimal_point() const | |
22603 | { return _M_data->_M_decimal_point; } | |
22604 | # 1820 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22605 | virtual char_type | |
22606 | do_thousands_sep() const | |
22607 | { return _M_data->_M_thousands_sep; } | |
22608 | # 1833 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22609 | virtual string | |
22610 | do_grouping() const | |
22611 | { return _M_data->_M_grouping; } | |
22612 | # 1846 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22613 | virtual string_type | |
22614 | do_truename() const | |
22615 | { return _M_data->_M_truename; } | |
22616 | # 1859 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22617 | virtual string_type | |
22618 | do_falsename() const | |
22619 | { return _M_data->_M_falsename; } | |
22620 | ||
22621 | ||
22622 | void | |
22623 | _M_initialize_numpunct(__c_locale __cloc = __null); | |
22624 | }; | |
22625 | ||
22626 | template<typename _CharT> | |
22627 | locale::id numpunct<_CharT>::id; | |
22628 | ||
22629 | template<> | |
22630 | numpunct<char>::~numpunct(); | |
22631 | ||
22632 | template<> | |
22633 | void | |
22634 | numpunct<char>::_M_initialize_numpunct(__c_locale __cloc); | |
22635 | ||
22636 | ||
22637 | template<> | |
22638 | numpunct<wchar_t>::~numpunct(); | |
22639 | ||
22640 | template<> | |
22641 | void | |
22642 | numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc); | |
22643 | ||
22644 | ||
22645 | ||
22646 | template<typename _CharT> | |
22647 | class numpunct_byname : public numpunct<_CharT> | |
22648 | { | |
22649 | public: | |
22650 | typedef _CharT char_type; | |
22651 | typedef basic_string<_CharT> string_type; | |
22652 | ||
22653 | explicit | |
22654 | numpunct_byname(const char* __s, size_t __refs = 0) | |
22655 | : numpunct<_CharT>(__refs) | |
22656 | { | |
22657 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
22658 | { | |
22659 | __c_locale __tmp; | |
22660 | this->_S_create_c_locale(__tmp, __s); | |
22661 | this->_M_initialize_numpunct(__tmp); | |
22662 | this->_S_destroy_c_locale(__tmp); | |
22663 | } | |
22664 | } | |
22665 | ||
22666 | protected: | |
22667 | virtual | |
22668 | ~numpunct_byname() { } | |
22669 | }; | |
22670 | # 1925 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22671 | template<typename _CharT, typename _InIter> | |
22672 | class num_get : public locale::facet | |
22673 | { | |
22674 | public: | |
22675 | ||
22676 | ||
22677 | ||
22678 | typedef _CharT char_type; | |
22679 | typedef _InIter iter_type; | |
22680 | ||
22681 | ||
22682 | ||
22683 | static locale::id id; | |
22684 | # 1946 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22685 | explicit | |
22686 | num_get(size_t __refs = 0) : facet(__refs) { } | |
22687 | # 1972 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22688 | iter_type | |
22689 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22690 | ios_base::iostate& __err, bool& __v) const | |
22691 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22692 | # 2008 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22693 | iter_type | |
22694 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22695 | ios_base::iostate& __err, long& __v) const | |
22696 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22697 | ||
22698 | iter_type | |
22699 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22700 | ios_base::iostate& __err, unsigned short& __v) const | |
22701 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22702 | ||
22703 | iter_type | |
22704 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22705 | ios_base::iostate& __err, unsigned int& __v) const | |
22706 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22707 | ||
22708 | iter_type | |
22709 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22710 | ios_base::iostate& __err, unsigned long& __v) const | |
22711 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22712 | ||
22713 | ||
22714 | iter_type | |
22715 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22716 | ios_base::iostate& __err, long long& __v) const | |
22717 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22718 | ||
22719 | iter_type | |
22720 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22721 | ios_base::iostate& __err, unsigned long long& __v) const | |
22722 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22723 | # 2067 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22724 | iter_type | |
22725 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22726 | ios_base::iostate& __err, float& __v) const | |
22727 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22728 | ||
22729 | iter_type | |
22730 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22731 | ios_base::iostate& __err, double& __v) const | |
22732 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22733 | ||
22734 | iter_type | |
22735 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22736 | ios_base::iostate& __err, long double& __v) const | |
22737 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22738 | # 2109 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22739 | iter_type | |
22740 | get(iter_type __in, iter_type __end, ios_base& __io, | |
22741 | ios_base::iostate& __err, void*& __v) const | |
22742 | { return this->do_get(__in, __end, __io, __err, __v); } | |
22743 | ||
22744 | protected: | |
22745 | ||
22746 | virtual ~num_get() { } | |
22747 | ||
22748 | iter_type | |
22749 | _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, | |
22750 | string& __xtrc) const; | |
22751 | ||
22752 | template<typename _ValueT> | |
22753 | iter_type | |
22754 | _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, | |
22755 | _ValueT& __v) const; | |
22756 | # 2142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22757 | virtual iter_type | |
22758 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; | |
22759 | ||
22760 | ||
22761 | virtual iter_type | |
22762 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const; | |
22763 | ||
22764 | virtual iter_type | |
22765 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22766 | unsigned short&) const; | |
22767 | ||
22768 | virtual iter_type | |
22769 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22770 | unsigned int&) const; | |
22771 | ||
22772 | virtual iter_type | |
22773 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22774 | unsigned long&) const; | |
22775 | ||
22776 | ||
22777 | virtual iter_type | |
22778 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22779 | long long&) const; | |
22780 | ||
22781 | virtual iter_type | |
22782 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22783 | unsigned long long&) const; | |
22784 | ||
22785 | ||
22786 | virtual iter_type | |
22787 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22788 | float&) const; | |
22789 | ||
22790 | virtual iter_type | |
22791 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22792 | double&) const; | |
22793 | ||
22794 | virtual iter_type | |
22795 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22796 | long double&) const; | |
22797 | ||
22798 | virtual iter_type | |
22799 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
22800 | void*&) const; | |
22801 | ||
22802 | }; | |
22803 | ||
22804 | template<typename _CharT, typename _InIter> | |
22805 | locale::id num_get<_CharT, _InIter>::id; | |
22806 | # 2204 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22807 | template<typename _CharT, typename _OutIter> | |
22808 | class num_put : public locale::facet | |
22809 | { | |
22810 | public: | |
22811 | ||
22812 | ||
22813 | ||
22814 | typedef _CharT char_type; | |
22815 | typedef _OutIter iter_type; | |
22816 | ||
22817 | ||
22818 | ||
22819 | static locale::id id; | |
22820 | # 2225 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22821 | explicit | |
22822 | num_put(size_t __refs = 0) : facet(__refs) { } | |
22823 | # 2243 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22824 | iter_type | |
22825 | put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const | |
22826 | { return this->do_put(__s, __f, __fill, __v); } | |
22827 | # 2285 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22828 | iter_type | |
22829 | put(iter_type __s, ios_base& __f, char_type __fill, long __v) const | |
22830 | { return this->do_put(__s, __f, __fill, __v); } | |
22831 | ||
22832 | iter_type | |
22833 | put(iter_type __s, ios_base& __f, char_type __fill, | |
22834 | unsigned long __v) const | |
22835 | { return this->do_put(__s, __f, __fill, __v); } | |
22836 | ||
22837 | ||
22838 | iter_type | |
22839 | put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const | |
22840 | { return this->do_put(__s, __f, __fill, __v); } | |
22841 | ||
22842 | iter_type | |
22843 | put(iter_type __s, ios_base& __f, char_type __fill, | |
22844 | unsigned long long __v) const | |
22845 | { return this->do_put(__s, __f, __fill, __v); } | |
22846 | # 2348 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22847 | iter_type | |
22848 | put(iter_type __s, ios_base& __f, char_type __fill, double __v) const | |
22849 | { return this->do_put(__s, __f, __fill, __v); } | |
22850 | ||
22851 | iter_type | |
22852 | put(iter_type __s, ios_base& __f, char_type __fill, | |
22853 | long double __v) const | |
22854 | { return this->do_put(__s, __f, __fill, __v); } | |
22855 | # 2373 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22856 | iter_type | |
22857 | put(iter_type __s, ios_base& __f, char_type __fill, | |
22858 | const void* __v) const | |
22859 | { return this->do_put(__s, __f, __fill, __v); } | |
22860 | ||
22861 | protected: | |
22862 | template<typename _ValueT> | |
22863 | iter_type | |
22864 | _M_insert_float(iter_type, ios_base& __io, char_type __fill, | |
22865 | char __mod, _ValueT __v) const; | |
22866 | ||
22867 | void | |
22868 | _M_group_float(const char* __grouping, size_t __grouping_size, | |
22869 | char_type __sep, const char_type* __p, char_type* __new, | |
22870 | char_type* __cs, int& __len) const; | |
22871 | ||
22872 | template<typename _ValueT> | |
22873 | iter_type | |
22874 | _M_insert_int(iter_type, ios_base& __io, char_type __fill, | |
22875 | _ValueT __v) const; | |
22876 | ||
22877 | void | |
22878 | _M_group_int(const char* __grouping, size_t __grouping_size, | |
22879 | char_type __sep, ios_base& __io, char_type* __new, | |
22880 | char_type* __cs, int& __len) const; | |
22881 | ||
22882 | void | |
22883 | _M_pad(char_type __fill, streamsize __w, ios_base& __io, | |
22884 | char_type* __new, const char_type* __cs, int& __len) const; | |
22885 | ||
22886 | ||
22887 | virtual | |
22888 | ~num_put() { }; | |
22889 | # 2421 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22890 | virtual iter_type | |
22891 | do_put(iter_type, ios_base&, char_type __fill, bool __v) const; | |
22892 | ||
22893 | virtual iter_type | |
22894 | do_put(iter_type, ios_base&, char_type __fill, long __v) const; | |
22895 | ||
22896 | virtual iter_type | |
22897 | do_put(iter_type, ios_base&, char_type __fill, unsigned long) const; | |
22898 | ||
22899 | ||
22900 | virtual iter_type | |
22901 | do_put(iter_type, ios_base&, char_type __fill, long long __v) const; | |
22902 | ||
22903 | virtual iter_type | |
22904 | do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const; | |
22905 | ||
22906 | ||
22907 | virtual iter_type | |
22908 | do_put(iter_type, ios_base&, char_type __fill, double __v) const; | |
22909 | ||
22910 | virtual iter_type | |
22911 | do_put(iter_type, ios_base&, char_type __fill, long double __v) const; | |
22912 | ||
22913 | virtual iter_type | |
22914 | do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; | |
22915 | ||
22916 | }; | |
22917 | ||
22918 | template <typename _CharT, typename _OutIter> | |
22919 | locale::id num_put<_CharT, _OutIter>::id; | |
22920 | # 2465 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22921 | template<typename _CharT> | |
22922 | class collate : public locale::facet | |
22923 | { | |
22924 | public: | |
22925 | ||
22926 | ||
22927 | ||
22928 | typedef _CharT char_type; | |
22929 | typedef basic_string<_CharT> string_type; | |
22930 | ||
22931 | ||
22932 | protected: | |
22933 | ||
22934 | ||
22935 | __c_locale _M_c_locale_collate; | |
22936 | ||
22937 | public: | |
22938 | ||
22939 | static locale::id id; | |
22940 | # 2492 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22941 | explicit | |
22942 | collate(size_t __refs = 0) | |
22943 | : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) | |
22944 | { } | |
22945 | # 2506 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22946 | explicit | |
22947 | collate(__c_locale __cloc, size_t __refs = 0) | |
22948 | : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) | |
22949 | { } | |
22950 | # 2523 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22951 | int | |
22952 | compare(const _CharT* __lo1, const _CharT* __hi1, | |
22953 | const _CharT* __lo2, const _CharT* __hi2) const | |
22954 | { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } | |
22955 | # 2542 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22956 | string_type | |
22957 | transform(const _CharT* __lo, const _CharT* __hi) const | |
22958 | { return this->do_transform(__lo, __hi); } | |
22959 | # 2556 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22960 | long | |
22961 | hash(const _CharT* __lo, const _CharT* __hi) const | |
22962 | { return this->do_hash(__lo, __hi); } | |
22963 | ||
22964 | ||
22965 | int | |
22966 | _M_compare(const _CharT*, const _CharT*) const; | |
22967 | ||
22968 | size_t | |
22969 | _M_transform(_CharT*, const _CharT*, size_t) const; | |
22970 | ||
22971 | protected: | |
22972 | ||
22973 | virtual | |
22974 | ~collate() | |
22975 | { _S_destroy_c_locale(_M_c_locale_collate); } | |
22976 | # 2585 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22977 | virtual int | |
22978 | do_compare(const _CharT* __lo1, const _CharT* __hi1, | |
22979 | const _CharT* __lo2, const _CharT* __hi2) const; | |
22980 | # 2601 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22981 | virtual string_type | |
22982 | do_transform(const _CharT* __lo, const _CharT* __hi) const; | |
22983 | # 2614 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
22984 | virtual long | |
22985 | do_hash(const _CharT* __lo, const _CharT* __hi) const; | |
22986 | }; | |
22987 | ||
22988 | template<typename _CharT> | |
22989 | locale::id collate<_CharT>::id; | |
22990 | ||
22991 | ||
22992 | template<> | |
22993 | int | |
22994 | collate<char>::_M_compare(const char*, const char*) const; | |
22995 | ||
22996 | template<> | |
22997 | size_t | |
22998 | collate<char>::_M_transform(char*, const char*, size_t) const; | |
22999 | ||
23000 | ||
23001 | template<> | |
23002 | int | |
23003 | collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const; | |
23004 | ||
23005 | template<> | |
23006 | size_t | |
23007 | collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const; | |
23008 | ||
23009 | ||
23010 | ||
23011 | template<typename _CharT> | |
23012 | class collate_byname : public collate<_CharT> | |
23013 | { | |
23014 | public: | |
23015 | ||
23016 | ||
23017 | typedef _CharT char_type; | |
23018 | typedef basic_string<_CharT> string_type; | |
23019 | ||
23020 | ||
23021 | explicit | |
23022 | collate_byname(const char* __s, size_t __refs = 0) | |
23023 | : collate<_CharT>(__refs) | |
23024 | { | |
23025 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
23026 | { | |
23027 | this->_S_destroy_c_locale(this->_M_c_locale_collate); | |
23028 | this->_S_create_c_locale(this->_M_c_locale_collate, __s); | |
23029 | } | |
23030 | } | |
23031 | ||
23032 | protected: | |
23033 | virtual | |
23034 | ~collate_byname() { } | |
23035 | }; | |
23036 | # 2674 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23037 | class time_base | |
23038 | { | |
23039 | public: | |
23040 | enum dateorder { no_order, dmy, mdy, ymd, ydm }; | |
23041 | }; | |
23042 | ||
23043 | template<typename _CharT> | |
23044 | struct __timepunct_cache : public locale::facet | |
23045 | { | |
23046 | ||
23047 | static const _CharT* _S_timezones[14]; | |
23048 | ||
23049 | const _CharT* _M_date_format; | |
23050 | const _CharT* _M_date_era_format; | |
23051 | const _CharT* _M_time_format; | |
23052 | const _CharT* _M_time_era_format; | |
23053 | const _CharT* _M_date_time_format; | |
23054 | const _CharT* _M_date_time_era_format; | |
23055 | const _CharT* _M_am; | |
23056 | const _CharT* _M_pm; | |
23057 | const _CharT* _M_am_pm_format; | |
23058 | ||
23059 | ||
23060 | const _CharT* _M_day1; | |
23061 | const _CharT* _M_day2; | |
23062 | const _CharT* _M_day3; | |
23063 | const _CharT* _M_day4; | |
23064 | const _CharT* _M_day5; | |
23065 | const _CharT* _M_day6; | |
23066 | const _CharT* _M_day7; | |
23067 | ||
23068 | ||
23069 | const _CharT* _M_aday1; | |
23070 | const _CharT* _M_aday2; | |
23071 | const _CharT* _M_aday3; | |
23072 | const _CharT* _M_aday4; | |
23073 | const _CharT* _M_aday5; | |
23074 | const _CharT* _M_aday6; | |
23075 | const _CharT* _M_aday7; | |
23076 | ||
23077 | ||
23078 | const _CharT* _M_month01; | |
23079 | const _CharT* _M_month02; | |
23080 | const _CharT* _M_month03; | |
23081 | const _CharT* _M_month04; | |
23082 | const _CharT* _M_month05; | |
23083 | const _CharT* _M_month06; | |
23084 | const _CharT* _M_month07; | |
23085 | const _CharT* _M_month08; | |
23086 | const _CharT* _M_month09; | |
23087 | const _CharT* _M_month10; | |
23088 | const _CharT* _M_month11; | |
23089 | const _CharT* _M_month12; | |
23090 | ||
23091 | ||
23092 | const _CharT* _M_amonth01; | |
23093 | const _CharT* _M_amonth02; | |
23094 | const _CharT* _M_amonth03; | |
23095 | const _CharT* _M_amonth04; | |
23096 | const _CharT* _M_amonth05; | |
23097 | const _CharT* _M_amonth06; | |
23098 | const _CharT* _M_amonth07; | |
23099 | const _CharT* _M_amonth08; | |
23100 | const _CharT* _M_amonth09; | |
23101 | const _CharT* _M_amonth10; | |
23102 | const _CharT* _M_amonth11; | |
23103 | const _CharT* _M_amonth12; | |
23104 | ||
23105 | bool _M_allocated; | |
23106 | ||
23107 | __timepunct_cache(size_t __refs = 0) : facet(__refs), | |
23108 | _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null), | |
23109 | _M_time_era_format(__null), _M_date_time_format(__null), | |
23110 | _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null), | |
23111 | _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null), | |
23112 | _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null), | |
23113 | _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null), | |
23114 | _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null), | |
23115 | _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null), | |
23116 | _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null), | |
23117 | _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null), | |
23118 | _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null), | |
23119 | _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null), | |
23120 | _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null), | |
23121 | _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false) | |
23122 | { } | |
23123 | ||
23124 | ~__timepunct_cache(); | |
23125 | ||
23126 | void | |
23127 | _M_cache(const locale& __loc); | |
23128 | ||
23129 | private: | |
23130 | __timepunct_cache& | |
23131 | operator=(const __timepunct_cache&); | |
23132 | ||
23133 | explicit | |
23134 | __timepunct_cache(const __timepunct_cache&); | |
23135 | }; | |
23136 | ||
23137 | template<typename _CharT> | |
23138 | __timepunct_cache<_CharT>::~__timepunct_cache() | |
23139 | { | |
23140 | if (_M_allocated) | |
23141 | { | |
23142 | ||
23143 | } | |
23144 | } | |
23145 | ||
23146 | ||
23147 | template<> | |
23148 | const char* | |
23149 | __timepunct_cache<char>::_S_timezones[14]; | |
23150 | ||
23151 | ||
23152 | template<> | |
23153 | const wchar_t* | |
23154 | __timepunct_cache<wchar_t>::_S_timezones[14]; | |
23155 | ||
23156 | ||
23157 | ||
23158 | template<typename _CharT> | |
23159 | const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; | |
23160 | ||
23161 | template<typename _CharT> | |
23162 | class __timepunct : public locale::facet | |
23163 | { | |
23164 | public: | |
23165 | ||
23166 | typedef _CharT __char_type; | |
23167 | typedef basic_string<_CharT> __string_type; | |
23168 | typedef __timepunct_cache<_CharT> __cache_type; | |
23169 | ||
23170 | protected: | |
23171 | __cache_type* _M_data; | |
23172 | __c_locale _M_c_locale_timepunct; | |
23173 | const char* _M_name_timepunct; | |
23174 | ||
23175 | public: | |
23176 | ||
23177 | static locale::id id; | |
23178 | ||
23179 | explicit | |
23180 | __timepunct(size_t __refs = 0); | |
23181 | ||
23182 | explicit | |
23183 | __timepunct(__cache_type* __cache, size_t __refs = 0); | |
23184 | # 2832 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23185 | explicit | |
23186 | __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); | |
23187 | ||
23188 | ||
23189 | ||
23190 | void | |
23191 | _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, | |
23192 | const tm* __tm) const; | |
23193 | ||
23194 | void | |
23195 | _M_date_formats(const _CharT** __date) const | |
23196 | { | |
23197 | ||
23198 | __date[0] = _M_data->_M_date_format; | |
23199 | __date[1] = _M_data->_M_date_era_format; | |
23200 | } | |
23201 | ||
23202 | void | |
23203 | _M_time_formats(const _CharT** __time) const | |
23204 | { | |
23205 | ||
23206 | __time[0] = _M_data->_M_time_format; | |
23207 | __time[1] = _M_data->_M_time_era_format; | |
23208 | } | |
23209 | ||
23210 | void | |
23211 | _M_date_time_formats(const _CharT** __dt) const | |
23212 | { | |
23213 | ||
23214 | __dt[0] = _M_data->_M_date_time_format; | |
23215 | __dt[1] = _M_data->_M_date_time_era_format; | |
23216 | } | |
23217 | ||
23218 | void | |
23219 | _M_am_pm_format(const _CharT* __ampm) const | |
23220 | { __ampm = _M_data->_M_am_pm_format; } | |
23221 | ||
23222 | void | |
23223 | _M_am_pm(const _CharT** __ampm) const | |
23224 | { | |
23225 | __ampm[0] = _M_data->_M_am; | |
23226 | __ampm[1] = _M_data->_M_pm; | |
23227 | } | |
23228 | ||
23229 | void | |
23230 | _M_days(const _CharT** __days) const | |
23231 | { | |
23232 | __days[0] = _M_data->_M_day1; | |
23233 | __days[1] = _M_data->_M_day2; | |
23234 | __days[2] = _M_data->_M_day3; | |
23235 | __days[3] = _M_data->_M_day4; | |
23236 | __days[4] = _M_data->_M_day5; | |
23237 | __days[5] = _M_data->_M_day6; | |
23238 | __days[6] = _M_data->_M_day7; | |
23239 | } | |
23240 | ||
23241 | void | |
23242 | _M_days_abbreviated(const _CharT** __days) const | |
23243 | { | |
23244 | __days[0] = _M_data->_M_aday1; | |
23245 | __days[1] = _M_data->_M_aday2; | |
23246 | __days[2] = _M_data->_M_aday3; | |
23247 | __days[3] = _M_data->_M_aday4; | |
23248 | __days[4] = _M_data->_M_aday5; | |
23249 | __days[5] = _M_data->_M_aday6; | |
23250 | __days[6] = _M_data->_M_aday7; | |
23251 | } | |
23252 | ||
23253 | void | |
23254 | _M_months(const _CharT** __months) const | |
23255 | { | |
23256 | __months[0] = _M_data->_M_month01; | |
23257 | __months[1] = _M_data->_M_month02; | |
23258 | __months[2] = _M_data->_M_month03; | |
23259 | __months[3] = _M_data->_M_month04; | |
23260 | __months[4] = _M_data->_M_month05; | |
23261 | __months[5] = _M_data->_M_month06; | |
23262 | __months[6] = _M_data->_M_month07; | |
23263 | __months[7] = _M_data->_M_month08; | |
23264 | __months[8] = _M_data->_M_month09; | |
23265 | __months[9] = _M_data->_M_month10; | |
23266 | __months[10] = _M_data->_M_month11; | |
23267 | __months[11] = _M_data->_M_month12; | |
23268 | } | |
23269 | ||
23270 | void | |
23271 | _M_months_abbreviated(const _CharT** __months) const | |
23272 | { | |
23273 | __months[0] = _M_data->_M_amonth01; | |
23274 | __months[1] = _M_data->_M_amonth02; | |
23275 | __months[2] = _M_data->_M_amonth03; | |
23276 | __months[3] = _M_data->_M_amonth04; | |
23277 | __months[4] = _M_data->_M_amonth05; | |
23278 | __months[5] = _M_data->_M_amonth06; | |
23279 | __months[6] = _M_data->_M_amonth07; | |
23280 | __months[7] = _M_data->_M_amonth08; | |
23281 | __months[8] = _M_data->_M_amonth09; | |
23282 | __months[9] = _M_data->_M_amonth10; | |
23283 | __months[10] = _M_data->_M_amonth11; | |
23284 | __months[11] = _M_data->_M_amonth12; | |
23285 | } | |
23286 | ||
23287 | protected: | |
23288 | virtual | |
23289 | ~__timepunct(); | |
23290 | ||
23291 | ||
23292 | void | |
23293 | _M_initialize_timepunct(__c_locale __cloc = __null); | |
23294 | }; | |
23295 | ||
23296 | template<typename _CharT> | |
23297 | locale::id __timepunct<_CharT>::id; | |
23298 | ||
23299 | ||
23300 | template<> | |
23301 | void | |
23302 | __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc); | |
23303 | ||
23304 | template<> | |
23305 | void | |
23306 | __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const; | |
23307 | ||
23308 | ||
23309 | template<> | |
23310 | void | |
23311 | __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc); | |
23312 | ||
23313 | template<> | |
23314 | void | |
23315 | __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*, | |
23316 | const tm*) const; | |
23317 | ||
23318 | ||
23319 | ||
23320 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/time_members.h" 1 3 | |
23321 | # 37 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/time_members.h" 3 | |
23322 | template<typename _CharT> | |
23323 | __timepunct<_CharT>::__timepunct(size_t __refs) | |
23324 | : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), | |
23325 | _M_name_timepunct(_S_get_c_name()) | |
23326 | { _M_initialize_timepunct(); } | |
23327 | ||
23328 | template<typename _CharT> | |
23329 | __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) | |
23330 | : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(__null), | |
23331 | _M_name_timepunct(_S_get_c_name()) | |
23332 | { _M_initialize_timepunct(); } | |
23333 | ||
23334 | template<typename _CharT> | |
23335 | __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | |
23336 | size_t __refs) | |
23337 | : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), | |
23338 | _M_name_timepunct(__null) | |
23339 | { | |
23340 | const size_t __len = std::strlen(__s) + 1; | |
23341 | char* __tmp = new char[__len]; | |
23342 | std::memcpy(__tmp, __s, __len); | |
23343 | _M_name_timepunct = __tmp; | |
23344 | ||
23345 | try | |
23346 | { _M_initialize_timepunct(__cloc); } | |
23347 | catch(...) | |
23348 | { | |
23349 | delete [] _M_name_timepunct; | |
23350 | throw; | |
23351 | } | |
23352 | } | |
23353 | ||
23354 | template<typename _CharT> | |
23355 | __timepunct<_CharT>::~__timepunct() | |
23356 | { | |
23357 | if (_M_name_timepunct != _S_get_c_name()) | |
23358 | delete [] _M_name_timepunct; | |
23359 | delete _M_data; | |
23360 | _S_destroy_c_locale(_M_c_locale_timepunct); | |
23361 | } | |
23362 | # 2968 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 2 3 | |
23363 | # 2981 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23364 | template<typename _CharT, typename _InIter> | |
23365 | class time_get : public locale::facet, public time_base | |
23366 | { | |
23367 | public: | |
23368 | ||
23369 | ||
23370 | ||
23371 | typedef _CharT char_type; | |
23372 | typedef _InIter iter_type; | |
23373 | ||
23374 | typedef basic_string<_CharT> __string_type; | |
23375 | ||
23376 | ||
23377 | static locale::id id; | |
23378 | # 3003 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23379 | explicit | |
23380 | time_get(size_t __refs = 0) | |
23381 | : facet (__refs) { } | |
23382 | # 3020 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23383 | dateorder | |
23384 | date_order() const | |
23385 | { return this->do_date_order(); } | |
23386 | # 3044 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23387 | iter_type | |
23388 | get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
23389 | ios_base::iostate& __err, tm* __tm) const | |
23390 | { return this->do_get_time(__beg, __end, __io, __err, __tm); } | |
23391 | # 3069 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23392 | iter_type | |
23393 | get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
23394 | ios_base::iostate& __err, tm* __tm) const | |
23395 | { return this->do_get_date(__beg, __end, __io, __err, __tm); } | |
23396 | # 3097 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23397 | iter_type | |
23398 | get_weekday(iter_type __beg, iter_type __end, ios_base& __io, | |
23399 | ios_base::iostate& __err, tm* __tm) const | |
23400 | { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } | |
23401 | # 3126 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23402 | iter_type | |
23403 | get_monthname(iter_type __beg, iter_type __end, ios_base& __io, | |
23404 | ios_base::iostate& __err, tm* __tm) const | |
23405 | { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } | |
23406 | # 3152 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23407 | iter_type | |
23408 | get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
23409 | ios_base::iostate& __err, tm* __tm) const | |
23410 | { return this->do_get_year(__beg, __end, __io, __err, __tm); } | |
23411 | ||
23412 | protected: | |
23413 | ||
23414 | virtual | |
23415 | ~time_get() { } | |
23416 | # 3172 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23417 | virtual dateorder | |
23418 | do_date_order() const; | |
23419 | # 3190 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23420 | virtual iter_type | |
23421 | do_get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
23422 | ios_base::iostate& __err, tm* __tm) const; | |
23423 | # 3209 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23424 | virtual iter_type | |
23425 | do_get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
23426 | ios_base::iostate& __err, tm* __tm) const; | |
23427 | # 3228 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23428 | virtual iter_type | |
23429 | do_get_weekday(iter_type __beg, iter_type __end, ios_base&, | |
23430 | ios_base::iostate& __err, tm* __tm) const; | |
23431 | # 3247 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23432 | virtual iter_type | |
23433 | do_get_monthname(iter_type __beg, iter_type __end, ios_base&, | |
23434 | ios_base::iostate& __err, tm* __tm) const; | |
23435 | # 3266 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23436 | virtual iter_type | |
23437 | do_get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
23438 | ios_base::iostate& __err, tm* __tm) const; | |
23439 | ||
23440 | ||
23441 | iter_type | |
23442 | _M_extract_num(iter_type __beg, iter_type __end, int& __member, | |
23443 | int __min, int __max, size_t __len, | |
23444 | ios_base& __io, ios_base::iostate& __err) const; | |
23445 | ||
23446 | ||
23447 | ||
23448 | iter_type | |
23449 | _M_extract_name(iter_type __beg, iter_type __end, int& __member, | |
23450 | const _CharT** __names, size_t __indexlen, | |
23451 | ios_base& __io, ios_base::iostate& __err) const; | |
23452 | ||
23453 | ||
23454 | iter_type | |
23455 | _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, | |
23456 | ios_base::iostate& __err, tm* __tm, | |
23457 | const _CharT* __format) const; | |
23458 | }; | |
23459 | ||
23460 | template<typename _CharT, typename _InIter> | |
23461 | locale::id time_get<_CharT, _InIter>::id; | |
23462 | ||
23463 | ||
23464 | template<typename _CharT, typename _InIter> | |
23465 | class time_get_byname : public time_get<_CharT, _InIter> | |
23466 | { | |
23467 | public: | |
23468 | ||
23469 | typedef _CharT char_type; | |
23470 | typedef _InIter iter_type; | |
23471 | ||
23472 | explicit | |
23473 | time_get_byname(const char*, size_t __refs = 0) | |
23474 | : time_get<_CharT, _InIter>(__refs) { } | |
23475 | ||
23476 | protected: | |
23477 | virtual | |
23478 | ~time_get_byname() { } | |
23479 | }; | |
23480 | # 3322 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23481 | template<typename _CharT, typename _OutIter> | |
23482 | class time_put : public locale::facet | |
23483 | { | |
23484 | public: | |
23485 | ||
23486 | ||
23487 | ||
23488 | typedef _CharT char_type; | |
23489 | typedef _OutIter iter_type; | |
23490 | ||
23491 | ||
23492 | ||
23493 | static locale::id id; | |
23494 | # 3343 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23495 | explicit | |
23496 | time_put(size_t __refs = 0) | |
23497 | : facet(__refs) { } | |
23498 | # 3362 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23499 | iter_type | |
23500 | put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
23501 | const _CharT* __beg, const _CharT* __end) const; | |
23502 | # 3382 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23503 | iter_type | |
23504 | put(iter_type __s, ios_base& __io, char_type __fill, | |
23505 | const tm* __tm, char __format, char __mod = 0) const | |
23506 | { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } | |
23507 | ||
23508 | protected: | |
23509 | ||
23510 | virtual | |
23511 | ~time_put() | |
23512 | { } | |
23513 | # 3409 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23514 | virtual iter_type | |
23515 | do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
23516 | char __format, char __mod) const; | |
23517 | }; | |
23518 | ||
23519 | template<typename _CharT, typename _OutIter> | |
23520 | locale::id time_put<_CharT, _OutIter>::id; | |
23521 | ||
23522 | ||
23523 | template<typename _CharT, typename _OutIter> | |
23524 | class time_put_byname : public time_put<_CharT, _OutIter> | |
23525 | { | |
23526 | public: | |
23527 | ||
23528 | typedef _CharT char_type; | |
23529 | typedef _OutIter iter_type; | |
23530 | ||
23531 | explicit | |
23532 | time_put_byname(const char*, size_t __refs = 0) | |
23533 | : time_put<_CharT, _OutIter>(__refs) | |
23534 | { }; | |
23535 | ||
23536 | protected: | |
23537 | virtual | |
23538 | ~time_put_byname() { } | |
23539 | }; | |
23540 | # 3447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23541 | class money_base | |
23542 | { | |
23543 | public: | |
23544 | enum part { none, space, symbol, sign, value }; | |
23545 | struct pattern { char field[4]; }; | |
23546 | ||
23547 | static const pattern _S_default_pattern; | |
23548 | ||
23549 | enum | |
23550 | { | |
23551 | _S_minus, | |
23552 | _S_zero, | |
23553 | _S_end = 11 | |
23554 | }; | |
23555 | ||
23556 | ||
23557 | ||
23558 | static const char* _S_atoms; | |
23559 | ||
23560 | ||
23561 | ||
23562 | static pattern | |
23563 | _S_construct_pattern(char __precedes, char __space, char __posn); | |
23564 | }; | |
23565 | ||
23566 | template<typename _CharT, bool _Intl> | |
23567 | struct __moneypunct_cache : public locale::facet | |
23568 | { | |
23569 | const char* _M_grouping; | |
23570 | size_t _M_grouping_size; | |
23571 | bool _M_use_grouping; | |
23572 | _CharT _M_decimal_point; | |
23573 | _CharT _M_thousands_sep; | |
23574 | const _CharT* _M_curr_symbol; | |
23575 | size_t _M_curr_symbol_size; | |
23576 | const _CharT* _M_positive_sign; | |
23577 | size_t _M_positive_sign_size; | |
23578 | const _CharT* _M_negative_sign; | |
23579 | size_t _M_negative_sign_size; | |
23580 | int _M_frac_digits; | |
23581 | money_base::pattern _M_pos_format; | |
23582 | money_base::pattern _M_neg_format; | |
23583 | ||
23584 | ||
23585 | ||
23586 | ||
23587 | _CharT _M_atoms[money_base::_S_end]; | |
23588 | ||
23589 | bool _M_allocated; | |
23590 | ||
23591 | __moneypunct_cache(size_t __refs = 0) : facet(__refs), | |
23592 | _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), | |
23593 | _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), | |
23594 | _M_curr_symbol(__null), _M_curr_symbol_size(0), | |
23595 | _M_positive_sign(__null), _M_positive_sign_size(0), | |
23596 | _M_negative_sign(__null), _M_negative_sign_size(0), | |
23597 | _M_frac_digits(0), | |
23598 | _M_pos_format(money_base::pattern()), | |
23599 | _M_neg_format(money_base::pattern()), _M_allocated(false) | |
23600 | { } | |
23601 | ||
23602 | ~__moneypunct_cache(); | |
23603 | ||
23604 | void | |
23605 | _M_cache(const locale& __loc); | |
23606 | ||
23607 | private: | |
23608 | __moneypunct_cache& | |
23609 | operator=(const __moneypunct_cache&); | |
23610 | ||
23611 | explicit | |
23612 | __moneypunct_cache(const __moneypunct_cache&); | |
23613 | }; | |
23614 | ||
23615 | template<typename _CharT, bool _Intl> | |
23616 | __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() | |
23617 | { | |
23618 | if (_M_allocated) | |
23619 | { | |
23620 | delete [] _M_grouping; | |
23621 | delete [] _M_curr_symbol; | |
23622 | delete [] _M_positive_sign; | |
23623 | delete [] _M_negative_sign; | |
23624 | } | |
23625 | } | |
23626 | ||
23627 | ||
23628 | ||
23629 | ||
23630 | ||
23631 | ||
23632 | ||
23633 | template<typename _CharT, bool _Intl> | |
23634 | class moneypunct : public locale::facet, public money_base | |
23635 | { | |
23636 | public: | |
23637 | ||
23638 | ||
23639 | ||
23640 | typedef _CharT char_type; | |
23641 | typedef basic_string<_CharT> string_type; | |
23642 | ||
23643 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
23644 | ||
23645 | private: | |
23646 | __cache_type* _M_data; | |
23647 | ||
23648 | public: | |
23649 | ||
23650 | ||
23651 | static const bool intl = _Intl; | |
23652 | ||
23653 | static locale::id id; | |
23654 | # 3568 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23655 | explicit | |
23656 | moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null) | |
23657 | { _M_initialize_moneypunct(); } | |
23658 | # 3580 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23659 | explicit | |
23660 | moneypunct(__cache_type* __cache, size_t __refs = 0) | |
23661 | : facet(__refs), _M_data(__cache) | |
23662 | { _M_initialize_moneypunct(); } | |
23663 | # 3595 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23664 | explicit | |
23665 | moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) | |
23666 | : facet(__refs), _M_data(__null) | |
23667 | { _M_initialize_moneypunct(__cloc, __s); } | |
23668 | # 3609 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23669 | char_type | |
23670 | decimal_point() const | |
23671 | { return this->do_decimal_point(); } | |
23672 | # 3622 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23673 | char_type | |
23674 | thousands_sep() const | |
23675 | { return this->do_thousands_sep(); } | |
23676 | # 3651 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23677 | string | |
23678 | grouping() const | |
23679 | { return this->do_grouping(); } | |
23680 | # 3664 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23681 | string_type | |
23682 | curr_symbol() const | |
23683 | { return this->do_curr_symbol(); } | |
23684 | # 3681 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23685 | string_type | |
23686 | positive_sign() const | |
23687 | { return this->do_positive_sign(); } | |
23688 | # 3698 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23689 | string_type | |
23690 | negative_sign() const | |
23691 | { return this->do_negative_sign(); } | |
23692 | # 3714 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23693 | int | |
23694 | frac_digits() const | |
23695 | { return this->do_frac_digits(); } | |
23696 | # 3749 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23697 | pattern | |
23698 | pos_format() const | |
23699 | { return this->do_pos_format(); } | |
23700 | ||
23701 | pattern | |
23702 | neg_format() const | |
23703 | { return this->do_neg_format(); } | |
23704 | ||
23705 | ||
23706 | protected: | |
23707 | ||
23708 | virtual | |
23709 | ~moneypunct(); | |
23710 | # 3771 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23711 | virtual char_type | |
23712 | do_decimal_point() const | |
23713 | { return _M_data->_M_decimal_point; } | |
23714 | # 3783 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23715 | virtual char_type | |
23716 | do_thousands_sep() const | |
23717 | { return _M_data->_M_thousands_sep; } | |
23718 | # 3796 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23719 | virtual string | |
23720 | do_grouping() const | |
23721 | { return _M_data->_M_grouping; } | |
23722 | # 3809 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23723 | virtual string_type | |
23724 | do_curr_symbol() const | |
23725 | { return _M_data->_M_curr_symbol; } | |
23726 | # 3822 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23727 | virtual string_type | |
23728 | do_positive_sign() const | |
23729 | { return _M_data->_M_positive_sign; } | |
23730 | # 3835 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23731 | virtual string_type | |
23732 | do_negative_sign() const | |
23733 | { return _M_data->_M_negative_sign; } | |
23734 | # 3849 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23735 | virtual int | |
23736 | do_frac_digits() const | |
23737 | { return _M_data->_M_frac_digits; } | |
23738 | # 3863 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23739 | virtual pattern | |
23740 | do_pos_format() const | |
23741 | { return _M_data->_M_pos_format; } | |
23742 | # 3877 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23743 | virtual pattern | |
23744 | do_neg_format() const | |
23745 | { return _M_data->_M_neg_format; } | |
23746 | ||
23747 | ||
23748 | void | |
23749 | _M_initialize_moneypunct(__c_locale __cloc = __null, | |
23750 | const char* __name = __null); | |
23751 | }; | |
23752 | ||
23753 | template<typename _CharT, bool _Intl> | |
23754 | locale::id moneypunct<_CharT, _Intl>::id; | |
23755 | ||
23756 | template<typename _CharT, bool _Intl> | |
23757 | const bool moneypunct<_CharT, _Intl>::intl; | |
23758 | ||
23759 | template<> | |
23760 | moneypunct<char, true>::~moneypunct(); | |
23761 | ||
23762 | template<> | |
23763 | moneypunct<char, false>::~moneypunct(); | |
23764 | ||
23765 | template<> | |
23766 | void | |
23767 | moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*); | |
23768 | ||
23769 | template<> | |
23770 | void | |
23771 | moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*); | |
23772 | ||
23773 | ||
23774 | template<> | |
23775 | moneypunct<wchar_t, true>::~moneypunct(); | |
23776 | ||
23777 | template<> | |
23778 | moneypunct<wchar_t, false>::~moneypunct(); | |
23779 | ||
23780 | template<> | |
23781 | void | |
23782 | moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale, | |
23783 | const char*); | |
23784 | ||
23785 | template<> | |
23786 | void | |
23787 | moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale, | |
23788 | const char*); | |
23789 | ||
23790 | ||
23791 | ||
23792 | template<typename _CharT, bool _Intl> | |
23793 | class moneypunct_byname : public moneypunct<_CharT, _Intl> | |
23794 | { | |
23795 | public: | |
23796 | typedef _CharT char_type; | |
23797 | typedef basic_string<_CharT> string_type; | |
23798 | ||
23799 | static const bool intl = _Intl; | |
23800 | ||
23801 | explicit | |
23802 | moneypunct_byname(const char* __s, size_t __refs = 0) | |
23803 | : moneypunct<_CharT, _Intl>(__refs) | |
23804 | { | |
23805 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
23806 | { | |
23807 | __c_locale __tmp; | |
23808 | this->_S_create_c_locale(__tmp, __s); | |
23809 | this->_M_initialize_moneypunct(__tmp); | |
23810 | this->_S_destroy_c_locale(__tmp); | |
23811 | } | |
23812 | } | |
23813 | ||
23814 | protected: | |
23815 | virtual | |
23816 | ~moneypunct_byname() { } | |
23817 | }; | |
23818 | ||
23819 | template<typename _CharT, bool _Intl> | |
23820 | const bool moneypunct_byname<_CharT, _Intl>::intl; | |
23821 | # 3968 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23822 | template<typename _CharT, typename _InIter> | |
23823 | class money_get : public locale::facet | |
23824 | { | |
23825 | public: | |
23826 | ||
23827 | ||
23828 | ||
23829 | typedef _CharT char_type; | |
23830 | typedef _InIter iter_type; | |
23831 | typedef basic_string<_CharT> string_type; | |
23832 | ||
23833 | ||
23834 | ||
23835 | static locale::id id; | |
23836 | # 3990 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23837 | explicit | |
23838 | money_get(size_t __refs = 0) : facet(__refs) { } | |
23839 | # 4020 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23840 | iter_type | |
23841 | get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
23842 | ios_base::iostate& __err, long double& __units) const | |
23843 | { return this->do_get(__s, __end, __intl, __io, __err, __units); } | |
23844 | # 4050 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23845 | iter_type | |
23846 | get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
23847 | ios_base::iostate& __err, string_type& __digits) const | |
23848 | { return this->do_get(__s, __end, __intl, __io, __err, __digits); } | |
23849 | ||
23850 | protected: | |
23851 | ||
23852 | virtual | |
23853 | ~money_get() { } | |
23854 | # 4067 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23855 | virtual iter_type | |
23856 | do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
23857 | ios_base::iostate& __err, long double& __units) const; | |
23858 | # 4078 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23859 | virtual iter_type | |
23860 | do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
23861 | ios_base::iostate& __err, string_type& __digits) const; | |
23862 | ||
23863 | template<bool _Intl> | |
23864 | iter_type | |
23865 | _M_extract(iter_type __s, iter_type __end, ios_base& __io, | |
23866 | ios_base::iostate& __err, string& __digits) const; | |
23867 | }; | |
23868 | ||
23869 | template<typename _CharT, typename _InIter> | |
23870 | locale::id money_get<_CharT, _InIter>::id; | |
23871 | # 4103 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23872 | template<typename _CharT, typename _OutIter> | |
23873 | class money_put : public locale::facet | |
23874 | { | |
23875 | public: | |
23876 | ||
23877 | ||
23878 | typedef _CharT char_type; | |
23879 | typedef _OutIter iter_type; | |
23880 | typedef basic_string<_CharT> string_type; | |
23881 | ||
23882 | ||
23883 | ||
23884 | static locale::id id; | |
23885 | # 4124 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23886 | explicit | |
23887 | money_put(size_t __refs = 0) : facet(__refs) { } | |
23888 | # 4144 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23889 | iter_type | |
23890 | put(iter_type __s, bool __intl, ios_base& __io, | |
23891 | char_type __fill, long double __units) const | |
23892 | { return this->do_put(__s, __intl, __io, __fill, __units); } | |
23893 | # 4166 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23894 | iter_type | |
23895 | put(iter_type __s, bool __intl, ios_base& __io, | |
23896 | char_type __fill, const string_type& __digits) const | |
23897 | { return this->do_put(__s, __intl, __io, __fill, __digits); } | |
23898 | ||
23899 | protected: | |
23900 | ||
23901 | virtual | |
23902 | ~money_put() { } | |
23903 | # 4194 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23904 | virtual iter_type | |
23905 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
23906 | long double __units) const; | |
23907 | # 4216 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23908 | virtual iter_type | |
23909 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
23910 | const string_type& __digits) const; | |
23911 | ||
23912 | template<bool _Intl> | |
23913 | iter_type | |
23914 | _M_insert(iter_type __s, ios_base& __io, char_type __fill, | |
23915 | const string_type& __digits) const; | |
23916 | }; | |
23917 | ||
23918 | template<typename _CharT, typename _OutIter> | |
23919 | locale::id money_put<_CharT, _OutIter>::id; | |
23920 | ||
23921 | ||
23922 | ||
23923 | ||
23924 | struct messages_base | |
23925 | { | |
23926 | typedef int catalog; | |
23927 | }; | |
23928 | # 4257 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23929 | template<typename _CharT> | |
23930 | class messages : public locale::facet, public messages_base | |
23931 | { | |
23932 | public: | |
23933 | ||
23934 | ||
23935 | ||
23936 | typedef _CharT char_type; | |
23937 | typedef basic_string<_CharT> string_type; | |
23938 | ||
23939 | ||
23940 | protected: | |
23941 | ||
23942 | ||
23943 | __c_locale _M_c_locale_messages; | |
23944 | const char* _M_name_messages; | |
23945 | ||
23946 | public: | |
23947 | ||
23948 | static locale::id id; | |
23949 | # 4285 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23950 | explicit | |
23951 | messages(size_t __refs = 0); | |
23952 | # 4299 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23953 | explicit | |
23954 | messages(__c_locale __cloc, const char* __s, size_t __refs = 0); | |
23955 | # 4312 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23956 | catalog | |
23957 | open(const basic_string<char>& __s, const locale& __loc) const | |
23958 | { return this->do_open(__s, __loc); } | |
23959 | # 4330 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23960 | catalog | |
23961 | open(const basic_string<char>&, const locale&, const char*) const; | |
23962 | # 4348 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23963 | string_type | |
23964 | get(catalog __c, int __set, int __msgid, const string_type& __s) const | |
23965 | { return this->do_get(__c, __set, __msgid, __s); } | |
23966 | # 4359 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23967 | void | |
23968 | close(catalog __c) const | |
23969 | { return this->do_close(__c); } | |
23970 | ||
23971 | protected: | |
23972 | ||
23973 | virtual | |
23974 | ~messages(); | |
23975 | # 4379 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23976 | virtual catalog | |
23977 | do_open(const basic_string<char>&, const locale&) const; | |
23978 | # 4398 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
23979 | virtual string_type | |
23980 | do_get(catalog, int, int, const string_type& __dfault) const; | |
23981 | ||
23982 | ||
23983 | ||
23984 | ||
23985 | ||
23986 | ||
23987 | virtual void | |
23988 | do_close(catalog) const; | |
23989 | ||
23990 | ||
23991 | char* | |
23992 | _M_convert_to_char(const string_type& __msg) const | |
23993 | { | |
23994 | ||
23995 | return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str())); | |
23996 | } | |
23997 | ||
23998 | ||
23999 | string_type | |
24000 | _M_convert_from_char(char*) const | |
24001 | { | |
24002 | # 4455 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
24003 | return string_type(); | |
24004 | } | |
24005 | }; | |
24006 | ||
24007 | template<typename _CharT> | |
24008 | locale::id messages<_CharT>::id; | |
24009 | ||
24010 | ||
24011 | template<> | |
24012 | string | |
24013 | messages<char>::do_get(catalog, int, int, const string&) const; | |
24014 | ||
24015 | ||
24016 | template<> | |
24017 | wstring | |
24018 | messages<wchar_t>::do_get(catalog, int, int, const wstring&) const; | |
24019 | ||
24020 | ||
24021 | ||
24022 | template<typename _CharT> | |
24023 | class messages_byname : public messages<_CharT> | |
24024 | { | |
24025 | public: | |
24026 | typedef _CharT char_type; | |
24027 | typedef basic_string<_CharT> string_type; | |
24028 | ||
24029 | explicit | |
24030 | messages_byname(const char* __s, size_t __refs = 0); | |
24031 | ||
24032 | protected: | |
24033 | virtual | |
24034 | ~messages_byname() | |
24035 | { } | |
24036 | }; | |
24037 | ||
24038 | ||
24039 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/messages_members.h" 1 3 | |
24040 | # 37 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/powerpc-unknown-linux-gnu/bits/messages_members.h" 3 | |
24041 | template<typename _CharT> | |
24042 | messages<_CharT>::messages(size_t __refs) | |
24043 | : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), | |
24044 | _M_name_messages(_S_get_c_name()) | |
24045 | { } | |
24046 | ||
24047 | template<typename _CharT> | |
24048 | messages<_CharT>::messages(__c_locale __cloc, const char* __s, | |
24049 | size_t __refs) | |
24050 | : facet(__refs), _M_c_locale_messages(__null), _M_name_messages(__null) | |
24051 | { | |
24052 | const size_t __len = std::strlen(__s) + 1; | |
24053 | char* __tmp = new char[__len]; | |
24054 | std::memcpy(__tmp, __s, __len); | |
24055 | _M_name_messages = __tmp; | |
24056 | ||
24057 | ||
24058 | _M_c_locale_messages = _S_clone_c_locale(__cloc); | |
24059 | } | |
24060 | ||
24061 | template<typename _CharT> | |
24062 | typename messages<_CharT>::catalog | |
24063 | messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | |
24064 | const char* __dir) const | |
24065 | { | |
24066 | bindtextdomain(__s.c_str(), __dir); | |
24067 | return this->do_open(__s, __loc); | |
24068 | } | |
24069 | ||
24070 | ||
24071 | template<typename _CharT> | |
24072 | messages<_CharT>::~messages() | |
24073 | { | |
24074 | if (_M_name_messages != _S_get_c_name()) | |
24075 | delete [] _M_name_messages; | |
24076 | _S_destroy_c_locale(_M_c_locale_messages); | |
24077 | } | |
24078 | ||
24079 | template<typename _CharT> | |
24080 | typename messages<_CharT>::catalog | |
24081 | messages<_CharT>::do_open(const basic_string<char>& __s, | |
24082 | const locale&) const | |
24083 | { | |
24084 | ||
24085 | ||
24086 | textdomain(__s.c_str()); | |
24087 | return 0; | |
24088 | } | |
24089 | ||
24090 | template<typename _CharT> | |
24091 | void | |
24092 | messages<_CharT>::do_close(catalog) const | |
24093 | { } | |
24094 | ||
24095 | ||
24096 | template<typename _CharT> | |
24097 | messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) | |
24098 | : messages<_CharT>(__refs) | |
24099 | { | |
24100 | if (this->_M_name_messages != locale::facet::_S_get_c_name()) | |
24101 | delete [] this->_M_name_messages; | |
24102 | char* __tmp = new char[std::strlen(__s) + 1]; | |
24103 | std::strcpy(__tmp, __s); | |
24104 | this->_M_name_messages = __tmp; | |
24105 | ||
24106 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
24107 | { | |
24108 | this->_S_destroy_c_locale(this->_M_c_locale_messages); | |
24109 | this->_S_create_c_locale(this->_M_c_locale_messages, __s); | |
24110 | } | |
24111 | } | |
24112 | # 4492 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 2 3 | |
24113 | # 4500 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.h" 3 | |
24114 | template<typename _CharT> | |
24115 | inline bool | |
24116 | isspace(_CharT __c, const locale& __loc) | |
24117 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); } | |
24118 | ||
24119 | ||
24120 | template<typename _CharT> | |
24121 | inline bool | |
24122 | isprint(_CharT __c, const locale& __loc) | |
24123 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); } | |
24124 | ||
24125 | ||
24126 | template<typename _CharT> | |
24127 | inline bool | |
24128 | iscntrl(_CharT __c, const locale& __loc) | |
24129 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); } | |
24130 | ||
24131 | ||
24132 | template<typename _CharT> | |
24133 | inline bool | |
24134 | isupper(_CharT __c, const locale& __loc) | |
24135 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); } | |
24136 | ||
24137 | ||
24138 | template<typename _CharT> | |
24139 | inline bool | |
24140 | islower(_CharT __c, const locale& __loc) | |
24141 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); } | |
24142 | ||
24143 | ||
24144 | template<typename _CharT> | |
24145 | inline bool | |
24146 | isalpha(_CharT __c, const locale& __loc) | |
24147 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); } | |
24148 | ||
24149 | ||
24150 | template<typename _CharT> | |
24151 | inline bool | |
24152 | isdigit(_CharT __c, const locale& __loc) | |
24153 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); } | |
24154 | ||
24155 | ||
24156 | template<typename _CharT> | |
24157 | inline bool | |
24158 | ispunct(_CharT __c, const locale& __loc) | |
24159 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); } | |
24160 | ||
24161 | ||
24162 | template<typename _CharT> | |
24163 | inline bool | |
24164 | isxdigit(_CharT __c, const locale& __loc) | |
24165 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); } | |
24166 | ||
24167 | ||
24168 | template<typename _CharT> | |
24169 | inline bool | |
24170 | isalnum(_CharT __c, const locale& __loc) | |
24171 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); } | |
24172 | ||
24173 | ||
24174 | template<typename _CharT> | |
24175 | inline bool | |
24176 | isgraph(_CharT __c, const locale& __loc) | |
24177 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); } | |
24178 | ||
24179 | ||
24180 | template<typename _CharT> | |
24181 | inline _CharT | |
24182 | toupper(_CharT __c, const locale& __loc) | |
24183 | { return use_facet<ctype<_CharT> >(__loc).toupper(__c); } | |
24184 | ||
24185 | ||
24186 | template<typename _CharT> | |
24187 | inline _CharT | |
24188 | tolower(_CharT __c, const locale& __loc) | |
24189 | { return use_facet<ctype<_CharT> >(__loc).tolower(__c); } | |
24190 | } | |
24191 | # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 2 3 | |
24192 | ||
24193 | namespace std | |
24194 | { | |
24195 | ||
24196 | ||
24197 | ||
24198 | ||
24199 | ||
24200 | ||
24201 | ||
24202 | template<typename _CharT, typename _Traits> | |
24203 | class basic_ios : public ios_base | |
24204 | { | |
24205 | public: | |
24206 | ||
24207 | ||
24208 | ||
24209 | ||
24210 | ||
24211 | ||
24212 | typedef _CharT char_type; | |
24213 | typedef typename _Traits::int_type int_type; | |
24214 | typedef typename _Traits::pos_type pos_type; | |
24215 | typedef typename _Traits::off_type off_type; | |
24216 | typedef _Traits traits_type; | |
24217 | # 78 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24218 | typedef ctype<_CharT> __ctype_type; | |
24219 | typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > | |
24220 | __num_put_type; | |
24221 | typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > | |
24222 | __num_get_type; | |
24223 | ||
24224 | ||
24225 | ||
24226 | protected: | |
24227 | basic_ostream<_CharT, _Traits>* _M_tie; | |
24228 | mutable char_type _M_fill; | |
24229 | mutable bool _M_fill_init; | |
24230 | basic_streambuf<_CharT, _Traits>* _M_streambuf; | |
24231 | ||
24232 | ||
24233 | const __ctype_type* _M_ctype; | |
24234 | ||
24235 | const __num_put_type* _M_num_put; | |
24236 | ||
24237 | const __num_get_type* _M_num_get; | |
24238 | ||
24239 | public: | |
24240 | ||
24241 | ||
24242 | ||
24243 | ||
24244 | ||
24245 | ||
24246 | ||
24247 | operator void*() const | |
24248 | { return this->fail() ? 0 : const_cast<basic_ios*>(this); } | |
24249 | ||
24250 | bool | |
24251 | operator!() const | |
24252 | { return this->fail(); } | |
24253 | # 122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24254 | iostate | |
24255 | rdstate() const | |
24256 | { return _M_streambuf_state; } | |
24257 | # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24258 | void | |
24259 | clear(iostate __state = goodbit); | |
24260 | ||
24261 | ||
24262 | ||
24263 | ||
24264 | ||
24265 | ||
24266 | ||
24267 | void | |
24268 | setstate(iostate __state) | |
24269 | { this->clear(this->rdstate() | __state); } | |
24270 | ||
24271 | ||
24272 | ||
24273 | ||
24274 | void | |
24275 | _M_setstate(iostate __state) | |
24276 | { | |
24277 | ||
24278 | ||
24279 | _M_streambuf_state |= __state; | |
24280 | if (this->exceptions() & __state) | |
24281 | throw; | |
24282 | } | |
24283 | ||
24284 | ||
24285 | ||
24286 | ||
24287 | ||
24288 | ||
24289 | ||
24290 | bool | |
24291 | good() const | |
24292 | { return this->rdstate() == 0; } | |
24293 | ||
24294 | ||
24295 | ||
24296 | ||
24297 | ||
24298 | ||
24299 | ||
24300 | bool | |
24301 | eof() const | |
24302 | { return (this->rdstate() & eofbit) != 0; } | |
24303 | # 186 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24304 | bool | |
24305 | fail() const | |
24306 | { return (this->rdstate() & (badbit | failbit)) != 0; } | |
24307 | ||
24308 | ||
24309 | ||
24310 | ||
24311 | ||
24312 | ||
24313 | ||
24314 | bool | |
24315 | bad() const | |
24316 | { return (this->rdstate() & badbit) != 0; } | |
24317 | # 207 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24318 | iostate | |
24319 | exceptions() const | |
24320 | { return _M_exception; } | |
24321 | # 242 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24322 | void | |
24323 | exceptions(iostate __except) | |
24324 | { | |
24325 | _M_exception = __except; | |
24326 | this->clear(_M_streambuf_state); | |
24327 | } | |
24328 | ||
24329 | ||
24330 | ||
24331 | ||
24332 | ||
24333 | ||
24334 | ||
24335 | explicit | |
24336 | basic_ios(basic_streambuf<_CharT, _Traits>* __sb) | |
24337 | : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), | |
24338 | _M_ctype(0), _M_num_put(0), _M_num_get(0) | |
24339 | { this->init(__sb); } | |
24340 | ||
24341 | ||
24342 | ||
24343 | ||
24344 | ||
24345 | ||
24346 | ||
24347 | virtual | |
24348 | ~basic_ios() { } | |
24349 | # 280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24350 | basic_ostream<_CharT, _Traits>* | |
24351 | tie() const | |
24352 | { return _M_tie; } | |
24353 | # 292 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24354 | basic_ostream<_CharT, _Traits>* | |
24355 | tie(basic_ostream<_CharT, _Traits>* __tiestr) | |
24356 | { | |
24357 | basic_ostream<_CharT, _Traits>* __old = _M_tie; | |
24358 | _M_tie = __tiestr; | |
24359 | return __old; | |
24360 | } | |
24361 | ||
24362 | ||
24363 | ||
24364 | ||
24365 | ||
24366 | ||
24367 | ||
24368 | basic_streambuf<_CharT, _Traits>* | |
24369 | rdbuf() const | |
24370 | { return _M_streambuf; } | |
24371 | # 332 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24372 | basic_streambuf<_CharT, _Traits>* | |
24373 | rdbuf(basic_streambuf<_CharT, _Traits>* __sb); | |
24374 | # 346 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24375 | basic_ios& | |
24376 | copyfmt(const basic_ios& __rhs); | |
24377 | ||
24378 | ||
24379 | ||
24380 | ||
24381 | ||
24382 | ||
24383 | ||
24384 | char_type | |
24385 | fill() const | |
24386 | { | |
24387 | if (!_M_fill_init) | |
24388 | { | |
24389 | _M_fill = this->widen(' '); | |
24390 | _M_fill_init = true; | |
24391 | } | |
24392 | return _M_fill; | |
24393 | } | |
24394 | # 375 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24395 | char_type | |
24396 | fill(char_type __ch) | |
24397 | { | |
24398 | char_type __old = this->fill(); | |
24399 | _M_fill = __ch; | |
24400 | return __old; | |
24401 | } | |
24402 | # 395 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24403 | locale | |
24404 | imbue(const locale& __loc); | |
24405 | # 415 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24406 | char | |
24407 | narrow(char_type __c, char __dfault) const; | |
24408 | # 433 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 3 | |
24409 | char_type | |
24410 | widen(char __c) const; | |
24411 | ||
24412 | protected: | |
24413 | ||
24414 | ||
24415 | ||
24416 | ||
24417 | ||
24418 | ||
24419 | ||
24420 | basic_ios() | |
24421 | : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), | |
24422 | _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) | |
24423 | { } | |
24424 | ||
24425 | ||
24426 | ||
24427 | ||
24428 | ||
24429 | ||
24430 | ||
24431 | void | |
24432 | init(basic_streambuf<_CharT, _Traits>* __sb); | |
24433 | ||
24434 | void | |
24435 | _M_cache_locale(const locale& __loc); | |
24436 | }; | |
24437 | } | |
24438 | ||
24439 | ||
24440 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.tcc" 1 3 | |
24441 | # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.tcc" 3 | |
24442 | ||
24443 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.tcc" 3 | |
24444 | ||
24445 | namespace std | |
24446 | { | |
24447 | template<typename _CharT, typename _Traits> | |
24448 | void | |
24449 | basic_ios<_CharT, _Traits>::clear(iostate __state) | |
24450 | { | |
24451 | if (this->rdbuf()) | |
24452 | _M_streambuf_state = __state; | |
24453 | else | |
24454 | _M_streambuf_state = __state | badbit; | |
24455 | if (this->exceptions() & this->rdstate()) | |
24456 | __throw_ios_failure(("basic_ios::clear")); | |
24457 | } | |
24458 | ||
24459 | template<typename _CharT, typename _Traits> | |
24460 | basic_streambuf<_CharT, _Traits>* | |
24461 | basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) | |
24462 | { | |
24463 | basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; | |
24464 | _M_streambuf = __sb; | |
24465 | this->clear(); | |
24466 | return __old; | |
24467 | } | |
24468 | ||
24469 | template<typename _CharT, typename _Traits> | |
24470 | basic_ios<_CharT, _Traits>& | |
24471 | basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) | |
24472 | { | |
24473 | ||
24474 | ||
24475 | if (this != &__rhs) | |
24476 | { | |
24477 | ||
24478 | ||
24479 | ||
24480 | ||
24481 | _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? | |
24482 | _M_local_word : new _Words[__rhs._M_word_size]; | |
24483 | ||
24484 | ||
24485 | _Callback_list* __cb = __rhs._M_callbacks; | |
24486 | if (__cb) | |
24487 | __cb->_M_add_reference(); | |
24488 | _M_call_callbacks(erase_event); | |
24489 | if (_M_word != _M_local_word) | |
24490 | { | |
24491 | delete [] _M_word; | |
24492 | _M_word = 0; | |
24493 | } | |
24494 | _M_dispose_callbacks(); | |
24495 | ||
24496 | ||
24497 | _M_callbacks = __cb; | |
24498 | for (int __i = 0; __i < __rhs._M_word_size; ++__i) | |
24499 | __words[__i] = __rhs._M_word[__i]; | |
24500 | _M_word = __words; | |
24501 | _M_word_size = __rhs._M_word_size; | |
24502 | ||
24503 | this->flags(__rhs.flags()); | |
24504 | this->width(__rhs.width()); | |
24505 | this->precision(__rhs.precision()); | |
24506 | this->tie(__rhs.tie()); | |
24507 | this->fill(__rhs.fill()); | |
24508 | _M_ios_locale = __rhs.getloc(); | |
24509 | _M_cache_locale(_M_ios_locale); | |
24510 | ||
24511 | _M_call_callbacks(copyfmt_event); | |
24512 | ||
24513 | ||
24514 | this->exceptions(__rhs.exceptions()); | |
24515 | } | |
24516 | return *this; | |
24517 | } | |
24518 | ||
24519 | template<typename _CharT, typename _Traits> | |
24520 | char | |
24521 | basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const | |
24522 | { return __check_facet(_M_ctype).narrow(__c, __dfault); } | |
24523 | ||
24524 | template<typename _CharT, typename _Traits> | |
24525 | _CharT | |
24526 | basic_ios<_CharT, _Traits>::widen(char __c) const | |
24527 | { return __check_facet(_M_ctype).widen(__c); } | |
24528 | ||
24529 | ||
24530 | template<typename _CharT, typename _Traits> | |
24531 | locale | |
24532 | basic_ios<_CharT, _Traits>::imbue(const locale& __loc) | |
24533 | { | |
24534 | locale __old(this->getloc()); | |
24535 | ios_base::imbue(__loc); | |
24536 | _M_cache_locale(__loc); | |
24537 | if (this->rdbuf() != 0) | |
24538 | this->rdbuf()->pubimbue(__loc); | |
24539 | return __old; | |
24540 | } | |
24541 | ||
24542 | template<typename _CharT, typename _Traits> | |
24543 | void | |
24544 | basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) | |
24545 | { | |
24546 | ||
24547 | ios_base::_M_init(); | |
24548 | ||
24549 | ||
24550 | _M_cache_locale(_M_ios_locale); | |
24551 | # 159 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.tcc" 3 | |
24552 | _M_fill = _CharT(); | |
24553 | _M_fill_init = false; | |
24554 | ||
24555 | _M_tie = 0; | |
24556 | _M_exception = goodbit; | |
24557 | _M_streambuf = __sb; | |
24558 | _M_streambuf_state = __sb ? goodbit : badbit; | |
24559 | } | |
24560 | ||
24561 | template<typename _CharT, typename _Traits> | |
24562 | void | |
24563 | basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) | |
24564 | { | |
24565 | if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) | |
24566 | _M_ctype = &use_facet<__ctype_type>(__loc); | |
24567 | else | |
24568 | _M_ctype = 0; | |
24569 | ||
24570 | if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) | |
24571 | _M_num_put = &use_facet<__num_put_type>(__loc); | |
24572 | else | |
24573 | _M_num_put = 0; | |
24574 | ||
24575 | if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) | |
24576 | _M_num_get = &use_facet<__num_get_type>(__loc); | |
24577 | else | |
24578 | _M_num_get = 0; | |
24579 | } | |
24580 | ||
24581 | ||
24582 | ||
24583 | ||
24584 | ||
24585 | extern template class basic_ios<char>; | |
24586 | ||
24587 | ||
24588 | extern template class basic_ios<wchar_t>; | |
24589 | ||
24590 | ||
24591 | } | |
24592 | # 465 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/basic_ios.h" 2 3 | |
24593 | # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ios" 2 3 | |
24594 | ||
24595 | #pragma GCC visibility pop | |
24596 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 2 3 | |
24597 | ||
24598 | namespace std | |
24599 | { | |
24600 | # 57 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24601 | template<typename _CharT, typename _Traits> | |
24602 | class basic_ostream : virtual public basic_ios<_CharT, _Traits> | |
24603 | { | |
24604 | public: | |
24605 | ||
24606 | typedef _CharT char_type; | |
24607 | typedef typename _Traits::int_type int_type; | |
24608 | typedef typename _Traits::pos_type pos_type; | |
24609 | typedef typename _Traits::off_type off_type; | |
24610 | typedef _Traits traits_type; | |
24611 | ||
24612 | ||
24613 | typedef basic_streambuf<_CharT, _Traits> __streambuf_type; | |
24614 | typedef basic_ios<_CharT, _Traits> __ios_type; | |
24615 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
24616 | typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > | |
24617 | __num_put_type; | |
24618 | typedef ctype<_CharT> __ctype_type; | |
24619 | ||
24620 | template<typename _CharT2, typename _Traits2> | |
24621 | friend basic_ostream<_CharT2, _Traits2>& | |
24622 | operator<<(basic_ostream<_CharT2, _Traits2>&, _CharT2); | |
24623 | ||
24624 | template<typename _Traits2> | |
24625 | friend basic_ostream<char, _Traits2>& | |
24626 | operator<<(basic_ostream<char, _Traits2>&, char); | |
24627 | ||
24628 | template<typename _CharT2, typename _Traits2> | |
24629 | friend basic_ostream<_CharT2, _Traits2>& | |
24630 | operator<<(basic_ostream<_CharT2, _Traits2>&, const _CharT2*); | |
24631 | ||
24632 | template<typename _Traits2> | |
24633 | friend basic_ostream<char, _Traits2>& | |
24634 | operator<<(basic_ostream<char, _Traits2>&, const char*); | |
24635 | ||
24636 | template<typename _CharT2, typename _Traits2> | |
24637 | friend basic_ostream<_CharT2, _Traits2>& | |
24638 | operator<<(basic_ostream<_CharT2, _Traits2>&, const char*); | |
24639 | # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24640 | explicit | |
24641 | basic_ostream(__streambuf_type* __sb) | |
24642 | { this->init(__sb); } | |
24643 | ||
24644 | ||
24645 | ||
24646 | ||
24647 | ||
24648 | ||
24649 | virtual | |
24650 | ~basic_ostream() { } | |
24651 | ||
24652 | ||
24653 | class sentry; | |
24654 | friend class sentry; | |
24655 | # 130 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24656 | inline __ostream_type& | |
24657 | operator<<(__ostream_type& (*__pf)(__ostream_type&)); | |
24658 | ||
24659 | inline __ostream_type& | |
24660 | operator<<(__ios_type& (*__pf)(__ios_type&)); | |
24661 | ||
24662 | inline __ostream_type& | |
24663 | operator<<(ios_base& (*__pf) (ios_base&)); | |
24664 | # 167 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24665 | __ostream_type& | |
24666 | operator<<(long __n); | |
24667 | ||
24668 | __ostream_type& | |
24669 | operator<<(unsigned long __n); | |
24670 | ||
24671 | __ostream_type& | |
24672 | operator<<(bool __n); | |
24673 | ||
24674 | __ostream_type& | |
24675 | operator<<(short __n); | |
24676 | ||
24677 | __ostream_type& | |
24678 | operator<<(unsigned short __n); | |
24679 | ||
24680 | __ostream_type& | |
24681 | operator<<(int __n); | |
24682 | ||
24683 | __ostream_type& | |
24684 | operator<<(unsigned int __n); | |
24685 | ||
24686 | ||
24687 | __ostream_type& | |
24688 | operator<<(long long __n); | |
24689 | ||
24690 | __ostream_type& | |
24691 | operator<<(unsigned long long __n); | |
24692 | ||
24693 | ||
24694 | __ostream_type& | |
24695 | operator<<(double __f); | |
24696 | ||
24697 | __ostream_type& | |
24698 | operator<<(float __f); | |
24699 | ||
24700 | __ostream_type& | |
24701 | operator<<(long double __f); | |
24702 | ||
24703 | __ostream_type& | |
24704 | operator<<(const void* __p); | |
24705 | # 229 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24706 | __ostream_type& | |
24707 | operator<<(__streambuf_type* __sb); | |
24708 | # 262 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24709 | __ostream_type& | |
24710 | put(char_type __c); | |
24711 | ||
24712 | ||
24713 | void | |
24714 | _M_write(const char_type* __s, streamsize __n) | |
24715 | { | |
24716 | streamsize __put = this->rdbuf()->sputn(__s, __n); | |
24717 | if (__put != __n) | |
24718 | this->setstate(ios_base::badbit); | |
24719 | } | |
24720 | # 290 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24721 | __ostream_type& | |
24722 | write(const char_type* __s, streamsize __n); | |
24723 | # 303 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24724 | __ostream_type& | |
24725 | flush(); | |
24726 | # 314 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24727 | pos_type | |
24728 | tellp(); | |
24729 | # 325 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24730 | __ostream_type& | |
24731 | seekp(pos_type); | |
24732 | # 337 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24733 | __ostream_type& | |
24734 | seekp(off_type, ios_base::seekdir); | |
24735 | ||
24736 | protected: | |
24737 | explicit | |
24738 | basic_ostream() { } | |
24739 | }; | |
24740 | # 355 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24741 | template <typename _CharT, typename _Traits> | |
24742 | class basic_ostream<_CharT, _Traits>::sentry | |
24743 | { | |
24744 | ||
24745 | bool _M_ok; | |
24746 | basic_ostream<_CharT,_Traits>& _M_os; | |
24747 | ||
24748 | public: | |
24749 | # 374 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24750 | explicit | |
24751 | sentry(basic_ostream<_CharT,_Traits>& __os); | |
24752 | # 384 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24753 | ~sentry() | |
24754 | { | |
24755 | ||
24756 | if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception()) | |
24757 | { | |
24758 | ||
24759 | if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) | |
24760 | _M_os.setstate(ios_base::badbit); | |
24761 | } | |
24762 | } | |
24763 | # 402 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24764 | operator bool() const | |
24765 | { return _M_ok; } | |
24766 | }; | |
24767 | # 423 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24768 | template<typename _CharT, typename _Traits> | |
24769 | basic_ostream<_CharT, _Traits>& | |
24770 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c); | |
24771 | ||
24772 | template<typename _CharT, typename _Traits> | |
24773 | basic_ostream<_CharT, _Traits>& | |
24774 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | |
24775 | { return (__out << __out.widen(__c)); } | |
24776 | ||
24777 | ||
24778 | template <class _Traits> | |
24779 | basic_ostream<char, _Traits>& | |
24780 | operator<<(basic_ostream<char, _Traits>& __out, char __c); | |
24781 | ||
24782 | ||
24783 | template<class _Traits> | |
24784 | basic_ostream<char, _Traits>& | |
24785 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | |
24786 | { return (__out << static_cast<char>(__c)); } | |
24787 | ||
24788 | template<class _Traits> | |
24789 | basic_ostream<char, _Traits>& | |
24790 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | |
24791 | { return (__out << static_cast<char>(__c)); } | |
24792 | # 463 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24793 | template<typename _CharT, typename _Traits> | |
24794 | basic_ostream<_CharT, _Traits>& | |
24795 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s); | |
24796 | ||
24797 | template<typename _CharT, typename _Traits> | |
24798 | basic_ostream<_CharT, _Traits> & | |
24799 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); | |
24800 | ||
24801 | ||
24802 | template<class _Traits> | |
24803 | basic_ostream<char, _Traits>& | |
24804 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s); | |
24805 | ||
24806 | ||
24807 | template<class _Traits> | |
24808 | basic_ostream<char, _Traits>& | |
24809 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | |
24810 | { return (__out << reinterpret_cast<const char*>(__s)); } | |
24811 | ||
24812 | template<class _Traits> | |
24813 | basic_ostream<char, _Traits> & | |
24814 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | |
24815 | { return (__out << reinterpret_cast<const char*>(__s)); } | |
24816 | # 497 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 3 | |
24817 | template<typename _CharT, typename _Traits> | |
24818 | basic_ostream<_CharT, _Traits>& | |
24819 | endl(basic_ostream<_CharT, _Traits>& __os) | |
24820 | { return flush(__os.put(__os.widen('\n'))); } | |
24821 | ||
24822 | ||
24823 | ||
24824 | ||
24825 | ||
24826 | ||
24827 | ||
24828 | template<typename _CharT, typename _Traits> | |
24829 | basic_ostream<_CharT, _Traits>& | |
24830 | ends(basic_ostream<_CharT, _Traits>& __os) | |
24831 | { return __os.put(_CharT()); } | |
24832 | ||
24833 | ||
24834 | ||
24835 | ||
24836 | ||
24837 | ||
24838 | template<typename _CharT, typename _Traits> | |
24839 | basic_ostream<_CharT, _Traits>& | |
24840 | flush(basic_ostream<_CharT, _Traits>& __os) | |
24841 | { return __os.flush(); } | |
24842 | ||
24843 | } | |
24844 | ||
24845 | ||
24846 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ostream.tcc" 1 3 | |
24847 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ostream.tcc" 3 | |
24848 | ||
24849 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ostream.tcc" 3 | |
24850 | ||
24851 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/locale" 1 3 | |
24852 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/locale" 3 | |
24853 | ||
24854 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/locale" 3 | |
24855 | #pragma GCC visibility push(default) | |
24856 | ||
24857 | ||
24858 | ||
24859 | ||
24860 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 1 3 | |
24861 | # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
24862 | ||
24863 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
24864 | ||
24865 | ||
24866 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/typeinfo" 1 3 | |
24867 | # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/typeinfo" 3 | |
24868 | #pragma GCC visibility push(default) | |
24869 | ||
24870 | extern "C++" { | |
24871 | ||
24872 | namespace __cxxabiv1 | |
24873 | { | |
24874 | class __class_type_info; | |
24875 | } | |
24876 | # 59 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/typeinfo" 3 | |
24877 | namespace std | |
24878 | { | |
24879 | ||
24880 | ||
24881 | ||
24882 | ||
24883 | ||
24884 | ||
24885 | class type_info | |
24886 | { | |
24887 | public: | |
24888 | ||
24889 | ||
24890 | ||
24891 | ||
24892 | virtual ~type_info(); | |
24893 | ||
24894 | private: | |
24895 | ||
24896 | type_info& operator=(const type_info&); | |
24897 | type_info(const type_info&); | |
24898 | ||
24899 | protected: | |
24900 | const char *__name; | |
24901 | ||
24902 | protected: | |
24903 | explicit type_info(const char *__n): __name(__n) { } | |
24904 | ||
24905 | public: | |
24906 | ||
24907 | ||
24908 | ||
24909 | const char* name() const | |
24910 | { return __name; } | |
24911 | # 105 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/typeinfo" 3 | |
24912 | bool before(const type_info& __arg) const | |
24913 | { return __name < __arg.__name; } | |
24914 | bool operator==(const type_info& __arg) const | |
24915 | { return __name == __arg.__name; } | |
24916 | ||
24917 | bool operator!=(const type_info& __arg) const | |
24918 | { return !operator==(__arg); } | |
24919 | ||
24920 | ||
24921 | public: | |
24922 | ||
24923 | virtual bool __is_pointer_p() const; | |
24924 | ||
24925 | virtual bool __is_function_p() const; | |
24926 | ||
24927 | ||
24928 | ||
24929 | ||
24930 | ||
24931 | ||
24932 | ||
24933 | virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, | |
24934 | unsigned __outer) const; | |
24935 | ||
24936 | ||
24937 | virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, | |
24938 | void **__obj_ptr) const; | |
24939 | }; | |
24940 | ||
24941 | ||
24942 | ||
24943 | ||
24944 | ||
24945 | ||
24946 | class bad_cast : public exception | |
24947 | { | |
24948 | public: | |
24949 | bad_cast() throw() { } | |
24950 | ||
24951 | ||
24952 | virtual ~bad_cast() throw(); | |
24953 | }; | |
24954 | ||
24955 | ||
24956 | class bad_typeid : public exception | |
24957 | { | |
24958 | public: | |
24959 | bad_typeid () throw() { } | |
24960 | ||
24961 | ||
24962 | virtual ~bad_typeid() throw(); | |
24963 | }; | |
24964 | } | |
24965 | ||
24966 | #pragma GCC visibility pop | |
24967 | ||
24968 | } | |
24969 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 2 3 | |
24970 | ||
24971 | ||
24972 | namespace std | |
24973 | { | |
24974 | template<typename _Facet> | |
24975 | locale | |
24976 | locale::combine(const locale& __other) const | |
24977 | { | |
24978 | _Impl* __tmp = new _Impl(*_M_impl, 1); | |
24979 | try | |
24980 | { | |
24981 | __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); | |
24982 | } | |
24983 | catch(...) | |
24984 | { | |
24985 | __tmp->_M_remove_reference(); | |
24986 | throw; | |
24987 | } | |
24988 | return locale(__tmp); | |
24989 | } | |
24990 | ||
24991 | template<typename _CharT, typename _Traits, typename _Alloc> | |
24992 | bool | |
24993 | locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, | |
24994 | const basic_string<_CharT, _Traits, _Alloc>& __s2) const | |
24995 | { | |
24996 | typedef std::collate<_CharT> __collate_type; | |
24997 | const __collate_type& __collate = use_facet<__collate_type>(*this); | |
24998 | return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), | |
24999 | __s2.data(), __s2.data() + __s2.length()) < 0); | |
25000 | } | |
25001 | # 86 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
25002 | template<typename _Facet> | |
25003 | inline bool | |
25004 | has_facet(const locale& __loc) throw() | |
25005 | { | |
25006 | const size_t __i = _Facet::id._M_id(); | |
25007 | const locale::facet** __facets = __loc._M_impl->_M_facets; | |
25008 | return (__i < __loc._M_impl->_M_facets_size && __facets[__i]); | |
25009 | } | |
25010 | # 108 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
25011 | template<typename _Facet> | |
25012 | inline const _Facet& | |
25013 | use_facet(const locale& __loc) | |
25014 | { | |
25015 | const size_t __i = _Facet::id._M_id(); | |
25016 | const locale::facet** __facets = __loc._M_impl->_M_facets; | |
25017 | if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i])) | |
25018 | __throw_bad_cast(); | |
25019 | return static_cast<const _Facet&>(*__facets[__i]); | |
25020 | } | |
25021 | ||
25022 | ||
25023 | ||
25024 | template<typename _Facet> | |
25025 | struct __use_cache | |
25026 | { | |
25027 | const _Facet* | |
25028 | operator() (const locale& __loc) const; | |
25029 | }; | |
25030 | ||
25031 | ||
25032 | template<typename _CharT> | |
25033 | struct __use_cache<__numpunct_cache<_CharT> > | |
25034 | { | |
25035 | const __numpunct_cache<_CharT>* | |
25036 | operator() (const locale& __loc) const | |
25037 | { | |
25038 | const size_t __i = numpunct<_CharT>::id._M_id(); | |
25039 | const locale::facet** __caches = __loc._M_impl->_M_caches; | |
25040 | if (!__caches[__i]) | |
25041 | { | |
25042 | __numpunct_cache<_CharT>* __tmp = __null; | |
25043 | try | |
25044 | { | |
25045 | __tmp = new __numpunct_cache<_CharT>; | |
25046 | __tmp->_M_cache(__loc); | |
25047 | } | |
25048 | catch(...) | |
25049 | { | |
25050 | delete __tmp; | |
25051 | throw; | |
25052 | } | |
25053 | __loc._M_impl->_M_install_cache(__tmp, __i); | |
25054 | } | |
25055 | return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]); | |
25056 | } | |
25057 | }; | |
25058 | ||
25059 | template<typename _CharT, bool _Intl> | |
25060 | struct __use_cache<__moneypunct_cache<_CharT, _Intl> > | |
25061 | { | |
25062 | const __moneypunct_cache<_CharT, _Intl>* | |
25063 | operator() (const locale& __loc) const | |
25064 | { | |
25065 | const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); | |
25066 | const locale::facet** __caches = __loc._M_impl->_M_caches; | |
25067 | if (!__caches[__i]) | |
25068 | { | |
25069 | __moneypunct_cache<_CharT, _Intl>* __tmp = __null; | |
25070 | try | |
25071 | { | |
25072 | __tmp = new __moneypunct_cache<_CharT, _Intl>; | |
25073 | __tmp->_M_cache(__loc); | |
25074 | } | |
25075 | catch(...) | |
25076 | { | |
25077 | delete __tmp; | |
25078 | throw; | |
25079 | } | |
25080 | __loc._M_impl->_M_install_cache(__tmp, __i); | |
25081 | } | |
25082 | return static_cast< | |
25083 | const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); | |
25084 | } | |
25085 | }; | |
25086 | ||
25087 | template<typename _CharT> | |
25088 | void | |
25089 | __numpunct_cache<_CharT>::_M_cache(const locale& __loc) | |
25090 | { | |
25091 | _M_allocated = true; | |
25092 | ||
25093 | const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); | |
25094 | ||
25095 | _M_grouping_size = __np.grouping().size(); | |
25096 | char* __grouping = new char[_M_grouping_size]; | |
25097 | __np.grouping().copy(__grouping, _M_grouping_size); | |
25098 | _M_grouping = __grouping; | |
25099 | _M_use_grouping = (_M_grouping_size | |
25100 | && static_cast<signed char>(__np.grouping()[0]) > 0); | |
25101 | ||
25102 | _M_truename_size = __np.truename().size(); | |
25103 | _CharT* __truename = new _CharT[_M_truename_size]; | |
25104 | __np.truename().copy(__truename, _M_truename_size); | |
25105 | _M_truename = __truename; | |
25106 | ||
25107 | _M_falsename_size = __np.falsename().size(); | |
25108 | _CharT* __falsename = new _CharT[_M_falsename_size]; | |
25109 | __np.falsename().copy(__falsename, _M_falsename_size); | |
25110 | _M_falsename = __falsename; | |
25111 | ||
25112 | _M_decimal_point = __np.decimal_point(); | |
25113 | _M_thousands_sep = __np.thousands_sep(); | |
25114 | ||
25115 | const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); | |
25116 | __ct.widen(__num_base::_S_atoms_out, | |
25117 | __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); | |
25118 | __ct.widen(__num_base::_S_atoms_in, | |
25119 | __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); | |
25120 | } | |
25121 | ||
25122 | template<typename _CharT, bool _Intl> | |
25123 | void | |
25124 | __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) | |
25125 | { | |
25126 | _M_allocated = true; | |
25127 | ||
25128 | const moneypunct<_CharT, _Intl>& __mp = | |
25129 | use_facet<moneypunct<_CharT, _Intl> >(__loc); | |
25130 | ||
25131 | _M_grouping_size = __mp.grouping().size(); | |
25132 | char* __grouping = new char[_M_grouping_size]; | |
25133 | __mp.grouping().copy(__grouping, _M_grouping_size); | |
25134 | _M_grouping = __grouping; | |
25135 | _M_use_grouping = (_M_grouping_size | |
25136 | && static_cast<signed char>(__mp.grouping()[0]) > 0); | |
25137 | ||
25138 | _M_decimal_point = __mp.decimal_point(); | |
25139 | _M_thousands_sep = __mp.thousands_sep(); | |
25140 | _M_frac_digits = __mp.frac_digits(); | |
25141 | ||
25142 | _M_curr_symbol_size = __mp.curr_symbol().size(); | |
25143 | _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size]; | |
25144 | __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); | |
25145 | _M_curr_symbol = __curr_symbol; | |
25146 | ||
25147 | _M_positive_sign_size = __mp.positive_sign().size(); | |
25148 | _CharT* __positive_sign = new _CharT[_M_positive_sign_size]; | |
25149 | __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); | |
25150 | _M_positive_sign = __positive_sign; | |
25151 | ||
25152 | _M_negative_sign_size = __mp.negative_sign().size(); | |
25153 | _CharT* __negative_sign = new _CharT[_M_negative_sign_size]; | |
25154 | __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); | |
25155 | _M_negative_sign = __negative_sign; | |
25156 | ||
25157 | _M_pos_format = __mp.pos_format(); | |
25158 | _M_neg_format = __mp.neg_format(); | |
25159 | ||
25160 | const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); | |
25161 | __ct.widen(money_base::_S_atoms, | |
25162 | money_base::_S_atoms + money_base::_S_end, _M_atoms); | |
25163 | } | |
25164 | # 271 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
25165 | static bool | |
25166 | __verify_grouping(const char* __grouping, size_t __grouping_size, | |
25167 | const string& __grouping_tmp); | |
25168 | ||
25169 | template<typename _CharT, typename _InIter> | |
25170 | _InIter | |
25171 | num_get<_CharT, _InIter>:: | |
25172 | _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, | |
25173 | ios_base::iostate& __err, string& __xtrc) const | |
25174 | { | |
25175 | typedef char_traits<_CharT> __traits_type; | |
25176 | typedef __numpunct_cache<_CharT> __cache_type; | |
25177 | __use_cache<__cache_type> __uc; | |
25178 | const locale& __loc = __io._M_getloc(); | |
25179 | const __cache_type* __lc = __uc(__loc); | |
25180 | const _CharT* __lit = __lc->_M_atoms_in; | |
25181 | char_type __c = char_type(); | |
25182 | ||
25183 | ||
25184 | bool __testeof = __beg == __end; | |
25185 | ||
25186 | ||
25187 | if (!__testeof) | |
25188 | { | |
25189 | __c = *__beg; | |
25190 | const bool __plus = __c == __lit[__num_base::_S_iplus]; | |
25191 | if ((__plus || __c == __lit[__num_base::_S_iminus]) | |
25192 | && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
25193 | && !(__c == __lc->_M_decimal_point)) | |
25194 | { | |
25195 | __xtrc += __plus ? '+' : '-'; | |
25196 | if (++__beg != __end) | |
25197 | __c = *__beg; | |
25198 | else | |
25199 | __testeof = true; | |
25200 | } | |
25201 | } | |
25202 | ||
25203 | ||
25204 | bool __found_mantissa = false; | |
25205 | int __sep_pos = 0; | |
25206 | while (!__testeof) | |
25207 | { | |
25208 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep | |
25209 | || __c == __lc->_M_decimal_point) | |
25210 | break; | |
25211 | else if (__c == __lit[__num_base::_S_izero]) | |
25212 | { | |
25213 | if (!__found_mantissa) | |
25214 | { | |
25215 | __xtrc += '0'; | |
25216 | __found_mantissa = true; | |
25217 | } | |
25218 | ++__sep_pos; | |
25219 | ||
25220 | if (++__beg != __end) | |
25221 | __c = *__beg; | |
25222 | else | |
25223 | __testeof = true; | |
25224 | } | |
25225 | else | |
25226 | break; | |
25227 | } | |
25228 | ||
25229 | ||
25230 | bool __found_dec = false; | |
25231 | bool __found_sci = false; | |
25232 | string __found_grouping; | |
25233 | if (__lc->_M_use_grouping) | |
25234 | __found_grouping.reserve(32); | |
25235 | const char_type* __q; | |
25236 | const char_type* __lit_zero = __lit + __num_base::_S_izero; | |
25237 | while (!__testeof) | |
25238 | { | |
25239 | ||
25240 | ||
25241 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
25242 | { | |
25243 | if (!__found_dec && !__found_sci) | |
25244 | { | |
25245 | ||
25246 | ||
25247 | if (__sep_pos) | |
25248 | { | |
25249 | __found_grouping += static_cast<char>(__sep_pos); | |
25250 | __sep_pos = 0; | |
25251 | } | |
25252 | else | |
25253 | { | |
25254 | ||
25255 | ||
25256 | __xtrc.clear(); | |
25257 | break; | |
25258 | } | |
25259 | } | |
25260 | else | |
25261 | break; | |
25262 | } | |
25263 | else if (__c == __lc->_M_decimal_point) | |
25264 | { | |
25265 | if (!__found_dec && !__found_sci) | |
25266 | { | |
25267 | ||
25268 | ||
25269 | ||
25270 | if (__found_grouping.size()) | |
25271 | __found_grouping += static_cast<char>(__sep_pos); | |
25272 | __xtrc += '.'; | |
25273 | __found_dec = true; | |
25274 | } | |
25275 | else | |
25276 | break; | |
25277 | } | |
25278 | else if ((__q = __traits_type::find(__lit_zero, 10, __c))) | |
25279 | { | |
25280 | __xtrc += __num_base::_S_atoms_in[__q - __lit]; | |
25281 | __found_mantissa = true; | |
25282 | ++__sep_pos; | |
25283 | } | |
25284 | else if ((__c == __lit[__num_base::_S_ie] | |
25285 | || __c == __lit[__num_base::_S_iE]) | |
25286 | && !__found_sci && __found_mantissa) | |
25287 | { | |
25288 | ||
25289 | if (__found_grouping.size() && !__found_dec) | |
25290 | __found_grouping += static_cast<char>(__sep_pos); | |
25291 | __xtrc += 'e'; | |
25292 | __found_sci = true; | |
25293 | ||
25294 | ||
25295 | if (++__beg != __end) | |
25296 | { | |
25297 | __c = *__beg; | |
25298 | const bool __plus = __c == __lit[__num_base::_S_iplus]; | |
25299 | if ((__plus || __c == __lit[__num_base::_S_iminus]) | |
25300 | && !(__lc->_M_use_grouping | |
25301 | && __c == __lc->_M_thousands_sep) | |
25302 | && !(__c == __lc->_M_decimal_point)) | |
25303 | __xtrc += __plus ? '+' : '-'; | |
25304 | else | |
25305 | continue; | |
25306 | } | |
25307 | else | |
25308 | { | |
25309 | __testeof = true; | |
25310 | break; | |
25311 | } | |
25312 | } | |
25313 | else | |
25314 | ||
25315 | break; | |
25316 | ||
25317 | if (++__beg != __end) | |
25318 | __c = *__beg; | |
25319 | else | |
25320 | __testeof = true; | |
25321 | } | |
25322 | ||
25323 | ||
25324 | ||
25325 | if (__found_grouping.size()) | |
25326 | { | |
25327 | ||
25328 | if (!__found_dec && !__found_sci) | |
25329 | __found_grouping += static_cast<char>(__sep_pos); | |
25330 | ||
25331 | if (!std::__verify_grouping(__lc->_M_grouping, | |
25332 | __lc->_M_grouping_size, | |
25333 | __found_grouping)) | |
25334 | __err |= ios_base::failbit; | |
25335 | } | |
25336 | ||
25337 | ||
25338 | if (__testeof) | |
25339 | __err |= ios_base::eofbit; | |
25340 | return __beg; | |
25341 | } | |
25342 | ||
25343 | template<typename _ValueT> | |
25344 | struct __to_unsigned_type | |
25345 | { typedef _ValueT __type; }; | |
25346 | ||
25347 | template<> | |
25348 | struct __to_unsigned_type<long> | |
25349 | { typedef unsigned long __type; }; | |
25350 | ||
25351 | ||
25352 | template<> | |
25353 | struct __to_unsigned_type<long long> | |
25354 | { typedef unsigned long long __type; }; | |
25355 | ||
25356 | ||
25357 | template<typename _CharT, typename _InIter> | |
25358 | template<typename _ValueT> | |
25359 | _InIter | |
25360 | num_get<_CharT, _InIter>:: | |
25361 | _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, | |
25362 | ios_base::iostate& __err, _ValueT& __v) const | |
25363 | { | |
25364 | typedef char_traits<_CharT> __traits_type; | |
25365 | typedef typename __to_unsigned_type<_ValueT>::__type __unsigned_type; | |
25366 | typedef __numpunct_cache<_CharT> __cache_type; | |
25367 | __use_cache<__cache_type> __uc; | |
25368 | const locale& __loc = __io._M_getloc(); | |
25369 | const __cache_type* __lc = __uc(__loc); | |
25370 | const _CharT* __lit = __lc->_M_atoms_in; | |
25371 | char_type __c = char_type(); | |
25372 | ||
25373 | ||
25374 | const ios_base::fmtflags __basefield = __io.flags() | |
25375 | & ios_base::basefield; | |
25376 | const bool __oct = __basefield == ios_base::oct; | |
25377 | int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); | |
25378 | ||
25379 | ||
25380 | bool __testeof = __beg == __end; | |
25381 | ||
25382 | ||
25383 | bool __negative = false; | |
25384 | if (!__testeof) | |
25385 | { | |
25386 | __c = *__beg; | |
25387 | if (numeric_limits<_ValueT>::is_signed) | |
25388 | __negative = __c == __lit[__num_base::_S_iminus]; | |
25389 | if ((__negative || __c == __lit[__num_base::_S_iplus]) | |
25390 | && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
25391 | && !(__c == __lc->_M_decimal_point)) | |
25392 | { | |
25393 | if (++__beg != __end) | |
25394 | __c = *__beg; | |
25395 | else | |
25396 | __testeof = true; | |
25397 | } | |
25398 | } | |
25399 | ||
25400 | ||
25401 | ||
25402 | bool __found_zero = false; | |
25403 | int __sep_pos = 0; | |
25404 | while (!__testeof) | |
25405 | { | |
25406 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep | |
25407 | || __c == __lc->_M_decimal_point) | |
25408 | break; | |
25409 | else if (__c == __lit[__num_base::_S_izero] | |
25410 | && (!__found_zero || __base == 10)) | |
25411 | { | |
25412 | __found_zero = true; | |
25413 | ++__sep_pos; | |
25414 | if (__basefield == 0) | |
25415 | __base = 8; | |
25416 | if (__base == 8) | |
25417 | __sep_pos = 0; | |
25418 | } | |
25419 | else if (__found_zero | |
25420 | && (__c == __lit[__num_base::_S_ix] | |
25421 | || __c == __lit[__num_base::_S_iX])) | |
25422 | { | |
25423 | if (__basefield == 0) | |
25424 | __base = 16; | |
25425 | if (__base == 16) | |
25426 | { | |
25427 | __found_zero = false; | |
25428 | __sep_pos = 0; | |
25429 | } | |
25430 | else | |
25431 | break; | |
25432 | } | |
25433 | else | |
25434 | break; | |
25435 | ||
25436 | if (++__beg != __end) | |
25437 | { | |
25438 | __c = *__beg; | |
25439 | if (!__found_zero) | |
25440 | break; | |
25441 | } | |
25442 | else | |
25443 | __testeof = true; | |
25444 | } | |
25445 | ||
25446 | ||
25447 | ||
25448 | const size_t __len = (__base == 16 ? __num_base::_S_iend | |
25449 | - __num_base::_S_izero : __base); | |
25450 | ||
25451 | ||
25452 | string __found_grouping; | |
25453 | if (__lc->_M_use_grouping) | |
25454 | __found_grouping.reserve(32); | |
25455 | bool __testfail = false; | |
25456 | const __unsigned_type __max = __negative ? | |
25457 | -numeric_limits<_ValueT>::min() : numeric_limits<_ValueT>::max(); | |
25458 | const __unsigned_type __smax = __max / __base; | |
25459 | __unsigned_type __result = 0; | |
25460 | const char_type* __q; | |
25461 | const char_type* __lit_zero = __lit + __num_base::_S_izero; | |
25462 | while (!__testeof) | |
25463 | { | |
25464 | ||
25465 | ||
25466 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
25467 | { | |
25468 | ||
25469 | ||
25470 | if (__sep_pos) | |
25471 | { | |
25472 | __found_grouping += static_cast<char>(__sep_pos); | |
25473 | __sep_pos = 0; | |
25474 | } | |
25475 | else | |
25476 | { | |
25477 | __testfail = true; | |
25478 | break; | |
25479 | } | |
25480 | } | |
25481 | else if (__c == __lc->_M_decimal_point) | |
25482 | break; | |
25483 | else if ((__q = __traits_type::find(__lit_zero, __len, __c))) | |
25484 | { | |
25485 | int __digit = __q - __lit_zero; | |
25486 | if (__digit > 15) | |
25487 | __digit -= 6; | |
25488 | if (__result > __smax) | |
25489 | __testfail = true; | |
25490 | else | |
25491 | { | |
25492 | __result *= __base; | |
25493 | __testfail |= __result > __max - __digit; | |
25494 | __result += __digit; | |
25495 | ++__sep_pos; | |
25496 | } | |
25497 | } | |
25498 | else | |
25499 | ||
25500 | break; | |
25501 | ||
25502 | if (++__beg != __end) | |
25503 | __c = *__beg; | |
25504 | else | |
25505 | __testeof = true; | |
25506 | } | |
25507 | ||
25508 | ||
25509 | ||
25510 | if (__found_grouping.size()) | |
25511 | { | |
25512 | ||
25513 | __found_grouping += static_cast<char>(__sep_pos); | |
25514 | ||
25515 | if (!std::__verify_grouping(__lc->_M_grouping, | |
25516 | __lc->_M_grouping_size, | |
25517 | __found_grouping)) | |
25518 | __err |= ios_base::failbit; | |
25519 | } | |
25520 | ||
25521 | if (!__testfail && (__sep_pos || __found_zero | |
25522 | || __found_grouping.size())) | |
25523 | __v = __negative ? -__result : __result; | |
25524 | else | |
25525 | __err |= ios_base::failbit; | |
25526 | ||
25527 | if (__testeof) | |
25528 | __err |= ios_base::eofbit; | |
25529 | return __beg; | |
25530 | } | |
25531 | ||
25532 | ||
25533 | ||
25534 | template<typename _CharT, typename _InIter> | |
25535 | _InIter | |
25536 | num_get<_CharT, _InIter>:: | |
25537 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25538 | ios_base::iostate& __err, bool& __v) const | |
25539 | { | |
25540 | if (!(__io.flags() & ios_base::boolalpha)) | |
25541 | { | |
25542 | ||
25543 | ||
25544 | ||
25545 | long __l = -1; | |
25546 | __beg = _M_extract_int(__beg, __end, __io, __err, __l); | |
25547 | if (__l == 0 || __l == 1) | |
25548 | __v = __l; | |
25549 | else | |
25550 | __err |= ios_base::failbit; | |
25551 | } | |
25552 | else | |
25553 | { | |
25554 | ||
25555 | typedef __numpunct_cache<_CharT> __cache_type; | |
25556 | __use_cache<__cache_type> __uc; | |
25557 | const locale& __loc = __io._M_getloc(); | |
25558 | const __cache_type* __lc = __uc(__loc); | |
25559 | ||
25560 | bool __testf = true; | |
25561 | bool __testt = true; | |
25562 | size_t __n; | |
25563 | bool __testeof = __beg == __end; | |
25564 | for (__n = 0; !__testeof; ++__n) | |
25565 | { | |
25566 | const char_type __c = *__beg; | |
25567 | ||
25568 | if (__testf) | |
25569 | if (__n < __lc->_M_falsename_size) | |
25570 | __testf = __c == __lc->_M_falsename[__n]; | |
25571 | else | |
25572 | break; | |
25573 | ||
25574 | if (__testt) | |
25575 | if (__n < __lc->_M_truename_size) | |
25576 | __testt = __c == __lc->_M_truename[__n]; | |
25577 | else | |
25578 | break; | |
25579 | ||
25580 | if (!__testf && !__testt) | |
25581 | break; | |
25582 | ||
25583 | if (++__beg == __end) | |
25584 | __testeof = true; | |
25585 | } | |
25586 | if (__testf && __n == __lc->_M_falsename_size) | |
25587 | __v = 0; | |
25588 | else if (__testt && __n == __lc->_M_truename_size) | |
25589 | __v = 1; | |
25590 | else | |
25591 | __err |= ios_base::failbit; | |
25592 | ||
25593 | if (__testeof) | |
25594 | __err |= ios_base::eofbit; | |
25595 | } | |
25596 | return __beg; | |
25597 | } | |
25598 | ||
25599 | template<typename _CharT, typename _InIter> | |
25600 | _InIter | |
25601 | num_get<_CharT, _InIter>:: | |
25602 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25603 | ios_base::iostate& __err, long& __v) const | |
25604 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
25605 | ||
25606 | template<typename _CharT, typename _InIter> | |
25607 | _InIter | |
25608 | num_get<_CharT, _InIter>:: | |
25609 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25610 | ios_base::iostate& __err, unsigned short& __v) const | |
25611 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
25612 | ||
25613 | template<typename _CharT, typename _InIter> | |
25614 | _InIter | |
25615 | num_get<_CharT, _InIter>:: | |
25616 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25617 | ios_base::iostate& __err, unsigned int& __v) const | |
25618 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
25619 | ||
25620 | template<typename _CharT, typename _InIter> | |
25621 | _InIter | |
25622 | num_get<_CharT, _InIter>:: | |
25623 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25624 | ios_base::iostate& __err, unsigned long& __v) const | |
25625 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
25626 | ||
25627 | ||
25628 | template<typename _CharT, typename _InIter> | |
25629 | _InIter | |
25630 | num_get<_CharT, _InIter>:: | |
25631 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25632 | ios_base::iostate& __err, long long& __v) const | |
25633 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
25634 | ||
25635 | template<typename _CharT, typename _InIter> | |
25636 | _InIter | |
25637 | num_get<_CharT, _InIter>:: | |
25638 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25639 | ios_base::iostate& __err, unsigned long long& __v) const | |
25640 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
25641 | ||
25642 | ||
25643 | template<typename _CharT, typename _InIter> | |
25644 | _InIter | |
25645 | num_get<_CharT, _InIter>:: | |
25646 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25647 | ios_base::iostate& __err, float& __v) const | |
25648 | { | |
25649 | string __xtrc; | |
25650 | __xtrc.reserve(32); | |
25651 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
25652 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
25653 | return __beg; | |
25654 | } | |
25655 | ||
25656 | template<typename _CharT, typename _InIter> | |
25657 | _InIter | |
25658 | num_get<_CharT, _InIter>:: | |
25659 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25660 | ios_base::iostate& __err, double& __v) const | |
25661 | { | |
25662 | string __xtrc; | |
25663 | __xtrc.reserve(32); | |
25664 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
25665 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
25666 | return __beg; | |
25667 | } | |
25668 | ||
25669 | template<typename _CharT, typename _InIter> | |
25670 | _InIter | |
25671 | num_get<_CharT, _InIter>:: | |
25672 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25673 | ios_base::iostate& __err, long double& __v) const | |
25674 | { | |
25675 | string __xtrc; | |
25676 | __xtrc.reserve(32); | |
25677 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
25678 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
25679 | return __beg; | |
25680 | } | |
25681 | ||
25682 | template<typename _CharT, typename _InIter> | |
25683 | _InIter | |
25684 | num_get<_CharT, _InIter>:: | |
25685 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
25686 | ios_base::iostate& __err, void*& __v) const | |
25687 | { | |
25688 | ||
25689 | typedef ios_base::fmtflags fmtflags; | |
25690 | const fmtflags __fmt = __io.flags(); | |
25691 | __io.flags(__fmt & ~ios_base::basefield | ios_base::hex); | |
25692 | ||
25693 | unsigned long __ul; | |
25694 | __beg = _M_extract_int(__beg, __end, __io, __err, __ul); | |
25695 | ||
25696 | ||
25697 | __io.flags(__fmt); | |
25698 | ||
25699 | if (!(__err & ios_base::failbit)) | |
25700 | __v = reinterpret_cast<void*>(__ul); | |
25701 | return __beg; | |
25702 | } | |
25703 | ||
25704 | ||
25705 | ||
25706 | template<typename _CharT, typename _OutIter> | |
25707 | void | |
25708 | num_put<_CharT, _OutIter>:: | |
25709 | _M_pad(_CharT __fill, streamsize __w, ios_base& __io, | |
25710 | _CharT* __new, const _CharT* __cs, int& __len) const | |
25711 | { | |
25712 | ||
25713 | ||
25714 | __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs, | |
25715 | __w, __len, true); | |
25716 | __len = static_cast<int>(__w); | |
25717 | } | |
25718 | ||
25719 | ||
25720 | ||
25721 | ||
25722 | template<typename _CharT> | |
25723 | inline int | |
25724 | __int_to_char(_CharT* __bufend, long __v, const _CharT* __lit, | |
25725 | ios_base::fmtflags __flags) | |
25726 | { | |
25727 | unsigned long __ul = __v; | |
25728 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
25729 | if (__builtin_expect(__basefield != ios_base::oct | |
25730 | && __basefield != ios_base::hex, true)) | |
25731 | __ul = __v < 0 ? -__v : __ul; | |
25732 | return __int_to_char(__bufend, __ul, __lit, __flags, false); | |
25733 | } | |
25734 | ||
25735 | template<typename _CharT> | |
25736 | inline int | |
25737 | __int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit, | |
25738 | ios_base::fmtflags __flags) | |
25739 | { return __int_to_char(__bufend, __v, __lit, __flags, false); } | |
25740 | ||
25741 | ||
25742 | template<typename _CharT> | |
25743 | inline int | |
25744 | __int_to_char(_CharT* __bufend, long long __v, const _CharT* __lit, | |
25745 | ios_base::fmtflags __flags) | |
25746 | { | |
25747 | unsigned long long __ull = __v; | |
25748 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
25749 | if (__builtin_expect(__basefield != ios_base::oct | |
25750 | && __basefield != ios_base::hex, true)) | |
25751 | __ull = __v < 0 ? -__v : __ull; | |
25752 | return __int_to_char(__bufend, __ull, __lit, __flags, false); | |
25753 | } | |
25754 | ||
25755 | template<typename _CharT> | |
25756 | inline int | |
25757 | __int_to_char(_CharT* __bufend, unsigned long long __v, | |
25758 | const _CharT* __lit, ios_base::fmtflags __flags) | |
25759 | { return __int_to_char(__bufend, __v, __lit, __flags, false); } | |
25760 | ||
25761 | ||
25762 | ||
25763 | template<typename _CharT, typename _ValueT> | |
25764 | int | |
25765 | __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, | |
25766 | ios_base::fmtflags __flags, bool) | |
25767 | { | |
25768 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
25769 | _CharT* __buf = __bufend; | |
25770 | ||
25771 | if (__builtin_expect(__basefield != ios_base::oct | |
25772 | && __basefield != ios_base::hex, true)) | |
25773 | { | |
25774 | ||
25775 | do | |
25776 | { | |
25777 | *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; | |
25778 | __v /= 10; | |
25779 | } | |
25780 | while (__v != 0); | |
25781 | } | |
25782 | else if (__basefield == ios_base::oct) | |
25783 | { | |
25784 | ||
25785 | do | |
25786 | { | |
25787 | *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; | |
25788 | __v >>= 3; | |
25789 | } | |
25790 | while (__v != 0); | |
25791 | } | |
25792 | else | |
25793 | { | |
25794 | ||
25795 | const bool __uppercase = __flags & ios_base::uppercase; | |
25796 | const int __case_offset = __uppercase ? __num_base::_S_oudigits | |
25797 | : __num_base::_S_odigits; | |
25798 | do | |
25799 | { | |
25800 | *--__buf = __lit[(__v & 0xf) + __case_offset]; | |
25801 | __v >>= 4; | |
25802 | } | |
25803 | while (__v != 0); | |
25804 | } | |
25805 | return __bufend - __buf; | |
25806 | } | |
25807 | ||
25808 | template<typename _CharT, typename _OutIter> | |
25809 | void | |
25810 | num_put<_CharT, _OutIter>:: | |
25811 | _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, | |
25812 | ios_base&, _CharT* __new, _CharT* __cs, int& __len) const | |
25813 | { | |
25814 | _CharT* __p = std::__add_grouping(__new, __sep, __grouping, | |
25815 | __grouping_size, __cs, __cs + __len); | |
25816 | __len = __p - __new; | |
25817 | } | |
25818 | ||
25819 | template<typename _CharT, typename _OutIter> | |
25820 | template<typename _ValueT> | |
25821 | _OutIter | |
25822 | num_put<_CharT, _OutIter>:: | |
25823 | _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, | |
25824 | _ValueT __v) const | |
25825 | { | |
25826 | typedef __numpunct_cache<_CharT> __cache_type; | |
25827 | __use_cache<__cache_type> __uc; | |
25828 | const locale& __loc = __io._M_getloc(); | |
25829 | const __cache_type* __lc = __uc(__loc); | |
25830 | const _CharT* __lit = __lc->_M_atoms_out; | |
25831 | const ios_base::fmtflags __flags = __io.flags(); | |
25832 | ||
25833 | ||
25834 | const int __ilen = 5 * sizeof(_ValueT); | |
25835 | _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
25836 | * __ilen)); | |
25837 | ||
25838 | ||
25839 | ||
25840 | int __len = __int_to_char(__cs + __ilen, __v, __lit, __flags); | |
25841 | __cs += __ilen - __len; | |
25842 | ||
25843 | ||
25844 | if (__lc->_M_use_grouping) | |
25845 | { | |
25846 | ||
25847 | ||
25848 | _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
25849 | * (__len + 1) | |
25850 | * 2)); | |
25851 | _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, | |
25852 | __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); | |
25853 | __cs = __cs2 + 2; | |
25854 | } | |
25855 | ||
25856 | ||
25857 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
25858 | if (__builtin_expect(__basefield != ios_base::oct | |
25859 | && __basefield != ios_base::hex, true)) | |
25860 | { | |
25861 | ||
25862 | if (__v > 0) | |
25863 | { | |
25864 | if (__flags & ios_base::showpos | |
25865 | && numeric_limits<_ValueT>::is_signed) | |
25866 | *--__cs = __lit[__num_base::_S_oplus], ++__len; | |
25867 | } | |
25868 | else if (__v) | |
25869 | *--__cs = __lit[__num_base::_S_ominus], ++__len; | |
25870 | } | |
25871 | else if (__flags & ios_base::showbase && __v) | |
25872 | { | |
25873 | if (__basefield == ios_base::oct) | |
25874 | *--__cs = __lit[__num_base::_S_odigits], ++__len; | |
25875 | else | |
25876 | { | |
25877 | ||
25878 | const bool __uppercase = __flags & ios_base::uppercase; | |
25879 | *--__cs = __lit[__num_base::_S_ox + __uppercase]; | |
25880 | ||
25881 | *--__cs = __lit[__num_base::_S_odigits]; | |
25882 | __len += 2; | |
25883 | } | |
25884 | } | |
25885 | ||
25886 | ||
25887 | const streamsize __w = __io.width(); | |
25888 | if (__w > static_cast<streamsize>(__len)) | |
25889 | { | |
25890 | _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
25891 | * __w)); | |
25892 | _M_pad(__fill, __w, __io, __cs3, __cs, __len); | |
25893 | __cs = __cs3; | |
25894 | } | |
25895 | __io.width(0); | |
25896 | ||
25897 | ||
25898 | ||
25899 | return std::__write(__s, __cs, __len); | |
25900 | } | |
25901 | ||
25902 | template<typename _CharT, typename _OutIter> | |
25903 | void | |
25904 | num_put<_CharT, _OutIter>:: | |
25905 | _M_group_float(const char* __grouping, size_t __grouping_size, | |
25906 | _CharT __sep, const _CharT* __p, _CharT* __new, | |
25907 | _CharT* __cs, int& __len) const | |
25908 | { | |
25909 | ||
25910 | ||
25911 | ||
25912 | const int __declen = __p ? __p - __cs : __len; | |
25913 | _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, | |
25914 | __grouping_size, | |
25915 | __cs, __cs + __declen); | |
25916 | ||
25917 | ||
25918 | int __newlen = __p2 - __new; | |
25919 | if (__p) | |
25920 | { | |
25921 | char_traits<_CharT>::copy(__p2, __p, __len - __declen); | |
25922 | __newlen += __len - __declen; | |
25923 | } | |
25924 | __len = __newlen; | |
25925 | } | |
25926 | # 1043 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
25927 | template<typename _CharT, typename _OutIter> | |
25928 | template<typename _ValueT> | |
25929 | _OutIter | |
25930 | num_put<_CharT, _OutIter>:: | |
25931 | _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, | |
25932 | _ValueT __v) const | |
25933 | { | |
25934 | typedef __numpunct_cache<_CharT> __cache_type; | |
25935 | __use_cache<__cache_type> __uc; | |
25936 | const locale& __loc = __io._M_getloc(); | |
25937 | const __cache_type* __lc = __uc(__loc); | |
25938 | ||
25939 | ||
25940 | streamsize __prec = __io.precision(); | |
25941 | if (__prec < static_cast<streamsize>(0)) | |
25942 | __prec = static_cast<streamsize>(6); | |
25943 | ||
25944 | const int __max_digits = numeric_limits<_ValueT>::digits10; | |
25945 | ||
25946 | ||
25947 | int __len; | |
25948 | ||
25949 | char __fbuf[16]; | |
25950 | ||
25951 | ||
25952 | ||
25953 | ||
25954 | int __cs_size = __max_digits * 3; | |
25955 | char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
25956 | ||
25957 | __num_base::_S_format_float(__io, __fbuf, __mod); | |
25958 | __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v, | |
25959 | _S_get_c_locale(), __prec); | |
25960 | ||
25961 | ||
25962 | if (__len >= __cs_size) | |
25963 | { | |
25964 | __cs_size = __len + 1; | |
25965 | __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
25966 | __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v, | |
25967 | _S_get_c_locale(), __prec); | |
25968 | } | |
25969 | # 1107 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
25970 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
25971 | ||
25972 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
25973 | * __len)); | |
25974 | __ctype.widen(__cs, __cs + __len, __ws); | |
25975 | ||
25976 | ||
25977 | const _CharT __cdec = __ctype.widen('.'); | |
25978 | const _CharT __dec = __lc->_M_decimal_point; | |
25979 | const _CharT* __p = char_traits<_CharT>::find(__ws, __len, __cdec); | |
25980 | if (__p) | |
25981 | __ws[__p - __ws] = __dec; | |
25982 | ||
25983 | ||
25984 | ||
25985 | ||
25986 | if (__lc->_M_use_grouping | |
25987 | && (__p || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' | |
25988 | && __cs[1] >= '0' && __cs[2] >= '0'))) | |
25989 | { | |
25990 | ||
25991 | ||
25992 | _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
25993 | * __len * 2)); | |
25994 | ||
25995 | streamsize __off = 0; | |
25996 | if (__cs[0] == '-' || __cs[0] == '+') | |
25997 | { | |
25998 | __off = 1; | |
25999 | __ws2[0] = __ws[0]; | |
26000 | __len -= 1; | |
26001 | } | |
26002 | ||
26003 | _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, | |
26004 | __lc->_M_thousands_sep, __p, __ws2 + __off, | |
26005 | __ws + __off, __len); | |
26006 | __len += __off; | |
26007 | ||
26008 | __ws = __ws2; | |
26009 | } | |
26010 | ||
26011 | ||
26012 | const streamsize __w = __io.width(); | |
26013 | if (__w > static_cast<streamsize>(__len)) | |
26014 | { | |
26015 | _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
26016 | * __w)); | |
26017 | _M_pad(__fill, __w, __io, __ws3, __ws, __len); | |
26018 | __ws = __ws3; | |
26019 | } | |
26020 | __io.width(0); | |
26021 | ||
26022 | ||
26023 | ||
26024 | return std::__write(__s, __ws, __len); | |
26025 | } | |
26026 | ||
26027 | template<typename _CharT, typename _OutIter> | |
26028 | _OutIter | |
26029 | num_put<_CharT, _OutIter>:: | |
26030 | do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const | |
26031 | { | |
26032 | const ios_base::fmtflags __flags = __io.flags(); | |
26033 | if ((__flags & ios_base::boolalpha) == 0) | |
26034 | { | |
26035 | const long __l = __v; | |
26036 | __s = _M_insert_int(__s, __io, __fill, __l); | |
26037 | } | |
26038 | else | |
26039 | { | |
26040 | typedef __numpunct_cache<_CharT> __cache_type; | |
26041 | __use_cache<__cache_type> __uc; | |
26042 | const locale& __loc = __io._M_getloc(); | |
26043 | const __cache_type* __lc = __uc(__loc); | |
26044 | ||
26045 | const _CharT* __name = __v ? __lc->_M_truename | |
26046 | : __lc->_M_falsename; | |
26047 | int __len = __v ? __lc->_M_truename_size | |
26048 | : __lc->_M_falsename_size; | |
26049 | ||
26050 | const streamsize __w = __io.width(); | |
26051 | if (__w > static_cast<streamsize>(__len)) | |
26052 | { | |
26053 | _CharT* __cs | |
26054 | = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
26055 | * __w)); | |
26056 | _M_pad(__fill, __w, __io, __cs, __name, __len); | |
26057 | __name = __cs; | |
26058 | } | |
26059 | __io.width(0); | |
26060 | __s = std::__write(__s, __name, __len); | |
26061 | } | |
26062 | return __s; | |
26063 | } | |
26064 | ||
26065 | template<typename _CharT, typename _OutIter> | |
26066 | _OutIter | |
26067 | num_put<_CharT, _OutIter>:: | |
26068 | do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const | |
26069 | { return _M_insert_int(__s, __io, __fill, __v); } | |
26070 | ||
26071 | template<typename _CharT, typename _OutIter> | |
26072 | _OutIter | |
26073 | num_put<_CharT, _OutIter>:: | |
26074 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
26075 | unsigned long __v) const | |
26076 | { return _M_insert_int(__s, __io, __fill, __v); } | |
26077 | ||
26078 | ||
26079 | template<typename _CharT, typename _OutIter> | |
26080 | _OutIter | |
26081 | num_put<_CharT, _OutIter>:: | |
26082 | do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const | |
26083 | { return _M_insert_int(__s, __io, __fill, __v); } | |
26084 | ||
26085 | template<typename _CharT, typename _OutIter> | |
26086 | _OutIter | |
26087 | num_put<_CharT, _OutIter>:: | |
26088 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
26089 | unsigned long long __v) const | |
26090 | { return _M_insert_int(__s, __io, __fill, __v); } | |
26091 | ||
26092 | ||
26093 | template<typename _CharT, typename _OutIter> | |
26094 | _OutIter | |
26095 | num_put<_CharT, _OutIter>:: | |
26096 | do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const | |
26097 | { return _M_insert_float(__s, __io, __fill, char(), __v); } | |
26098 | ||
26099 | template<typename _CharT, typename _OutIter> | |
26100 | _OutIter | |
26101 | num_put<_CharT, _OutIter>:: | |
26102 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
26103 | long double __v) const | |
26104 | { return _M_insert_float(__s, __io, __fill, 'L', __v); } | |
26105 | ||
26106 | template<typename _CharT, typename _OutIter> | |
26107 | _OutIter | |
26108 | num_put<_CharT, _OutIter>:: | |
26109 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
26110 | const void* __v) const | |
26111 | { | |
26112 | const ios_base::fmtflags __flags = __io.flags(); | |
26113 | const ios_base::fmtflags __fmt = ~(ios_base::basefield | |
26114 | | ios_base::uppercase | |
26115 | | ios_base::internal); | |
26116 | __io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase)); | |
26117 | ||
26118 | __s = _M_insert_int(__s, __io, __fill, | |
26119 | reinterpret_cast<unsigned long>(__v)); | |
26120 | __io.flags(__flags); | |
26121 | return __s; | |
26122 | } | |
26123 | ||
26124 | template<typename _CharT, typename _InIter> | |
26125 | template<bool _Intl> | |
26126 | _InIter | |
26127 | money_get<_CharT, _InIter>:: | |
26128 | _M_extract(iter_type __beg, iter_type __end, ios_base& __io, | |
26129 | ios_base::iostate& __err, string& __units) const | |
26130 | { | |
26131 | typedef char_traits<_CharT> __traits_type; | |
26132 | typedef typename string_type::size_type size_type; | |
26133 | typedef money_base::part part; | |
26134 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
26135 | ||
26136 | const locale& __loc = __io._M_getloc(); | |
26137 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26138 | ||
26139 | __use_cache<__cache_type> __uc; | |
26140 | const __cache_type* __lc = __uc(__loc); | |
26141 | const char_type* __lit = __lc->_M_atoms; | |
26142 | ||
26143 | ||
26144 | bool __negative = false; | |
26145 | ||
26146 | size_type __sign_size = 0; | |
26147 | ||
26148 | const bool __mandatory_sign = (__lc->_M_positive_sign_size | |
26149 | && __lc->_M_negative_sign_size); | |
26150 | ||
26151 | string __grouping_tmp; | |
26152 | if (__lc->_M_use_grouping) | |
26153 | __grouping_tmp.reserve(32); | |
26154 | ||
26155 | int __last_pos = 0; | |
26156 | ||
26157 | int __n = 0; | |
26158 | ||
26159 | bool __testvalid = true; | |
26160 | ||
26161 | bool __testdecfound = false; | |
26162 | ||
26163 | ||
26164 | string __res; | |
26165 | __res.reserve(32); | |
26166 | ||
26167 | const char_type* __lit_zero = __lit + money_base::_S_zero; | |
26168 | const money_base::pattern __p = __lc->_M_neg_format; | |
26169 | for (int __i = 0; __i < 4 && __testvalid; ++__i) | |
26170 | { | |
26171 | const part __which = static_cast<part>(__p.field[__i]); | |
26172 | switch (__which) | |
26173 | { | |
26174 | case money_base::symbol: | |
26175 | ||
26176 | ||
26177 | ||
26178 | ||
26179 | if (__io.flags() & ios_base::showbase || __sign_size > 1 | |
26180 | || __i == 0 | |
26181 | || (__i == 1 && (__mandatory_sign | |
26182 | || (static_cast<part>(__p.field[0]) | |
26183 | == money_base::sign) | |
26184 | || (static_cast<part>(__p.field[2]) | |
26185 | == money_base::space))) | |
26186 | || (__i == 2 && ((static_cast<part>(__p.field[3]) | |
26187 | == money_base::value) | |
26188 | || __mandatory_sign | |
26189 | && (static_cast<part>(__p.field[3]) | |
26190 | == money_base::sign)))) | |
26191 | { | |
26192 | const size_type __len = __lc->_M_curr_symbol_size; | |
26193 | size_type __j = 0; | |
26194 | for (; __beg != __end && __j < __len | |
26195 | && *__beg == __lc->_M_curr_symbol[__j]; | |
26196 | ++__beg, ++__j); | |
26197 | if (__j != __len | |
26198 | && (__j || __io.flags() & ios_base::showbase)) | |
26199 | __testvalid = false; | |
26200 | } | |
26201 | break; | |
26202 | case money_base::sign: | |
26203 | ||
26204 | if (__lc->_M_positive_sign_size && __beg != __end | |
26205 | && *__beg == __lc->_M_positive_sign[0]) | |
26206 | { | |
26207 | __sign_size = __lc->_M_positive_sign_size; | |
26208 | ++__beg; | |
26209 | } | |
26210 | else if (__lc->_M_negative_sign_size && __beg != __end | |
26211 | && *__beg == __lc->_M_negative_sign[0]) | |
26212 | { | |
26213 | __negative = true; | |
26214 | __sign_size = __lc->_M_negative_sign_size; | |
26215 | ++__beg; | |
26216 | } | |
26217 | else if (__lc->_M_positive_sign_size | |
26218 | && !__lc->_M_negative_sign_size) | |
26219 | ||
26220 | ||
26221 | __negative = true; | |
26222 | else if (__mandatory_sign) | |
26223 | __testvalid = false; | |
26224 | break; | |
26225 | case money_base::value: | |
26226 | ||
26227 | ||
26228 | for (; __beg != __end; ++__beg) | |
26229 | { | |
26230 | const char_type __c = *__beg; | |
26231 | const char_type* __q = __traits_type::find(__lit_zero, | |
26232 | 10, __c); | |
26233 | if (__q != 0) | |
26234 | { | |
26235 | __res += money_base::_S_atoms[__q - __lit]; | |
26236 | ++__n; | |
26237 | } | |
26238 | else if (__c == __lc->_M_decimal_point | |
26239 | && !__testdecfound) | |
26240 | { | |
26241 | __last_pos = __n; | |
26242 | __n = 0; | |
26243 | __testdecfound = true; | |
26244 | } | |
26245 | else if (__lc->_M_use_grouping | |
26246 | && __c == __lc->_M_thousands_sep | |
26247 | && !__testdecfound) | |
26248 | { | |
26249 | if (__n) | |
26250 | { | |
26251 | ||
26252 | __grouping_tmp += static_cast<char>(__n); | |
26253 | __n = 0; | |
26254 | } | |
26255 | else | |
26256 | { | |
26257 | __testvalid = false; | |
26258 | break; | |
26259 | } | |
26260 | } | |
26261 | else | |
26262 | break; | |
26263 | } | |
26264 | if (__res.empty()) | |
26265 | __testvalid = false; | |
26266 | break; | |
26267 | case money_base::space: | |
26268 | ||
26269 | if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) | |
26270 | ++__beg; | |
26271 | else | |
26272 | __testvalid = false; | |
26273 | case money_base::none: | |
26274 | ||
26275 | if (__i != 3) | |
26276 | for (; __beg != __end | |
26277 | && __ctype.is(ctype_base::space, *__beg); ++__beg); | |
26278 | break; | |
26279 | } | |
26280 | } | |
26281 | ||
26282 | ||
26283 | if (__sign_size > 1 && __testvalid) | |
26284 | { | |
26285 | const char_type* __sign = __negative ? __lc->_M_negative_sign | |
26286 | : __lc->_M_positive_sign; | |
26287 | size_type __i = 1; | |
26288 | for (; __beg != __end && __i < __sign_size | |
26289 | && *__beg == __sign[__i]; ++__beg, ++__i); | |
26290 | ||
26291 | if (__i != __sign_size) | |
26292 | __testvalid = false; | |
26293 | } | |
26294 | ||
26295 | if (__testvalid) | |
26296 | { | |
26297 | ||
26298 | if (__res.size() > 1) | |
26299 | { | |
26300 | const size_type __first = __res.find_first_not_of('0'); | |
26301 | const bool __only_zeros = __first == string::npos; | |
26302 | if (__first) | |
26303 | __res.erase(0, __only_zeros ? __res.size() - 1 : __first); | |
26304 | } | |
26305 | ||
26306 | ||
26307 | if (__negative && __res[0] != '0') | |
26308 | __res.insert(__res.begin(), '-'); | |
26309 | ||
26310 | ||
26311 | if (__grouping_tmp.size()) | |
26312 | { | |
26313 | ||
26314 | __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos | |
26315 | : __n); | |
26316 | if (!std::__verify_grouping(__lc->_M_grouping, | |
26317 | __lc->_M_grouping_size, | |
26318 | __grouping_tmp)) | |
26319 | __err |= ios_base::failbit; | |
26320 | } | |
26321 | ||
26322 | ||
26323 | if (__testdecfound && __lc->_M_frac_digits > 0 | |
26324 | && __n != __lc->_M_frac_digits) | |
26325 | __testvalid = false; | |
26326 | } | |
26327 | ||
26328 | ||
26329 | if (!__testvalid) | |
26330 | __err |= ios_base::failbit; | |
26331 | else | |
26332 | __units.swap(__res); | |
26333 | ||
26334 | ||
26335 | if (__beg == __end) | |
26336 | __err |= ios_base::eofbit; | |
26337 | return __beg; | |
26338 | } | |
26339 | ||
26340 | template<typename _CharT, typename _InIter> | |
26341 | _InIter | |
26342 | money_get<_CharT, _InIter>:: | |
26343 | do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, | |
26344 | ios_base::iostate& __err, long double& __units) const | |
26345 | { | |
26346 | string __str; | |
26347 | if (__intl) | |
26348 | __beg = _M_extract<true>(__beg, __end, __io, __err, __str); | |
26349 | else | |
26350 | __beg = _M_extract<false>(__beg, __end, __io, __err, __str); | |
26351 | std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); | |
26352 | return __beg; | |
26353 | } | |
26354 | ||
26355 | template<typename _CharT, typename _InIter> | |
26356 | _InIter | |
26357 | money_get<_CharT, _InIter>:: | |
26358 | do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, | |
26359 | ios_base::iostate& __err, string_type& __units) const | |
26360 | { | |
26361 | typedef typename string::size_type size_type; | |
26362 | ||
26363 | const locale& __loc = __io._M_getloc(); | |
26364 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26365 | ||
26366 | string __str; | |
26367 | const iter_type __ret = __intl ? _M_extract<true>(__beg, __end, __io, | |
26368 | __err, __str) | |
26369 | : _M_extract<false>(__beg, __end, __io, | |
26370 | __err, __str); | |
26371 | const size_type __len = __str.size(); | |
26372 | if (__len) | |
26373 | { | |
26374 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
26375 | * __len)); | |
26376 | __ctype.widen(__str.data(), __str.data() + __len, __ws); | |
26377 | __units.assign(__ws, __len); | |
26378 | } | |
26379 | ||
26380 | return __ret; | |
26381 | } | |
26382 | ||
26383 | template<typename _CharT, typename _OutIter> | |
26384 | template<bool _Intl> | |
26385 | _OutIter | |
26386 | money_put<_CharT, _OutIter>:: | |
26387 | _M_insert(iter_type __s, ios_base& __io, char_type __fill, | |
26388 | const string_type& __digits) const | |
26389 | { | |
26390 | typedef typename string_type::size_type size_type; | |
26391 | typedef money_base::part part; | |
26392 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
26393 | ||
26394 | const locale& __loc = __io._M_getloc(); | |
26395 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26396 | ||
26397 | __use_cache<__cache_type> __uc; | |
26398 | const __cache_type* __lc = __uc(__loc); | |
26399 | const char_type* __lit = __lc->_M_atoms; | |
26400 | ||
26401 | ||
26402 | ||
26403 | const char_type* __beg = __digits.data(); | |
26404 | ||
26405 | money_base::pattern __p; | |
26406 | const char_type* __sign; | |
26407 | size_type __sign_size; | |
26408 | if (!(*__beg == __lit[money_base::_S_minus])) | |
26409 | { | |
26410 | __p = __lc->_M_pos_format; | |
26411 | __sign = __lc->_M_positive_sign; | |
26412 | __sign_size = __lc->_M_positive_sign_size; | |
26413 | } | |
26414 | else | |
26415 | { | |
26416 | __p = __lc->_M_neg_format; | |
26417 | __sign = __lc->_M_negative_sign; | |
26418 | __sign_size = __lc->_M_negative_sign_size; | |
26419 | if (__digits.size()) | |
26420 | ++__beg; | |
26421 | } | |
26422 | ||
26423 | ||
26424 | size_type __len = __ctype.scan_not(ctype_base::digit, __beg, | |
26425 | __beg + __digits.size()) - __beg; | |
26426 | if (__len) | |
26427 | { | |
26428 | ||
26429 | ||
26430 | ||
26431 | string_type __value; | |
26432 | __value.reserve(2 * __len); | |
26433 | ||
26434 | ||
26435 | ||
26436 | int __paddec = __len - __lc->_M_frac_digits; | |
26437 | if (__paddec > 0) | |
26438 | { | |
26439 | if (__lc->_M_frac_digits < 0) | |
26440 | __paddec = __len; | |
26441 | if (__lc->_M_grouping_size) | |
26442 | { | |
26443 | _CharT* __ws = | |
26444 | static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
26445 | * 2 * __len)); | |
26446 | _CharT* __ws_end = | |
26447 | std::__add_grouping(__ws, __lc->_M_thousands_sep, | |
26448 | __lc->_M_grouping, | |
26449 | __lc->_M_grouping_size, | |
26450 | __beg, __beg + __paddec); | |
26451 | __value.assign(__ws, __ws_end - __ws); | |
26452 | } | |
26453 | else | |
26454 | __value.assign(__beg, __paddec); | |
26455 | } | |
26456 | ||
26457 | ||
26458 | if (__lc->_M_frac_digits > 0) | |
26459 | { | |
26460 | __value += __lc->_M_decimal_point; | |
26461 | if (__paddec >= 0) | |
26462 | __value.append(__beg + __paddec, __lc->_M_frac_digits); | |
26463 | else | |
26464 | { | |
26465 | ||
26466 | __value.append(-__paddec, __lit[money_base::_S_zero]); | |
26467 | __value.append(__beg, __len); | |
26468 | } | |
26469 | } | |
26470 | ||
26471 | ||
26472 | const ios_base::fmtflags __f = __io.flags() | |
26473 | & ios_base::adjustfield; | |
26474 | __len = __value.size() + __sign_size; | |
26475 | __len += ((__io.flags() & ios_base::showbase) | |
26476 | ? __lc->_M_curr_symbol_size : 0); | |
26477 | ||
26478 | string_type __res; | |
26479 | __res.reserve(2 * __len); | |
26480 | ||
26481 | const size_type __width = static_cast<size_type>(__io.width()); | |
26482 | const bool __testipad = (__f == ios_base::internal | |
26483 | && __len < __width); | |
26484 | ||
26485 | for (int __i = 0; __i < 4; ++__i) | |
26486 | { | |
26487 | const part __which = static_cast<part>(__p.field[__i]); | |
26488 | switch (__which) | |
26489 | { | |
26490 | case money_base::symbol: | |
26491 | if (__io.flags() & ios_base::showbase) | |
26492 | __res.append(__lc->_M_curr_symbol, | |
26493 | __lc->_M_curr_symbol_size); | |
26494 | break; | |
26495 | case money_base::sign: | |
26496 | ||
26497 | ||
26498 | ||
26499 | if (__sign_size) | |
26500 | __res += __sign[0]; | |
26501 | break; | |
26502 | case money_base::value: | |
26503 | __res += __value; | |
26504 | break; | |
26505 | case money_base::space: | |
26506 | ||
26507 | ||
26508 | ||
26509 | if (__testipad) | |
26510 | __res.append(__width - __len, __fill); | |
26511 | else | |
26512 | __res += __fill; | |
26513 | break; | |
26514 | case money_base::none: | |
26515 | if (__testipad) | |
26516 | __res.append(__width - __len, __fill); | |
26517 | break; | |
26518 | } | |
26519 | } | |
26520 | ||
26521 | ||
26522 | if (__sign_size > 1) | |
26523 | __res.append(__sign + 1, __sign_size - 1); | |
26524 | ||
26525 | ||
26526 | __len = __res.size(); | |
26527 | if (__width > __len) | |
26528 | { | |
26529 | if (__f == ios_base::left) | |
26530 | ||
26531 | __res.append(__width - __len, __fill); | |
26532 | else | |
26533 | ||
26534 | __res.insert(0, __width - __len, __fill); | |
26535 | __len = __width; | |
26536 | } | |
26537 | ||
26538 | ||
26539 | __s = std::__write(__s, __res.data(), __len); | |
26540 | } | |
26541 | __io.width(0); | |
26542 | return __s; | |
26543 | } | |
26544 | ||
26545 | template<typename _CharT, typename _OutIter> | |
26546 | _OutIter | |
26547 | money_put<_CharT, _OutIter>:: | |
26548 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
26549 | long double __units) const | |
26550 | { | |
26551 | const locale __loc = __io.getloc(); | |
26552 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26553 | ||
26554 | ||
26555 | int __cs_size = 64; | |
26556 | char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
26557 | ||
26558 | ||
26559 | int __len = std::__convert_from_v(__cs, __cs_size, "%.*Lf", __units, | |
26560 | _S_get_c_locale(), 0); | |
26561 | ||
26562 | if (__len >= __cs_size) | |
26563 | { | |
26564 | __cs_size = __len + 1; | |
26565 | __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
26566 | __len = std::__convert_from_v(__cs, __cs_size, "%.*Lf", __units, | |
26567 | _S_get_c_locale(), 0); | |
26568 | } | |
26569 | ||
26570 | ||
26571 | ||
26572 | ||
26573 | ||
26574 | ||
26575 | ||
26576 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
26577 | * __cs_size)); | |
26578 | __ctype.widen(__cs, __cs + __len, __ws); | |
26579 | const string_type __digits(__ws, __len); | |
26580 | return __intl ? _M_insert<true>(__s, __io, __fill, __digits) | |
26581 | : _M_insert<false>(__s, __io, __fill, __digits); | |
26582 | } | |
26583 | ||
26584 | template<typename _CharT, typename _OutIter> | |
26585 | _OutIter | |
26586 | money_put<_CharT, _OutIter>:: | |
26587 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
26588 | const string_type& __digits) const | |
26589 | { return __intl ? _M_insert<true>(__s, __io, __fill, __digits) | |
26590 | : _M_insert<false>(__s, __io, __fill, __digits); } | |
26591 | ||
26592 | ||
26593 | ||
26594 | ||
26595 | ||
26596 | template<typename _CharT, typename _InIter> | |
26597 | time_base::dateorder | |
26598 | time_get<_CharT, _InIter>::do_date_order() const | |
26599 | { return time_base::no_order; } | |
26600 | ||
26601 | ||
26602 | ||
26603 | template<typename _CharT, typename _InIter> | |
26604 | _InIter | |
26605 | time_get<_CharT, _InIter>:: | |
26606 | _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, | |
26607 | ios_base::iostate& __err, tm* __tm, | |
26608 | const _CharT* __format) const | |
26609 | { | |
26610 | const locale& __loc = __io._M_getloc(); | |
26611 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
26612 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26613 | const size_t __len = char_traits<_CharT>::length(__format); | |
26614 | ||
26615 | for (size_t __i = 0; __beg != __end && __i < __len && !__err; ++__i) | |
26616 | { | |
26617 | if (__ctype.narrow(__format[__i], 0) == '%') | |
26618 | { | |
26619 | ||
26620 | char __c = __ctype.narrow(__format[++__i], 0); | |
26621 | int __mem = 0; | |
26622 | if (__c == 'E' || __c == 'O') | |
26623 | __c = __ctype.narrow(__format[++__i], 0); | |
26624 | switch (__c) | |
26625 | { | |
26626 | const char* __cs; | |
26627 | _CharT __wcs[10]; | |
26628 | case 'a': | |
26629 | ||
26630 | const char_type* __days1[7]; | |
26631 | __tp._M_days_abbreviated(__days1); | |
26632 | __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, | |
26633 | 7, __io, __err); | |
26634 | break; | |
26635 | case 'A': | |
26636 | ||
26637 | const char_type* __days2[7]; | |
26638 | __tp._M_days(__days2); | |
26639 | __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, | |
26640 | 7, __io, __err); | |
26641 | break; | |
26642 | case 'h': | |
26643 | case 'b': | |
26644 | ||
26645 | const char_type* __months1[12]; | |
26646 | __tp._M_months_abbreviated(__months1); | |
26647 | __beg = _M_extract_name(__beg, __end, __tm->tm_mon, | |
26648 | __months1, 12, __io, __err); | |
26649 | break; | |
26650 | case 'B': | |
26651 | ||
26652 | const char_type* __months2[12]; | |
26653 | __tp._M_months(__months2); | |
26654 | __beg = _M_extract_name(__beg, __end, __tm->tm_mon, | |
26655 | __months2, 12, __io, __err); | |
26656 | break; | |
26657 | case 'c': | |
26658 | ||
26659 | const char_type* __dt[2]; | |
26660 | __tp._M_date_time_formats(__dt); | |
26661 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26662 | __tm, __dt[0]); | |
26663 | break; | |
26664 | case 'd': | |
26665 | ||
26666 | __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, | |
26667 | __io, __err); | |
26668 | break; | |
26669 | case 'e': | |
26670 | ||
26671 | ||
26672 | if (__ctype.is(ctype_base::space, *__beg)) | |
26673 | __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, | |
26674 | 1, __io, __err); | |
26675 | else | |
26676 | __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, | |
26677 | 2, __io, __err); | |
26678 | break; | |
26679 | case 'D': | |
26680 | ||
26681 | __cs = "%m/%d/%y"; | |
26682 | __ctype.widen(__cs, __cs + 9, __wcs); | |
26683 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26684 | __tm, __wcs); | |
26685 | break; | |
26686 | case 'H': | |
26687 | ||
26688 | __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, | |
26689 | __io, __err); | |
26690 | break; | |
26691 | case 'I': | |
26692 | ||
26693 | __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, | |
26694 | __io, __err); | |
26695 | break; | |
26696 | case 'm': | |
26697 | ||
26698 | __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, | |
26699 | __io, __err); | |
26700 | if (!__err) | |
26701 | __tm->tm_mon = __mem - 1; | |
26702 | break; | |
26703 | case 'M': | |
26704 | ||
26705 | __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, | |
26706 | __io, __err); | |
26707 | break; | |
26708 | case 'n': | |
26709 | if (__ctype.narrow(*__beg, 0) == '\n') | |
26710 | ++__beg; | |
26711 | else | |
26712 | __err |= ios_base::failbit; | |
26713 | break; | |
26714 | case 'R': | |
26715 | ||
26716 | __cs = "%H:%M"; | |
26717 | __ctype.widen(__cs, __cs + 6, __wcs); | |
26718 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26719 | __tm, __wcs); | |
26720 | break; | |
26721 | case 'S': | |
26722 | ||
26723 | ||
26724 | ||
26725 | __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, | |
26726 | ||
26727 | ||
26728 | ||
26729 | __io, __err); | |
26730 | break; | |
26731 | case 't': | |
26732 | if (__ctype.narrow(*__beg, 0) == '\t') | |
26733 | ++__beg; | |
26734 | else | |
26735 | __err |= ios_base::failbit; | |
26736 | break; | |
26737 | case 'T': | |
26738 | ||
26739 | __cs = "%H:%M:%S"; | |
26740 | __ctype.widen(__cs, __cs + 9, __wcs); | |
26741 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26742 | __tm, __wcs); | |
26743 | break; | |
26744 | case 'x': | |
26745 | ||
26746 | const char_type* __dates[2]; | |
26747 | __tp._M_date_formats(__dates); | |
26748 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26749 | __tm, __dates[0]); | |
26750 | break; | |
26751 | case 'X': | |
26752 | ||
26753 | const char_type* __times[2]; | |
26754 | __tp._M_time_formats(__times); | |
26755 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26756 | __tm, __times[0]); | |
26757 | break; | |
26758 | case 'y': | |
26759 | case 'C': | |
26760 | ||
26761 | __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2, | |
26762 | __io, __err); | |
26763 | break; | |
26764 | case 'Y': | |
26765 | ||
26766 | __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, | |
26767 | __io, __err); | |
26768 | if (!__err) | |
26769 | __tm->tm_year = __mem - 1900; | |
26770 | break; | |
26771 | case 'Z': | |
26772 | ||
26773 | if (__ctype.is(ctype_base::upper, *__beg)) | |
26774 | { | |
26775 | int __tmp; | |
26776 | __beg = _M_extract_name(__beg, __end, __tmp, | |
26777 | __timepunct_cache<_CharT>::_S_timezones, | |
26778 | 14, __io, __err); | |
26779 | ||
26780 | ||
26781 | if (__beg != __end && !__err && __tmp == 0 | |
26782 | && (*__beg == __ctype.widen('-') | |
26783 | || *__beg == __ctype.widen('+'))) | |
26784 | { | |
26785 | __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, | |
26786 | __io, __err); | |
26787 | __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, | |
26788 | __io, __err); | |
26789 | } | |
26790 | } | |
26791 | else | |
26792 | __err |= ios_base::failbit; | |
26793 | break; | |
26794 | default: | |
26795 | ||
26796 | __err |= ios_base::failbit; | |
26797 | } | |
26798 | } | |
26799 | else | |
26800 | { | |
26801 | ||
26802 | if (__format[__i] == *__beg) | |
26803 | ++__beg; | |
26804 | else | |
26805 | __err |= ios_base::failbit; | |
26806 | } | |
26807 | } | |
26808 | return __beg; | |
26809 | } | |
26810 | ||
26811 | template<typename _CharT, typename _InIter> | |
26812 | _InIter | |
26813 | time_get<_CharT, _InIter>:: | |
26814 | _M_extract_num(iter_type __beg, iter_type __end, int& __member, | |
26815 | int __min, int __max, size_t __len, | |
26816 | ios_base& __io, ios_base::iostate& __err) const | |
26817 | { | |
26818 | const locale& __loc = __io._M_getloc(); | |
26819 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26820 | ||
26821 | ||
26822 | int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); | |
26823 | ||
26824 | ++__min; | |
26825 | size_t __i = 0; | |
26826 | int __value = 0; | |
26827 | for (; __beg != __end && __i < __len; ++__beg, ++__i) | |
26828 | { | |
26829 | const char __c = __ctype.narrow(*__beg, '*'); | |
26830 | if (__c >= '0' && __c <= '9') | |
26831 | { | |
26832 | __value = __value * 10 + (__c - '0'); | |
26833 | const int __valuec = __value * __mult; | |
26834 | if (__valuec > __max || __valuec + __mult < __min) | |
26835 | break; | |
26836 | __mult /= 10; | |
26837 | } | |
26838 | else | |
26839 | break; | |
26840 | } | |
26841 | if (__i == __len) | |
26842 | __member = __value; | |
26843 | else | |
26844 | __err |= ios_base::failbit; | |
26845 | return __beg; | |
26846 | } | |
26847 | ||
26848 | ||
26849 | ||
26850 | template<typename _CharT, typename _InIter> | |
26851 | _InIter | |
26852 | time_get<_CharT, _InIter>:: | |
26853 | _M_extract_name(iter_type __beg, iter_type __end, int& __member, | |
26854 | const _CharT** __names, size_t __indexlen, | |
26855 | ios_base& __io, ios_base::iostate& __err) const | |
26856 | { | |
26857 | typedef char_traits<_CharT> __traits_type; | |
26858 | const locale& __loc = __io._M_getloc(); | |
26859 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26860 | ||
26861 | int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int) | |
26862 | * __indexlen)); | |
26863 | size_t __nmatches = 0; | |
26864 | size_t __pos = 0; | |
26865 | bool __testvalid = true; | |
26866 | const char_type* __name; | |
26867 | ||
26868 | ||
26869 | ||
26870 | ||
26871 | ||
26872 | if (__beg != __end) | |
26873 | { | |
26874 | const char_type __c = *__beg; | |
26875 | for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) | |
26876 | if (__c == __names[__i1][0] | |
26877 | || __c == __ctype.toupper(__names[__i1][0])) | |
26878 | __matches[__nmatches++] = __i1; | |
26879 | } | |
26880 | ||
26881 | while (__nmatches > 1) | |
26882 | { | |
26883 | ||
26884 | size_t __minlen = __traits_type::length(__names[__matches[0]]); | |
26885 | for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) | |
26886 | __minlen = std::min(__minlen, | |
26887 | __traits_type::length(__names[__matches[__i2]])); | |
26888 | ++__beg, ++__pos; | |
26889 | if (__pos < __minlen && __beg != __end) | |
26890 | for (size_t __i3 = 0; __i3 < __nmatches;) | |
26891 | { | |
26892 | __name = __names[__matches[__i3]]; | |
26893 | if (!(__name[__pos] == *__beg)) | |
26894 | __matches[__i3] = __matches[--__nmatches]; | |
26895 | else | |
26896 | ++__i3; | |
26897 | } | |
26898 | else | |
26899 | break; | |
26900 | } | |
26901 | ||
26902 | if (__nmatches == 1) | |
26903 | { | |
26904 | ||
26905 | ++__beg, ++__pos; | |
26906 | __name = __names[__matches[0]]; | |
26907 | const size_t __len = __traits_type::length(__name); | |
26908 | while (__pos < __len && __beg != __end && __name[__pos] == *__beg) | |
26909 | ++__beg, ++__pos; | |
26910 | ||
26911 | if (__len == __pos) | |
26912 | __member = __matches[0]; | |
26913 | else | |
26914 | __testvalid = false; | |
26915 | } | |
26916 | else | |
26917 | __testvalid = false; | |
26918 | if (!__testvalid) | |
26919 | __err |= ios_base::failbit; | |
26920 | return __beg; | |
26921 | } | |
26922 | ||
26923 | template<typename _CharT, typename _InIter> | |
26924 | _InIter | |
26925 | time_get<_CharT, _InIter>:: | |
26926 | do_get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
26927 | ios_base::iostate& __err, tm* __tm) const | |
26928 | { | |
26929 | const locale& __loc = __io._M_getloc(); | |
26930 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
26931 | const char_type* __times[2]; | |
26932 | __tp._M_time_formats(__times); | |
26933 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26934 | __tm, __times[0]); | |
26935 | if (__beg == __end) | |
26936 | __err |= ios_base::eofbit; | |
26937 | return __beg; | |
26938 | } | |
26939 | ||
26940 | template<typename _CharT, typename _InIter> | |
26941 | _InIter | |
26942 | time_get<_CharT, _InIter>:: | |
26943 | do_get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
26944 | ios_base::iostate& __err, tm* __tm) const | |
26945 | { | |
26946 | const locale& __loc = __io._M_getloc(); | |
26947 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
26948 | const char_type* __dates[2]; | |
26949 | __tp._M_date_formats(__dates); | |
26950 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
26951 | __tm, __dates[0]); | |
26952 | if (__beg == __end) | |
26953 | __err |= ios_base::eofbit; | |
26954 | return __beg; | |
26955 | } | |
26956 | ||
26957 | template<typename _CharT, typename _InIter> | |
26958 | _InIter | |
26959 | time_get<_CharT, _InIter>:: | |
26960 | do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, | |
26961 | ios_base::iostate& __err, tm* __tm) const | |
26962 | { | |
26963 | typedef char_traits<_CharT> __traits_type; | |
26964 | const locale& __loc = __io._M_getloc(); | |
26965 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
26966 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
26967 | const char_type* __days[7]; | |
26968 | __tp._M_days_abbreviated(__days); | |
26969 | int __tmpwday; | |
26970 | __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7, __io, __err); | |
26971 | ||
26972 | ||
26973 | ||
26974 | ||
26975 | ||
26976 | ||
26977 | ||
26978 | if (!__err && __beg != __end) | |
26979 | { | |
26980 | size_t __pos = __traits_type::length(__days[__tmpwday]); | |
26981 | __tp._M_days(__days); | |
26982 | const char_type* __name = __days[__tmpwday]; | |
26983 | if (__name[__pos] == *__beg) | |
26984 | { | |
26985 | ||
26986 | const size_t __len = __traits_type::length(__name); | |
26987 | while (__pos < __len && __beg != __end | |
26988 | && __name[__pos] == *__beg) | |
26989 | ++__beg, ++__pos; | |
26990 | if (__len != __pos) | |
26991 | __err |= ios_base::failbit; | |
26992 | } | |
26993 | } | |
26994 | if (!__err) | |
26995 | __tm->tm_wday = __tmpwday; | |
26996 | ||
26997 | if (__beg == __end) | |
26998 | __err |= ios_base::eofbit; | |
26999 | return __beg; | |
27000 | } | |
27001 | ||
27002 | template<typename _CharT, typename _InIter> | |
27003 | _InIter | |
27004 | time_get<_CharT, _InIter>:: | |
27005 | do_get_monthname(iter_type __beg, iter_type __end, | |
27006 | ios_base& __io, ios_base::iostate& __err, tm* __tm) const | |
27007 | { | |
27008 | typedef char_traits<_CharT> __traits_type; | |
27009 | const locale& __loc = __io._M_getloc(); | |
27010 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
27011 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
27012 | const char_type* __months[12]; | |
27013 | __tp._M_months_abbreviated(__months); | |
27014 | int __tmpmon; | |
27015 | __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12, | |
27016 | __io, __err); | |
27017 | ||
27018 | ||
27019 | ||
27020 | ||
27021 | ||
27022 | ||
27023 | ||
27024 | if (!__err && __beg != __end) | |
27025 | { | |
27026 | size_t __pos = __traits_type::length(__months[__tmpmon]); | |
27027 | __tp._M_months(__months); | |
27028 | const char_type* __name = __months[__tmpmon]; | |
27029 | if (__name[__pos] == *__beg) | |
27030 | { | |
27031 | ||
27032 | const size_t __len = __traits_type::length(__name); | |
27033 | while (__pos < __len && __beg != __end | |
27034 | && __name[__pos] == *__beg) | |
27035 | ++__beg, ++__pos; | |
27036 | if (__len != __pos) | |
27037 | __err |= ios_base::failbit; | |
27038 | } | |
27039 | } | |
27040 | if (!__err) | |
27041 | __tm->tm_mon = __tmpmon; | |
27042 | ||
27043 | if (__beg == __end) | |
27044 | __err |= ios_base::eofbit; | |
27045 | return __beg; | |
27046 | } | |
27047 | ||
27048 | template<typename _CharT, typename _InIter> | |
27049 | _InIter | |
27050 | time_get<_CharT, _InIter>:: | |
27051 | do_get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
27052 | ios_base::iostate& __err, tm* __tm) const | |
27053 | { | |
27054 | const locale& __loc = __io._M_getloc(); | |
27055 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
27056 | ||
27057 | size_t __i = 0; | |
27058 | int __value = 0; | |
27059 | for (; __beg != __end && __i < 4; ++__beg, ++__i) | |
27060 | { | |
27061 | const char __c = __ctype.narrow(*__beg, '*'); | |
27062 | if (__c >= '0' && __c <= '9') | |
27063 | __value = __value * 10 + (__c - '0'); | |
27064 | else | |
27065 | break; | |
27066 | } | |
27067 | if (__i == 2 || __i == 4) | |
27068 | __tm->tm_year = __i == 2 ? __value : __value - 1900; | |
27069 | else | |
27070 | __err |= ios_base::failbit; | |
27071 | if (__beg == __end) | |
27072 | __err |= ios_base::eofbit; | |
27073 | return __beg; | |
27074 | } | |
27075 | ||
27076 | template<typename _CharT, typename _OutIter> | |
27077 | _OutIter | |
27078 | time_put<_CharT, _OutIter>:: | |
27079 | put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
27080 | const _CharT* __beg, const _CharT* __end) const | |
27081 | { | |
27082 | const locale& __loc = __io._M_getloc(); | |
27083 | ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); | |
27084 | for (; __beg != __end; ++__beg) | |
27085 | if (__ctype.narrow(*__beg, 0) != '%') | |
27086 | { | |
27087 | *__s = *__beg; | |
27088 | ++__s; | |
27089 | } | |
27090 | else if (++__beg != __end) | |
27091 | { | |
27092 | char __format; | |
27093 | char __mod = 0; | |
27094 | const char __c = __ctype.narrow(*__beg, 0); | |
27095 | if (__c != 'E' && __c != 'O') | |
27096 | __format = __c; | |
27097 | else if (++__beg != __end) | |
27098 | { | |
27099 | __mod = __c; | |
27100 | __format = __ctype.narrow(*__beg, 0); | |
27101 | } | |
27102 | else | |
27103 | break; | |
27104 | __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); | |
27105 | } | |
27106 | else | |
27107 | break; | |
27108 | return __s; | |
27109 | } | |
27110 | ||
27111 | template<typename _CharT, typename _OutIter> | |
27112 | _OutIter | |
27113 | time_put<_CharT, _OutIter>:: | |
27114 | do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, | |
27115 | char __format, char __mod) const | |
27116 | { | |
27117 | const locale& __loc = __io._M_getloc(); | |
27118 | ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); | |
27119 | __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
27120 | ||
27121 | ||
27122 | ||
27123 | const size_t __maxlen = 128; | |
27124 | char_type* __res = | |
27125 | static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen)); | |
27126 | ||
27127 | ||
27128 | ||
27129 | ||
27130 | ||
27131 | ||
27132 | char_type __fmt[4]; | |
27133 | __fmt[0] = __ctype.widen('%'); | |
27134 | if (!__mod) | |
27135 | { | |
27136 | __fmt[1] = __format; | |
27137 | __fmt[2] = char_type(); | |
27138 | } | |
27139 | else | |
27140 | { | |
27141 | __fmt[1] = __mod; | |
27142 | __fmt[2] = __format; | |
27143 | __fmt[3] = char_type(); | |
27144 | } | |
27145 | ||
27146 | __tp._M_put(__res, __maxlen, __fmt, __tm); | |
27147 | ||
27148 | ||
27149 | return std::__write(__s, __res, char_traits<char_type>::length(__res)); | |
27150 | } | |
27151 | ||
27152 | ||
27153 | template<typename _CharT> | |
27154 | int | |
27155 | collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const | |
27156 | { return 0; } | |
27157 | ||
27158 | ||
27159 | template<typename _CharT> | |
27160 | size_t | |
27161 | collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const | |
27162 | { return 0; } | |
27163 | ||
27164 | template<typename _CharT> | |
27165 | int | |
27166 | collate<_CharT>:: | |
27167 | do_compare(const _CharT* __lo1, const _CharT* __hi1, | |
27168 | const _CharT* __lo2, const _CharT* __hi2) const | |
27169 | { | |
27170 | ||
27171 | ||
27172 | const string_type __one(__lo1, __hi1); | |
27173 | const string_type __two(__lo2, __hi2); | |
27174 | ||
27175 | const _CharT* __p = __one.c_str(); | |
27176 | const _CharT* __pend = __one.data() + __one.length(); | |
27177 | const _CharT* __q = __two.c_str(); | |
27178 | const _CharT* __qend = __two.data() + __two.length(); | |
27179 | ||
27180 | ||
27181 | ||
27182 | ||
27183 | for (;;) | |
27184 | { | |
27185 | const int __res = _M_compare(__p, __q); | |
27186 | if (__res) | |
27187 | return __res; | |
27188 | ||
27189 | __p += char_traits<_CharT>::length(__p); | |
27190 | __q += char_traits<_CharT>::length(__q); | |
27191 | if (__p == __pend && __q == __qend) | |
27192 | return 0; | |
27193 | else if (__p == __pend) | |
27194 | return -1; | |
27195 | else if (__q == __qend) | |
27196 | return 1; | |
27197 | ||
27198 | __p++; | |
27199 | __q++; | |
27200 | } | |
27201 | } | |
27202 | ||
27203 | template<typename _CharT> | |
27204 | typename collate<_CharT>::string_type | |
27205 | collate<_CharT>:: | |
27206 | do_transform(const _CharT* __lo, const _CharT* __hi) const | |
27207 | { | |
27208 | ||
27209 | string_type __str(__lo, __hi); | |
27210 | ||
27211 | const _CharT* __p = __str.c_str(); | |
27212 | const _CharT* __pend = __str.data() + __str.length(); | |
27213 | ||
27214 | size_t __len = (__hi - __lo) * 2; | |
27215 | ||
27216 | string_type __ret; | |
27217 | ||
27218 | ||
27219 | ||
27220 | ||
27221 | for (;;) | |
27222 | { | |
27223 | ||
27224 | _CharT* __c = | |
27225 | static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len)); | |
27226 | size_t __res = _M_transform(__c, __p, __len); | |
27227 | ||
27228 | ||
27229 | if (__res >= __len) | |
27230 | { | |
27231 | __len = __res + 1; | |
27232 | __c = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
27233 | * __len)); | |
27234 | __res = _M_transform(__c, __p, __len); | |
27235 | } | |
27236 | ||
27237 | __ret.append(__c, __res); | |
27238 | __p += char_traits<_CharT>::length(__p); | |
27239 | if (__p == __pend) | |
27240 | return __ret; | |
27241 | ||
27242 | __p++; | |
27243 | __ret.push_back(_CharT()); | |
27244 | } | |
27245 | } | |
27246 | ||
27247 | template<typename _CharT> | |
27248 | long | |
27249 | collate<_CharT>:: | |
27250 | do_hash(const _CharT* __lo, const _CharT* __hi) const | |
27251 | { | |
27252 | unsigned long __val = 0; | |
27253 | for (; __lo < __hi; ++__lo) | |
27254 | __val = *__lo + ((__val << 7) | | |
27255 | (__val >> (numeric_limits<unsigned long>::digits - 7))); | |
27256 | return static_cast<long>(__val); | |
27257 | } | |
27258 | # 2407 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/locale_facets.tcc" 3 | |
27259 | template<typename _CharT, typename _Traits> | |
27260 | void | |
27261 | __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, | |
27262 | _CharT* __news, const _CharT* __olds, | |
27263 | const streamsize __newlen, | |
27264 | const streamsize __oldlen, const bool __num) | |
27265 | { | |
27266 | const size_t __plen = static_cast<size_t>(__newlen - __oldlen); | |
27267 | const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; | |
27268 | ||
27269 | ||
27270 | if (__adjust == ios_base::left) | |
27271 | { | |
27272 | _Traits::copy(__news, const_cast<_CharT*>(__olds), __oldlen); | |
27273 | _Traits::assign(__news + __oldlen, __plen, __fill); | |
27274 | return; | |
27275 | } | |
27276 | ||
27277 | size_t __mod = 0; | |
27278 | if (__adjust == ios_base::internal && __num) | |
27279 | { | |
27280 | ||
27281 | ||
27282 | ||
27283 | const locale& __loc = __io._M_getloc(); | |
27284 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
27285 | ||
27286 | const bool __testsign = (__ctype.widen('-') == __olds[0] | |
27287 | || __ctype.widen('+') == __olds[0]); | |
27288 | const bool __testhex = (__ctype.widen('0') == __olds[0] | |
27289 | && __oldlen > 1 | |
27290 | && (__ctype.widen('x') == __olds[1] | |
27291 | || __ctype.widen('X') == __olds[1])); | |
27292 | if (__testhex) | |
27293 | { | |
27294 | __news[0] = __olds[0]; | |
27295 | __news[1] = __olds[1]; | |
27296 | __mod = 2; | |
27297 | __news += 2; | |
27298 | } | |
27299 | else if (__testsign) | |
27300 | { | |
27301 | __news[0] = __olds[0]; | |
27302 | __mod = 1; | |
27303 | ++__news; | |
27304 | } | |
27305 | ||
27306 | } | |
27307 | _Traits::assign(__news, __plen, __fill); | |
27308 | _Traits::copy(__news + __plen, const_cast<_CharT*>(__olds + __mod), | |
27309 | __oldlen - __mod); | |
27310 | } | |
27311 | ||
27312 | bool | |
27313 | __verify_grouping(const char* __grouping, size_t __grouping_size, | |
27314 | const string& __grouping_tmp) | |
27315 | { | |
27316 | const size_t __n = __grouping_tmp.size() - 1; | |
27317 | const size_t __min = std::min(__n, size_t(__grouping_size - 1)); | |
27318 | size_t __i = __n; | |
27319 | bool __test = true; | |
27320 | ||
27321 | ||
27322 | ||
27323 | ||
27324 | for (size_t __j = 0; __j < __min && __test; --__i, ++__j) | |
27325 | __test = __grouping_tmp[__i] == __grouping[__j]; | |
27326 | for (; __i && __test; --__i) | |
27327 | __test = __grouping_tmp[__i] == __grouping[__min]; | |
27328 | ||
27329 | ||
27330 | ||
27331 | if (static_cast<signed char>(__grouping[__min]) > 0) | |
27332 | __test &= __grouping_tmp[0] <= __grouping[__min]; | |
27333 | return __test; | |
27334 | } | |
27335 | ||
27336 | template<typename _CharT> | |
27337 | _CharT* | |
27338 | __add_grouping(_CharT* __s, _CharT __sep, | |
27339 | const char* __gbeg, size_t __gsize, | |
27340 | const _CharT* __first, const _CharT* __last) | |
27341 | { | |
27342 | if (__last - __first > *__gbeg | |
27343 | && static_cast<signed char>(*__gbeg) > 0) | |
27344 | { | |
27345 | const bool __bump = __gsize != 1; | |
27346 | __s = std::__add_grouping(__s, __sep, __gbeg + __bump, | |
27347 | __gsize - __bump, __first, | |
27348 | __last - *__gbeg); | |
27349 | __first = __last - *__gbeg; | |
27350 | *__s++ = __sep; | |
27351 | } | |
27352 | do | |
27353 | *__s++ = *__first++; | |
27354 | while (__first != __last); | |
27355 | return __s; | |
27356 | } | |
27357 | ||
27358 | ||
27359 | ||
27360 | ||
27361 | ||
27362 | extern template class moneypunct<char, false>; | |
27363 | extern template class moneypunct<char, true>; | |
27364 | extern template class moneypunct_byname<char, false>; | |
27365 | extern template class moneypunct_byname<char, true>; | |
27366 | extern template class money_get<char>; | |
27367 | extern template class money_put<char>; | |
27368 | extern template class numpunct<char>; | |
27369 | extern template class numpunct_byname<char>; | |
27370 | extern template class num_get<char>; | |
27371 | extern template class num_put<char>; | |
27372 | extern template class __timepunct<char>; | |
27373 | extern template class time_put<char>; | |
27374 | extern template class time_put_byname<char>; | |
27375 | extern template class time_get<char>; | |
27376 | extern template class time_get_byname<char>; | |
27377 | extern template class messages<char>; | |
27378 | extern template class messages_byname<char>; | |
27379 | extern template class ctype_byname<char>; | |
27380 | extern template class codecvt_byname<char, char, mbstate_t>; | |
27381 | extern template class collate<char>; | |
27382 | extern template class collate_byname<char>; | |
27383 | ||
27384 | extern template | |
27385 | const codecvt<char, char, mbstate_t>& | |
27386 | use_facet<codecvt<char, char, mbstate_t> >(const locale&); | |
27387 | ||
27388 | extern template | |
27389 | const collate<char>& | |
27390 | use_facet<collate<char> >(const locale&); | |
27391 | ||
27392 | extern template | |
27393 | const numpunct<char>& | |
27394 | use_facet<numpunct<char> >(const locale&); | |
27395 | ||
27396 | extern template | |
27397 | const num_put<char>& | |
27398 | use_facet<num_put<char> >(const locale&); | |
27399 | ||
27400 | extern template | |
27401 | const num_get<char>& | |
27402 | use_facet<num_get<char> >(const locale&); | |
27403 | ||
27404 | extern template | |
27405 | const moneypunct<char, true>& | |
27406 | use_facet<moneypunct<char, true> >(const locale&); | |
27407 | ||
27408 | extern template | |
27409 | const moneypunct<char, false>& | |
27410 | use_facet<moneypunct<char, false> >(const locale&); | |
27411 | ||
27412 | extern template | |
27413 | const money_put<char>& | |
27414 | use_facet<money_put<char> >(const locale&); | |
27415 | ||
27416 | extern template | |
27417 | const money_get<char>& | |
27418 | use_facet<money_get<char> >(const locale&); | |
27419 | ||
27420 | extern template | |
27421 | const __timepunct<char>& | |
27422 | use_facet<__timepunct<char> >(const locale&); | |
27423 | ||
27424 | extern template | |
27425 | const time_put<char>& | |
27426 | use_facet<time_put<char> >(const locale&); | |
27427 | ||
27428 | extern template | |
27429 | const time_get<char>& | |
27430 | use_facet<time_get<char> >(const locale&); | |
27431 | ||
27432 | extern template | |
27433 | const messages<char>& | |
27434 | use_facet<messages<char> >(const locale&); | |
27435 | ||
27436 | extern template | |
27437 | bool | |
27438 | has_facet<ctype<char> >(const locale&); | |
27439 | ||
27440 | extern template | |
27441 | bool | |
27442 | has_facet<codecvt<char, char, mbstate_t> >(const locale&); | |
27443 | ||
27444 | extern template | |
27445 | bool | |
27446 | has_facet<collate<char> >(const locale&); | |
27447 | ||
27448 | extern template | |
27449 | bool | |
27450 | has_facet<numpunct<char> >(const locale&); | |
27451 | ||
27452 | extern template | |
27453 | bool | |
27454 | has_facet<num_put<char> >(const locale&); | |
27455 | ||
27456 | extern template | |
27457 | bool | |
27458 | has_facet<num_get<char> >(const locale&); | |
27459 | ||
27460 | extern template | |
27461 | bool | |
27462 | has_facet<moneypunct<char> >(const locale&); | |
27463 | ||
27464 | extern template | |
27465 | bool | |
27466 | has_facet<money_put<char> >(const locale&); | |
27467 | ||
27468 | extern template | |
27469 | bool | |
27470 | has_facet<money_get<char> >(const locale&); | |
27471 | ||
27472 | extern template | |
27473 | bool | |
27474 | has_facet<__timepunct<char> >(const locale&); | |
27475 | ||
27476 | extern template | |
27477 | bool | |
27478 | has_facet<time_put<char> >(const locale&); | |
27479 | ||
27480 | extern template | |
27481 | bool | |
27482 | has_facet<time_get<char> >(const locale&); | |
27483 | ||
27484 | extern template | |
27485 | bool | |
27486 | has_facet<messages<char> >(const locale&); | |
27487 | ||
27488 | ||
27489 | extern template class moneypunct<wchar_t, false>; | |
27490 | extern template class moneypunct<wchar_t, true>; | |
27491 | extern template class moneypunct_byname<wchar_t, false>; | |
27492 | extern template class moneypunct_byname<wchar_t, true>; | |
27493 | extern template class money_get<wchar_t>; | |
27494 | extern template class money_put<wchar_t>; | |
27495 | extern template class numpunct<wchar_t>; | |
27496 | extern template class numpunct_byname<wchar_t>; | |
27497 | extern template class num_get<wchar_t>; | |
27498 | extern template class num_put<wchar_t>; | |
27499 | extern template class __timepunct<wchar_t>; | |
27500 | extern template class time_put<wchar_t>; | |
27501 | extern template class time_put_byname<wchar_t>; | |
27502 | extern template class time_get<wchar_t>; | |
27503 | extern template class time_get_byname<wchar_t>; | |
27504 | extern template class messages<wchar_t>; | |
27505 | extern template class messages_byname<wchar_t>; | |
27506 | extern template class ctype_byname<wchar_t>; | |
27507 | extern template class codecvt_byname<wchar_t, char, mbstate_t>; | |
27508 | extern template class collate<wchar_t>; | |
27509 | extern template class collate_byname<wchar_t>; | |
27510 | ||
27511 | extern template | |
27512 | const codecvt<wchar_t, char, mbstate_t>& | |
27513 | use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&); | |
27514 | ||
27515 | extern template | |
27516 | const collate<wchar_t>& | |
27517 | use_facet<collate<wchar_t> >(const locale&); | |
27518 | ||
27519 | extern template | |
27520 | const numpunct<wchar_t>& | |
27521 | use_facet<numpunct<wchar_t> >(const locale&); | |
27522 | ||
27523 | extern template | |
27524 | const num_put<wchar_t>& | |
27525 | use_facet<num_put<wchar_t> >(const locale&); | |
27526 | ||
27527 | extern template | |
27528 | const num_get<wchar_t>& | |
27529 | use_facet<num_get<wchar_t> >(const locale&); | |
27530 | ||
27531 | extern template | |
27532 | const moneypunct<wchar_t, true>& | |
27533 | use_facet<moneypunct<wchar_t, true> >(const locale&); | |
27534 | ||
27535 | extern template | |
27536 | const moneypunct<wchar_t, false>& | |
27537 | use_facet<moneypunct<wchar_t, false> >(const locale&); | |
27538 | ||
27539 | extern template | |
27540 | const money_put<wchar_t>& | |
27541 | use_facet<money_put<wchar_t> >(const locale&); | |
27542 | ||
27543 | extern template | |
27544 | const money_get<wchar_t>& | |
27545 | use_facet<money_get<wchar_t> >(const locale&); | |
27546 | ||
27547 | extern template | |
27548 | const __timepunct<wchar_t>& | |
27549 | use_facet<__timepunct<wchar_t> >(const locale&); | |
27550 | ||
27551 | extern template | |
27552 | const time_put<wchar_t>& | |
27553 | use_facet<time_put<wchar_t> >(const locale&); | |
27554 | ||
27555 | extern template | |
27556 | const time_get<wchar_t>& | |
27557 | use_facet<time_get<wchar_t> >(const locale&); | |
27558 | ||
27559 | extern template | |
27560 | const messages<wchar_t>& | |
27561 | use_facet<messages<wchar_t> >(const locale&); | |
27562 | ||
27563 | extern template | |
27564 | bool | |
27565 | has_facet<ctype<wchar_t> >(const locale&); | |
27566 | ||
27567 | extern template | |
27568 | bool | |
27569 | has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&); | |
27570 | ||
27571 | extern template | |
27572 | bool | |
27573 | has_facet<collate<wchar_t> >(const locale&); | |
27574 | ||
27575 | extern template | |
27576 | bool | |
27577 | has_facet<numpunct<wchar_t> >(const locale&); | |
27578 | ||
27579 | extern template | |
27580 | bool | |
27581 | has_facet<num_put<wchar_t> >(const locale&); | |
27582 | ||
27583 | extern template | |
27584 | bool | |
27585 | has_facet<num_get<wchar_t> >(const locale&); | |
27586 | ||
27587 | extern template | |
27588 | bool | |
27589 | has_facet<moneypunct<wchar_t> >(const locale&); | |
27590 | ||
27591 | extern template | |
27592 | bool | |
27593 | has_facet<money_put<wchar_t> >(const locale&); | |
27594 | ||
27595 | extern template | |
27596 | bool | |
27597 | has_facet<money_get<wchar_t> >(const locale&); | |
27598 | ||
27599 | extern template | |
27600 | bool | |
27601 | has_facet<__timepunct<wchar_t> >(const locale&); | |
27602 | ||
27603 | extern template | |
27604 | bool | |
27605 | has_facet<time_put<wchar_t> >(const locale&); | |
27606 | ||
27607 | extern template | |
27608 | bool | |
27609 | has_facet<time_get<wchar_t> >(const locale&); | |
27610 | ||
27611 | extern template | |
27612 | bool | |
27613 | has_facet<messages<wchar_t> >(const locale&); | |
27614 | ||
27615 | ||
27616 | } | |
27617 | # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/locale" 2 3 | |
27618 | ||
27619 | #pragma GCC visibility pop | |
27620 | # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/ostream.tcc" 2 3 | |
27621 | ||
27622 | namespace std | |
27623 | { | |
27624 | template<typename _CharT, typename _Traits> | |
27625 | basic_ostream<_CharT, _Traits>::sentry:: | |
27626 | sentry(basic_ostream<_CharT, _Traits>& __os) | |
27627 | : _M_ok(false), _M_os(__os) | |
27628 | { | |
27629 | ||
27630 | if (__os.tie() && __os.good()) | |
27631 | __os.tie()->flush(); | |
27632 | ||
27633 | if (__os.good()) | |
27634 | _M_ok = true; | |
27635 | else | |
27636 | __os.setstate(ios_base::failbit); | |
27637 | } | |
27638 | ||
27639 | template<typename _CharT, typename _Traits> | |
27640 | basic_ostream<_CharT, _Traits>& | |
27641 | basic_ostream<_CharT, _Traits>:: | |
27642 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | |
27643 | { | |
27644 | ||
27645 | ||
27646 | ||
27647 | return __pf(*this); | |
27648 | } | |
27649 | ||
27650 | template<typename _CharT, typename _Traits> | |
27651 | basic_ostream<_CharT, _Traits>& | |
27652 | basic_ostream<_CharT, _Traits>:: | |
27653 | operator<<(__ios_type& (*__pf)(__ios_type&)) | |
27654 | { | |
27655 | ||
27656 | ||
27657 | ||
27658 | __pf(*this); | |
27659 | return *this; | |
27660 | } | |
27661 | ||
27662 | template<typename _CharT, typename _Traits> | |
27663 | basic_ostream<_CharT, _Traits>& | |
27664 | basic_ostream<_CharT, _Traits>:: | |
27665 | operator<<(ios_base& (*__pf)(ios_base&)) | |
27666 | { | |
27667 | ||
27668 | ||
27669 | ||
27670 | __pf(*this); | |
27671 | return *this; | |
27672 | } | |
27673 | ||
27674 | template<typename _CharT, typename _Traits> | |
27675 | basic_ostream<_CharT, _Traits>& | |
27676 | basic_ostream<_CharT, _Traits>:: | |
27677 | operator<<(bool __n) | |
27678 | { | |
27679 | sentry __cerb(*this); | |
27680 | if (__cerb) | |
27681 | { | |
27682 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27683 | try | |
27684 | { | |
27685 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27686 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27687 | __err |= ios_base::badbit; | |
27688 | } | |
27689 | catch(...) | |
27690 | { this->_M_setstate(ios_base::badbit); } | |
27691 | if (__err) | |
27692 | this->setstate(__err); | |
27693 | } | |
27694 | return *this; | |
27695 | } | |
27696 | ||
27697 | template<typename _CharT, typename _Traits> | |
27698 | basic_ostream<_CharT, _Traits>& | |
27699 | basic_ostream<_CharT, _Traits>:: | |
27700 | operator<<(short __n) | |
27701 | { | |
27702 | sentry __cerb(*this); | |
27703 | if (__cerb) | |
27704 | { | |
27705 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27706 | try | |
27707 | { | |
27708 | ||
27709 | ||
27710 | long __l; | |
27711 | const ios_base::fmtflags __fmt = (this->flags() | |
27712 | & ios_base::basefield); | |
27713 | if (__fmt == ios_base::oct || __fmt == ios_base::hex) | |
27714 | __l = static_cast<long>(static_cast<unsigned short>(__n)); | |
27715 | else | |
27716 | __l = static_cast<long>(__n); | |
27717 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27718 | if (__np.put(*this, *this, this->fill(), __l).failed()) | |
27719 | __err |= ios_base::badbit; | |
27720 | } | |
27721 | catch(...) | |
27722 | { this->_M_setstate(ios_base::badbit); } | |
27723 | if (__err) | |
27724 | this->setstate(__err); | |
27725 | } | |
27726 | return *this; | |
27727 | } | |
27728 | ||
27729 | template<typename _CharT, typename _Traits> | |
27730 | basic_ostream<_CharT, _Traits>& | |
27731 | basic_ostream<_CharT, _Traits>:: | |
27732 | operator<<(unsigned short __n) | |
27733 | { | |
27734 | sentry __cerb(*this); | |
27735 | if (__cerb) | |
27736 | { | |
27737 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27738 | try | |
27739 | { | |
27740 | ||
27741 | ||
27742 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27743 | if (__np.put(*this, *this, this->fill(), | |
27744 | static_cast<unsigned long>(__n)).failed()) | |
27745 | __err |= ios_base::badbit; | |
27746 | } | |
27747 | catch(...) | |
27748 | { this->_M_setstate(ios_base::badbit); } | |
27749 | if (__err) | |
27750 | this->setstate(__err); | |
27751 | } | |
27752 | return *this; | |
27753 | } | |
27754 | ||
27755 | template<typename _CharT, typename _Traits> | |
27756 | basic_ostream<_CharT, _Traits>& | |
27757 | basic_ostream<_CharT, _Traits>:: | |
27758 | operator<<(int __n) | |
27759 | { | |
27760 | sentry __cerb(*this); | |
27761 | if (__cerb) | |
27762 | { | |
27763 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27764 | try | |
27765 | { | |
27766 | ||
27767 | ||
27768 | long __l; | |
27769 | const ios_base::fmtflags __fmt = (this->flags() | |
27770 | & ios_base::basefield); | |
27771 | if (__fmt == ios_base::oct || __fmt == ios_base::hex) | |
27772 | __l = static_cast<long>(static_cast<unsigned int>(__n)); | |
27773 | else | |
27774 | __l = static_cast<long>(__n); | |
27775 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27776 | if (__np.put(*this, *this, this->fill(), __l).failed()) | |
27777 | __err |= ios_base::badbit; | |
27778 | } | |
27779 | catch(...) | |
27780 | { this->_M_setstate(ios_base::badbit); } | |
27781 | if (__err) | |
27782 | this->setstate(__err); | |
27783 | } | |
27784 | return *this; | |
27785 | } | |
27786 | ||
27787 | template<typename _CharT, typename _Traits> | |
27788 | basic_ostream<_CharT, _Traits>& | |
27789 | basic_ostream<_CharT, _Traits>:: | |
27790 | operator<<(unsigned int __n) | |
27791 | { | |
27792 | sentry __cerb(*this); | |
27793 | if (__cerb) | |
27794 | { | |
27795 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27796 | try | |
27797 | { | |
27798 | ||
27799 | ||
27800 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27801 | if (__np.put(*this, *this, this->fill(), | |
27802 | static_cast<unsigned long>(__n)).failed()) | |
27803 | __err |= ios_base::badbit; | |
27804 | } | |
27805 | catch(...) | |
27806 | { this->_M_setstate(ios_base::badbit); } | |
27807 | if (__err) | |
27808 | this->setstate(__err); | |
27809 | } | |
27810 | return *this; | |
27811 | } | |
27812 | ||
27813 | template<typename _CharT, typename _Traits> | |
27814 | basic_ostream<_CharT, _Traits>& | |
27815 | basic_ostream<_CharT, _Traits>:: | |
27816 | operator<<(long __n) | |
27817 | { | |
27818 | sentry __cerb(*this); | |
27819 | if (__cerb) | |
27820 | { | |
27821 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27822 | try | |
27823 | { | |
27824 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27825 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27826 | __err |= ios_base::badbit; | |
27827 | } | |
27828 | catch(...) | |
27829 | { this->_M_setstate(ios_base::badbit); } | |
27830 | if (__err) | |
27831 | this->setstate(__err); | |
27832 | } | |
27833 | return *this; | |
27834 | } | |
27835 | ||
27836 | template<typename _CharT, typename _Traits> | |
27837 | basic_ostream<_CharT, _Traits>& | |
27838 | basic_ostream<_CharT, _Traits>:: | |
27839 | operator<<(unsigned long __n) | |
27840 | { | |
27841 | sentry __cerb(*this); | |
27842 | if (__cerb) | |
27843 | { | |
27844 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27845 | try | |
27846 | { | |
27847 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27848 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27849 | __err |= ios_base::badbit; | |
27850 | } | |
27851 | catch(...) | |
27852 | { this->_M_setstate(ios_base::badbit); } | |
27853 | if (__err) | |
27854 | this->setstate(__err); | |
27855 | } | |
27856 | return *this; | |
27857 | } | |
27858 | ||
27859 | ||
27860 | template<typename _CharT, typename _Traits> | |
27861 | basic_ostream<_CharT, _Traits>& | |
27862 | basic_ostream<_CharT, _Traits>:: | |
27863 | operator<<(long long __n) | |
27864 | { | |
27865 | sentry __cerb(*this); | |
27866 | if (__cerb) | |
27867 | { | |
27868 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27869 | try | |
27870 | { | |
27871 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27872 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27873 | __err |= ios_base::badbit; | |
27874 | } | |
27875 | catch(...) | |
27876 | { this->_M_setstate(ios_base::badbit); } | |
27877 | if (__err) | |
27878 | this->setstate(__err); | |
27879 | } | |
27880 | return *this; | |
27881 | } | |
27882 | ||
27883 | template<typename _CharT, typename _Traits> | |
27884 | basic_ostream<_CharT, _Traits>& | |
27885 | basic_ostream<_CharT, _Traits>:: | |
27886 | operator<<(unsigned long long __n) | |
27887 | { | |
27888 | sentry __cerb(*this); | |
27889 | if (__cerb) | |
27890 | { | |
27891 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27892 | try | |
27893 | { | |
27894 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27895 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27896 | __err |= ios_base::badbit; | |
27897 | } | |
27898 | catch(...) | |
27899 | { this->_M_setstate(ios_base::badbit); } | |
27900 | if (__err) | |
27901 | this->setstate(__err); | |
27902 | } | |
27903 | return *this; | |
27904 | } | |
27905 | ||
27906 | ||
27907 | template<typename _CharT, typename _Traits> | |
27908 | basic_ostream<_CharT, _Traits>& | |
27909 | basic_ostream<_CharT, _Traits>:: | |
27910 | operator<<(float __n) | |
27911 | { | |
27912 | sentry __cerb(*this); | |
27913 | if (__cerb) | |
27914 | { | |
27915 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27916 | try | |
27917 | { | |
27918 | ||
27919 | ||
27920 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27921 | if (__np.put(*this, *this, this->fill(), | |
27922 | static_cast<double>(__n)).failed()) | |
27923 | __err |= ios_base::badbit; | |
27924 | } | |
27925 | catch(...) | |
27926 | { this->_M_setstate(ios_base::badbit); } | |
27927 | if (__err) | |
27928 | this->setstate(__err); | |
27929 | } | |
27930 | return *this; | |
27931 | } | |
27932 | ||
27933 | template<typename _CharT, typename _Traits> | |
27934 | basic_ostream<_CharT, _Traits>& | |
27935 | basic_ostream<_CharT, _Traits>:: | |
27936 | operator<<(double __n) | |
27937 | { | |
27938 | sentry __cerb(*this); | |
27939 | if (__cerb) | |
27940 | { | |
27941 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27942 | try | |
27943 | { | |
27944 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27945 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27946 | __err |= ios_base::badbit; | |
27947 | } | |
27948 | catch(...) | |
27949 | { this->_M_setstate(ios_base::badbit); } | |
27950 | if (__err) | |
27951 | this->setstate(__err); | |
27952 | } | |
27953 | return *this; | |
27954 | } | |
27955 | ||
27956 | template<typename _CharT, typename _Traits> | |
27957 | basic_ostream<_CharT, _Traits>& | |
27958 | basic_ostream<_CharT, _Traits>:: | |
27959 | operator<<(long double __n) | |
27960 | { | |
27961 | sentry __cerb(*this); | |
27962 | if (__cerb) | |
27963 | { | |
27964 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27965 | try | |
27966 | { | |
27967 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27968 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27969 | __err |= ios_base::badbit; | |
27970 | } | |
27971 | catch(...) | |
27972 | { this->_M_setstate(ios_base::badbit); } | |
27973 | if (__err) | |
27974 | this->setstate(__err); | |
27975 | } | |
27976 | return *this; | |
27977 | } | |
27978 | ||
27979 | template<typename _CharT, typename _Traits> | |
27980 | basic_ostream<_CharT, _Traits>& | |
27981 | basic_ostream<_CharT, _Traits>:: | |
27982 | operator<<(const void* __n) | |
27983 | { | |
27984 | sentry __cerb(*this); | |
27985 | if (__cerb) | |
27986 | { | |
27987 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
27988 | try | |
27989 | { | |
27990 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
27991 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
27992 | __err |= ios_base::badbit; | |
27993 | } | |
27994 | catch(...) | |
27995 | { this->_M_setstate(ios_base::badbit); } | |
27996 | if (__err) | |
27997 | this->setstate(__err); | |
27998 | } | |
27999 | return *this; | |
28000 | } | |
28001 | ||
28002 | template<typename _CharT, typename _Traits> | |
28003 | basic_ostream<_CharT, _Traits>& | |
28004 | basic_ostream<_CharT, _Traits>:: | |
28005 | operator<<(__streambuf_type* __sbin) | |
28006 | { | |
28007 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28008 | sentry __cerb(*this); | |
28009 | if (__cerb && __sbin) | |
28010 | { | |
28011 | try | |
28012 | { | |
28013 | if (!__copy_streambufs(__sbin, this->rdbuf())) | |
28014 | __err |= ios_base::failbit; | |
28015 | } | |
28016 | catch(...) | |
28017 | { this->_M_setstate(ios_base::failbit); } | |
28018 | } | |
28019 | else if (!__sbin) | |
28020 | __err |= ios_base::badbit; | |
28021 | if (__err) | |
28022 | this->setstate(__err); | |
28023 | return *this; | |
28024 | } | |
28025 | ||
28026 | template<typename _CharT, typename _Traits> | |
28027 | basic_ostream<_CharT, _Traits>& | |
28028 | basic_ostream<_CharT, _Traits>:: | |
28029 | put(char_type __c) | |
28030 | { | |
28031 | ||
28032 | ||
28033 | ||
28034 | ||
28035 | ||
28036 | ||
28037 | sentry __cerb(*this); | |
28038 | if (__cerb) | |
28039 | { | |
28040 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28041 | try | |
28042 | { | |
28043 | const int_type __put = this->rdbuf()->sputc(__c); | |
28044 | if (traits_type::eq_int_type(__put, traits_type::eof())) | |
28045 | __err |= ios_base::badbit; | |
28046 | } | |
28047 | catch (...) | |
28048 | { this->_M_setstate(ios_base::badbit); } | |
28049 | if (__err) | |
28050 | this->setstate(__err); | |
28051 | } | |
28052 | return *this; | |
28053 | } | |
28054 | ||
28055 | template<typename _CharT, typename _Traits> | |
28056 | basic_ostream<_CharT, _Traits>& | |
28057 | basic_ostream<_CharT, _Traits>:: | |
28058 | write(const _CharT* __s, streamsize __n) | |
28059 | { | |
28060 | ||
28061 | ||
28062 | ||
28063 | ||
28064 | ||
28065 | ||
28066 | ||
28067 | sentry __cerb(*this); | |
28068 | if (__cerb) | |
28069 | { | |
28070 | try | |
28071 | { _M_write(__s, __n); } | |
28072 | catch (...) | |
28073 | { this->_M_setstate(ios_base::badbit); } | |
28074 | } | |
28075 | return *this; | |
28076 | } | |
28077 | ||
28078 | template<typename _CharT, typename _Traits> | |
28079 | basic_ostream<_CharT, _Traits>& | |
28080 | basic_ostream<_CharT, _Traits>:: | |
28081 | flush() | |
28082 | { | |
28083 | ||
28084 | ||
28085 | ||
28086 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28087 | try | |
28088 | { | |
28089 | if (this->rdbuf() && this->rdbuf()->pubsync() == -1) | |
28090 | __err |= ios_base::badbit; | |
28091 | } | |
28092 | catch(...) | |
28093 | { this->_M_setstate(ios_base::badbit); } | |
28094 | if (__err) | |
28095 | this->setstate(__err); | |
28096 | return *this; | |
28097 | } | |
28098 | ||
28099 | template<typename _CharT, typename _Traits> | |
28100 | typename basic_ostream<_CharT, _Traits>::pos_type | |
28101 | basic_ostream<_CharT, _Traits>:: | |
28102 | tellp() | |
28103 | { | |
28104 | pos_type __ret = pos_type(-1); | |
28105 | try | |
28106 | { | |
28107 | if (!this->fail()) | |
28108 | __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); | |
28109 | } | |
28110 | catch(...) | |
28111 | { this->_M_setstate(ios_base::badbit); } | |
28112 | return __ret; | |
28113 | } | |
28114 | ||
28115 | template<typename _CharT, typename _Traits> | |
28116 | basic_ostream<_CharT, _Traits>& | |
28117 | basic_ostream<_CharT, _Traits>:: | |
28118 | seekp(pos_type __pos) | |
28119 | { | |
28120 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28121 | try | |
28122 | { | |
28123 | if (!this->fail()) | |
28124 | { | |
28125 | ||
28126 | ||
28127 | const pos_type __p = this->rdbuf()->pubseekpos(__pos, | |
28128 | ios_base::out); | |
28129 | ||
28130 | ||
28131 | if (__p == pos_type(off_type(-1))) | |
28132 | __err |= ios_base::failbit; | |
28133 | } | |
28134 | } | |
28135 | catch(...) | |
28136 | { this->_M_setstate(ios_base::badbit); } | |
28137 | if (__err) | |
28138 | this->setstate(__err); | |
28139 | return *this; | |
28140 | } | |
28141 | ||
28142 | template<typename _CharT, typename _Traits> | |
28143 | basic_ostream<_CharT, _Traits>& | |
28144 | basic_ostream<_CharT, _Traits>:: | |
28145 | seekp(off_type __off, ios_base::seekdir __dir) | |
28146 | { | |
28147 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28148 | try | |
28149 | { | |
28150 | if (!this->fail()) | |
28151 | { | |
28152 | ||
28153 | ||
28154 | const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, | |
28155 | ios_base::out); | |
28156 | ||
28157 | ||
28158 | if (__p == pos_type(off_type(-1))) | |
28159 | __err |= ios_base::failbit; | |
28160 | } | |
28161 | } | |
28162 | catch(...) | |
28163 | { this->_M_setstate(ios_base::badbit); } | |
28164 | if (__err) | |
28165 | this->setstate(__err); | |
28166 | return *this; | |
28167 | } | |
28168 | ||
28169 | ||
28170 | template<typename _CharT, typename _Traits> | |
28171 | basic_ostream<_CharT, _Traits>& | |
28172 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | |
28173 | { | |
28174 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
28175 | typename __ostream_type::sentry __cerb(__out); | |
28176 | if (__cerb) | |
28177 | { | |
28178 | try | |
28179 | { | |
28180 | const streamsize __w = __out.width(); | |
28181 | streamsize __len = 1; | |
28182 | _CharT* __cs = &__c; | |
28183 | if (__w > __len) | |
28184 | { | |
28185 | __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
28186 | * __w)); | |
28187 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
28188 | &__c, __w, __len, false); | |
28189 | __len = __w; | |
28190 | } | |
28191 | __out._M_write(__cs, __len); | |
28192 | __out.width(0); | |
28193 | } | |
28194 | catch(...) | |
28195 | { __out._M_setstate(ios_base::badbit); } | |
28196 | } | |
28197 | return __out; | |
28198 | } | |
28199 | ||
28200 | ||
28201 | template <class _Traits> | |
28202 | basic_ostream<char, _Traits>& | |
28203 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | |
28204 | { | |
28205 | typedef basic_ostream<char, _Traits> __ostream_type; | |
28206 | typename __ostream_type::sentry __cerb(__out); | |
28207 | if (__cerb) | |
28208 | { | |
28209 | try | |
28210 | { | |
28211 | const streamsize __w = __out.width(); | |
28212 | streamsize __len = 1; | |
28213 | char* __cs = &__c; | |
28214 | if (__w > __len) | |
28215 | { | |
28216 | __cs = static_cast<char*>(__builtin_alloca(__w)); | |
28217 | __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
28218 | &__c, __w, __len, false); | |
28219 | __len = __w; | |
28220 | } | |
28221 | __out._M_write(__cs, __len); | |
28222 | __out.width(0); | |
28223 | } | |
28224 | catch(...) | |
28225 | { __out._M_setstate(ios_base::badbit); } | |
28226 | } | |
28227 | return __out; | |
28228 | } | |
28229 | ||
28230 | template<typename _CharT, typename _Traits> | |
28231 | basic_ostream<_CharT, _Traits>& | |
28232 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | |
28233 | { | |
28234 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
28235 | typename __ostream_type::sentry __cerb(__out); | |
28236 | if (__cerb && __s) | |
28237 | { | |
28238 | try | |
28239 | { | |
28240 | const streamsize __w = __out.width(); | |
28241 | streamsize __len = static_cast<streamsize>(_Traits::length(__s)); | |
28242 | if (__w > __len) | |
28243 | { | |
28244 | _CharT* __cs = (static_cast< | |
28245 | _CharT*>(__builtin_alloca(sizeof(_CharT) | |
28246 | * __w))); | |
28247 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
28248 | __s, __w, __len, false); | |
28249 | __s = __cs; | |
28250 | __len = __w; | |
28251 | } | |
28252 | __out._M_write(__s, __len); | |
28253 | __out.width(0); | |
28254 | } | |
28255 | catch(...) | |
28256 | { __out._M_setstate(ios_base::badbit); } | |
28257 | } | |
28258 | else if (!__s) | |
28259 | __out.setstate(ios_base::badbit); | |
28260 | return __out; | |
28261 | } | |
28262 | ||
28263 | template<typename _CharT, typename _Traits> | |
28264 | basic_ostream<_CharT, _Traits>& | |
28265 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | |
28266 | { | |
28267 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
28268 | ||
28269 | ||
28270 | ||
28271 | typedef char_traits<char> __traits_type; | |
28272 | typename __ostream_type::sentry __cerb(__out); | |
28273 | if (__cerb && __s) | |
28274 | { | |
28275 | size_t __clen = __traits_type::length(__s); | |
28276 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
28277 | * __clen)); | |
28278 | for (size_t __i = 0; __i < __clen; ++__i) | |
28279 | __ws[__i] = __out.widen(__s[__i]); | |
28280 | _CharT* __str = __ws; | |
28281 | ||
28282 | try | |
28283 | { | |
28284 | const streamsize __w = __out.width(); | |
28285 | streamsize __len = static_cast<streamsize>(__clen); | |
28286 | if (__w > __len) | |
28287 | { | |
28288 | _CharT* __cs = (static_cast< | |
28289 | _CharT*>(__builtin_alloca(sizeof(_CharT) | |
28290 | * __w))); | |
28291 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
28292 | __ws, __w, __len, false); | |
28293 | __str = __cs; | |
28294 | __len = __w; | |
28295 | } | |
28296 | __out._M_write(__str, __len); | |
28297 | __out.width(0); | |
28298 | } | |
28299 | catch(...) | |
28300 | { __out._M_setstate(ios_base::badbit); } | |
28301 | } | |
28302 | else if (!__s) | |
28303 | __out.setstate(ios_base::badbit); | |
28304 | return __out; | |
28305 | } | |
28306 | ||
28307 | ||
28308 | template<class _Traits> | |
28309 | basic_ostream<char, _Traits>& | |
28310 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | |
28311 | { | |
28312 | typedef basic_ostream<char, _Traits> __ostream_type; | |
28313 | typename __ostream_type::sentry __cerb(__out); | |
28314 | if (__cerb && __s) | |
28315 | { | |
28316 | try | |
28317 | { | |
28318 | const streamsize __w = __out.width(); | |
28319 | streamsize __len = static_cast<streamsize>(_Traits::length(__s)); | |
28320 | if (__w > __len) | |
28321 | { | |
28322 | char* __cs = static_cast<char*>(__builtin_alloca(__w)); | |
28323 | __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
28324 | __s, __w, __len, false); | |
28325 | __s = __cs; | |
28326 | __len = __w; | |
28327 | } | |
28328 | __out._M_write(__s, __len); | |
28329 | __out.width(0); | |
28330 | } | |
28331 | catch(...) | |
28332 | { __out._M_setstate(ios_base::badbit); } | |
28333 | } | |
28334 | else if (!__s) | |
28335 | __out.setstate(ios_base::badbit); | |
28336 | return __out; | |
28337 | } | |
28338 | ||
28339 | ||
28340 | template<typename _CharT, typename _Traits, typename _Alloc> | |
28341 | basic_ostream<_CharT, _Traits>& | |
28342 | operator<<(basic_ostream<_CharT, _Traits>& __out, | |
28343 | const basic_string<_CharT, _Traits, _Alloc>& __str) | |
28344 | { | |
28345 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
28346 | typename __ostream_type::sentry __cerb(__out); | |
28347 | if (__cerb) | |
28348 | { | |
28349 | const streamsize __w = __out.width(); | |
28350 | streamsize __len = static_cast<streamsize>(__str.size()); | |
28351 | const _CharT* __s = __str.data(); | |
28352 | ||
28353 | ||
28354 | ||
28355 | if (__w > __len) | |
28356 | { | |
28357 | _CharT* __cs = (static_cast< | |
28358 | _CharT*>(__builtin_alloca(sizeof(_CharT) * __w))); | |
28359 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s, | |
28360 | __w, __len, false); | |
28361 | __s = __cs; | |
28362 | __len = __w; | |
28363 | } | |
28364 | __out._M_write(__s, __len); | |
28365 | __out.width(0); | |
28366 | } | |
28367 | return __out; | |
28368 | } | |
28369 | ||
28370 | ||
28371 | ||
28372 | ||
28373 | ||
28374 | extern template class basic_ostream<char>; | |
28375 | extern template ostream& endl(ostream&); | |
28376 | extern template ostream& ends(ostream&); | |
28377 | extern template ostream& flush(ostream&); | |
28378 | extern template ostream& operator<<(ostream&, char); | |
28379 | extern template ostream& operator<<(ostream&, unsigned char); | |
28380 | extern template ostream& operator<<(ostream&, signed char); | |
28381 | extern template ostream& operator<<(ostream&, const char*); | |
28382 | extern template ostream& operator<<(ostream&, const unsigned char*); | |
28383 | extern template ostream& operator<<(ostream&, const signed char*); | |
28384 | ||
28385 | ||
28386 | extern template class basic_ostream<wchar_t>; | |
28387 | extern template wostream& endl(wostream&); | |
28388 | extern template wostream& ends(wostream&); | |
28389 | extern template wostream& flush(wostream&); | |
28390 | extern template wostream& operator<<(wostream&, wchar_t); | |
28391 | extern template wostream& operator<<(wostream&, char); | |
28392 | extern template wostream& operator<<(wostream&, const wchar_t*); | |
28393 | extern template wostream& operator<<(wostream&, const char*); | |
28394 | ||
28395 | ||
28396 | } | |
28397 | # 527 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/ostream" 2 3 | |
28398 | ||
28399 | ||
28400 | #pragma GCC visibility pop | |
28401 | # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iostream" 2 3 | |
28402 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 1 3 | |
28403 | # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28404 | ||
28405 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28406 | #pragma GCC visibility push(default) | |
28407 | ||
28408 | ||
28409 | ||
28410 | ||
28411 | namespace std | |
28412 | { | |
28413 | # 58 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28414 | template<typename _CharT, typename _Traits> | |
28415 | class basic_istream : virtual public basic_ios<_CharT, _Traits> | |
28416 | { | |
28417 | public: | |
28418 | ||
28419 | typedef _CharT char_type; | |
28420 | typedef typename _Traits::int_type int_type; | |
28421 | typedef typename _Traits::pos_type pos_type; | |
28422 | typedef typename _Traits::off_type off_type; | |
28423 | typedef _Traits traits_type; | |
28424 | ||
28425 | ||
28426 | typedef basic_streambuf<_CharT, _Traits> __streambuf_type; | |
28427 | typedef basic_ios<_CharT, _Traits> __ios_type; | |
28428 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
28429 | typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > | |
28430 | __num_get_type; | |
28431 | typedef ctype<_CharT> __ctype_type; | |
28432 | ||
28433 | template<typename _CharT2, typename _Traits2> | |
28434 | friend basic_istream<_CharT2, _Traits2>& | |
28435 | operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2&); | |
28436 | ||
28437 | template<typename _CharT2, typename _Traits2> | |
28438 | friend basic_istream<_CharT2, _Traits2>& | |
28439 | operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); | |
28440 | ||
28441 | protected: | |
28442 | ||
28443 | ||
28444 | ||
28445 | ||
28446 | ||
28447 | ||
28448 | ||
28449 | streamsize _M_gcount; | |
28450 | ||
28451 | public: | |
28452 | # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28453 | explicit | |
28454 | basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0)) | |
28455 | { this->init(__sb); } | |
28456 | ||
28457 | ||
28458 | ||
28459 | ||
28460 | ||
28461 | ||
28462 | virtual | |
28463 | ~basic_istream() | |
28464 | { _M_gcount = streamsize(0); } | |
28465 | ||
28466 | ||
28467 | class sentry; | |
28468 | friend class sentry; | |
28469 | # 131 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28470 | inline __istream_type& | |
28471 | operator>>(__istream_type& (*__pf)(__istream_type&)); | |
28472 | ||
28473 | inline __istream_type& | |
28474 | operator>>(__ios_type& (*__pf)(__ios_type&)); | |
28475 | ||
28476 | inline __istream_type& | |
28477 | operator>>(ios_base& (*__pf)(ios_base&)); | |
28478 | # 169 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28479 | __istream_type& | |
28480 | operator>>(bool& __n); | |
28481 | ||
28482 | __istream_type& | |
28483 | operator>>(short& __n); | |
28484 | ||
28485 | __istream_type& | |
28486 | operator>>(unsigned short& __n); | |
28487 | ||
28488 | __istream_type& | |
28489 | operator>>(int& __n); | |
28490 | ||
28491 | __istream_type& | |
28492 | operator>>(unsigned int& __n); | |
28493 | ||
28494 | __istream_type& | |
28495 | operator>>(long& __n); | |
28496 | ||
28497 | __istream_type& | |
28498 | operator>>(unsigned long& __n); | |
28499 | ||
28500 | ||
28501 | __istream_type& | |
28502 | operator>>(long long& __n); | |
28503 | ||
28504 | __istream_type& | |
28505 | operator>>(unsigned long long& __n); | |
28506 | ||
28507 | ||
28508 | __istream_type& | |
28509 | operator>>(float& __f); | |
28510 | ||
28511 | __istream_type& | |
28512 | operator>>(double& __f); | |
28513 | ||
28514 | __istream_type& | |
28515 | operator>>(long double& __f); | |
28516 | ||
28517 | __istream_type& | |
28518 | operator>>(void*& __p); | |
28519 | # 230 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28520 | __istream_type& | |
28521 | operator>>(__streambuf_type* __sb); | |
28522 | # 240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28523 | inline streamsize | |
28524 | gcount() const | |
28525 | { return _M_gcount; } | |
28526 | # 272 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28527 | int_type | |
28528 | get(); | |
28529 | # 286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28530 | __istream_type& | |
28531 | get(char_type& __c); | |
28532 | # 313 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28533 | __istream_type& | |
28534 | get(char_type* __s, streamsize __n, char_type __delim); | |
28535 | # 324 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28536 | inline __istream_type& | |
28537 | get(char_type* __s, streamsize __n) | |
28538 | { return this->get(__s, __n, this->widen('\n')); } | |
28539 | # 347 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28540 | __istream_type& | |
28541 | get(__streambuf_type& __sb, char_type __delim); | |
28542 | # 357 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28543 | inline __istream_type& | |
28544 | get(__streambuf_type& __sb) | |
28545 | { return this->get(__sb, this->widen('\n')); } | |
28546 | # 386 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28547 | __istream_type& | |
28548 | getline(char_type* __s, streamsize __n, char_type __delim); | |
28549 | # 397 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28550 | inline __istream_type& | |
28551 | getline(char_type* __s, streamsize __n) | |
28552 | { return this->getline(__s, __n, this->widen('\n')); } | |
28553 | # 421 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28554 | __istream_type& | |
28555 | ignore(); | |
28556 | ||
28557 | __istream_type& | |
28558 | ignore(streamsize __n); | |
28559 | ||
28560 | __istream_type& | |
28561 | ignore(streamsize __n, int_type __delim); | |
28562 | # 438 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28563 | int_type | |
28564 | peek(); | |
28565 | # 456 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28566 | __istream_type& | |
28567 | read(char_type* __s, streamsize __n); | |
28568 | # 475 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28569 | streamsize | |
28570 | readsome(char_type* __s, streamsize __n); | |
28571 | # 491 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28572 | __istream_type& | |
28573 | putback(char_type __c); | |
28574 | # 506 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28575 | __istream_type& | |
28576 | unget(); | |
28577 | # 524 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28578 | int | |
28579 | sync(); | |
28580 | # 538 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28581 | pos_type | |
28582 | tellg(); | |
28583 | # 553 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28584 | __istream_type& | |
28585 | seekg(pos_type); | |
28586 | # 569 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28587 | __istream_type& | |
28588 | seekg(off_type, ios_base::seekdir); | |
28589 | ||
28590 | ||
28591 | protected: | |
28592 | explicit | |
28593 | basic_istream(): _M_gcount(streamsize(0)) { } | |
28594 | }; | |
28595 | ||
28596 | ||
28597 | template<> | |
28598 | basic_istream<char>& | |
28599 | basic_istream<char>:: | |
28600 | getline(char_type* __s, streamsize __n, char_type __delim); | |
28601 | ||
28602 | template<> | |
28603 | basic_istream<char>& | |
28604 | basic_istream<char>:: | |
28605 | ignore(streamsize __n); | |
28606 | ||
28607 | template<> | |
28608 | basic_istream<char>& | |
28609 | basic_istream<char>:: | |
28610 | ignore(streamsize __n, int_type __delim); | |
28611 | ||
28612 | ||
28613 | template<> | |
28614 | basic_istream<wchar_t>& | |
28615 | basic_istream<wchar_t>:: | |
28616 | getline(char_type* __s, streamsize __n, char_type __delim); | |
28617 | ||
28618 | template<> | |
28619 | basic_istream<wchar_t>& | |
28620 | basic_istream<wchar_t>:: | |
28621 | ignore(streamsize __n); | |
28622 | ||
28623 | template<> | |
28624 | basic_istream<wchar_t>& | |
28625 | basic_istream<wchar_t>:: | |
28626 | ignore(streamsize __n, int_type __delim); | |
28627 | # 622 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28628 | template<typename _CharT, typename _Traits> | |
28629 | class basic_istream<_CharT, _Traits>::sentry | |
28630 | { | |
28631 | public: | |
28632 | ||
28633 | typedef _Traits traits_type; | |
28634 | typedef basic_streambuf<_CharT, _Traits> __streambuf_type; | |
28635 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
28636 | typedef typename __istream_type::__ctype_type __ctype_type; | |
28637 | typedef typename _Traits::int_type __int_type; | |
28638 | # 654 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28639 | explicit | |
28640 | sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); | |
28641 | # 664 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28642 | operator bool() const { return _M_ok; } | |
28643 | ||
28644 | private: | |
28645 | bool _M_ok; | |
28646 | }; | |
28647 | # 683 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28648 | template<typename _CharT, typename _Traits> | |
28649 | basic_istream<_CharT, _Traits>& | |
28650 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); | |
28651 | ||
28652 | template<class _Traits> | |
28653 | basic_istream<char, _Traits>& | |
28654 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | |
28655 | { return (__in >> reinterpret_cast<char&>(__c)); } | |
28656 | ||
28657 | template<class _Traits> | |
28658 | basic_istream<char, _Traits>& | |
28659 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | |
28660 | { return (__in >> reinterpret_cast<char&>(__c)); } | |
28661 | # 724 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28662 | template<typename _CharT, typename _Traits> | |
28663 | basic_istream<_CharT, _Traits>& | |
28664 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); | |
28665 | ||
28666 | ||
28667 | template<> | |
28668 | basic_istream<char>& | |
28669 | operator>>(basic_istream<char>& __in, char* __s); | |
28670 | ||
28671 | template<class _Traits> | |
28672 | basic_istream<char, _Traits>& | |
28673 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | |
28674 | { return (__in >> reinterpret_cast<char*>(__s)); } | |
28675 | ||
28676 | template<class _Traits> | |
28677 | basic_istream<char, _Traits>& | |
28678 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | |
28679 | { return (__in >> reinterpret_cast<char*>(__s)); } | |
28680 | # 751 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28681 | template<typename _CharT, typename _Traits> | |
28682 | class basic_iostream | |
28683 | : public basic_istream<_CharT, _Traits>, | |
28684 | public basic_ostream<_CharT, _Traits> | |
28685 | { | |
28686 | public: | |
28687 | ||
28688 | ||
28689 | ||
28690 | typedef _CharT char_type; | |
28691 | typedef typename _Traits::int_type int_type; | |
28692 | typedef typename _Traits::pos_type pos_type; | |
28693 | typedef typename _Traits::off_type off_type; | |
28694 | typedef _Traits traits_type; | |
28695 | ||
28696 | ||
28697 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
28698 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
28699 | ||
28700 | ||
28701 | ||
28702 | ||
28703 | ||
28704 | ||
28705 | ||
28706 | explicit | |
28707 | basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) | |
28708 | : __istream_type(), __ostream_type() | |
28709 | { this->init(__sb); } | |
28710 | ||
28711 | ||
28712 | ||
28713 | ||
28714 | virtual | |
28715 | ~basic_iostream() { } | |
28716 | ||
28717 | protected: | |
28718 | explicit | |
28719 | basic_iostream() : __istream_type(), __ostream_type() | |
28720 | { } | |
28721 | }; | |
28722 | # 814 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 3 | |
28723 | template<typename _CharT, typename _Traits> | |
28724 | basic_istream<_CharT, _Traits>& | |
28725 | ws(basic_istream<_CharT, _Traits>& __is); | |
28726 | } | |
28727 | ||
28728 | ||
28729 | # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/istream.tcc" 1 3 | |
28730 | # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/istream.tcc" 3 | |
28731 | ||
28732 | # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/istream.tcc" 3 | |
28733 | ||
28734 | ||
28735 | ||
28736 | ||
28737 | namespace std | |
28738 | { | |
28739 | template<typename _CharT, typename _Traits> | |
28740 | basic_istream<_CharT, _Traits>::sentry:: | |
28741 | sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) | |
28742 | { | |
28743 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28744 | if (__in.good()) | |
28745 | { | |
28746 | if (__in.tie()) | |
28747 | __in.tie()->flush(); | |
28748 | if (!__noskip && (__in.flags() & ios_base::skipws)) | |
28749 | { | |
28750 | const __int_type __eof = traits_type::eof(); | |
28751 | __streambuf_type* __sb = __in.rdbuf(); | |
28752 | __int_type __c = __sb->sgetc(); | |
28753 | ||
28754 | const __ctype_type& __ct = __check_facet(__in._M_ctype); | |
28755 | while (!traits_type::eq_int_type(__c, __eof) | |
28756 | && __ct.is(ctype_base::space, | |
28757 | traits_type::to_char_type(__c))) | |
28758 | __c = __sb->snextc(); | |
28759 | ||
28760 | ||
28761 | ||
28762 | ||
28763 | if (traits_type::eq_int_type(__c, __eof)) | |
28764 | __err |= ios_base::eofbit; | |
28765 | } | |
28766 | } | |
28767 | ||
28768 | if (__in.good() && __err == ios_base::goodbit) | |
28769 | _M_ok = true; | |
28770 | else | |
28771 | { | |
28772 | __err |= ios_base::failbit; | |
28773 | __in.setstate(__err); | |
28774 | } | |
28775 | } | |
28776 | ||
28777 | template<typename _CharT, typename _Traits> | |
28778 | basic_istream<_CharT, _Traits>& | |
28779 | basic_istream<_CharT, _Traits>:: | |
28780 | operator>>(__istream_type& (*__pf)(__istream_type&)) | |
28781 | { return __pf(*this); } | |
28782 | ||
28783 | template<typename _CharT, typename _Traits> | |
28784 | basic_istream<_CharT, _Traits>& | |
28785 | basic_istream<_CharT, _Traits>:: | |
28786 | operator>>(__ios_type& (*__pf)(__ios_type&)) | |
28787 | { | |
28788 | __pf(*this); | |
28789 | return *this; | |
28790 | } | |
28791 | ||
28792 | template<typename _CharT, typename _Traits> | |
28793 | basic_istream<_CharT, _Traits>& | |
28794 | basic_istream<_CharT, _Traits>:: | |
28795 | operator>>(ios_base& (*__pf)(ios_base&)) | |
28796 | { | |
28797 | __pf(*this); | |
28798 | return *this; | |
28799 | } | |
28800 | ||
28801 | template<typename _CharT, typename _Traits> | |
28802 | basic_istream<_CharT, _Traits>& | |
28803 | basic_istream<_CharT, _Traits>:: | |
28804 | operator>>(bool& __n) | |
28805 | { | |
28806 | sentry __cerb(*this, false); | |
28807 | if (__cerb) | |
28808 | { | |
28809 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28810 | try | |
28811 | { | |
28812 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28813 | __ng.get(*this, 0, *this, __err, __n); | |
28814 | } | |
28815 | catch(...) | |
28816 | { this->_M_setstate(ios_base::badbit); } | |
28817 | if (__err) | |
28818 | this->setstate(__err); | |
28819 | } | |
28820 | return *this; | |
28821 | } | |
28822 | ||
28823 | template<typename _CharT, typename _Traits> | |
28824 | basic_istream<_CharT, _Traits>& | |
28825 | basic_istream<_CharT, _Traits>:: | |
28826 | operator>>(short& __n) | |
28827 | { | |
28828 | sentry __cerb(*this, false); | |
28829 | if (__cerb) | |
28830 | { | |
28831 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28832 | try | |
28833 | { | |
28834 | long __l; | |
28835 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28836 | __ng.get(*this, 0, *this, __err, __l); | |
28837 | ||
28838 | ||
28839 | if (!(__err & ios_base::failbit) | |
28840 | && (numeric_limits<short>::min() <= __l | |
28841 | && __l <= numeric_limits<short>::max())) | |
28842 | __n = __l; | |
28843 | else | |
28844 | __err |= ios_base::failbit; | |
28845 | } | |
28846 | catch(...) | |
28847 | { this->_M_setstate(ios_base::badbit); } | |
28848 | if (__err) | |
28849 | this->setstate(__err); | |
28850 | } | |
28851 | return *this; | |
28852 | } | |
28853 | ||
28854 | template<typename _CharT, typename _Traits> | |
28855 | basic_istream<_CharT, _Traits>& | |
28856 | basic_istream<_CharT, _Traits>:: | |
28857 | operator>>(unsigned short& __n) | |
28858 | { | |
28859 | sentry __cerb(*this, false); | |
28860 | if (__cerb) | |
28861 | { | |
28862 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28863 | try | |
28864 | { | |
28865 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28866 | __ng.get(*this, 0, *this, __err, __n); | |
28867 | } | |
28868 | catch(...) | |
28869 | { this->_M_setstate(ios_base::badbit); } | |
28870 | if (__err) | |
28871 | this->setstate(__err); | |
28872 | } | |
28873 | return *this; | |
28874 | } | |
28875 | ||
28876 | template<typename _CharT, typename _Traits> | |
28877 | basic_istream<_CharT, _Traits>& | |
28878 | basic_istream<_CharT, _Traits>:: | |
28879 | operator>>(int& __n) | |
28880 | { | |
28881 | sentry __cerb(*this, false); | |
28882 | if (__cerb) | |
28883 | { | |
28884 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28885 | try | |
28886 | { | |
28887 | long __l; | |
28888 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28889 | __ng.get(*this, 0, *this, __err, __l); | |
28890 | ||
28891 | ||
28892 | if (!(__err & ios_base::failbit) | |
28893 | && (numeric_limits<int>::min() <= __l | |
28894 | && __l <= numeric_limits<int>::max())) | |
28895 | __n = __l; | |
28896 | else | |
28897 | __err |= ios_base::failbit; | |
28898 | } | |
28899 | catch(...) | |
28900 | { this->_M_setstate(ios_base::badbit); } | |
28901 | if (__err) | |
28902 | this->setstate(__err); | |
28903 | } | |
28904 | return *this; | |
28905 | } | |
28906 | ||
28907 | template<typename _CharT, typename _Traits> | |
28908 | basic_istream<_CharT, _Traits>& | |
28909 | basic_istream<_CharT, _Traits>:: | |
28910 | operator>>(unsigned int& __n) | |
28911 | { | |
28912 | sentry __cerb(*this, false); | |
28913 | if (__cerb) | |
28914 | { | |
28915 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28916 | try | |
28917 | { | |
28918 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28919 | __ng.get(*this, 0, *this, __err, __n); | |
28920 | } | |
28921 | catch(...) | |
28922 | { this->_M_setstate(ios_base::badbit); } | |
28923 | if (__err) | |
28924 | this->setstate(__err); | |
28925 | } | |
28926 | return *this; | |
28927 | } | |
28928 | ||
28929 | template<typename _CharT, typename _Traits> | |
28930 | basic_istream<_CharT, _Traits>& | |
28931 | basic_istream<_CharT, _Traits>:: | |
28932 | operator>>(long& __n) | |
28933 | { | |
28934 | sentry __cerb(*this, false); | |
28935 | if (__cerb) | |
28936 | { | |
28937 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28938 | try | |
28939 | { | |
28940 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28941 | __ng.get(*this, 0, *this, __err, __n); | |
28942 | } | |
28943 | catch(...) | |
28944 | { this->_M_setstate(ios_base::badbit); } | |
28945 | if (__err) | |
28946 | this->setstate(__err); | |
28947 | } | |
28948 | return *this; | |
28949 | } | |
28950 | ||
28951 | template<typename _CharT, typename _Traits> | |
28952 | basic_istream<_CharT, _Traits>& | |
28953 | basic_istream<_CharT, _Traits>:: | |
28954 | operator>>(unsigned long& __n) | |
28955 | { | |
28956 | sentry __cerb(*this, false); | |
28957 | if (__cerb) | |
28958 | { | |
28959 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28960 | try | |
28961 | { | |
28962 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28963 | __ng.get(*this, 0, *this, __err, __n); | |
28964 | } | |
28965 | catch(...) | |
28966 | { this->_M_setstate(ios_base::badbit); } | |
28967 | if (__err) | |
28968 | this->setstate(__err); | |
28969 | } | |
28970 | return *this; | |
28971 | } | |
28972 | ||
28973 | ||
28974 | template<typename _CharT, typename _Traits> | |
28975 | basic_istream<_CharT, _Traits>& | |
28976 | basic_istream<_CharT, _Traits>:: | |
28977 | operator>>(long long& __n) | |
28978 | { | |
28979 | sentry __cerb(*this, false); | |
28980 | if (__cerb) | |
28981 | { | |
28982 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
28983 | try | |
28984 | { | |
28985 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
28986 | __ng.get(*this, 0, *this, __err, __n); | |
28987 | } | |
28988 | catch(...) | |
28989 | { this->_M_setstate(ios_base::badbit); } | |
28990 | if (__err) | |
28991 | this->setstate(__err); | |
28992 | } | |
28993 | return *this; | |
28994 | } | |
28995 | ||
28996 | template<typename _CharT, typename _Traits> | |
28997 | basic_istream<_CharT, _Traits>& | |
28998 | basic_istream<_CharT, _Traits>:: | |
28999 | operator>>(unsigned long long& __n) | |
29000 | { | |
29001 | sentry __cerb(*this, false); | |
29002 | if (__cerb) | |
29003 | { | |
29004 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29005 | try | |
29006 | { | |
29007 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
29008 | __ng.get(*this, 0, *this, __err, __n); | |
29009 | } | |
29010 | catch(...) | |
29011 | { this->_M_setstate(ios_base::badbit); } | |
29012 | if (__err) | |
29013 | this->setstate(__err); | |
29014 | } | |
29015 | return *this; | |
29016 | } | |
29017 | ||
29018 | ||
29019 | template<typename _CharT, typename _Traits> | |
29020 | basic_istream<_CharT, _Traits>& | |
29021 | basic_istream<_CharT, _Traits>:: | |
29022 | operator>>(float& __n) | |
29023 | { | |
29024 | sentry __cerb(*this, false); | |
29025 | if (__cerb) | |
29026 | { | |
29027 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29028 | try | |
29029 | { | |
29030 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
29031 | __ng.get(*this, 0, *this, __err, __n); | |
29032 | } | |
29033 | catch(...) | |
29034 | { this->_M_setstate(ios_base::badbit); } | |
29035 | if (__err) | |
29036 | this->setstate(__err); | |
29037 | } | |
29038 | return *this; | |
29039 | } | |
29040 | ||
29041 | template<typename _CharT, typename _Traits> | |
29042 | basic_istream<_CharT, _Traits>& | |
29043 | basic_istream<_CharT, _Traits>:: | |
29044 | operator>>(double& __n) | |
29045 | { | |
29046 | sentry __cerb(*this, false); | |
29047 | if (__cerb) | |
29048 | { | |
29049 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29050 | try | |
29051 | { | |
29052 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
29053 | __ng.get(*this, 0, *this, __err, __n); | |
29054 | } | |
29055 | catch(...) | |
29056 | { this->_M_setstate(ios_base::badbit); } | |
29057 | if (__err) | |
29058 | this->setstate(__err); | |
29059 | } | |
29060 | return *this; | |
29061 | } | |
29062 | ||
29063 | template<typename _CharT, typename _Traits> | |
29064 | basic_istream<_CharT, _Traits>& | |
29065 | basic_istream<_CharT, _Traits>:: | |
29066 | operator>>(long double& __n) | |
29067 | { | |
29068 | sentry __cerb(*this, false); | |
29069 | if (__cerb) | |
29070 | { | |
29071 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29072 | try | |
29073 | { | |
29074 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
29075 | __ng.get(*this, 0, *this, __err, __n); | |
29076 | } | |
29077 | catch(...) | |
29078 | { this->_M_setstate(ios_base::badbit); } | |
29079 | if (__err) | |
29080 | this->setstate(__err); | |
29081 | } | |
29082 | return *this; | |
29083 | } | |
29084 | ||
29085 | template<typename _CharT, typename _Traits> | |
29086 | basic_istream<_CharT, _Traits>& | |
29087 | basic_istream<_CharT, _Traits>:: | |
29088 | operator>>(void*& __n) | |
29089 | { | |
29090 | sentry __cerb(*this, false); | |
29091 | if (__cerb) | |
29092 | { | |
29093 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29094 | try | |
29095 | { | |
29096 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
29097 | __ng.get(*this, 0, *this, __err, __n); | |
29098 | } | |
29099 | catch(...) | |
29100 | { this->_M_setstate(ios_base::badbit); } | |
29101 | if (__err) | |
29102 | this->setstate(__err); | |
29103 | } | |
29104 | return *this; | |
29105 | } | |
29106 | ||
29107 | template<typename _CharT, typename _Traits> | |
29108 | basic_istream<_CharT, _Traits>& | |
29109 | basic_istream<_CharT, _Traits>:: | |
29110 | operator>>(__streambuf_type* __sbout) | |
29111 | { | |
29112 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29113 | sentry __cerb(*this, false); | |
29114 | if (__cerb && __sbout) | |
29115 | { | |
29116 | try | |
29117 | { | |
29118 | if (!__copy_streambufs(this->rdbuf(), __sbout)) | |
29119 | __err |= ios_base::failbit; | |
29120 | } | |
29121 | catch(...) | |
29122 | { this->_M_setstate(ios_base::failbit); } | |
29123 | } | |
29124 | else if (!__sbout) | |
29125 | __err |= ios_base::failbit; | |
29126 | if (__err) | |
29127 | this->setstate(__err); | |
29128 | return *this; | |
29129 | } | |
29130 | ||
29131 | template<typename _CharT, typename _Traits> | |
29132 | typename basic_istream<_CharT, _Traits>::int_type | |
29133 | basic_istream<_CharT, _Traits>:: | |
29134 | get(void) | |
29135 | { | |
29136 | const int_type __eof = traits_type::eof(); | |
29137 | int_type __c = __eof; | |
29138 | _M_gcount = 0; | |
29139 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29140 | sentry __cerb(*this, true); | |
29141 | if (__cerb) | |
29142 | { | |
29143 | try | |
29144 | { | |
29145 | __c = this->rdbuf()->sbumpc(); | |
29146 | ||
29147 | if (!traits_type::eq_int_type(__c, __eof)) | |
29148 | _M_gcount = 1; | |
29149 | else | |
29150 | __err |= ios_base::eofbit; | |
29151 | } | |
29152 | catch(...) | |
29153 | { this->_M_setstate(ios_base::badbit); } | |
29154 | } | |
29155 | if (!_M_gcount) | |
29156 | __err |= ios_base::failbit; | |
29157 | if (__err) | |
29158 | this->setstate(__err); | |
29159 | return __c; | |
29160 | } | |
29161 | ||
29162 | template<typename _CharT, typename _Traits> | |
29163 | basic_istream<_CharT, _Traits>& | |
29164 | basic_istream<_CharT, _Traits>:: | |
29165 | get(char_type& __c) | |
29166 | { | |
29167 | _M_gcount = 0; | |
29168 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29169 | sentry __cerb(*this, true); | |
29170 | if (__cerb) | |
29171 | { | |
29172 | try | |
29173 | { | |
29174 | const int_type __cb = this->rdbuf()->sbumpc(); | |
29175 | ||
29176 | if (!traits_type::eq_int_type(__cb, traits_type::eof())) | |
29177 | { | |
29178 | _M_gcount = 1; | |
29179 | __c = traits_type::to_char_type(__cb); | |
29180 | } | |
29181 | else | |
29182 | __err |= ios_base::eofbit; | |
29183 | } | |
29184 | catch(...) | |
29185 | { this->_M_setstate(ios_base::badbit); } | |
29186 | } | |
29187 | if (!_M_gcount) | |
29188 | __err |= ios_base::failbit; | |
29189 | if (__err) | |
29190 | this->setstate(__err); | |
29191 | return *this; | |
29192 | } | |
29193 | ||
29194 | template<typename _CharT, typename _Traits> | |
29195 | basic_istream<_CharT, _Traits>& | |
29196 | basic_istream<_CharT, _Traits>:: | |
29197 | get(char_type* __s, streamsize __n, char_type __delim) | |
29198 | { | |
29199 | _M_gcount = 0; | |
29200 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29201 | sentry __cerb(*this, true); | |
29202 | if (__cerb) | |
29203 | { | |
29204 | try | |
29205 | { | |
29206 | const int_type __idelim = traits_type::to_int_type(__delim); | |
29207 | const int_type __eof = traits_type::eof(); | |
29208 | __streambuf_type* __sb = this->rdbuf(); | |
29209 | int_type __c = __sb->sgetc(); | |
29210 | ||
29211 | while (_M_gcount + 1 < __n | |
29212 | && !traits_type::eq_int_type(__c, __eof) | |
29213 | && !traits_type::eq_int_type(__c, __idelim)) | |
29214 | { | |
29215 | *__s++ = traits_type::to_char_type(__c); | |
29216 | ++_M_gcount; | |
29217 | __c = __sb->snextc(); | |
29218 | } | |
29219 | if (traits_type::eq_int_type(__c, __eof)) | |
29220 | __err |= ios_base::eofbit; | |
29221 | } | |
29222 | catch(...) | |
29223 | { this->_M_setstate(ios_base::badbit); } | |
29224 | } | |
29225 | ||
29226 | ||
29227 | if (__n > 0) | |
29228 | *__s = char_type(); | |
29229 | if (!_M_gcount) | |
29230 | __err |= ios_base::failbit; | |
29231 | if (__err) | |
29232 | this->setstate(__err); | |
29233 | return *this; | |
29234 | } | |
29235 | ||
29236 | template<typename _CharT, typename _Traits> | |
29237 | basic_istream<_CharT, _Traits>& | |
29238 | basic_istream<_CharT, _Traits>:: | |
29239 | get(__streambuf_type& __sb, char_type __delim) | |
29240 | { | |
29241 | _M_gcount = 0; | |
29242 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29243 | sentry __cerb(*this, true); | |
29244 | if (__cerb) | |
29245 | { | |
29246 | try | |
29247 | { | |
29248 | const int_type __idelim = traits_type::to_int_type(__delim); | |
29249 | const int_type __eof = traits_type::eof(); | |
29250 | __streambuf_type* __this_sb = this->rdbuf(); | |
29251 | int_type __c = __this_sb->sgetc(); | |
29252 | char_type __c2 = traits_type::to_char_type(__c); | |
29253 | ||
29254 | while (!traits_type::eq_int_type(__c, __eof) | |
29255 | && !traits_type::eq_int_type(__c, __idelim) | |
29256 | && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) | |
29257 | { | |
29258 | ++_M_gcount; | |
29259 | __c = __this_sb->snextc(); | |
29260 | __c2 = traits_type::to_char_type(__c); | |
29261 | } | |
29262 | if (traits_type::eq_int_type(__c, __eof)) | |
29263 | __err |= ios_base::eofbit; | |
29264 | } | |
29265 | catch(...) | |
29266 | { this->_M_setstate(ios_base::badbit); } | |
29267 | } | |
29268 | if (!_M_gcount) | |
29269 | __err |= ios_base::failbit; | |
29270 | if (__err) | |
29271 | this->setstate(__err); | |
29272 | return *this; | |
29273 | } | |
29274 | ||
29275 | template<typename _CharT, typename _Traits> | |
29276 | basic_istream<_CharT, _Traits>& | |
29277 | basic_istream<_CharT, _Traits>:: | |
29278 | getline(char_type* __s, streamsize __n, char_type __delim) | |
29279 | { | |
29280 | _M_gcount = 0; | |
29281 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29282 | sentry __cerb(*this, true); | |
29283 | if (__cerb) | |
29284 | { | |
29285 | try | |
29286 | { | |
29287 | const int_type __idelim = traits_type::to_int_type(__delim); | |
29288 | const int_type __eof = traits_type::eof(); | |
29289 | __streambuf_type* __sb = this->rdbuf(); | |
29290 | int_type __c = __sb->sgetc(); | |
29291 | ||
29292 | while (_M_gcount + 1 < __n | |
29293 | && !traits_type::eq_int_type(__c, __eof) | |
29294 | && !traits_type::eq_int_type(__c, __idelim)) | |
29295 | { | |
29296 | *__s++ = traits_type::to_char_type(__c); | |
29297 | __c = __sb->snextc(); | |
29298 | ++_M_gcount; | |
29299 | } | |
29300 | if (traits_type::eq_int_type(__c, __eof)) | |
29301 | __err |= ios_base::eofbit; | |
29302 | else | |
29303 | { | |
29304 | if (traits_type::eq_int_type(__c, __idelim)) | |
29305 | { | |
29306 | __sb->sbumpc(); | |
29307 | ++_M_gcount; | |
29308 | } | |
29309 | else | |
29310 | __err |= ios_base::failbit; | |
29311 | } | |
29312 | } | |
29313 | catch(...) | |
29314 | { this->_M_setstate(ios_base::badbit); } | |
29315 | } | |
29316 | ||
29317 | ||
29318 | if (__n > 0) | |
29319 | *__s = char_type(); | |
29320 | if (!_M_gcount) | |
29321 | __err |= ios_base::failbit; | |
29322 | if (__err) | |
29323 | this->setstate(__err); | |
29324 | return *this; | |
29325 | } | |
29326 | ||
29327 | ||
29328 | ||
29329 | ||
29330 | template<typename _CharT, typename _Traits> | |
29331 | basic_istream<_CharT, _Traits>& | |
29332 | basic_istream<_CharT, _Traits>:: | |
29333 | ignore(void) | |
29334 | { | |
29335 | _M_gcount = 0; | |
29336 | sentry __cerb(*this, true); | |
29337 | if (__cerb) | |
29338 | { | |
29339 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29340 | try | |
29341 | { | |
29342 | const int_type __eof = traits_type::eof(); | |
29343 | __streambuf_type* __sb = this->rdbuf(); | |
29344 | ||
29345 | if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) | |
29346 | __err |= ios_base::eofbit; | |
29347 | else | |
29348 | _M_gcount = 1; | |
29349 | } | |
29350 | catch(...) | |
29351 | { this->_M_setstate(ios_base::badbit); } | |
29352 | if (__err) | |
29353 | this->setstate(__err); | |
29354 | } | |
29355 | return *this; | |
29356 | } | |
29357 | ||
29358 | template<typename _CharT, typename _Traits> | |
29359 | basic_istream<_CharT, _Traits>& | |
29360 | basic_istream<_CharT, _Traits>:: | |
29361 | ignore(streamsize __n) | |
29362 | { | |
29363 | _M_gcount = 0; | |
29364 | sentry __cerb(*this, true); | |
29365 | if (__cerb && __n > 0) | |
29366 | { | |
29367 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29368 | try | |
29369 | { | |
29370 | const int_type __eof = traits_type::eof(); | |
29371 | __streambuf_type* __sb = this->rdbuf(); | |
29372 | int_type __c = __sb->sgetc(); | |
29373 | # 692 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/bits/istream.tcc" 3 | |
29374 | bool __large_ignore = false; | |
29375 | while (true) | |
29376 | { | |
29377 | while (_M_gcount < __n | |
29378 | && !traits_type::eq_int_type(__c, __eof)) | |
29379 | { | |
29380 | ++_M_gcount; | |
29381 | __c = __sb->snextc(); | |
29382 | } | |
29383 | if (__n == numeric_limits<streamsize>::max() | |
29384 | && !traits_type::eq_int_type(__c, __eof)) | |
29385 | { | |
29386 | _M_gcount = numeric_limits<streamsize>::min(); | |
29387 | __large_ignore = true; | |
29388 | } | |
29389 | else | |
29390 | break; | |
29391 | } | |
29392 | ||
29393 | if (__large_ignore) | |
29394 | _M_gcount = numeric_limits<streamsize>::max(); | |
29395 | ||
29396 | if (traits_type::eq_int_type(__c, __eof)) | |
29397 | __err |= ios_base::eofbit; | |
29398 | } | |
29399 | catch(...) | |
29400 | { this->_M_setstate(ios_base::badbit); } | |
29401 | if (__err) | |
29402 | this->setstate(__err); | |
29403 | } | |
29404 | return *this; | |
29405 | } | |
29406 | ||
29407 | template<typename _CharT, typename _Traits> | |
29408 | basic_istream<_CharT, _Traits>& | |
29409 | basic_istream<_CharT, _Traits>:: | |
29410 | ignore(streamsize __n, int_type __delim) | |
29411 | { | |
29412 | _M_gcount = 0; | |
29413 | sentry __cerb(*this, true); | |
29414 | if (__cerb && __n > 0) | |
29415 | { | |
29416 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29417 | try | |
29418 | { | |
29419 | const int_type __eof = traits_type::eof(); | |
29420 | __streambuf_type* __sb = this->rdbuf(); | |
29421 | int_type __c = __sb->sgetc(); | |
29422 | ||
29423 | ||
29424 | bool __large_ignore = false; | |
29425 | while (true) | |
29426 | { | |
29427 | while (_M_gcount < __n | |
29428 | && !traits_type::eq_int_type(__c, __eof) | |
29429 | && !traits_type::eq_int_type(__c, __delim)) | |
29430 | { | |
29431 | ++_M_gcount; | |
29432 | __c = __sb->snextc(); | |
29433 | } | |
29434 | if (__n == numeric_limits<streamsize>::max() | |
29435 | && !traits_type::eq_int_type(__c, __eof) | |
29436 | && !traits_type::eq_int_type(__c, __delim)) | |
29437 | { | |
29438 | _M_gcount = numeric_limits<streamsize>::min(); | |
29439 | __large_ignore = true; | |
29440 | } | |
29441 | else | |
29442 | break; | |
29443 | } | |
29444 | ||
29445 | if (__large_ignore) | |
29446 | _M_gcount = numeric_limits<streamsize>::max(); | |
29447 | ||
29448 | if (traits_type::eq_int_type(__c, __eof)) | |
29449 | __err |= ios_base::eofbit; | |
29450 | else if (traits_type::eq_int_type(__c, __delim)) | |
29451 | { | |
29452 | if (_M_gcount < numeric_limits<streamsize>::max()) | |
29453 | ++_M_gcount; | |
29454 | __sb->sbumpc(); | |
29455 | } | |
29456 | } | |
29457 | catch(...) | |
29458 | { this->_M_setstate(ios_base::badbit); } | |
29459 | if (__err) | |
29460 | this->setstate(__err); | |
29461 | } | |
29462 | return *this; | |
29463 | } | |
29464 | ||
29465 | template<typename _CharT, typename _Traits> | |
29466 | typename basic_istream<_CharT, _Traits>::int_type | |
29467 | basic_istream<_CharT, _Traits>:: | |
29468 | peek(void) | |
29469 | { | |
29470 | int_type __c = traits_type::eof(); | |
29471 | _M_gcount = 0; | |
29472 | sentry __cerb(*this, true); | |
29473 | if (__cerb) | |
29474 | { | |
29475 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29476 | try | |
29477 | { | |
29478 | __c = this->rdbuf()->sgetc(); | |
29479 | if (traits_type::eq_int_type(__c, traits_type::eof())) | |
29480 | __err |= ios_base::eofbit; | |
29481 | } | |
29482 | catch(...) | |
29483 | { this->_M_setstate(ios_base::badbit); } | |
29484 | if (__err) | |
29485 | this->setstate(__err); | |
29486 | } | |
29487 | return __c; | |
29488 | } | |
29489 | ||
29490 | template<typename _CharT, typename _Traits> | |
29491 | basic_istream<_CharT, _Traits>& | |
29492 | basic_istream<_CharT, _Traits>:: | |
29493 | read(char_type* __s, streamsize __n) | |
29494 | { | |
29495 | _M_gcount = 0; | |
29496 | sentry __cerb(*this, true); | |
29497 | if (__cerb) | |
29498 | { | |
29499 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29500 | try | |
29501 | { | |
29502 | _M_gcount = this->rdbuf()->sgetn(__s, __n); | |
29503 | if (_M_gcount != __n) | |
29504 | __err |= (ios_base::eofbit | ios_base::failbit); | |
29505 | } | |
29506 | catch(...) | |
29507 | { this->_M_setstate(ios_base::badbit); } | |
29508 | if (__err) | |
29509 | this->setstate(__err); | |
29510 | } | |
29511 | return *this; | |
29512 | } | |
29513 | ||
29514 | template<typename _CharT, typename _Traits> | |
29515 | streamsize | |
29516 | basic_istream<_CharT, _Traits>:: | |
29517 | readsome(char_type* __s, streamsize __n) | |
29518 | { | |
29519 | _M_gcount = 0; | |
29520 | sentry __cerb(*this, true); | |
29521 | if (__cerb) | |
29522 | { | |
29523 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29524 | try | |
29525 | { | |
29526 | ||
29527 | const streamsize __num = this->rdbuf()->in_avail(); | |
29528 | if (__num > 0) | |
29529 | _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); | |
29530 | else if (__num == -1) | |
29531 | __err |= ios_base::eofbit; | |
29532 | } | |
29533 | catch(...) | |
29534 | { this->_M_setstate(ios_base::badbit); } | |
29535 | if (__err) | |
29536 | this->setstate(__err); | |
29537 | } | |
29538 | return _M_gcount; | |
29539 | } | |
29540 | ||
29541 | template<typename _CharT, typename _Traits> | |
29542 | basic_istream<_CharT, _Traits>& | |
29543 | basic_istream<_CharT, _Traits>:: | |
29544 | putback(char_type __c) | |
29545 | { | |
29546 | ||
29547 | ||
29548 | _M_gcount = 0; | |
29549 | sentry __cerb(*this, true); | |
29550 | if (__cerb) | |
29551 | { | |
29552 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29553 | try | |
29554 | { | |
29555 | const int_type __eof = traits_type::eof(); | |
29556 | __streambuf_type* __sb = this->rdbuf(); | |
29557 | if (!__sb | |
29558 | || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) | |
29559 | __err |= ios_base::badbit; | |
29560 | } | |
29561 | catch(...) | |
29562 | { this->_M_setstate(ios_base::badbit); } | |
29563 | if (__err) | |
29564 | this->setstate(__err); | |
29565 | } | |
29566 | return *this; | |
29567 | } | |
29568 | ||
29569 | template<typename _CharT, typename _Traits> | |
29570 | basic_istream<_CharT, _Traits>& | |
29571 | basic_istream<_CharT, _Traits>:: | |
29572 | unget(void) | |
29573 | { | |
29574 | ||
29575 | ||
29576 | _M_gcount = 0; | |
29577 | sentry __cerb(*this, true); | |
29578 | if (__cerb) | |
29579 | { | |
29580 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29581 | try | |
29582 | { | |
29583 | const int_type __eof = traits_type::eof(); | |
29584 | __streambuf_type* __sb = this->rdbuf(); | |
29585 | if (!__sb | |
29586 | || traits_type::eq_int_type(__sb->sungetc(), __eof)) | |
29587 | __err |= ios_base::badbit; | |
29588 | } | |
29589 | catch(...) | |
29590 | { this->_M_setstate(ios_base::badbit); } | |
29591 | if (__err) | |
29592 | this->setstate(__err); | |
29593 | } | |
29594 | return *this; | |
29595 | } | |
29596 | ||
29597 | template<typename _CharT, typename _Traits> | |
29598 | int | |
29599 | basic_istream<_CharT, _Traits>:: | |
29600 | sync(void) | |
29601 | { | |
29602 | ||
29603 | ||
29604 | int __ret = -1; | |
29605 | sentry __cerb(*this, true); | |
29606 | if (__cerb) | |
29607 | { | |
29608 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29609 | try | |
29610 | { | |
29611 | __streambuf_type* __sb = this->rdbuf(); | |
29612 | if (__sb) | |
29613 | { | |
29614 | if (__sb->pubsync() == -1) | |
29615 | __err |= ios_base::badbit; | |
29616 | else | |
29617 | __ret = 0; | |
29618 | } | |
29619 | } | |
29620 | catch(...) | |
29621 | { this->_M_setstate(ios_base::badbit); } | |
29622 | if (__err) | |
29623 | this->setstate(__err); | |
29624 | } | |
29625 | return __ret; | |
29626 | } | |
29627 | ||
29628 | template<typename _CharT, typename _Traits> | |
29629 | typename basic_istream<_CharT, _Traits>::pos_type | |
29630 | basic_istream<_CharT, _Traits>:: | |
29631 | tellg(void) | |
29632 | { | |
29633 | ||
29634 | ||
29635 | pos_type __ret = pos_type(-1); | |
29636 | try | |
29637 | { | |
29638 | if (!this->fail()) | |
29639 | __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); | |
29640 | } | |
29641 | catch(...) | |
29642 | { this->_M_setstate(ios_base::badbit); } | |
29643 | return __ret; | |
29644 | } | |
29645 | ||
29646 | template<typename _CharT, typename _Traits> | |
29647 | basic_istream<_CharT, _Traits>& | |
29648 | basic_istream<_CharT, _Traits>:: | |
29649 | seekg(pos_type __pos) | |
29650 | { | |
29651 | ||
29652 | ||
29653 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29654 | try | |
29655 | { | |
29656 | if (!this->fail()) | |
29657 | { | |
29658 | ||
29659 | const pos_type __p = this->rdbuf()->pubseekpos(__pos, | |
29660 | ios_base::in); | |
29661 | ||
29662 | ||
29663 | if (__p == pos_type(off_type(-1))) | |
29664 | __err |= ios_base::failbit; | |
29665 | } | |
29666 | } | |
29667 | catch(...) | |
29668 | { this->_M_setstate(ios_base::badbit); } | |
29669 | if (__err) | |
29670 | this->setstate(__err); | |
29671 | return *this; | |
29672 | } | |
29673 | ||
29674 | template<typename _CharT, typename _Traits> | |
29675 | basic_istream<_CharT, _Traits>& | |
29676 | basic_istream<_CharT, _Traits>:: | |
29677 | seekg(off_type __off, ios_base::seekdir __dir) | |
29678 | { | |
29679 | ||
29680 | ||
29681 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29682 | try | |
29683 | { | |
29684 | if (!this->fail()) | |
29685 | { | |
29686 | ||
29687 | const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, | |
29688 | ios_base::in); | |
29689 | ||
29690 | ||
29691 | if (__p == pos_type(off_type(-1))) | |
29692 | __err |= ios_base::failbit; | |
29693 | } | |
29694 | } | |
29695 | catch(...) | |
29696 | { this->_M_setstate(ios_base::badbit); } | |
29697 | if (__err) | |
29698 | this->setstate(__err); | |
29699 | return *this; | |
29700 | } | |
29701 | ||
29702 | ||
29703 | template<typename _CharT, typename _Traits> | |
29704 | basic_istream<_CharT, _Traits>& | |
29705 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | |
29706 | { | |
29707 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
29708 | typedef typename __istream_type::int_type __int_type; | |
29709 | ||
29710 | typename __istream_type::sentry __cerb(__in, false); | |
29711 | if (__cerb) | |
29712 | { | |
29713 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29714 | try | |
29715 | { | |
29716 | const __int_type __cb = __in.rdbuf()->sbumpc(); | |
29717 | if (!_Traits::eq_int_type(__cb, _Traits::eof())) | |
29718 | __c = _Traits::to_char_type(__cb); | |
29719 | else | |
29720 | __err |= (ios_base::eofbit | ios_base::failbit); | |
29721 | } | |
29722 | catch(...) | |
29723 | { __in._M_setstate(ios_base::badbit); } | |
29724 | if (__err) | |
29725 | __in.setstate(__err); | |
29726 | } | |
29727 | return __in; | |
29728 | } | |
29729 | ||
29730 | template<typename _CharT, typename _Traits> | |
29731 | basic_istream<_CharT, _Traits>& | |
29732 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | |
29733 | { | |
29734 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
29735 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
29736 | typedef typename _Traits::int_type int_type; | |
29737 | typedef _CharT char_type; | |
29738 | typedef ctype<_CharT> __ctype_type; | |
29739 | ||
29740 | streamsize __extracted = 0; | |
29741 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29742 | typename __istream_type::sentry __cerb(__in, false); | |
29743 | if (__cerb) | |
29744 | { | |
29745 | try | |
29746 | { | |
29747 | ||
29748 | streamsize __num = __in.width(); | |
29749 | if (__num <= 0) | |
29750 | __num = numeric_limits<streamsize>::max(); | |
29751 | ||
29752 | const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); | |
29753 | ||
29754 | const int_type __eof = _Traits::eof(); | |
29755 | __streambuf_type* __sb = __in.rdbuf(); | |
29756 | int_type __c = __sb->sgetc(); | |
29757 | ||
29758 | while (__extracted < __num - 1 | |
29759 | && !_Traits::eq_int_type(__c, __eof) | |
29760 | && !__ct.is(ctype_base::space, | |
29761 | _Traits::to_char_type(__c))) | |
29762 | { | |
29763 | *__s++ = _Traits::to_char_type(__c); | |
29764 | ++__extracted; | |
29765 | __c = __sb->snextc(); | |
29766 | } | |
29767 | if (_Traits::eq_int_type(__c, __eof)) | |
29768 | __err |= ios_base::eofbit; | |
29769 | ||
29770 | ||
29771 | ||
29772 | *__s = char_type(); | |
29773 | __in.width(0); | |
29774 | } | |
29775 | catch(...) | |
29776 | { __in._M_setstate(ios_base::badbit); } | |
29777 | } | |
29778 | if (!__extracted) | |
29779 | __err |= ios_base::failbit; | |
29780 | if (__err) | |
29781 | __in.setstate(__err); | |
29782 | return __in; | |
29783 | } | |
29784 | ||
29785 | ||
29786 | template<typename _CharT, typename _Traits> | |
29787 | basic_istream<_CharT,_Traits>& | |
29788 | ws(basic_istream<_CharT,_Traits>& __in) | |
29789 | { | |
29790 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
29791 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
29792 | typedef typename __istream_type::__ctype_type __ctype_type; | |
29793 | typedef typename __istream_type::int_type __int_type; | |
29794 | ||
29795 | const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); | |
29796 | const __int_type __eof = _Traits::eof(); | |
29797 | __streambuf_type* __sb = __in.rdbuf(); | |
29798 | __int_type __c = __sb->sgetc(); | |
29799 | ||
29800 | while (!_Traits::eq_int_type(__c, __eof) | |
29801 | && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) | |
29802 | __c = __sb->snextc(); | |
29803 | ||
29804 | if (_Traits::eq_int_type(__c, __eof)) | |
29805 | __in.setstate(ios_base::eofbit); | |
29806 | return __in; | |
29807 | } | |
29808 | ||
29809 | ||
29810 | template<typename _CharT, typename _Traits, typename _Alloc> | |
29811 | basic_istream<_CharT, _Traits>& | |
29812 | operator>>(basic_istream<_CharT, _Traits>& __in, | |
29813 | basic_string<_CharT, _Traits, _Alloc>& __str) | |
29814 | { | |
29815 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
29816 | typedef typename __istream_type::int_type __int_type; | |
29817 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
29818 | typedef typename __istream_type::__ctype_type __ctype_type; | |
29819 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
29820 | typedef typename __string_type::size_type __size_type; | |
29821 | ||
29822 | __size_type __extracted = 0; | |
29823 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29824 | typename __istream_type::sentry __cerb(__in, false); | |
29825 | if (__cerb) | |
29826 | { | |
29827 | try | |
29828 | { | |
29829 | ||
29830 | __str.erase(); | |
29831 | _CharT __buf[128]; | |
29832 | __size_type __len = 0; | |
29833 | const streamsize __w = __in.width(); | |
29834 | const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) | |
29835 | : __str.max_size(); | |
29836 | const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); | |
29837 | const __int_type __eof = _Traits::eof(); | |
29838 | __streambuf_type* __sb = __in.rdbuf(); | |
29839 | __int_type __c = __sb->sgetc(); | |
29840 | ||
29841 | while (__extracted < __n | |
29842 | && !_Traits::eq_int_type(__c, __eof) | |
29843 | && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) | |
29844 | { | |
29845 | if (__len == sizeof(__buf) / sizeof(_CharT)) | |
29846 | { | |
29847 | __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); | |
29848 | __len = 0; | |
29849 | } | |
29850 | __buf[__len++] = _Traits::to_char_type(__c); | |
29851 | ++__extracted; | |
29852 | __c = __sb->snextc(); | |
29853 | } | |
29854 | __str.append(__buf, __len); | |
29855 | ||
29856 | if (_Traits::eq_int_type(__c, __eof)) | |
29857 | __err |= ios_base::eofbit; | |
29858 | __in.width(0); | |
29859 | } | |
29860 | catch(...) | |
29861 | { | |
29862 | ||
29863 | ||
29864 | ||
29865 | __in._M_setstate(ios_base::badbit); | |
29866 | } | |
29867 | } | |
29868 | ||
29869 | if (!__extracted) | |
29870 | __err |= ios_base::failbit; | |
29871 | if (__err) | |
29872 | __in.setstate(__err); | |
29873 | return __in; | |
29874 | } | |
29875 | ||
29876 | template<typename _CharT, typename _Traits, typename _Alloc> | |
29877 | basic_istream<_CharT, _Traits>& | |
29878 | getline(basic_istream<_CharT, _Traits>& __in, | |
29879 | basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) | |
29880 | { | |
29881 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
29882 | typedef typename __istream_type::int_type __int_type; | |
29883 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
29884 | typedef typename __istream_type::__ctype_type __ctype_type; | |
29885 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
29886 | typedef typename __string_type::size_type __size_type; | |
29887 | ||
29888 | __size_type __extracted = 0; | |
29889 | const __size_type __n = __str.max_size(); | |
29890 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
29891 | typename __istream_type::sentry __cerb(__in, true); | |
29892 | if (__cerb) | |
29893 | { | |
29894 | try | |
29895 | { | |
29896 | __str.erase(); | |
29897 | const __int_type __idelim = _Traits::to_int_type(__delim); | |
29898 | const __int_type __eof = _Traits::eof(); | |
29899 | __streambuf_type* __sb = __in.rdbuf(); | |
29900 | __int_type __c = __sb->sgetc(); | |
29901 | ||
29902 | while (__extracted < __n | |
29903 | && !_Traits::eq_int_type(__c, __eof) | |
29904 | && !_Traits::eq_int_type(__c, __idelim)) | |
29905 | { | |
29906 | __str += _Traits::to_char_type(__c); | |
29907 | ++__extracted; | |
29908 | __c = __sb->snextc(); | |
29909 | } | |
29910 | ||
29911 | if (_Traits::eq_int_type(__c, __eof)) | |
29912 | __err |= ios_base::eofbit; | |
29913 | else if (_Traits::eq_int_type(__c, __idelim)) | |
29914 | { | |
29915 | ++__extracted; | |
29916 | __sb->sbumpc(); | |
29917 | } | |
29918 | else | |
29919 | __err |= ios_base::failbit; | |
29920 | } | |
29921 | catch(...) | |
29922 | { | |
29923 | ||
29924 | ||
29925 | ||
29926 | __in._M_setstate(ios_base::badbit); | |
29927 | } | |
29928 | } | |
29929 | if (!__extracted) | |
29930 | __err |= ios_base::failbit; | |
29931 | if (__err) | |
29932 | __in.setstate(__err); | |
29933 | return __in; | |
29934 | } | |
29935 | ||
29936 | template<class _CharT, class _Traits, class _Alloc> | |
29937 | inline basic_istream<_CharT,_Traits>& | |
29938 | getline(basic_istream<_CharT, _Traits>& __in, | |
29939 | basic_string<_CharT,_Traits,_Alloc>& __str) | |
29940 | { return getline(__in, __str, __in.widen('\n')); } | |
29941 | ||
29942 | ||
29943 | ||
29944 | ||
29945 | ||
29946 | extern template class basic_istream<char>; | |
29947 | extern template istream& ws(istream&); | |
29948 | extern template istream& operator>>(istream&, char&); | |
29949 | extern template istream& operator>>(istream&, char*); | |
29950 | extern template istream& operator>>(istream&, unsigned char&); | |
29951 | extern template istream& operator>>(istream&, signed char&); | |
29952 | extern template istream& operator>>(istream&, unsigned char*); | |
29953 | extern template istream& operator>>(istream&, signed char*); | |
29954 | ||
29955 | extern template class basic_iostream<char>; | |
29956 | ||
29957 | ||
29958 | extern template class basic_istream<wchar_t>; | |
29959 | extern template wistream& ws(wistream&); | |
29960 | extern template wistream& operator>>(wistream&, wchar_t&); | |
29961 | extern template wistream& operator>>(wistream&, wchar_t*); | |
29962 | ||
29963 | extern template class basic_iostream<wchar_t>; | |
29964 | ||
29965 | ||
29966 | } | |
29967 | # 821 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/istream" 2 3 | |
29968 | ||
29969 | ||
29970 | #pragma GCC visibility pop | |
29971 | # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iostream" 2 3 | |
29972 | ||
29973 | namespace std | |
29974 | { | |
29975 | # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.2/include/g++-v4/iostream" 3 | |
29976 | extern istream cin; | |
29977 | extern ostream cout; | |
29978 | extern ostream cerr; | |
29979 | extern ostream clog; | |
29980 | ||
29981 | ||
29982 | extern wistream wcin; | |
29983 | extern wostream wcout; | |
29984 | extern wostream wcerr; | |
29985 | extern wostream wclog; | |
29986 | ||
29987 | ||
29988 | ||
29989 | ||
29990 | static ios_base::Init __ioinit; | |
29991 | } | |
29992 | ||
29993 | #pragma GCC visibility pop | |
29994 | # 4 "conftest.cc" 2 | |
29995 | ||
29996 | ||
29997 | ||
29998 | void someoutput (void) { std::cout << 123; } | |
29999 | ||
30000 | int main (void) { return 0; } |