]> git.wh0rd.org - ICEs.git/blame - 150951/gccSEGV.cpp
initial import
[ICEs.git] / 150951 / gccSEGV.cpp
CommitLineData
45516216 1// /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1plus -quiet -D_GNU_SOURCE jasmin.cpp -quiet -dumpbase jasmin.cpp -mtune=pentiumpro -auxbase-strip jasmin.o -g -g -o - -frandom-seed=0
2# 1 "jasmin.cpp"
3# 1 "/home/viktor/skola/kompilator/main/src/be-jvm//"
4# 1 "<inbyggd>"
5# 1 "<kommandorad>"
6# 1 "jasmin.cpp"
7# 1 "jasmin.h" 1
8# 18 "jasmin.h"
9# 1 "jvmdefs.h" 1
10# 18 "jvmdefs.h"
11# 1 "../defs.h" 1
12# 19 "jvmdefs.h" 2
13# 19 "jasmin.h" 2
14# 1 "../ast/identifier.h" 1
15# 18 "../ast/identifier.h"
16# 1 "../ast/adefs.h" 1
17# 18 "../ast/adefs.h"
18# 1 "../ast/../defs.h" 1
19# 19 "../ast/adefs.h" 2
20# 1 "../ast/../error.h" 1
21# 18 "../ast/../error.h"
22# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 1 3
23# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 3
24
25# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 3
26#pragma GCC visibility push(default)
27
28# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h" 1 3
29# 35 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h" 3
30# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/os_defines.h" 1 3
31# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/os_defines.h" 3
32# 1 "/usr/include/features.h" 1 3 4
33# 323 "/usr/include/features.h" 3 4
34# 1 "/usr/include/sys/cdefs.h" 1 3 4
35# 313 "/usr/include/sys/cdefs.h" 3 4
36# 1 "/usr/include/bits/wordsize.h" 1 3 4
37# 314 "/usr/include/sys/cdefs.h" 2 3 4
38# 324 "/usr/include/features.h" 2 3 4
39# 346 "/usr/include/features.h" 3 4
40# 1 "/usr/include/gnu/stubs.h" 1 3 4
41
42
43
44# 1 "/usr/include/bits/wordsize.h" 1 3 4
45# 5 "/usr/include/gnu/stubs.h" 2 3 4
46
47
48# 1 "/usr/include/gnu/stubs-32.h" 1 3 4
49# 8 "/usr/include/gnu/stubs.h" 2 3 4
50# 347 "/usr/include/features.h" 2 3 4
51# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/os_defines.h" 2 3
52# 36 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h" 2 3
53
54
55# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/cpu_defines.h" 1 3
56# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++config.h" 2 3
57
58
59
60
61namespace __gnu_debug_def { }
62
63namespace __gnu_debug
64{
65 using namespace __gnu_debug_def;
66}
67# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
68# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stringfwd.h" 1 3
69# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stringfwd.h" 3
70
71# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stringfwd.h" 3
72
73
74
75namespace std
76{
77 template<typename _Alloc>
78 class allocator;
79
80 template<class _CharT>
81 struct char_traits;
82
83 template<typename _CharT, typename _Traits = char_traits<_CharT>,
84 typename _Alloc = allocator<_CharT> >
85 class basic_string;
86
87 template<> struct char_traits<char>;
88
89 typedef basic_string<char> string;
90
91
92 template<> struct char_traits<wchar_t>;
93
94 typedef basic_string<wchar_t> wstring;
95
96}
97# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
98# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 1 3
99# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3
100
101# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3
102
103# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 1 3
104# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 3
105
106# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 3
107#pragma GCC visibility push(default)
108
109# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 1 3
110# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 3
111
112# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 3
113#pragma GCC visibility push(default)
114
115# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
116# 152 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
117typedef int ptrdiff_t;
118# 214 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
119typedef unsigned int size_t;
120# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 2 3
121
122namespace std
123{
124 using ::ptrdiff_t;
125 using ::size_t;
126}
127
128#pragma GCC visibility pop
129# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 2 3
130
131# 1 "/usr/include/string.h" 1 3 4
132# 28 "/usr/include/string.h" 3 4
133extern "C" {
134
135
136
137
138# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
139# 34 "/usr/include/string.h" 2 3 4
140
141
142
143
144extern void *memcpy (void *__restrict __dest,
145 __const void *__restrict __src, size_t __n)
146 throw () __attribute__ ((__nonnull__ (1, 2)));
147
148
149extern void *memmove (void *__dest, __const void *__src, size_t __n)
150 throw () __attribute__ ((__nonnull__ (1, 2)));
151
152
153
154
155
156
157extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
158 int __c, size_t __n)
159 throw () __attribute__ ((__nonnull__ (1, 2)));
160
161
162
163
164
165extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
166
167
168extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
169 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
170
171
172extern void *memchr (__const void *__s, int __c, size_t __n)
173 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
174
175
176
177
178
179extern void *rawmemchr (__const void *__s, int __c)
180 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
181
182
183extern void *memrchr (__const void *__s, int __c, size_t __n)
184 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
185
186
187
188
189
190extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
191 throw () __attribute__ ((__nonnull__ (1, 2)));
192
193extern char *strncpy (char *__restrict __dest,
194 __const char *__restrict __src, size_t __n)
195 throw () __attribute__ ((__nonnull__ (1, 2)));
196
197
198extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
199 throw () __attribute__ ((__nonnull__ (1, 2)));
200
201extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
202 size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
203
204
205extern int strcmp (__const char *__s1, __const char *__s2)
206 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
207
208extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
209 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
210
211
212extern int strcoll (__const char *__s1, __const char *__s2)
213 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
214
215extern size_t strxfrm (char *__restrict __dest,
216 __const char *__restrict __src, size_t __n)
217 throw () __attribute__ ((__nonnull__ (2)));
218
219
220
221
222
223
224# 1 "/usr/include/xlocale.h" 1 3 4
225# 28 "/usr/include/xlocale.h" 3 4
226typedef struct __locale_struct
227{
228
229 struct locale_data *__locales[13];
230
231
232 const unsigned short int *__ctype_b;
233 const int *__ctype_tolower;
234 const int *__ctype_toupper;
235
236
237 const char *__names[13];
238} *__locale_t;
239# 119 "/usr/include/string.h" 2 3 4
240
241
242extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
243 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
244
245extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
246 __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
247
248
249
250
251extern char *strdup (__const char *__s)
252 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
253
254
255
256
257
258
259extern char *strndup (__const char *__string, size_t __n)
260 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
261# 165 "/usr/include/string.h" 3 4
262
263
264extern char *strchr (__const char *__s, int __c)
265 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
266
267extern char *strrchr (__const char *__s, int __c)
268 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
269
270
271
272
273
274extern char *strchrnul (__const char *__s, int __c)
275 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
276
277
278
279
280
281extern size_t strcspn (__const char *__s, __const char *__reject)
282 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
283
284
285extern size_t strspn (__const char *__s, __const char *__accept)
286 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
287
288extern char *strpbrk (__const char *__s, __const char *__accept)
289 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
290
291extern char *strstr (__const char *__haystack, __const char *__needle)
292 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
293
294
295
296extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
297 throw () __attribute__ ((__nonnull__ (2)));
298
299
300
301
302extern char *__strtok_r (char *__restrict __s,
303 __const char *__restrict __delim,
304 char **__restrict __save_ptr)
305 throw () __attribute__ ((__nonnull__ (2, 3)));
306
307extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
308 char **__restrict __save_ptr)
309 throw () __attribute__ ((__nonnull__ (2, 3)));
310
311
312
313
314extern char *strcasestr (__const char *__haystack, __const char *__needle)
315 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
316
317
318
319
320
321
322extern void *memmem (__const void *__haystack, size_t __haystacklen,
323 __const void *__needle, size_t __needlelen)
324 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
325
326
327
328extern void *__mempcpy (void *__restrict __dest,
329 __const void *__restrict __src, size_t __n)
330 throw () __attribute__ ((__nonnull__ (1, 2)));
331extern void *mempcpy (void *__restrict __dest,
332 __const void *__restrict __src, size_t __n)
333 throw () __attribute__ ((__nonnull__ (1, 2)));
334
335
336
337
338
339extern size_t strlen (__const char *__s)
340 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
341
342
343
344
345
346extern size_t strnlen (__const char *__string, size_t __maxlen)
347 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
348
349
350
351
352
353extern char *strerror (int __errnum) throw ();
354
355# 281 "/usr/include/string.h" 3 4
356extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
357 throw () __attribute__ ((__nonnull__ (2)));
358
359
360
361
362
363extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
364
365
366
367extern void bcopy (__const void *__src, void *__dest, size_t __n)
368 throw () __attribute__ ((__nonnull__ (1, 2)));
369
370
371extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
372
373
374extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
375 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
376
377
378extern char *index (__const char *__s, int __c)
379 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
380
381
382extern char *rindex (__const char *__s, int __c)
383 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
384
385
386
387extern int ffs (int __i) throw () __attribute__ ((__const__));
388
389
390
391
392extern int ffsl (long int __l) throw () __attribute__ ((__const__));
393
394__extension__ extern int ffsll (long long int __ll)
395 throw () __attribute__ ((__const__));
396
397
398
399
400extern int strcasecmp (__const char *__s1, __const char *__s2)
401 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
402
403
404extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
405 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
406
407
408
409
410
411extern int strcasecmp_l (__const char *__s1, __const char *__s2,
412 __locale_t __loc)
413 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
414
415extern int strncasecmp_l (__const char *__s1, __const char *__s2,
416 size_t __n, __locale_t __loc)
417 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
418
419
420
421
422
423extern char *strsep (char **__restrict __stringp,
424 __const char *__restrict __delim)
425 throw () __attribute__ ((__nonnull__ (1, 2)));
426
427
428
429
430extern int strverscmp (__const char *__s1, __const char *__s2)
431 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
432
433
434extern char *strsignal (int __sig) throw ();
435
436
437extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
438 throw () __attribute__ ((__nonnull__ (1, 2)));
439extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
440 throw () __attribute__ ((__nonnull__ (1, 2)));
441
442
443
444extern char *__stpncpy (char *__restrict __dest,
445 __const char *__restrict __src, size_t __n)
446 throw () __attribute__ ((__nonnull__ (1, 2)));
447extern char *stpncpy (char *__restrict __dest,
448 __const char *__restrict __src, size_t __n)
449 throw () __attribute__ ((__nonnull__ (1, 2)));
450
451
452extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
453
454
455extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
456
457
458
459
460
461
462extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1)));
463# 426 "/usr/include/string.h" 3 4
464}
465# 54 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 2 3
466# 79 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 3
467namespace std
468{
469 using ::memcpy;
470 using ::memmove;
471 using ::strcpy;
472 using ::strncpy;
473 using ::strcat;
474 using ::strncat;
475 using ::memcmp;
476 using ::strcmp;
477 using ::strcoll;
478 using ::strncmp;
479 using ::strxfrm;
480 using ::strcspn;
481 using ::strspn;
482 using ::strtok;
483 using ::memset;
484 using ::strerror;
485 using ::strlen;
486
487 using ::memchr;
488
489 inline void*
490 memchr(void* __p, int __c, size_t __n)
491 { return memchr(const_cast<const void*>(__p), __c, __n); }
492
493 using ::strchr;
494
495 inline char*
496 strchr(char* __s1, int __n)
497 { return __builtin_strchr(const_cast<const char*>(__s1), __n); }
498
499 using ::strpbrk;
500
501 inline char*
502 strpbrk(char* __s1, const char* __s2)
503 { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
504
505 using ::strrchr;
506
507 inline char*
508 strrchr(char* __s1, int __n)
509 { return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
510
511 using ::strstr;
512
513 inline char*
514 strstr(char* __s1, const char* __s2)
515 { return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
516}
517
518#pragma GCC visibility pop
519# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 2 3
520# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 1 3
521# 66 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
522# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/climits" 1 3
523# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/climits" 3
524
525# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/climits" 3
526#pragma GCC visibility push(default)
527
528# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4
529# 11 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h" 3 4
530# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h" 1 3 4
531
532
533
534
535
536
537# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4
538# 122 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h" 3 4
539# 1 "/usr/include/limits.h" 1 3 4
540# 145 "/usr/include/limits.h" 3 4
541# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
542# 153 "/usr/include/bits/posix1_lim.h" 3 4
543# 1 "/usr/include/bits/local_lim.h" 1 3 4
544# 36 "/usr/include/bits/local_lim.h" 3 4
545# 1 "/usr/include/linux/limits.h" 1 3 4
546# 37 "/usr/include/bits/local_lim.h" 2 3 4
547# 154 "/usr/include/bits/posix1_lim.h" 2 3 4
548# 146 "/usr/include/limits.h" 2 3 4
549
550
551
552# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
553# 150 "/usr/include/limits.h" 2 3 4
554
555
556
557# 1 "/usr/include/bits/xopen_lim.h" 1 3 4
558# 34 "/usr/include/bits/xopen_lim.h" 3 4
559# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
560# 35 "/usr/include/bits/xopen_lim.h" 2 3 4
561# 154 "/usr/include/limits.h" 2 3 4
562# 123 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h" 2 3 4
563# 8 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h" 2 3 4
564# 12 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h" 2 3 4
565# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/climits" 2 3
566
567#pragma GCC visibility pop
568# 67 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
569# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 1 3
570# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3
571
572# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3
573#pragma GCC visibility push(default)
574# 72 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3
575# 1 "/usr/include/stdlib.h" 1 3 4
576# 33 "/usr/include/stdlib.h" 3 4
577# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
578# 34 "/usr/include/stdlib.h" 2 3 4
579
580extern "C" {
581
582
583
584
585
586
587# 1 "/usr/include/bits/waitflags.h" 1 3 4
588# 43 "/usr/include/stdlib.h" 2 3 4
589# 1 "/usr/include/bits/waitstatus.h" 1 3 4
590# 65 "/usr/include/bits/waitstatus.h" 3 4
591# 1 "/usr/include/endian.h" 1 3 4
592# 37 "/usr/include/endian.h" 3 4
593# 1 "/usr/include/bits/endian.h" 1 3 4
594# 38 "/usr/include/endian.h" 2 3 4
595# 66 "/usr/include/bits/waitstatus.h" 2 3 4
596
597union wait
598 {
599 int w_status;
600 struct
601 {
602
603 unsigned int __w_termsig:7;
604 unsigned int __w_coredump:1;
605 unsigned int __w_retcode:8;
606 unsigned int:16;
607
608
609
610
611
612
613
614 } __wait_terminated;
615 struct
616 {
617
618 unsigned int __w_stopval:8;
619 unsigned int __w_stopsig:8;
620 unsigned int:16;
621
622
623
624
625
626
627 } __wait_stopped;
628 };
629# 44 "/usr/include/stdlib.h" 2 3 4
630# 96 "/usr/include/stdlib.h" 3 4
631
632
633typedef struct
634 {
635 int quot;
636 int rem;
637 } div_t;
638
639
640
641typedef struct
642 {
643 long int quot;
644 long int rem;
645 } ldiv_t;
646
647
648
649
650
651
652
653__extension__ typedef struct
654 {
655 long long int quot;
656 long long int rem;
657 } lldiv_t;
658
659
660# 140 "/usr/include/stdlib.h" 3 4
661extern size_t __ctype_get_mb_cur_max (void) throw () ;
662
663
664
665
666extern double atof (__const char *__nptr)
667 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
668
669extern int atoi (__const char *__nptr)
670 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
671
672extern long int atol (__const char *__nptr)
673 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
674
675
676
677
678
679__extension__ extern long long int atoll (__const char *__nptr)
680 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
681
682
683
684
685
686extern double strtod (__const char *__restrict __nptr,
687 char **__restrict __endptr)
688 throw () __attribute__ ((__nonnull__ (1))) ;
689
690
691
692
693
694extern float strtof (__const char *__restrict __nptr,
695 char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
696
697extern long double strtold (__const char *__restrict __nptr,
698 char **__restrict __endptr)
699 throw () __attribute__ ((__nonnull__ (1))) ;
700
701
702
703
704
705extern long int strtol (__const char *__restrict __nptr,
706 char **__restrict __endptr, int __base)
707 throw () __attribute__ ((__nonnull__ (1))) ;
708
709extern unsigned long int strtoul (__const char *__restrict __nptr,
710 char **__restrict __endptr, int __base)
711 throw () __attribute__ ((__nonnull__ (1))) ;
712
713
714
715
716__extension__
717extern long long int strtoq (__const char *__restrict __nptr,
718 char **__restrict __endptr, int __base)
719 throw () __attribute__ ((__nonnull__ (1))) ;
720
721__extension__
722extern unsigned long long int strtouq (__const char *__restrict __nptr,
723 char **__restrict __endptr, int __base)
724 throw () __attribute__ ((__nonnull__ (1))) ;
725
726
727
728
729
730__extension__
731extern long long int strtoll (__const char *__restrict __nptr,
732 char **__restrict __endptr, int __base)
733 throw () __attribute__ ((__nonnull__ (1))) ;
734
735__extension__
736extern unsigned long long int strtoull (__const char *__restrict __nptr,
737 char **__restrict __endptr, int __base)
738 throw () __attribute__ ((__nonnull__ (1))) ;
739
740# 240 "/usr/include/stdlib.h" 3 4
741extern long int strtol_l (__const char *__restrict __nptr,
742 char **__restrict __endptr, int __base,
743 __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
744
745extern unsigned long int strtoul_l (__const char *__restrict __nptr,
746 char **__restrict __endptr,
747 int __base, __locale_t __loc)
748 throw () __attribute__ ((__nonnull__ (1, 4))) ;
749
750__extension__
751extern long long int strtoll_l (__const char *__restrict __nptr,
752 char **__restrict __endptr, int __base,
753 __locale_t __loc)
754 throw () __attribute__ ((__nonnull__ (1, 4))) ;
755
756__extension__
757extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
758 char **__restrict __endptr,
759 int __base, __locale_t __loc)
760 throw () __attribute__ ((__nonnull__ (1, 4))) ;
761
762extern double strtod_l (__const char *__restrict __nptr,
763 char **__restrict __endptr, __locale_t __loc)
764 throw () __attribute__ ((__nonnull__ (1, 3))) ;
765
766extern float strtof_l (__const char *__restrict __nptr,
767 char **__restrict __endptr, __locale_t __loc)
768 throw () __attribute__ ((__nonnull__ (1, 3))) ;
769
770extern long double strtold_l (__const char *__restrict __nptr,
771 char **__restrict __endptr,
772 __locale_t __loc)
773 throw () __attribute__ ((__nonnull__ (1, 3))) ;
774
775
776
777
778
779
780extern double __strtod_internal (__const char *__restrict __nptr,
781 char **__restrict __endptr, int __group)
782 throw () __attribute__ ((__nonnull__ (1))) ;
783extern float __strtof_internal (__const char *__restrict __nptr,
784 char **__restrict __endptr, int __group)
785 throw () __attribute__ ((__nonnull__ (1))) ;
786extern long double __strtold_internal (__const char *__restrict __nptr,
787 char **__restrict __endptr,
788 int __group)
789 throw () __attribute__ ((__nonnull__ (1))) ;
790
791extern long int __strtol_internal (__const char *__restrict __nptr,
792 char **__restrict __endptr,
793 int __base, int __group)
794 throw () __attribute__ ((__nonnull__ (1))) ;
795
796
797
798extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
799 char **__restrict __endptr,
800 int __base, int __group)
801 throw () __attribute__ ((__nonnull__ (1))) ;
802
803
804
805
806__extension__
807extern long long int __strtoll_internal (__const char *__restrict __nptr,
808 char **__restrict __endptr,
809 int __base, int __group)
810 throw () __attribute__ ((__nonnull__ (1))) ;
811
812
813
814__extension__
815extern unsigned long long int __strtoull_internal (__const char *
816 __restrict __nptr,
817 char **__restrict __endptr,
818 int __base, int __group)
819 throw () __attribute__ ((__nonnull__ (1))) ;
820# 429 "/usr/include/stdlib.h" 3 4
821extern char *l64a (long int __n) throw () ;
822
823
824extern long int a64l (__const char *__s)
825 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
826
827
828
829
830# 1 "/usr/include/sys/types.h" 1 3 4
831# 29 "/usr/include/sys/types.h" 3 4
832extern "C" {
833
834# 1 "/usr/include/bits/types.h" 1 3 4
835# 28 "/usr/include/bits/types.h" 3 4
836# 1 "/usr/include/bits/wordsize.h" 1 3 4
837# 29 "/usr/include/bits/types.h" 2 3 4
838
839
840# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
841# 32 "/usr/include/bits/types.h" 2 3 4
842
843
844typedef unsigned char __u_char;
845typedef unsigned short int __u_short;
846typedef unsigned int __u_int;
847typedef unsigned long int __u_long;
848
849
850typedef signed char __int8_t;
851typedef unsigned char __uint8_t;
852typedef signed short int __int16_t;
853typedef unsigned short int __uint16_t;
854typedef signed int __int32_t;
855typedef unsigned int __uint32_t;
856
857
858
859
860__extension__ typedef signed long long int __int64_t;
861__extension__ typedef unsigned long long int __uint64_t;
862
863
864
865
866
867
868
869__extension__ typedef long long int __quad_t;
870__extension__ typedef unsigned long long int __u_quad_t;
871# 134 "/usr/include/bits/types.h" 3 4
872# 1 "/usr/include/bits/typesizes.h" 1 3 4
873# 135 "/usr/include/bits/types.h" 2 3 4
874
875
876__extension__ typedef __u_quad_t __dev_t;
877__extension__ typedef unsigned int __uid_t;
878__extension__ typedef unsigned int __gid_t;
879__extension__ typedef unsigned long int __ino_t;
880__extension__ typedef __u_quad_t __ino64_t;
881__extension__ typedef unsigned int __mode_t;
882__extension__ typedef unsigned int __nlink_t;
883__extension__ typedef long int __off_t;
884__extension__ typedef __quad_t __off64_t;
885__extension__ typedef int __pid_t;
886__extension__ typedef struct { int __val[2]; } __fsid_t;
887__extension__ typedef long int __clock_t;
888__extension__ typedef unsigned long int __rlim_t;
889__extension__ typedef __u_quad_t __rlim64_t;
890__extension__ typedef unsigned int __id_t;
891__extension__ typedef long int __time_t;
892__extension__ typedef unsigned int __useconds_t;
893__extension__ typedef long int __suseconds_t;
894
895__extension__ typedef int __daddr_t;
896__extension__ typedef long int __swblk_t;
897__extension__ typedef int __key_t;
898
899
900__extension__ typedef int __clockid_t;
901
902
903__extension__ typedef void * __timer_t;
904
905
906__extension__ typedef long int __blksize_t;
907
908
909
910
911__extension__ typedef long int __blkcnt_t;
912__extension__ typedef __quad_t __blkcnt64_t;
913
914
915__extension__ typedef unsigned long int __fsblkcnt_t;
916__extension__ typedef __u_quad_t __fsblkcnt64_t;
917
918
919__extension__ typedef unsigned long int __fsfilcnt_t;
920__extension__ typedef __u_quad_t __fsfilcnt64_t;
921
922__extension__ typedef int __ssize_t;
923
924
925
926typedef __off64_t __loff_t;
927typedef __quad_t *__qaddr_t;
928typedef char *__caddr_t;
929
930
931__extension__ typedef int __intptr_t;
932
933
934__extension__ typedef unsigned int __socklen_t;
935# 32 "/usr/include/sys/types.h" 2 3 4
936
937
938
939typedef __u_char u_char;
940typedef __u_short u_short;
941typedef __u_int u_int;
942typedef __u_long u_long;
943typedef __quad_t quad_t;
944typedef __u_quad_t u_quad_t;
945typedef __fsid_t fsid_t;
946
947
948
949
950typedef __loff_t loff_t;
951
952
953
954typedef __ino_t ino_t;
955
956
957
958
959
960
961typedef __ino64_t ino64_t;
962
963
964
965
966typedef __dev_t dev_t;
967
968
969
970
971typedef __gid_t gid_t;
972
973
974
975
976typedef __mode_t mode_t;
977
978
979
980
981typedef __nlink_t nlink_t;
982
983
984
985
986typedef __uid_t uid_t;
987
988
989
990
991
992typedef __off_t off_t;
993
994
995
996
997
998
999typedef __off64_t off64_t;
1000
1001
1002
1003
1004typedef __pid_t pid_t;
1005
1006
1007
1008
1009typedef __id_t id_t;
1010
1011
1012
1013
1014typedef __ssize_t ssize_t;
1015
1016
1017
1018
1019
1020typedef __daddr_t daddr_t;
1021typedef __caddr_t caddr_t;
1022
1023
1024
1025
1026
1027typedef __key_t key_t;
1028# 133 "/usr/include/sys/types.h" 3 4
1029# 1 "/usr/include/time.h" 1 3 4
1030# 59 "/usr/include/time.h" 3 4
1031
1032
1033typedef __clock_t clock_t;
1034
1035
1036
1037# 75 "/usr/include/time.h" 3 4
1038
1039
1040typedef __time_t time_t;
1041
1042
1043
1044# 93 "/usr/include/time.h" 3 4
1045typedef __clockid_t clockid_t;
1046# 105 "/usr/include/time.h" 3 4
1047typedef __timer_t timer_t;
1048# 134 "/usr/include/sys/types.h" 2 3 4
1049
1050
1051
1052typedef __useconds_t useconds_t;
1053
1054
1055
1056typedef __suseconds_t suseconds_t;
1057
1058
1059
1060
1061
1062# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1063# 148 "/usr/include/sys/types.h" 2 3 4
1064
1065
1066
1067typedef unsigned long int ulong;
1068typedef unsigned short int ushort;
1069typedef unsigned int uint;
1070# 195 "/usr/include/sys/types.h" 3 4
1071typedef int int8_t __attribute__ ((__mode__ (__QI__)));
1072typedef int int16_t __attribute__ ((__mode__ (__HI__)));
1073typedef int int32_t __attribute__ ((__mode__ (__SI__)));
1074typedef int int64_t __attribute__ ((__mode__ (__DI__)));
1075
1076
1077typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
1078typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
1079typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
1080typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
1081
1082typedef int register_t __attribute__ ((__mode__ (__word__)));
1083# 220 "/usr/include/sys/types.h" 3 4
1084# 1 "/usr/include/sys/select.h" 1 3 4
1085# 31 "/usr/include/sys/select.h" 3 4
1086# 1 "/usr/include/bits/select.h" 1 3 4
1087# 32 "/usr/include/sys/select.h" 2 3 4
1088
1089
1090# 1 "/usr/include/bits/sigset.h" 1 3 4
1091# 23 "/usr/include/bits/sigset.h" 3 4
1092typedef int __sig_atomic_t;
1093
1094
1095
1096
1097typedef struct
1098 {
1099 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1100 } __sigset_t;
1101# 35 "/usr/include/sys/select.h" 2 3 4
1102
1103
1104
1105typedef __sigset_t sigset_t;
1106
1107
1108
1109
1110
1111# 1 "/usr/include/time.h" 1 3 4
1112# 121 "/usr/include/time.h" 3 4
1113struct timespec
1114 {
1115 __time_t tv_sec;
1116 long int tv_nsec;
1117 };
1118# 45 "/usr/include/sys/select.h" 2 3 4
1119
1120# 1 "/usr/include/bits/time.h" 1 3 4
1121# 69 "/usr/include/bits/time.h" 3 4
1122struct timeval
1123 {
1124 __time_t tv_sec;
1125 __suseconds_t tv_usec;
1126 };
1127# 47 "/usr/include/sys/select.h" 2 3 4
1128# 55 "/usr/include/sys/select.h" 3 4
1129typedef long int __fd_mask;
1130# 67 "/usr/include/sys/select.h" 3 4
1131typedef struct
1132 {
1133
1134
1135
1136 __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
1137
1138
1139
1140
1141
1142 } fd_set;
1143
1144
1145
1146
1147
1148
1149typedef __fd_mask fd_mask;
1150# 99 "/usr/include/sys/select.h" 3 4
1151extern "C" {
1152# 109 "/usr/include/sys/select.h" 3 4
1153extern int select (int __nfds, fd_set *__restrict __readfds,
1154 fd_set *__restrict __writefds,
1155 fd_set *__restrict __exceptfds,
1156 struct timeval *__restrict __timeout);
1157# 121 "/usr/include/sys/select.h" 3 4
1158extern int pselect (int __nfds, fd_set *__restrict __readfds,
1159 fd_set *__restrict __writefds,
1160 fd_set *__restrict __exceptfds,
1161 const struct timespec *__restrict __timeout,
1162 const __sigset_t *__restrict __sigmask);
1163
1164
1165}
1166# 221 "/usr/include/sys/types.h" 2 3 4
1167
1168
1169# 1 "/usr/include/sys/sysmacros.h" 1 3 4
1170# 29 "/usr/include/sys/sysmacros.h" 3 4
1171__extension__
1172extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
1173 throw ();
1174__extension__
1175extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
1176 throw ();
1177__extension__
1178extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
1179 unsigned int __minor)
1180 throw ();
1181
1182
1183__extension__ extern __inline unsigned int
1184gnu_dev_major (unsigned long long int __dev) throw ()
1185{
1186 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
1187}
1188
1189__extension__ extern __inline unsigned int
1190gnu_dev_minor (unsigned long long int __dev) throw ()
1191{
1192 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
1193}
1194
1195__extension__ extern __inline unsigned long long int
1196gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
1197{
1198 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
1199 | (((unsigned long long int) (__minor & ~0xff)) << 12)
1200 | (((unsigned long long int) (__major & ~0xfff)) << 32));
1201}
1202# 224 "/usr/include/sys/types.h" 2 3 4
1203
1204
1205
1206
1207typedef __blksize_t blksize_t;
1208
1209
1210
1211
1212
1213
1214typedef __blkcnt_t blkcnt_t;
1215
1216
1217
1218typedef __fsblkcnt_t fsblkcnt_t;
1219
1220
1221
1222typedef __fsfilcnt_t fsfilcnt_t;
1223# 262 "/usr/include/sys/types.h" 3 4
1224typedef __blkcnt64_t blkcnt64_t;
1225typedef __fsblkcnt64_t fsblkcnt64_t;
1226typedef __fsfilcnt64_t fsfilcnt64_t;
1227
1228
1229
1230
1231
1232# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
1233# 36 "/usr/include/bits/pthreadtypes.h" 3 4
1234typedef unsigned long int pthread_t;
1235
1236
1237typedef union
1238{
1239 char __size[36];
1240 long int __align;
1241} pthread_attr_t;
1242
1243
1244typedef struct __pthread_internal_slist
1245{
1246 struct __pthread_internal_slist *__next;
1247} __pthread_slist_t;
1248
1249
1250
1251
1252typedef union
1253{
1254 struct __pthread_mutex_s
1255 {
1256 int __lock;
1257 unsigned int __count;
1258 int __owner;
1259
1260
1261 int __kind;
1262 unsigned int __nusers;
1263 __extension__ union
1264 {
1265 int __spins;
1266 __pthread_slist_t __list;
1267 };
1268 } __data;
1269 char __size[24];
1270 long int __align;
1271} pthread_mutex_t;
1272
1273typedef union
1274{
1275 char __size[4];
1276 long int __align;
1277} pthread_mutexattr_t;
1278
1279
1280
1281
1282typedef union
1283{
1284 struct
1285 {
1286 int __lock;
1287 unsigned int __futex;
1288 __extension__ unsigned long long int __total_seq;
1289 __extension__ unsigned long long int __wakeup_seq;
1290 __extension__ unsigned long long int __woken_seq;
1291 void *__mutex;
1292 unsigned int __nwaiters;
1293 unsigned int __broadcast_seq;
1294 } __data;
1295 char __size[48];
1296 __extension__ long long int __align;
1297} pthread_cond_t;
1298
1299typedef union
1300{
1301 char __size[4];
1302 long int __align;
1303} pthread_condattr_t;
1304
1305
1306
1307typedef unsigned int pthread_key_t;
1308
1309
1310
1311typedef int pthread_once_t;
1312
1313
1314
1315
1316
1317typedef union
1318{
1319 struct
1320 {
1321 int __lock;
1322 unsigned int __nr_readers;
1323 unsigned int __readers_wakeup;
1324 unsigned int __writer_wakeup;
1325 unsigned int __nr_readers_queued;
1326 unsigned int __nr_writers_queued;
1327
1328
1329 unsigned int __flags;
1330 int __writer;
1331 } __data;
1332 char __size[32];
1333 long int __align;
1334} pthread_rwlock_t;
1335
1336typedef union
1337{
1338 char __size[8];
1339 long int __align;
1340} pthread_rwlockattr_t;
1341
1342
1343
1344
1345
1346typedef volatile int pthread_spinlock_t;
1347
1348
1349
1350
1351typedef union
1352{
1353 char __size[20];
1354 long int __align;
1355} pthread_barrier_t;
1356
1357typedef union
1358{
1359 char __size[4];
1360 int __align;
1361} pthread_barrierattr_t;
1362# 271 "/usr/include/sys/types.h" 2 3 4
1363
1364
1365}
1366# 439 "/usr/include/stdlib.h" 2 3 4
1367
1368
1369
1370
1371
1372
1373extern long int random (void) throw ();
1374
1375
1376extern void srandom (unsigned int __seed) throw ();
1377
1378
1379
1380
1381
1382extern char *initstate (unsigned int __seed, char *__statebuf,
1383 size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
1384
1385
1386
1387extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
1388
1389
1390
1391
1392
1393
1394
1395struct random_data
1396 {
1397 int32_t *fptr;
1398 int32_t *rptr;
1399 int32_t *state;
1400 int rand_type;
1401 int rand_deg;
1402 int rand_sep;
1403 int32_t *end_ptr;
1404 };
1405
1406extern int random_r (struct random_data *__restrict __buf,
1407 int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
1408
1409extern int srandom_r (unsigned int __seed, struct random_data *__buf)
1410 throw () __attribute__ ((__nonnull__ (2)));
1411
1412extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
1413 size_t __statelen,
1414 struct random_data *__restrict __buf)
1415 throw () __attribute__ ((__nonnull__ (2, 4)));
1416
1417extern int setstate_r (char *__restrict __statebuf,
1418 struct random_data *__restrict __buf)
1419 throw () __attribute__ ((__nonnull__ (1, 2)));
1420
1421
1422
1423
1424
1425
1426extern int rand (void) throw ();
1427
1428extern void srand (unsigned int __seed) throw ();
1429
1430
1431
1432
1433extern int rand_r (unsigned int *__seed) throw ();
1434
1435
1436
1437
1438
1439
1440
1441extern double drand48 (void) throw ();
1442extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
1443
1444
1445extern long int lrand48 (void) throw ();
1446extern long int nrand48 (unsigned short int __xsubi[3])
1447 throw () __attribute__ ((__nonnull__ (1)));
1448
1449
1450extern long int mrand48 (void) throw ();
1451extern long int jrand48 (unsigned short int __xsubi[3])
1452 throw () __attribute__ ((__nonnull__ (1)));
1453
1454
1455extern void srand48 (long int __seedval) throw ();
1456extern unsigned short int *seed48 (unsigned short int __seed16v[3])
1457 throw () __attribute__ ((__nonnull__ (1)));
1458extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
1459
1460
1461
1462
1463
1464struct drand48_data
1465 {
1466 unsigned short int __x[3];
1467 unsigned short int __old_x[3];
1468 unsigned short int __c;
1469 unsigned short int __init;
1470 unsigned long long int __a;
1471 };
1472
1473
1474extern int drand48_r (struct drand48_data *__restrict __buffer,
1475 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
1476extern int erand48_r (unsigned short int __xsubi[3],
1477 struct drand48_data *__restrict __buffer,
1478 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
1479
1480
1481extern int lrand48_r (struct drand48_data *__restrict __buffer,
1482 long int *__restrict __result)
1483 throw () __attribute__ ((__nonnull__ (1, 2)));
1484extern int nrand48_r (unsigned short int __xsubi[3],
1485 struct drand48_data *__restrict __buffer,
1486 long int *__restrict __result)
1487 throw () __attribute__ ((__nonnull__ (1, 2)));
1488
1489
1490extern int mrand48_r (struct drand48_data *__restrict __buffer,
1491 long int *__restrict __result)
1492 throw () __attribute__ ((__nonnull__ (1, 2)));
1493extern int jrand48_r (unsigned short int __xsubi[3],
1494 struct drand48_data *__restrict __buffer,
1495 long int *__restrict __result)
1496 throw () __attribute__ ((__nonnull__ (1, 2)));
1497
1498
1499extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
1500 throw () __attribute__ ((__nonnull__ (2)));
1501
1502extern int seed48_r (unsigned short int __seed16v[3],
1503 struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
1504
1505extern int lcong48_r (unsigned short int __param[7],
1506 struct drand48_data *__buffer)
1507 throw () __attribute__ ((__nonnull__ (1, 2)));
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
1518
1519extern void *calloc (size_t __nmemb, size_t __size)
1520 throw () __attribute__ ((__malloc__)) ;
1521
1522
1523
1524
1525
1526
1527
1528extern void *realloc (void *__ptr, size_t __size)
1529 throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
1530
1531extern void free (void *__ptr) throw ();
1532
1533
1534
1535
1536extern void cfree (void *__ptr) throw ();
1537
1538
1539
1540# 1 "/usr/include/alloca.h" 1 3 4
1541# 25 "/usr/include/alloca.h" 3 4
1542# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1543# 26 "/usr/include/alloca.h" 2 3 4
1544
1545extern "C" {
1546
1547
1548
1549
1550
1551extern void *alloca (size_t __size) throw ();
1552
1553
1554
1555
1556
1557}
1558# 613 "/usr/include/stdlib.h" 2 3 4
1559
1560
1561
1562
1563extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
1564
1565
1566
1567
1568extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
1569 throw () __attribute__ ((__nonnull__ (1))) ;
1570
1571
1572
1573
1574extern void abort (void) throw () __attribute__ ((__noreturn__));
1575
1576
1577
1578extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
1579
1580
1581
1582
1583
1584extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
1585 throw () __attribute__ ((__nonnull__ (1)));
1586
1587
1588
1589
1590
1591
1592extern void exit (int __status) throw () __attribute__ ((__noreturn__));
1593
1594
1595
1596
1597
1598
1599extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
1600
1601
1602
1603
1604
1605
1606extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
1607
1608
1609
1610
1611extern char *__secure_getenv (__const char *__name)
1612 throw () __attribute__ ((__nonnull__ (1))) ;
1613
1614
1615
1616
1617
1618extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
1619
1620
1621
1622
1623
1624extern int setenv (__const char *__name, __const char *__value, int __replace)
1625 throw () __attribute__ ((__nonnull__ (2)));
1626
1627
1628extern int unsetenv (__const char *__name) throw ();
1629
1630
1631
1632
1633
1634
1635extern int clearenv (void) throw ();
1636# 698 "/usr/include/stdlib.h" 3 4
1637extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
1638# 709 "/usr/include/stdlib.h" 3 4
1639extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
1640# 719 "/usr/include/stdlib.h" 3 4
1641extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
1642# 729 "/usr/include/stdlib.h" 3 4
1643extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
1644
1645
1646
1647
1648
1649
1650
1651
1652extern int system (__const char *__command) ;
1653
1654
1655
1656
1657
1658
1659
1660extern char *canonicalize_file_name (__const char *__name)
1661 throw () __attribute__ ((__nonnull__ (1))) ;
1662# 757 "/usr/include/stdlib.h" 3 4
1663extern char *realpath (__const char *__restrict __name,
1664 char *__restrict __resolved) throw () ;
1665
1666
1667
1668
1669
1670
1671typedef int (*__compar_fn_t) (__const void *, __const void *);
1672
1673
1674typedef __compar_fn_t comparison_fn_t;
1675
1676
1677
1678
1679
1680
1681extern void *bsearch (__const void *__key, __const void *__base,
1682 size_t __nmemb, size_t __size, __compar_fn_t __compar)
1683 __attribute__ ((__nonnull__ (1, 2, 5))) ;
1684
1685
1686
1687extern void qsort (void *__base, size_t __nmemb, size_t __size,
1688 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
1689
1690
1691
1692extern int abs (int __x) throw () __attribute__ ((__const__)) ;
1693extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
1694
1695
1696
1697__extension__ extern long long int llabs (long long int __x)
1698 throw () __attribute__ ((__const__)) ;
1699
1700
1701
1702
1703
1704
1705
1706extern div_t div (int __numer, int __denom)
1707 throw () __attribute__ ((__const__)) ;
1708extern ldiv_t ldiv (long int __numer, long int __denom)
1709 throw () __attribute__ ((__const__)) ;
1710
1711
1712
1713
1714__extension__ extern lldiv_t lldiv (long long int __numer,
1715 long long int __denom)
1716 throw () __attribute__ ((__const__)) ;
1717
1718# 822 "/usr/include/stdlib.h" 3 4
1719extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
1720 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
1721
1722
1723
1724
1725extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
1726 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
1727
1728
1729
1730
1731extern char *gcvt (double __value, int __ndigit, char *__buf)
1732 throw () __attribute__ ((__nonnull__ (3))) ;
1733
1734
1735
1736
1737extern char *qecvt (long double __value, int __ndigit,
1738 int *__restrict __decpt, int *__restrict __sign)
1739 throw () __attribute__ ((__nonnull__ (3, 4))) ;
1740extern char *qfcvt (long double __value, int __ndigit,
1741 int *__restrict __decpt, int *__restrict __sign)
1742 throw () __attribute__ ((__nonnull__ (3, 4))) ;
1743extern char *qgcvt (long double __value, int __ndigit, char *__buf)
1744 throw () __attribute__ ((__nonnull__ (3))) ;
1745
1746
1747
1748
1749extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
1750 int *__restrict __sign, char *__restrict __buf,
1751 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
1752extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
1753 int *__restrict __sign, char *__restrict __buf,
1754 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
1755
1756extern int qecvt_r (long double __value, int __ndigit,
1757 int *__restrict __decpt, int *__restrict __sign,
1758 char *__restrict __buf, size_t __len)
1759 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
1760extern int qfcvt_r (long double __value, int __ndigit,
1761 int *__restrict __decpt, int *__restrict __sign,
1762 char *__restrict __buf, size_t __len)
1763 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
1764
1765
1766
1767
1768
1769
1770
1771extern int mblen (__const char *__s, size_t __n) throw () ;
1772
1773
1774extern int mbtowc (wchar_t *__restrict __pwc,
1775 __const char *__restrict __s, size_t __n) throw () ;
1776
1777
1778extern int wctomb (char *__s, wchar_t __wchar) throw () ;
1779
1780
1781
1782extern size_t mbstowcs (wchar_t *__restrict __pwcs,
1783 __const char *__restrict __s, size_t __n) throw ();
1784
1785extern size_t wcstombs (char *__restrict __s,
1786 __const wchar_t *__restrict __pwcs, size_t __n)
1787 throw ();
1788
1789
1790
1791
1792
1793
1794
1795
1796extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
1797# 910 "/usr/include/stdlib.h" 3 4
1798extern int getsubopt (char **__restrict __optionp,
1799 char *__const *__restrict __tokens,
1800 char **__restrict __valuep)
1801 throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
1802
1803
1804
1805
1806
1807extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
1808
1809
1810
1811
1812
1813
1814
1815extern int posix_openpt (int __oflag) ;
1816
1817
1818
1819
1820
1821
1822
1823extern int grantpt (int __fd) throw ();
1824
1825
1826
1827extern int unlockpt (int __fd) throw ();
1828
1829
1830
1831
1832extern char *ptsname (int __fd) throw () ;
1833
1834
1835
1836
1837
1838
1839extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
1840 throw () __attribute__ ((__nonnull__ (2)));
1841
1842
1843extern int getpt (void);
1844
1845
1846
1847
1848
1849
1850extern int getloadavg (double __loadavg[], int __nelem)
1851 throw () __attribute__ ((__nonnull__ (1)));
1852# 978 "/usr/include/stdlib.h" 3 4
1853}
1854# 73 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 2 3
1855# 104 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3
1856namespace std
1857{
1858 using ::div_t;
1859 using ::ldiv_t;
1860
1861 using ::abort;
1862 using ::abs;
1863 using ::atexit;
1864 using ::atof;
1865 using ::atoi;
1866 using ::atol;
1867 using ::bsearch;
1868 using ::calloc;
1869 using ::div;
1870 using ::exit;
1871 using ::free;
1872 using ::getenv;
1873 using ::labs;
1874 using ::ldiv;
1875 using ::malloc;
1876
1877 using ::mblen;
1878 using ::mbstowcs;
1879 using ::mbtowc;
1880
1881 using ::qsort;
1882 using ::rand;
1883 using ::realloc;
1884 using ::srand;
1885 using ::strtod;
1886 using ::strtol;
1887 using ::strtoul;
1888 using ::system;
1889
1890 using ::wcstombs;
1891 using ::wctomb;
1892
1893
1894 inline long
1895 abs(long __i) { return labs(__i); }
1896
1897 inline ldiv_t
1898 div(long __i, long __j) { return ldiv(__i, __j); }
1899}
1900# 160 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3
1901namespace __gnu_cxx
1902{
1903
1904 using ::lldiv_t;
1905
1906
1907
1908
1909
1910 using ::_Exit;
1911
1912
1913 inline long long
1914 abs(long long __x) { return __x >= 0 ? __x : -__x; }
1915
1916
1917 using ::llabs;
1918
1919 inline lldiv_t
1920 div(long long __n, long long __d)
1921 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
1922
1923 using ::lldiv;
1924# 193 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3
1925 using ::atoll;
1926 using ::strtoll;
1927 using ::strtoull;
1928
1929 using ::strtof;
1930 using ::strtold;
1931}
1932
1933namespace std
1934{
1935
1936 using ::__gnu_cxx::lldiv_t;
1937
1938 using ::__gnu_cxx::_Exit;
1939 using ::__gnu_cxx::abs;
1940
1941 using ::__gnu_cxx::llabs;
1942 using ::__gnu_cxx::div;
1943 using ::__gnu_cxx::lldiv;
1944
1945 using ::__gnu_cxx::atoll;
1946 using ::__gnu_cxx::strtof;
1947 using ::__gnu_cxx::strtoll;
1948 using ::__gnu_cxx::strtoull;
1949 using ::__gnu_cxx::strtold;
1950}
1951
1952
1953
1954
1955
1956#pragma GCC visibility pop
1957# 68 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
1958
1959# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 1 3
1960# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 3
1961
1962# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 3
1963#pragma GCC visibility push(default)
1964
1965
1966# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 1 3
1967# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 3
1968
1969# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 3
1970
1971
1972# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 1 3
1973# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3
1974
1975# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3
1976#pragma GCC visibility push(default)
1977
1978
1979
1980
1981# 1 "/usr/include/stdio.h" 1 3 4
1982# 30 "/usr/include/stdio.h" 3 4
1983extern "C" {
1984
1985
1986
1987# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1988# 35 "/usr/include/stdio.h" 2 3 4
1989# 44 "/usr/include/stdio.h" 3 4
1990
1991
1992typedef struct _IO_FILE FILE;
1993
1994
1995
1996
1997
1998# 62 "/usr/include/stdio.h" 3 4
1999typedef struct _IO_FILE __FILE;
2000# 72 "/usr/include/stdio.h" 3 4
2001# 1 "/usr/include/libio.h" 1 3 4
2002# 32 "/usr/include/libio.h" 3 4
2003# 1 "/usr/include/_G_config.h" 1 3 4
2004# 14 "/usr/include/_G_config.h" 3 4
2005# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2006# 355 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
2007typedef unsigned int wint_t;
2008# 15 "/usr/include/_G_config.h" 2 3 4
2009# 24 "/usr/include/_G_config.h" 3 4
2010# 1 "/usr/include/wchar.h" 1 3 4
2011# 48 "/usr/include/wchar.h" 3 4
2012# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2013# 49 "/usr/include/wchar.h" 2 3 4
2014
2015# 1 "/usr/include/bits/wchar.h" 1 3 4
2016# 51 "/usr/include/wchar.h" 2 3 4
2017# 76 "/usr/include/wchar.h" 3 4
2018typedef struct
2019{
2020 int __count;
2021 union
2022 {
2023 wint_t __wch;
2024 char __wchb[4];
2025 } __value;
2026} __mbstate_t;
2027# 25 "/usr/include/_G_config.h" 2 3 4
2028
2029typedef struct
2030{
2031 __off_t __pos;
2032 __mbstate_t __state;
2033} _G_fpos_t;
2034typedef struct
2035{
2036 __off64_t __pos;
2037 __mbstate_t __state;
2038} _G_fpos64_t;
2039# 44 "/usr/include/_G_config.h" 3 4
2040# 1 "/usr/include/gconv.h" 1 3 4
2041# 28 "/usr/include/gconv.h" 3 4
2042# 1 "/usr/include/wchar.h" 1 3 4
2043# 48 "/usr/include/wchar.h" 3 4
2044# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2045# 49 "/usr/include/wchar.h" 2 3 4
2046# 29 "/usr/include/gconv.h" 2 3 4
2047
2048
2049# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
2050# 32 "/usr/include/gconv.h" 2 3 4
2051
2052
2053
2054
2055
2056enum
2057{
2058 __GCONV_OK = 0,
2059 __GCONV_NOCONV,
2060 __GCONV_NODB,
2061 __GCONV_NOMEM,
2062
2063 __GCONV_EMPTY_INPUT,
2064 __GCONV_FULL_OUTPUT,
2065 __GCONV_ILLEGAL_INPUT,
2066 __GCONV_INCOMPLETE_INPUT,
2067
2068 __GCONV_ILLEGAL_DESCRIPTOR,
2069 __GCONV_INTERNAL_ERROR
2070};
2071
2072
2073
2074enum
2075{
2076 __GCONV_IS_LAST = 0x0001,
2077 __GCONV_IGNORE_ERRORS = 0x0002
2078};
2079
2080
2081
2082struct __gconv_step;
2083struct __gconv_step_data;
2084struct __gconv_loaded_object;
2085struct __gconv_trans_data;
2086
2087
2088
2089typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
2090 __const unsigned char **, __const unsigned char *,
2091 unsigned char **, size_t *, int, int);
2092
2093
2094typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
2095
2096
2097typedef int (*__gconv_init_fct) (struct __gconv_step *);
2098typedef void (*__gconv_end_fct) (struct __gconv_step *);
2099
2100
2101
2102typedef int (*__gconv_trans_fct) (struct __gconv_step *,
2103 struct __gconv_step_data *, void *,
2104 __const unsigned char *,
2105 __const unsigned char **,
2106 __const unsigned char *, unsigned char **,
2107 size_t *);
2108
2109
2110typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
2111 __const unsigned char *,
2112 unsigned char *, unsigned char *);
2113
2114
2115typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
2116 size_t *);
2117
2118
2119typedef int (*__gconv_trans_init_fct) (void **, const char *);
2120typedef void (*__gconv_trans_end_fct) (void *);
2121
2122struct __gconv_trans_data
2123{
2124
2125 __gconv_trans_fct __trans_fct;
2126 __gconv_trans_context_fct __trans_context_fct;
2127 __gconv_trans_end_fct __trans_end_fct;
2128 void *__data;
2129 struct __gconv_trans_data *__next;
2130};
2131
2132
2133
2134struct __gconv_step
2135{
2136 struct __gconv_loaded_object *__shlib_handle;
2137 __const char *__modname;
2138
2139 int __counter;
2140
2141 char *__from_name;
2142 char *__to_name;
2143
2144 __gconv_fct __fct;
2145 __gconv_btowc_fct __btowc_fct;
2146 __gconv_init_fct __init_fct;
2147 __gconv_end_fct __end_fct;
2148
2149
2150
2151 int __min_needed_from;
2152 int __max_needed_from;
2153 int __min_needed_to;
2154 int __max_needed_to;
2155
2156
2157 int __stateful;
2158
2159 void *__data;
2160};
2161
2162
2163
2164struct __gconv_step_data
2165{
2166 unsigned char *__outbuf;
2167 unsigned char *__outbufend;
2168
2169
2170
2171 int __flags;
2172
2173
2174
2175 int __invocation_counter;
2176
2177
2178
2179 int __internal_use;
2180
2181 __mbstate_t *__statep;
2182 __mbstate_t __state;
2183
2184
2185
2186 struct __gconv_trans_data *__trans;
2187};
2188
2189
2190
2191typedef struct __gconv_info
2192{
2193 size_t __nsteps;
2194 struct __gconv_step *__steps;
2195 __extension__ struct __gconv_step_data __data [];
2196} *__gconv_t;
2197# 45 "/usr/include/_G_config.h" 2 3 4
2198typedef union
2199{
2200 struct __gconv_info __cd;
2201 struct
2202 {
2203 struct __gconv_info __cd;
2204 struct __gconv_step_data __data;
2205 } __combined;
2206} _G_iconv_t;
2207
2208typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
2209typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
2210typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
2211typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
2212# 33 "/usr/include/libio.h" 2 3 4
2213# 53 "/usr/include/libio.h" 3 4
2214# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
2215# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 3 4
2216typedef __builtin_va_list __gnuc_va_list;
2217# 54 "/usr/include/libio.h" 2 3 4
2218# 166 "/usr/include/libio.h" 3 4
2219struct _IO_jump_t; struct _IO_FILE;
2220# 176 "/usr/include/libio.h" 3 4
2221typedef void _IO_lock_t;
2222
2223
2224
2225
2226
2227struct _IO_marker {
2228 struct _IO_marker *_next;
2229 struct _IO_FILE *_sbuf;
2230
2231
2232
2233 int _pos;
2234# 199 "/usr/include/libio.h" 3 4
2235};
2236
2237
2238enum __codecvt_result
2239{
2240 __codecvt_ok,
2241 __codecvt_partial,
2242 __codecvt_error,
2243 __codecvt_noconv
2244};
2245# 267 "/usr/include/libio.h" 3 4
2246struct _IO_FILE {
2247 int _flags;
2248
2249
2250
2251
2252 char* _IO_read_ptr;
2253 char* _IO_read_end;
2254 char* _IO_read_base;
2255 char* _IO_write_base;
2256 char* _IO_write_ptr;
2257 char* _IO_write_end;
2258 char* _IO_buf_base;
2259 char* _IO_buf_end;
2260
2261 char *_IO_save_base;
2262 char *_IO_backup_base;
2263 char *_IO_save_end;
2264
2265 struct _IO_marker *_markers;
2266
2267 struct _IO_FILE *_chain;
2268
2269 int _fileno;
2270
2271
2272
2273 int _flags2;
2274
2275 __off_t _old_offset;
2276
2277
2278
2279 unsigned short _cur_column;
2280 signed char _vtable_offset;
2281 char _shortbuf[1];
2282
2283
2284
2285 _IO_lock_t *_lock;
2286# 315 "/usr/include/libio.h" 3 4
2287 __off64_t _offset;
2288# 324 "/usr/include/libio.h" 3 4
2289 void *__pad1;
2290 void *__pad2;
2291 void *__pad3;
2292 void *__pad4;
2293 size_t __pad5;
2294
2295 int _mode;
2296
2297 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
2298
2299};
2300
2301
2302
2303
2304
2305struct _IO_FILE_plus;
2306
2307extern struct _IO_FILE_plus _IO_2_1_stdin_;
2308extern struct _IO_FILE_plus _IO_2_1_stdout_;
2309extern struct _IO_FILE_plus _IO_2_1_stderr_;
2310# 360 "/usr/include/libio.h" 3 4
2311typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
2312
2313
2314
2315
2316
2317
2318
2319typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
2320 size_t __n);
2321
2322
2323
2324
2325
2326
2327
2328typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
2329
2330
2331typedef int __io_close_fn (void *__cookie);
2332
2333
2334
2335
2336typedef __io_read_fn cookie_read_function_t;
2337typedef __io_write_fn cookie_write_function_t;
2338typedef __io_seek_fn cookie_seek_function_t;
2339typedef __io_close_fn cookie_close_function_t;
2340
2341
2342typedef struct
2343{
2344 __io_read_fn *read;
2345 __io_write_fn *write;
2346 __io_seek_fn *seek;
2347 __io_close_fn *close;
2348} _IO_cookie_io_functions_t;
2349typedef _IO_cookie_io_functions_t cookie_io_functions_t;
2350
2351struct _IO_cookie_file;
2352
2353
2354extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
2355 void *__cookie, _IO_cookie_io_functions_t __fns);
2356
2357
2358
2359
2360extern "C" {
2361
2362
2363extern int __underflow (_IO_FILE *) throw ();
2364extern int __uflow (_IO_FILE *) throw ();
2365extern int __overflow (_IO_FILE *, int) throw ();
2366extern wint_t __wunderflow (_IO_FILE *) throw ();
2367extern wint_t __wuflow (_IO_FILE *) throw ();
2368extern wint_t __woverflow (_IO_FILE *, wint_t) throw ();
2369# 450 "/usr/include/libio.h" 3 4
2370extern int _IO_getc (_IO_FILE *__fp) throw ();
2371extern int _IO_putc (int __c, _IO_FILE *__fp) throw ();
2372extern int _IO_feof (_IO_FILE *__fp) throw ();
2373extern int _IO_ferror (_IO_FILE *__fp) throw ();
2374
2375extern int _IO_peekc_locked (_IO_FILE *__fp) throw ();
2376
2377
2378
2379
2380
2381extern void _IO_flockfile (_IO_FILE *) throw ();
2382extern void _IO_funlockfile (_IO_FILE *) throw ();
2383extern int _IO_ftrylockfile (_IO_FILE *) throw ();
2384# 480 "/usr/include/libio.h" 3 4
2385extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
2386 __gnuc_va_list, int *__restrict);
2387extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
2388 __gnuc_va_list);
2389extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw ();
2390extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw ();
2391
2392extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw ();
2393extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw ();
2394
2395extern void _IO_free_backup_area (_IO_FILE *) throw ();
2396# 542 "/usr/include/libio.h" 3 4
2397}
2398# 73 "/usr/include/stdio.h" 2 3 4
2399
2400
2401
2402
2403typedef __gnuc_va_list va_list;
2404# 86 "/usr/include/stdio.h" 3 4
2405
2406
2407typedef _G_fpos_t fpos_t;
2408
2409
2410
2411
2412
2413typedef _G_fpos64_t fpos64_t;
2414# 138 "/usr/include/stdio.h" 3 4
2415# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
2416# 139 "/usr/include/stdio.h" 2 3 4
2417
2418
2419
2420extern struct _IO_FILE *stdin;
2421extern struct _IO_FILE *stdout;
2422extern struct _IO_FILE *stderr;
2423
2424
2425
2426
2427
2428
2429
2430extern int remove (__const char *__filename) throw ();
2431
2432extern int rename (__const char *__old, __const char *__new) throw ();
2433
2434
2435
2436
2437extern int renameat (int __oldfd, __const char *__old, int __newfd,
2438 __const char *__new) throw ();
2439
2440
2441
2442
2443
2444
2445
2446
2447extern FILE *tmpfile (void);
2448# 179 "/usr/include/stdio.h" 3 4
2449extern FILE *tmpfile64 (void);
2450
2451
2452
2453extern char *tmpnam (char *__s) throw ();
2454
2455
2456
2457
2458
2459extern char *tmpnam_r (char *__s) throw ();
2460# 201 "/usr/include/stdio.h" 3 4
2461extern char *tempnam (__const char *__dir, __const char *__pfx)
2462 throw () __attribute__ ((__malloc__));
2463
2464
2465
2466
2467
2468
2469
2470
2471extern int fclose (FILE *__stream);
2472
2473
2474
2475
2476extern int fflush (FILE *__stream);
2477
2478# 226 "/usr/include/stdio.h" 3 4
2479extern int fflush_unlocked (FILE *__stream);
2480# 236 "/usr/include/stdio.h" 3 4
2481extern int fcloseall (void);
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491extern FILE *fopen (__const char *__restrict __filename,
2492 __const char *__restrict __modes);
2493
2494
2495
2496
2497extern FILE *freopen (__const char *__restrict __filename,
2498 __const char *__restrict __modes,
2499 FILE *__restrict __stream);
2500# 267 "/usr/include/stdio.h" 3 4
2501
2502
2503extern FILE *fopen64 (__const char *__restrict __filename,
2504 __const char *__restrict __modes);
2505extern FILE *freopen64 (__const char *__restrict __filename,
2506 __const char *__restrict __modes,
2507 FILE *__restrict __stream);
2508
2509
2510
2511
2512extern FILE *fdopen (int __fd, __const char *__modes) throw ();
2513
2514
2515
2516
2517
2518extern FILE *fopencookie (void *__restrict __magic_cookie,
2519 __const char *__restrict __modes,
2520 _IO_cookie_io_functions_t __io_funcs) throw ();
2521
2522
2523extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw ();
2524
2525
2526
2527
2528extern FILE *open_memstream (char **__restrict __bufloc,
2529 size_t *__restrict __sizeloc) throw ();
2530
2531
2532
2533extern FILE *open_wmemstream (wchar_t **__restrict __bufloc,
2534 size_t *__restrict __sizeloc) throw ();
2535
2536
2537
2538
2539
2540
2541extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
2542
2543
2544
2545extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
2546 int __modes, size_t __n) throw ();
2547
2548
2549
2550
2551
2552extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
2553 size_t __size) throw ();
2554
2555
2556extern void setlinebuf (FILE *__stream) throw ();
2557
2558
2559
2560
2561
2562
2563
2564
2565extern int fprintf (FILE *__restrict __stream,
2566 __const char *__restrict __format, ...);
2567
2568
2569
2570
2571extern int printf (__const char *__restrict __format, ...);
2572
2573extern int sprintf (char *__restrict __s,
2574 __const char *__restrict __format, ...) throw ();
2575
2576
2577
2578
2579
2580extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
2581 __gnuc_va_list __arg);
2582
2583
2584
2585
2586extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
2587
2588extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
2589 __gnuc_va_list __arg) throw ();
2590
2591
2592
2593
2594
2595extern int snprintf (char *__restrict __s, size_t __maxlen,
2596 __const char *__restrict __format, ...)
2597 throw () __attribute__ ((__format__ (__printf__, 3, 4)));
2598
2599extern int vsnprintf (char *__restrict __s, size_t __maxlen,
2600 __const char *__restrict __format, __gnuc_va_list __arg)
2601 throw () __attribute__ ((__format__ (__printf__, 3, 0)));
2602
2603
2604
2605
2606
2607
2608extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
2609 __gnuc_va_list __arg)
2610 throw () __attribute__ ((__format__ (__printf__, 2, 0)));
2611extern int __asprintf (char **__restrict __ptr,
2612 __const char *__restrict __fmt, ...)
2613 throw () __attribute__ ((__format__ (__printf__, 2, 3)));
2614extern int asprintf (char **__restrict __ptr,
2615 __const char *__restrict __fmt, ...)
2616 throw () __attribute__ ((__format__ (__printf__, 2, 3)));
2617
2618
2619
2620
2621
2622
2623
2624extern int vdprintf (int __fd, __const char *__restrict __fmt,
2625 __gnuc_va_list __arg)
2626 __attribute__ ((__format__ (__printf__, 2, 0)));
2627extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
2628 __attribute__ ((__format__ (__printf__, 2, 3)));
2629
2630
2631
2632
2633
2634
2635
2636
2637extern int fscanf (FILE *__restrict __stream,
2638 __const char *__restrict __format, ...) ;
2639
2640
2641
2642
2643extern int scanf (__const char *__restrict __format, ...) ;
2644
2645extern int sscanf (__const char *__restrict __s,
2646 __const char *__restrict __format, ...) throw ();
2647
2648
2649
2650
2651
2652
2653
2654
2655extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
2656 __gnuc_va_list __arg)
2657 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
2658
2659
2660
2661
2662
2663extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
2664 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
2665
2666
2667extern int vsscanf (__const char *__restrict __s,
2668 __const char *__restrict __format, __gnuc_va_list __arg)
2669 throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679extern int fgetc (FILE *__stream);
2680extern int getc (FILE *__stream);
2681
2682
2683
2684
2685
2686extern int getchar (void);
2687
2688# 464 "/usr/include/stdio.h" 3 4
2689extern int getc_unlocked (FILE *__stream);
2690extern int getchar_unlocked (void);
2691# 475 "/usr/include/stdio.h" 3 4
2692extern int fgetc_unlocked (FILE *__stream);
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704extern int fputc (int __c, FILE *__stream);
2705extern int putc (int __c, FILE *__stream);
2706
2707
2708
2709
2710
2711extern int putchar (int __c);
2712
2713# 508 "/usr/include/stdio.h" 3 4
2714extern int fputc_unlocked (int __c, FILE *__stream);
2715
2716
2717
2718
2719
2720
2721
2722extern int putc_unlocked (int __c, FILE *__stream);
2723extern int putchar_unlocked (int __c);
2724
2725
2726
2727
2728
2729
2730extern int getw (FILE *__stream);
2731
2732
2733extern int putw (int __w, FILE *__stream);
2734
2735
2736
2737
2738
2739
2740
2741
2742extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
2743 ;
2744
2745
2746
2747
2748
2749
2750extern char *gets (char *__s) ;
2751
2752# 554 "/usr/include/stdio.h" 3 4
2753extern char *fgets_unlocked (char *__restrict __s, int __n,
2754 FILE *__restrict __stream) ;
2755# 570 "/usr/include/stdio.h" 3 4
2756extern __ssize_t __getdelim (char **__restrict __lineptr,
2757 size_t *__restrict __n, int __delimiter,
2758 FILE *__restrict __stream) ;
2759extern __ssize_t getdelim (char **__restrict __lineptr,
2760 size_t *__restrict __n, int __delimiter,
2761 FILE *__restrict __stream) ;
2762
2763
2764
2765
2766
2767
2768
2769extern __ssize_t getline (char **__restrict __lineptr,
2770 size_t *__restrict __n,
2771 FILE *__restrict __stream) ;
2772
2773
2774
2775
2776
2777
2778
2779
2780extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
2781
2782
2783
2784
2785
2786extern int puts (__const char *__s);
2787
2788
2789
2790
2791
2792
2793extern int ungetc (int __c, FILE *__stream);
2794
2795
2796
2797
2798
2799
2800extern size_t fread (void *__restrict __ptr, size_t __size,
2801 size_t __n, FILE *__restrict __stream) ;
2802
2803
2804
2805
2806extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
2807 size_t __n, FILE *__restrict __s) ;
2808
2809# 631 "/usr/include/stdio.h" 3 4
2810extern int fputs_unlocked (__const char *__restrict __s,
2811 FILE *__restrict __stream);
2812# 642 "/usr/include/stdio.h" 3 4
2813extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
2814 size_t __n, FILE *__restrict __stream) ;
2815extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
2816 size_t __n, FILE *__restrict __stream) ;
2817
2818
2819
2820
2821
2822
2823
2824
2825extern int fseek (FILE *__stream, long int __off, int __whence);
2826
2827
2828
2829
2830extern long int ftell (FILE *__stream) ;
2831
2832
2833
2834
2835extern void rewind (FILE *__stream);
2836
2837# 678 "/usr/include/stdio.h" 3 4
2838extern int fseeko (FILE *__stream, __off_t __off, int __whence);
2839
2840
2841
2842
2843extern __off_t ftello (FILE *__stream) ;
2844# 697 "/usr/include/stdio.h" 3 4
2845
2846
2847
2848
2849
2850
2851extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
2852
2853
2854
2855
2856extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
2857# 720 "/usr/include/stdio.h" 3 4
2858
2859
2860
2861extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
2862extern __off64_t ftello64 (FILE *__stream) ;
2863extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
2864extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
2865
2866
2867
2868
2869extern void clearerr (FILE *__stream) throw ();
2870
2871extern int feof (FILE *__stream) throw () ;
2872
2873extern int ferror (FILE *__stream) throw () ;
2874
2875
2876
2877
2878extern void clearerr_unlocked (FILE *__stream) throw ();
2879extern int feof_unlocked (FILE *__stream) throw () ;
2880extern int ferror_unlocked (FILE *__stream) throw () ;
2881
2882
2883
2884
2885
2886
2887
2888
2889extern void perror (__const char *__s);
2890
2891
2892
2893
2894
2895
2896# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
2897# 27 "/usr/include/bits/sys_errlist.h" 3 4
2898extern int sys_nerr;
2899extern __const char *__const sys_errlist[];
2900
2901
2902extern int _sys_nerr;
2903extern __const char *__const _sys_errlist[];
2904# 759 "/usr/include/stdio.h" 2 3 4
2905
2906
2907
2908
2909extern int fileno (FILE *__stream) throw () ;
2910
2911
2912
2913
2914extern int fileno_unlocked (FILE *__stream) throw () ;
2915# 778 "/usr/include/stdio.h" 3 4
2916extern FILE *popen (__const char *__command, __const char *__modes) ;
2917
2918
2919
2920
2921
2922extern int pclose (FILE *__stream);
2923
2924
2925
2926
2927
2928extern char *ctermid (char *__s) throw ();
2929
2930
2931
2932
2933
2934extern char *cuserid (char *__s);
2935
2936
2937
2938
2939struct obstack;
2940
2941
2942extern int obstack_printf (struct obstack *__restrict __obstack,
2943 __const char *__restrict __format, ...)
2944 throw () __attribute__ ((__format__ (__printf__, 2, 3)));
2945extern int obstack_vprintf (struct obstack *__restrict __obstack,
2946 __const char *__restrict __format,
2947 __gnuc_va_list __args)
2948 throw () __attribute__ ((__format__ (__printf__, 2, 0)));
2949
2950
2951
2952
2953
2954
2955
2956extern void flockfile (FILE *__stream) throw ();
2957
2958
2959
2960extern int ftrylockfile (FILE *__stream) throw () ;
2961
2962
2963extern void funlockfile (FILE *__stream) throw ();
2964# 848 "/usr/include/stdio.h" 3 4
2965}
2966# 55 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 2 3
2967# 99 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3
2968namespace std
2969{
2970 using ::FILE;
2971 using ::fpos_t;
2972
2973 using ::clearerr;
2974 using ::fclose;
2975 using ::feof;
2976 using ::ferror;
2977 using ::fflush;
2978 using ::fgetc;
2979 using ::fgetpos;
2980 using ::fgets;
2981 using ::fopen;
2982 using ::fprintf;
2983 using ::fputc;
2984 using ::fputs;
2985 using ::fread;
2986 using ::freopen;
2987 using ::fscanf;
2988 using ::fseek;
2989 using ::fsetpos;
2990 using ::ftell;
2991 using ::fwrite;
2992 using ::getc;
2993 using ::getchar;
2994 using ::gets;
2995 using ::perror;
2996 using ::printf;
2997 using ::putc;
2998 using ::putchar;
2999 using ::puts;
3000 using ::remove;
3001 using ::rename;
3002 using ::rewind;
3003 using ::scanf;
3004 using ::setbuf;
3005 using ::setvbuf;
3006 using ::sprintf;
3007 using ::sscanf;
3008 using ::tmpfile;
3009 using ::tmpnam;
3010 using ::ungetc;
3011 using ::vfprintf;
3012 using ::vprintf;
3013 using ::vsprintf;
3014}
3015# 155 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3
3016namespace __gnu_cxx
3017{
3018# 170 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3
3019 using ::snprintf;
3020 using ::vfscanf;
3021 using ::vscanf;
3022 using ::vsnprintf;
3023 using ::vsscanf;
3024
3025}
3026
3027namespace std
3028{
3029 using __gnu_cxx::snprintf;
3030 using __gnu_cxx::vfscanf;
3031 using __gnu_cxx::vscanf;
3032 using __gnu_cxx::vsnprintf;
3033 using __gnu_cxx::vsscanf;
3034}
3035
3036
3037#pragma GCC visibility pop
3038# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 2 3
3039# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 1 3
3040# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 3
3041
3042# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 3
3043#pragma GCC visibility push(default)
3044
3045# 1 "/usr/include/locale.h" 1 3 4
3046# 29 "/usr/include/locale.h" 3 4
3047# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
3048# 30 "/usr/include/locale.h" 2 3 4
3049# 1 "/usr/include/bits/locale.h" 1 3 4
3050# 27 "/usr/include/bits/locale.h" 3 4
3051enum
3052{
3053 __LC_CTYPE = 0,
3054 __LC_NUMERIC = 1,
3055 __LC_TIME = 2,
3056 __LC_COLLATE = 3,
3057 __LC_MONETARY = 4,
3058 __LC_MESSAGES = 5,
3059 __LC_ALL = 6,
3060 __LC_PAPER = 7,
3061 __LC_NAME = 8,
3062 __LC_ADDRESS = 9,
3063 __LC_TELEPHONE = 10,
3064 __LC_MEASUREMENT = 11,
3065 __LC_IDENTIFICATION = 12
3066};
3067# 31 "/usr/include/locale.h" 2 3 4
3068
3069extern "C" {
3070# 52 "/usr/include/locale.h" 3 4
3071struct lconv
3072{
3073
3074
3075 char *decimal_point;
3076 char *thousands_sep;
3077
3078
3079
3080
3081
3082 char *grouping;
3083
3084
3085
3086
3087
3088 char *int_curr_symbol;
3089 char *currency_symbol;
3090 char *mon_decimal_point;
3091 char *mon_thousands_sep;
3092 char *mon_grouping;
3093 char *positive_sign;
3094 char *negative_sign;
3095 char int_frac_digits;
3096 char frac_digits;
3097
3098 char p_cs_precedes;
3099
3100 char p_sep_by_space;
3101
3102 char n_cs_precedes;
3103
3104 char n_sep_by_space;
3105
3106
3107
3108
3109
3110
3111 char p_sign_posn;
3112 char n_sign_posn;
3113
3114
3115 char int_p_cs_precedes;
3116
3117 char int_p_sep_by_space;
3118
3119 char int_n_cs_precedes;
3120
3121 char int_n_sep_by_space;
3122
3123
3124
3125
3126
3127
3128 char int_p_sign_posn;
3129 char int_n_sign_posn;
3130# 119 "/usr/include/locale.h" 3 4
3131};
3132
3133
3134
3135
3136
3137extern char *setlocale (int __category, __const char *__locale) throw ();
3138
3139
3140extern struct lconv *localeconv (void) throw ();
3141
3142
3143# 148 "/usr/include/locale.h" 3 4
3144typedef __locale_t locale_t;
3145
3146
3147
3148
3149
3150extern __locale_t newlocale (int __category_mask, __const char *__locale,
3151 __locale_t __base) throw ();
3152# 189 "/usr/include/locale.h" 3 4
3153extern __locale_t duplocale (__locale_t __dataset) throw ();
3154
3155
3156
3157extern void freelocale (__locale_t __dataset) throw ();
3158
3159
3160
3161
3162
3163
3164extern __locale_t uselocale (__locale_t __dataset) throw ();
3165
3166
3167
3168
3169
3170
3171
3172}
3173# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 2 3
3174
3175
3176
3177
3178
3179namespace std
3180{
3181 using ::lconv;
3182 using ::setlocale;
3183 using ::localeconv;
3184}
3185
3186#pragma GCC visibility pop
3187# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 2 3
3188# 1 "/usr/include/langinfo.h" 1 3 4
3189# 24 "/usr/include/langinfo.h" 3 4
3190# 1 "/usr/include/nl_types.h" 1 3 4
3191# 31 "/usr/include/nl_types.h" 3 4
3192extern "C" {
3193
3194
3195typedef void *nl_catd;
3196
3197
3198typedef int nl_item;
3199
3200
3201
3202
3203
3204extern nl_catd catopen (__const char *__cat_name, int __flag) __attribute__ ((__nonnull__ (1)));
3205
3206
3207
3208extern char *catgets (nl_catd __catalog, int __set, int __number,
3209 __const char *__string) throw () __attribute__ ((__nonnull__ (1)));
3210
3211
3212extern int catclose (nl_catd __catalog) throw () __attribute__ ((__nonnull__ (1)));
3213
3214}
3215# 25 "/usr/include/langinfo.h" 2 3 4
3216
3217# 1 "/usr/include/bits/locale.h" 1 3 4
3218# 27 "/usr/include/langinfo.h" 2 3 4
3219
3220
3221extern "C" {
3222# 42 "/usr/include/langinfo.h" 3 4
3223enum
3224{
3225
3226
3227
3228 ABDAY_1 = (((__LC_TIME) << 16) | (0)),
3229
3230 ABDAY_2,
3231
3232 ABDAY_3,
3233
3234 ABDAY_4,
3235
3236 ABDAY_5,
3237
3238 ABDAY_6,
3239
3240 ABDAY_7,
3241
3242
3243
3244 DAY_1,
3245
3246 DAY_2,
3247
3248 DAY_3,
3249
3250 DAY_4,
3251
3252 DAY_5,
3253
3254 DAY_6,
3255
3256 DAY_7,
3257
3258
3259
3260 ABMON_1,
3261
3262 ABMON_2,
3263
3264 ABMON_3,
3265
3266 ABMON_4,
3267
3268 ABMON_5,
3269
3270 ABMON_6,
3271
3272 ABMON_7,
3273
3274 ABMON_8,
3275
3276 ABMON_9,
3277
3278 ABMON_10,
3279
3280 ABMON_11,
3281
3282 ABMON_12,
3283
3284
3285
3286 MON_1,
3287
3288 MON_2,
3289
3290 MON_3,
3291
3292 MON_4,
3293
3294 MON_5,
3295
3296 MON_6,
3297
3298 MON_7,
3299
3300 MON_8,
3301
3302 MON_9,
3303
3304 MON_10,
3305
3306 MON_11,
3307
3308 MON_12,
3309
3310
3311 AM_STR,
3312
3313 PM_STR,
3314
3315
3316 D_T_FMT,
3317
3318 D_FMT,
3319
3320 T_FMT,
3321
3322 T_FMT_AMPM,
3323
3324
3325 ERA,
3326
3327 __ERA_YEAR,
3328
3329
3330
3331 ERA_D_FMT,
3332
3333 ALT_DIGITS,
3334
3335 ERA_D_T_FMT,
3336
3337 ERA_T_FMT,
3338
3339
3340 _NL_TIME_ERA_NUM_ENTRIES,
3341 _NL_TIME_ERA_ENTRIES,
3342
3343 _NL_WABDAY_1,
3344 _NL_WABDAY_2,
3345 _NL_WABDAY_3,
3346 _NL_WABDAY_4,
3347 _NL_WABDAY_5,
3348 _NL_WABDAY_6,
3349 _NL_WABDAY_7,
3350
3351
3352 _NL_WDAY_1,
3353 _NL_WDAY_2,
3354 _NL_WDAY_3,
3355 _NL_WDAY_4,
3356 _NL_WDAY_5,
3357 _NL_WDAY_6,
3358 _NL_WDAY_7,
3359
3360
3361 _NL_WABMON_1,
3362 _NL_WABMON_2,
3363 _NL_WABMON_3,
3364 _NL_WABMON_4,
3365 _NL_WABMON_5,
3366 _NL_WABMON_6,
3367 _NL_WABMON_7,
3368 _NL_WABMON_8,
3369 _NL_WABMON_9,
3370 _NL_WABMON_10,
3371 _NL_WABMON_11,
3372 _NL_WABMON_12,
3373
3374
3375 _NL_WMON_1,
3376 _NL_WMON_2,
3377 _NL_WMON_3,
3378 _NL_WMON_4,
3379 _NL_WMON_5,
3380 _NL_WMON_6,
3381 _NL_WMON_7,
3382 _NL_WMON_8,
3383 _NL_WMON_9,
3384 _NL_WMON_10,
3385 _NL_WMON_11,
3386 _NL_WMON_12,
3387
3388 _NL_WAM_STR,
3389 _NL_WPM_STR,
3390
3391 _NL_WD_T_FMT,
3392 _NL_WD_FMT,
3393 _NL_WT_FMT,
3394 _NL_WT_FMT_AMPM,
3395
3396 _NL_WERA_YEAR,
3397 _NL_WERA_D_FMT,
3398 _NL_WALT_DIGITS,
3399 _NL_WERA_D_T_FMT,
3400 _NL_WERA_T_FMT,
3401
3402 _NL_TIME_WEEK_NDAYS,
3403 _NL_TIME_WEEK_1STDAY,
3404 _NL_TIME_WEEK_1STWEEK,
3405 _NL_TIME_FIRST_WEEKDAY,
3406 _NL_TIME_FIRST_WORKDAY,
3407 _NL_TIME_CAL_DIRECTION,
3408 _NL_TIME_TIMEZONE,
3409
3410 _DATE_FMT,
3411
3412 _NL_W_DATE_FMT,
3413
3414 _NL_TIME_CODESET,
3415
3416 _NL_NUM_LC_TIME,
3417
3418
3419
3420
3421 _NL_COLLATE_NRULES = (((__LC_COLLATE) << 16) | (0)),
3422 _NL_COLLATE_RULESETS,
3423 _NL_COLLATE_TABLEMB,
3424 _NL_COLLATE_WEIGHTMB,
3425 _NL_COLLATE_EXTRAMB,
3426 _NL_COLLATE_INDIRECTMB,
3427 _NL_COLLATE_GAP1,
3428 _NL_COLLATE_GAP2,
3429 _NL_COLLATE_GAP3,
3430 _NL_COLLATE_TABLEWC,
3431 _NL_COLLATE_WEIGHTWC,
3432 _NL_COLLATE_EXTRAWC,
3433 _NL_COLLATE_INDIRECTWC,
3434 _NL_COLLATE_SYMB_HASH_SIZEMB,
3435 _NL_COLLATE_SYMB_TABLEMB,
3436 _NL_COLLATE_SYMB_EXTRAMB,
3437 _NL_COLLATE_COLLSEQMB,
3438 _NL_COLLATE_COLLSEQWC,
3439 _NL_COLLATE_CODESET,
3440 _NL_NUM_LC_COLLATE,
3441
3442
3443
3444
3445 _NL_CTYPE_CLASS = (((__LC_CTYPE) << 16) | (0)),
3446 _NL_CTYPE_TOUPPER,
3447 _NL_CTYPE_GAP1,
3448 _NL_CTYPE_TOLOWER,
3449 _NL_CTYPE_GAP2,
3450 _NL_CTYPE_CLASS32,
3451 _NL_CTYPE_GAP3,
3452 _NL_CTYPE_GAP4,
3453 _NL_CTYPE_GAP5,
3454 _NL_CTYPE_GAP6,
3455 _NL_CTYPE_CLASS_NAMES,
3456 _NL_CTYPE_MAP_NAMES,
3457 _NL_CTYPE_WIDTH,
3458 _NL_CTYPE_MB_CUR_MAX,
3459 _NL_CTYPE_CODESET_NAME,
3460 CODESET = _NL_CTYPE_CODESET_NAME,
3461
3462 _NL_CTYPE_TOUPPER32,
3463 _NL_CTYPE_TOLOWER32,
3464 _NL_CTYPE_CLASS_OFFSET,
3465 _NL_CTYPE_MAP_OFFSET,
3466 _NL_CTYPE_INDIGITS_MB_LEN,
3467 _NL_CTYPE_INDIGITS0_MB,
3468 _NL_CTYPE_INDIGITS1_MB,
3469 _NL_CTYPE_INDIGITS2_MB,
3470 _NL_CTYPE_INDIGITS3_MB,
3471 _NL_CTYPE_INDIGITS4_MB,
3472 _NL_CTYPE_INDIGITS5_MB,
3473 _NL_CTYPE_INDIGITS6_MB,
3474 _NL_CTYPE_INDIGITS7_MB,
3475 _NL_CTYPE_INDIGITS8_MB,
3476 _NL_CTYPE_INDIGITS9_MB,
3477 _NL_CTYPE_INDIGITS_WC_LEN,
3478 _NL_CTYPE_INDIGITS0_WC,
3479 _NL_CTYPE_INDIGITS1_WC,
3480 _NL_CTYPE_INDIGITS2_WC,
3481 _NL_CTYPE_INDIGITS3_WC,
3482 _NL_CTYPE_INDIGITS4_WC,
3483 _NL_CTYPE_INDIGITS5_WC,
3484 _NL_CTYPE_INDIGITS6_WC,
3485 _NL_CTYPE_INDIGITS7_WC,
3486 _NL_CTYPE_INDIGITS8_WC,
3487 _NL_CTYPE_INDIGITS9_WC,
3488 _NL_CTYPE_OUTDIGIT0_MB,
3489 _NL_CTYPE_OUTDIGIT1_MB,
3490 _NL_CTYPE_OUTDIGIT2_MB,
3491 _NL_CTYPE_OUTDIGIT3_MB,
3492 _NL_CTYPE_OUTDIGIT4_MB,
3493 _NL_CTYPE_OUTDIGIT5_MB,
3494 _NL_CTYPE_OUTDIGIT6_MB,
3495 _NL_CTYPE_OUTDIGIT7_MB,
3496 _NL_CTYPE_OUTDIGIT8_MB,
3497 _NL_CTYPE_OUTDIGIT9_MB,
3498 _NL_CTYPE_OUTDIGIT0_WC,
3499 _NL_CTYPE_OUTDIGIT1_WC,
3500 _NL_CTYPE_OUTDIGIT2_WC,
3501 _NL_CTYPE_OUTDIGIT3_WC,
3502 _NL_CTYPE_OUTDIGIT4_WC,
3503 _NL_CTYPE_OUTDIGIT5_WC,
3504 _NL_CTYPE_OUTDIGIT6_WC,
3505 _NL_CTYPE_OUTDIGIT7_WC,
3506 _NL_CTYPE_OUTDIGIT8_WC,
3507 _NL_CTYPE_OUTDIGIT9_WC,
3508 _NL_CTYPE_TRANSLIT_TAB_SIZE,
3509 _NL_CTYPE_TRANSLIT_FROM_IDX,
3510 _NL_CTYPE_TRANSLIT_FROM_TBL,
3511 _NL_CTYPE_TRANSLIT_TO_IDX,
3512 _NL_CTYPE_TRANSLIT_TO_TBL,
3513 _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN,
3514 _NL_CTYPE_TRANSLIT_DEFAULT_MISSING,
3515 _NL_CTYPE_TRANSLIT_IGNORE_LEN,
3516 _NL_CTYPE_TRANSLIT_IGNORE,
3517 _NL_CTYPE_MAP_TO_NONASCII,
3518 _NL_CTYPE_EXTRA_MAP_1,
3519 _NL_CTYPE_EXTRA_MAP_2,
3520 _NL_CTYPE_EXTRA_MAP_3,
3521 _NL_CTYPE_EXTRA_MAP_4,
3522 _NL_CTYPE_EXTRA_MAP_5,
3523 _NL_CTYPE_EXTRA_MAP_6,
3524 _NL_CTYPE_EXTRA_MAP_7,
3525 _NL_CTYPE_EXTRA_MAP_8,
3526 _NL_CTYPE_EXTRA_MAP_9,
3527 _NL_CTYPE_EXTRA_MAP_10,
3528 _NL_CTYPE_EXTRA_MAP_11,
3529 _NL_CTYPE_EXTRA_MAP_12,
3530 _NL_CTYPE_EXTRA_MAP_13,
3531 _NL_CTYPE_EXTRA_MAP_14,
3532 _NL_NUM_LC_CTYPE,
3533
3534
3535
3536
3537 __INT_CURR_SYMBOL = (((__LC_MONETARY) << 16) | (0)),
3538
3539
3540
3541 __CURRENCY_SYMBOL,
3542
3543
3544
3545 __MON_DECIMAL_POINT,
3546
3547
3548
3549 __MON_THOUSANDS_SEP,
3550
3551
3552
3553 __MON_GROUPING,
3554
3555
3556
3557 __POSITIVE_SIGN,
3558
3559
3560
3561 __NEGATIVE_SIGN,
3562
3563
3564
3565 __INT_FRAC_DIGITS,
3566
3567
3568
3569 __FRAC_DIGITS,
3570
3571
3572
3573 __P_CS_PRECEDES,
3574
3575
3576
3577 __P_SEP_BY_SPACE,
3578
3579
3580
3581 __N_CS_PRECEDES,
3582
3583
3584
3585 __N_SEP_BY_SPACE,
3586
3587
3588
3589 __P_SIGN_POSN,
3590
3591
3592
3593 __N_SIGN_POSN,
3594
3595
3596
3597 _NL_MONETARY_CRNCYSTR,
3598
3599 __INT_P_CS_PRECEDES,
3600
3601
3602
3603 __INT_P_SEP_BY_SPACE,
3604
3605
3606
3607 __INT_N_CS_PRECEDES,
3608
3609
3610
3611 __INT_N_SEP_BY_SPACE,
3612
3613
3614
3615 __INT_P_SIGN_POSN,
3616
3617
3618
3619 __INT_N_SIGN_POSN,
3620
3621
3622
3623 _NL_MONETARY_DUO_INT_CURR_SYMBOL,
3624 _NL_MONETARY_DUO_CURRENCY_SYMBOL,
3625 _NL_MONETARY_DUO_INT_FRAC_DIGITS,
3626 _NL_MONETARY_DUO_FRAC_DIGITS,
3627 _NL_MONETARY_DUO_P_CS_PRECEDES,
3628 _NL_MONETARY_DUO_P_SEP_BY_SPACE,
3629 _NL_MONETARY_DUO_N_CS_PRECEDES,
3630 _NL_MONETARY_DUO_N_SEP_BY_SPACE,
3631 _NL_MONETARY_DUO_INT_P_CS_PRECEDES,
3632 _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE,
3633 _NL_MONETARY_DUO_INT_N_CS_PRECEDES,
3634 _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE,
3635 _NL_MONETARY_DUO_P_SIGN_POSN,
3636 _NL_MONETARY_DUO_N_SIGN_POSN,
3637 _NL_MONETARY_DUO_INT_P_SIGN_POSN,
3638 _NL_MONETARY_DUO_INT_N_SIGN_POSN,
3639 _NL_MONETARY_UNO_VALID_FROM,
3640 _NL_MONETARY_UNO_VALID_TO,
3641 _NL_MONETARY_DUO_VALID_FROM,
3642 _NL_MONETARY_DUO_VALID_TO,
3643 _NL_MONETARY_CONVERSION_RATE,
3644 _NL_MONETARY_DECIMAL_POINT_WC,
3645 _NL_MONETARY_THOUSANDS_SEP_WC,
3646 _NL_MONETARY_CODESET,
3647 _NL_NUM_LC_MONETARY,
3648
3649
3650
3651 __DECIMAL_POINT = (((__LC_NUMERIC) << 16) | (0)),
3652
3653
3654
3655 RADIXCHAR = __DECIMAL_POINT,
3656
3657 __THOUSANDS_SEP,
3658
3659
3660
3661 THOUSEP = __THOUSANDS_SEP,
3662
3663 __GROUPING,
3664
3665
3666
3667 _NL_NUMERIC_DECIMAL_POINT_WC,
3668 _NL_NUMERIC_THOUSANDS_SEP_WC,
3669 _NL_NUMERIC_CODESET,
3670 _NL_NUM_LC_NUMERIC,
3671
3672 __YESEXPR = (((__LC_MESSAGES) << 16) | (0)),
3673
3674 __NOEXPR,
3675
3676 __YESSTR,
3677
3678
3679
3680 __NOSTR,
3681
3682
3683
3684 _NL_MESSAGES_CODESET,
3685 _NL_NUM_LC_MESSAGES,
3686
3687 _NL_PAPER_HEIGHT = (((__LC_PAPER) << 16) | (0)),
3688 _NL_PAPER_WIDTH,
3689 _NL_PAPER_CODESET,
3690 _NL_NUM_LC_PAPER,
3691
3692 _NL_NAME_NAME_FMT = (((__LC_NAME) << 16) | (0)),
3693 _NL_NAME_NAME_GEN,
3694 _NL_NAME_NAME_MR,
3695 _NL_NAME_NAME_MRS,
3696 _NL_NAME_NAME_MISS,
3697 _NL_NAME_NAME_MS,
3698 _NL_NAME_CODESET,
3699 _NL_NUM_LC_NAME,
3700
3701 _NL_ADDRESS_POSTAL_FMT = (((__LC_ADDRESS) << 16) | (0)),
3702 _NL_ADDRESS_COUNTRY_NAME,
3703 _NL_ADDRESS_COUNTRY_POST,
3704 _NL_ADDRESS_COUNTRY_AB2,
3705 _NL_ADDRESS_COUNTRY_AB3,
3706 _NL_ADDRESS_COUNTRY_CAR,
3707 _NL_ADDRESS_COUNTRY_NUM,
3708 _NL_ADDRESS_COUNTRY_ISBN,
3709 _NL_ADDRESS_LANG_NAME,
3710 _NL_ADDRESS_LANG_AB,
3711 _NL_ADDRESS_LANG_TERM,
3712 _NL_ADDRESS_LANG_LIB,
3713 _NL_ADDRESS_CODESET,
3714 _NL_NUM_LC_ADDRESS,
3715
3716 _NL_TELEPHONE_TEL_INT_FMT = (((__LC_TELEPHONE) << 16) | (0)),
3717 _NL_TELEPHONE_TEL_DOM_FMT,
3718 _NL_TELEPHONE_INT_SELECT,
3719 _NL_TELEPHONE_INT_PREFIX,
3720 _NL_TELEPHONE_CODESET,
3721 _NL_NUM_LC_TELEPHONE,
3722
3723 _NL_MEASUREMENT_MEASUREMENT = (((__LC_MEASUREMENT) << 16) | (0)),
3724 _NL_MEASUREMENT_CODESET,
3725 _NL_NUM_LC_MEASUREMENT,
3726
3727 _NL_IDENTIFICATION_TITLE = (((__LC_IDENTIFICATION) << 16) | (0)),
3728 _NL_IDENTIFICATION_SOURCE,
3729 _NL_IDENTIFICATION_ADDRESS,
3730 _NL_IDENTIFICATION_CONTACT,
3731 _NL_IDENTIFICATION_EMAIL,
3732 _NL_IDENTIFICATION_TEL,
3733 _NL_IDENTIFICATION_FAX,
3734 _NL_IDENTIFICATION_LANGUAGE,
3735 _NL_IDENTIFICATION_TERRITORY,
3736 _NL_IDENTIFICATION_AUDIENCE,
3737 _NL_IDENTIFICATION_APPLICATION,
3738 _NL_IDENTIFICATION_ABBREVIATION,
3739 _NL_IDENTIFICATION_REVISION,
3740 _NL_IDENTIFICATION_DATE,
3741 _NL_IDENTIFICATION_CATEGORY,
3742 _NL_IDENTIFICATION_CODESET,
3743 _NL_NUM_LC_IDENTIFICATION,
3744
3745
3746 _NL_NUM
3747};
3748# 582 "/usr/include/langinfo.h" 3 4
3749extern char *nl_langinfo (nl_item __item) throw ();
3750# 593 "/usr/include/langinfo.h" 3 4
3751extern char *nl_langinfo_l (nl_item __item, __locale_t l);
3752
3753
3754}
3755# 45 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 2 3
3756# 1 "/usr/include/iconv.h" 1 3 4
3757# 24 "/usr/include/iconv.h" 3 4
3758# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
3759# 25 "/usr/include/iconv.h" 2 3 4
3760
3761
3762extern "C" {
3763
3764
3765typedef void *iconv_t;
3766
3767
3768
3769
3770
3771
3772
3773extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
3774
3775
3776
3777
3778extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
3779 size_t *__restrict __inbytesleft,
3780 char **__restrict __outbuf,
3781 size_t *__restrict __outbytesleft);
3782
3783
3784
3785
3786
3787extern int iconv_close (iconv_t __cd);
3788
3789}
3790# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 2 3
3791# 1 "/usr/include/libintl.h" 1 3 4
3792# 35 "/usr/include/libintl.h" 3 4
3793extern "C" {
3794
3795
3796
3797
3798extern char *gettext (__const char *__msgid)
3799 throw () __attribute__ ((__format_arg__ (1)));
3800
3801
3802
3803extern char *dgettext (__const char *__domainname, __const char *__msgid)
3804 throw () __attribute__ ((__format_arg__ (2)));
3805extern char *__dgettext (__const char *__domainname, __const char *__msgid)
3806 throw () __attribute__ ((__format_arg__ (2)));
3807
3808
3809
3810extern char *dcgettext (__const char *__domainname,
3811 __const char *__msgid, int __category)
3812 throw () __attribute__ ((__format_arg__ (2)));
3813extern char *__dcgettext (__const char *__domainname,
3814 __const char *__msgid, int __category)
3815 throw () __attribute__ ((__format_arg__ (2)));
3816
3817
3818
3819
3820extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
3821 unsigned long int __n)
3822 throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2)));
3823
3824
3825
3826extern char *dngettext (__const char *__domainname, __const char *__msgid1,
3827 __const char *__msgid2, unsigned long int __n)
3828 throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
3829
3830
3831
3832extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
3833 __const char *__msgid2, unsigned long int __n,
3834 int __category)
3835 throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
3836
3837
3838
3839
3840
3841extern char *textdomain (__const char *__domainname) throw ();
3842
3843
3844
3845extern char *bindtextdomain (__const char *__domainname,
3846 __const char *__dirname) throw ();
3847
3848
3849
3850extern char *bind_textdomain_codeset (__const char *__domainname,
3851 __const char *__codeset) throw ();
3852# 122 "/usr/include/libintl.h" 3 4
3853}
3854# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 2 3
3855
3856
3857
3858
3859
3860
3861namespace __gnu_cxx
3862{
3863 extern "C" __typeof(uselocale) __uselocale;
3864}
3865
3866
3867namespace std
3868{
3869 typedef __locale_t __c_locale;
3870
3871
3872
3873
3874
3875 template<typename _Tv>
3876 int
3877 __convert_from_v(char* __out,
3878 const int __size __attribute__ ((__unused__)),
3879 const char* __fmt,
3880
3881 _Tv __v, const __c_locale& __cloc, int __prec)
3882 {
3883 __c_locale __old = __gnu_cxx::__uselocale(__cloc);
3884# 86 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++locale.h" 3
3885 const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
3886
3887
3888
3889
3890
3891 __gnu_cxx::__uselocale(__old);
3892
3893
3894
3895
3896 return __ret;
3897 }
3898}
3899# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3
3900# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++io.h" 1 3
3901# 38 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++io.h" 3
3902# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr.h" 1 3
3903# 33 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr.h" 3
3904#pragma GCC visibility push(default)
3905# 114 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr.h" 3
3906# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 1 3
3907# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 3
3908# 1 "/usr/include/pthread.h" 1 3 4
3909# 23 "/usr/include/pthread.h" 3 4
3910# 1 "/usr/include/sched.h" 1 3 4
3911# 29 "/usr/include/sched.h" 3 4
3912# 1 "/usr/include/time.h" 1 3 4
3913# 30 "/usr/include/sched.h" 2 3 4
3914
3915
3916# 1 "/usr/include/bits/sched.h" 1 3 4
3917# 65 "/usr/include/bits/sched.h" 3 4
3918struct sched_param
3919 {
3920 int __sched_priority;
3921 };
3922
3923extern "C" {
3924
3925
3926
3927extern int clone (int (*__fn) (void *__arg), void *__child_stack,
3928 int __flags, void *__arg, ...) throw ();
3929
3930
3931extern int unshare (int __flags) throw ();
3932
3933
3934}
3935
3936
3937
3938
3939
3940
3941
3942struct __sched_param
3943 {
3944 int __sched_priority;
3945 };
3946# 104 "/usr/include/bits/sched.h" 3 4
3947typedef unsigned long int __cpu_mask;
3948
3949
3950
3951
3952
3953
3954typedef struct
3955{
3956 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
3957} cpu_set_t;
3958# 33 "/usr/include/sched.h" 2 3 4
3959
3960
3961
3962
3963extern "C" {
3964
3965
3966extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
3967 throw ();
3968
3969
3970extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw ();
3971
3972
3973extern int sched_setscheduler (__pid_t __pid, int __policy,
3974 __const struct sched_param *__param) throw ();
3975
3976
3977extern int sched_getscheduler (__pid_t __pid) throw ();
3978
3979
3980extern int sched_yield (void) throw ();
3981
3982
3983extern int sched_get_priority_max (int __algorithm) throw ();
3984
3985
3986extern int sched_get_priority_min (int __algorithm) throw ();
3987
3988
3989extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw ();
3990# 76 "/usr/include/sched.h" 3 4
3991extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
3992 __const cpu_set_t *__cpuset) throw ();
3993
3994
3995extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
3996 cpu_set_t *__cpuset) throw ();
3997
3998
3999}
4000# 24 "/usr/include/pthread.h" 2 3 4
4001# 1 "/usr/include/time.h" 1 3 4
4002# 31 "/usr/include/time.h" 3 4
4003extern "C" {
4004
4005
4006
4007
4008
4009
4010
4011# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
4012# 40 "/usr/include/time.h" 2 3 4
4013
4014
4015
4016# 1 "/usr/include/bits/time.h" 1 3 4
4017# 44 "/usr/include/time.h" 2 3 4
4018# 132 "/usr/include/time.h" 3 4
4019
4020
4021struct tm
4022{
4023 int tm_sec;
4024 int tm_min;
4025 int tm_hour;
4026 int tm_mday;
4027 int tm_mon;
4028 int tm_year;
4029 int tm_wday;
4030 int tm_yday;
4031 int tm_isdst;
4032
4033
4034 long int tm_gmtoff;
4035 __const char *tm_zone;
4036
4037
4038
4039
4040};
4041
4042
4043
4044
4045
4046
4047
4048
4049struct itimerspec
4050 {
4051 struct timespec it_interval;
4052 struct timespec it_value;
4053 };
4054
4055
4056struct sigevent;
4057# 181 "/usr/include/time.h" 3 4
4058
4059
4060
4061extern clock_t clock (void) throw ();
4062
4063
4064extern time_t time (time_t *__timer) throw ();
4065
4066
4067extern double difftime (time_t __time1, time_t __time0)
4068 throw () __attribute__ ((__const__));
4069
4070
4071extern time_t mktime (struct tm *__tp) throw ();
4072
4073
4074
4075
4076
4077extern size_t strftime (char *__restrict __s, size_t __maxsize,
4078 __const char *__restrict __format,
4079 __const struct tm *__restrict __tp) throw ();
4080
4081
4082
4083
4084
4085extern char *strptime (__const char *__restrict __s,
4086 __const char *__restrict __fmt, struct tm *__tp)
4087 throw ();
4088
4089
4090
4091
4092
4093
4094
4095extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
4096 __const char *__restrict __format,
4097 __const struct tm *__restrict __tp,
4098 __locale_t __loc) throw ();
4099
4100extern char *strptime_l (__const char *__restrict __s,
4101 __const char *__restrict __fmt, struct tm *__tp,
4102 __locale_t __loc) throw ();
4103
4104
4105
4106
4107
4108
4109extern struct tm *gmtime (__const time_t *__timer) throw ();
4110
4111
4112
4113extern struct tm *localtime (__const time_t *__timer) throw ();
4114
4115
4116
4117
4118
4119extern struct tm *gmtime_r (__const time_t *__restrict __timer,
4120 struct tm *__restrict __tp) throw ();
4121
4122
4123
4124extern struct tm *localtime_r (__const time_t *__restrict __timer,
4125 struct tm *__restrict __tp) throw ();
4126
4127
4128
4129
4130
4131extern char *asctime (__const struct tm *__tp) throw ();
4132
4133
4134extern char *ctime (__const time_t *__timer) throw ();
4135
4136
4137
4138
4139
4140
4141
4142extern char *asctime_r (__const struct tm *__restrict __tp,
4143 char *__restrict __buf) throw ();
4144
4145
4146extern char *ctime_r (__const time_t *__restrict __timer,
4147 char *__restrict __buf) throw ();
4148
4149
4150
4151
4152extern char *__tzname[2];
4153extern int __daylight;
4154extern long int __timezone;
4155
4156
4157
4158
4159extern char *tzname[2];
4160
4161
4162
4163extern void tzset (void) throw ();
4164
4165
4166
4167extern int daylight;
4168extern long int timezone;
4169
4170
4171
4172
4173
4174extern int stime (__const time_t *__when) throw ();
4175# 312 "/usr/include/time.h" 3 4
4176extern time_t timegm (struct tm *__tp) throw ();
4177
4178
4179extern time_t timelocal (struct tm *__tp) throw ();
4180
4181
4182extern int dysize (int __year) throw () __attribute__ ((__const__));
4183# 327 "/usr/include/time.h" 3 4
4184extern int nanosleep (__const struct timespec *__requested_time,
4185 struct timespec *__remaining);
4186
4187
4188
4189extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
4190
4191
4192extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
4193
4194
4195extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
4196 throw ();
4197
4198
4199
4200
4201
4202
4203extern int clock_nanosleep (clockid_t __clock_id, int __flags,
4204 __const struct timespec *__req,
4205 struct timespec *__rem);
4206
4207
4208extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
4209
4210
4211
4212
4213extern int timer_create (clockid_t __clock_id,
4214 struct sigevent *__restrict __evp,
4215 timer_t *__restrict __timerid) throw ();
4216
4217
4218extern int timer_delete (timer_t __timerid) throw ();
4219
4220
4221extern int timer_settime (timer_t __timerid, int __flags,
4222 __const struct itimerspec *__restrict __value,
4223 struct itimerspec *__restrict __ovalue) throw ();
4224
4225
4226extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
4227 throw ();
4228
4229
4230extern int timer_getoverrun (timer_t __timerid) throw ();
4231# 389 "/usr/include/time.h" 3 4
4232extern int getdate_err;
4233# 398 "/usr/include/time.h" 3 4
4234extern struct tm *getdate (__const char *__string);
4235# 412 "/usr/include/time.h" 3 4
4236extern int getdate_r (__const char *__restrict __string,
4237 struct tm *__restrict __resbufp);
4238
4239
4240}
4241# 25 "/usr/include/pthread.h" 2 3 4
4242
4243
4244# 1 "/usr/include/signal.h" 1 3 4
4245# 31 "/usr/include/signal.h" 3 4
4246extern "C" {
4247
4248# 1 "/usr/include/bits/sigset.h" 1 3 4
4249# 34 "/usr/include/signal.h" 2 3 4
4250# 400 "/usr/include/signal.h" 3 4
4251}
4252# 28 "/usr/include/pthread.h" 2 3 4
4253
4254# 1 "/usr/include/bits/setjmp.h" 1 3 4
4255# 29 "/usr/include/bits/setjmp.h" 3 4
4256typedef int __jmp_buf[6];
4257# 30 "/usr/include/pthread.h" 2 3 4
4258# 1 "/usr/include/bits/wordsize.h" 1 3 4
4259# 31 "/usr/include/pthread.h" 2 3 4
4260
4261
4262
4263enum
4264{
4265 PTHREAD_CREATE_JOINABLE,
4266
4267 PTHREAD_CREATE_DETACHED
4268
4269};
4270
4271
4272
4273enum
4274{
4275 PTHREAD_MUTEX_TIMED_NP,
4276 PTHREAD_MUTEX_RECURSIVE_NP,
4277 PTHREAD_MUTEX_ERRORCHECK_NP,
4278 PTHREAD_MUTEX_ADAPTIVE_NP
4279
4280 ,
4281 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
4282 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
4283 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
4284 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
4285
4286
4287
4288 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
4289
4290};
4291
4292
4293
4294
4295enum
4296{
4297 PTHREAD_MUTEX_STALLED_NP,
4298 PTHREAD_MUTEX_ROBUST_NP
4299};
4300
4301
4302
4303
4304
4305enum
4306{
4307 PTHREAD_PRIO_NONE,
4308 PTHREAD_PRIO_INHERIT,
4309 PTHREAD_PRIO_PROTECT
4310};
4311# 113 "/usr/include/pthread.h" 3 4
4312enum
4313{
4314 PTHREAD_RWLOCK_PREFER_READER_NP,
4315 PTHREAD_RWLOCK_PREFER_WRITER_NP,
4316 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
4317 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
4318};
4319# 143 "/usr/include/pthread.h" 3 4
4320enum
4321{
4322 PTHREAD_INHERIT_SCHED,
4323
4324 PTHREAD_EXPLICIT_SCHED
4325
4326};
4327
4328
4329
4330enum
4331{
4332 PTHREAD_SCOPE_SYSTEM,
4333
4334 PTHREAD_SCOPE_PROCESS
4335
4336};
4337
4338
4339
4340enum
4341{
4342 PTHREAD_PROCESS_PRIVATE,
4343
4344 PTHREAD_PROCESS_SHARED
4345
4346};
4347# 178 "/usr/include/pthread.h" 3 4
4348struct _pthread_cleanup_buffer
4349{
4350 void (*__routine) (void *);
4351 void *__arg;
4352 int __canceltype;
4353 struct _pthread_cleanup_buffer *__prev;
4354};
4355
4356
4357enum
4358{
4359 PTHREAD_CANCEL_ENABLE,
4360
4361 PTHREAD_CANCEL_DISABLE
4362
4363};
4364enum
4365{
4366 PTHREAD_CANCEL_DEFERRED,
4367
4368 PTHREAD_CANCEL_ASYNCHRONOUS
4369
4370};
4371# 216 "/usr/include/pthread.h" 3 4
4372extern "C" {
4373
4374
4375
4376
4377extern int pthread_create (pthread_t *__restrict __newthread,
4378 __const pthread_attr_t *__restrict __attr,
4379 void *(*__start_routine) (void *),
4380 void *__restrict __arg) throw ();
4381
4382
4383
4384
4385
4386extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
4387
4388
4389
4390
4391
4392
4393
4394extern int pthread_join (pthread_t __th, void **__thread_return);
4395
4396
4397
4398
4399extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw ();
4400
4401
4402
4403
4404
4405
4406
4407extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
4408 __const struct timespec *__abstime);
4409
4410
4411
4412
4413
4414
4415extern int pthread_detach (pthread_t __th) throw ();
4416
4417
4418
4419extern pthread_t pthread_self (void) throw () __attribute__ ((__const__));
4420
4421
4422extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw ();
4423
4424
4425
4426
4427
4428
4429
4430extern int pthread_attr_init (pthread_attr_t *__attr) throw ();
4431
4432
4433extern int pthread_attr_destroy (pthread_attr_t *__attr) throw ();
4434
4435
4436extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
4437 int *__detachstate) throw ();
4438
4439
4440extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
4441 int __detachstate) throw ();
4442
4443
4444
4445extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
4446 size_t *__guardsize) throw ();
4447
4448
4449extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
4450 size_t __guardsize) throw ();
4451
4452
4453
4454extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
4455 __attr,
4456 struct sched_param *__restrict __param)
4457 throw ();
4458
4459
4460extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
4461 __const struct sched_param *__restrict
4462 __param) throw ();
4463
4464
4465extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
4466 __attr, int *__restrict __policy)
4467 throw ();
4468
4469
4470extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
4471 throw ();
4472
4473
4474extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
4475 __attr, int *__restrict __inherit)
4476 throw ();
4477
4478
4479extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
4480 int __inherit) throw ();
4481
4482
4483
4484extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
4485 int *__restrict __scope) throw ();
4486
4487
4488extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
4489 throw ();
4490
4491
4492extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
4493 __attr, void **__restrict __stackaddr)
4494 throw () __attribute__ ((__deprecated__));
4495
4496
4497
4498
4499
4500extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
4501 void *__stackaddr)
4502 throw () __attribute__ ((__deprecated__));
4503
4504
4505extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
4506 __attr, size_t *__restrict __stacksize)
4507 throw ();
4508
4509
4510
4511
4512extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
4513 size_t __stacksize) throw ();
4514
4515
4516
4517extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
4518 void **__restrict __stackaddr,
4519 size_t *__restrict __stacksize) throw ();
4520
4521
4522
4523
4524extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
4525 size_t __stacksize) throw ();
4526
4527
4528
4529
4530
4531extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
4532 size_t __cpusetsize,
4533 __const cpu_set_t *__cpuset) throw ();
4534
4535
4536
4537extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
4538 size_t __cpusetsize,
4539 cpu_set_t *__cpuset) throw ();
4540
4541
4542
4543
4544
4545extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) throw ();
4546
4547
4548
4549
4550
4551
4552
4553extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
4554 __const struct sched_param *__param)
4555 throw ();
4556
4557
4558extern int pthread_getschedparam (pthread_t __target_thread,
4559 int *__restrict __policy,
4560 struct sched_param *__restrict __param)
4561 throw ();
4562
4563
4564extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
4565 throw ();
4566
4567
4568
4569
4570extern int pthread_getconcurrency (void) throw ();
4571
4572
4573extern int pthread_setconcurrency (int __level) throw ();
4574
4575
4576
4577
4578
4579
4580
4581extern int pthread_yield (void) throw ();
4582
4583
4584
4585
4586extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
4587 __const cpu_set_t *__cpuset) throw ();
4588
4589
4590extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
4591 cpu_set_t *__cpuset) throw ();
4592# 448 "/usr/include/pthread.h" 3 4
4593extern int pthread_once (pthread_once_t *__once_control,
4594 void (*__init_routine) (void));
4595# 460 "/usr/include/pthread.h" 3 4
4596extern int pthread_setcancelstate (int __state, int *__oldstate);
4597
4598
4599
4600extern int pthread_setcanceltype (int __type, int *__oldtype);
4601
4602
4603extern int pthread_cancel (pthread_t __th);
4604
4605
4606
4607
4608extern void pthread_testcancel (void);
4609
4610
4611
4612
4613typedef struct
4614{
4615 struct
4616 {
4617 __jmp_buf __cancel_jmp_buf;
4618 int __mask_was_saved;
4619 } __cancel_jmp_buf[1];
4620 void *__pad[4];
4621} __pthread_unwind_buf_t __attribute__ ((__aligned__));
4622# 494 "/usr/include/pthread.h" 3 4
4623struct __pthread_cleanup_frame
4624{
4625 void (*__cancel_routine) (void *);
4626 void *__cancel_arg;
4627 int __do_it;
4628 int __cancel_type;
4629};
4630
4631
4632
4633
4634class __pthread_cleanup_class
4635{
4636 void (*__cancel_routine) (void *);
4637 void *__cancel_arg;
4638 int __do_it;
4639 int __cancel_type;
4640
4641 public:
4642 __pthread_cleanup_class (void (*__fct) (void *), void *__arg)
4643 : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { }
4644 ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); }
4645 void __setdoit (int __newval) { __do_it = __newval; }
4646 void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED,
4647 &__cancel_type); }
4648 void __restore () const { pthread_setcanceltype (__cancel_type, 0); }
4649};
4650# 694 "/usr/include/pthread.h" 3 4
4651struct __jmp_buf_tag;
4652extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw ();
4653
4654
4655
4656
4657
4658extern int pthread_mutex_init (pthread_mutex_t *__mutex,
4659 __const pthread_mutexattr_t *__mutexattr)
4660 throw ();
4661
4662
4663extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw ();
4664
4665
4666extern int pthread_mutex_trylock (pthread_mutex_t *_mutex) throw ();
4667
4668
4669extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw ();
4670
4671
4672
4673extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
4674 __const struct timespec *__restrict
4675 __abstime) throw ();
4676
4677
4678
4679extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw ();
4680
4681
4682
4683
4684extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
4685 __restrict __mutex,
4686 int *__restrict __prioceiling)
4687 throw ();
4688
4689
4690
4691extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
4692 int __prioceiling,
4693 int *__restrict __old_ceiling)
4694 throw ();
4695
4696
4697
4698
4699
4700extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) throw ();
4701
4702
4703
4704
4705
4706
4707
4708extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw ();
4709
4710
4711extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw ();
4712
4713
4714extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
4715 __restrict __attr,
4716 int *__restrict __pshared) throw ();
4717
4718
4719extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
4720 int __pshared) throw ();
4721
4722
4723
4724extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
4725 __attr, int *__restrict __kind) throw ();
4726
4727
4728
4729
4730extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
4731 throw ();
4732
4733
4734extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
4735 __restrict __attr,
4736 int *__restrict __protocol) throw ();
4737
4738
4739
4740extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
4741 int __protocol) throw ();
4742
4743
4744extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
4745 __restrict __attr,
4746 int *__restrict __prioceiling)
4747 throw ();
4748
4749
4750extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
4751 int __prioceiling) throw ();
4752
4753
4754
4755
4756extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
4757 int *__robustness) throw ();
4758
4759
4760extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
4761 int __robustness) throw ();
4762# 813 "/usr/include/pthread.h" 3 4
4763extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
4764 __const pthread_rwlockattr_t *__restrict
4765 __attr) throw ();
4766
4767
4768extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw ();
4769
4770
4771extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw ();
4772
4773
4774extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw ();
4775
4776
4777
4778extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
4779 __const struct timespec *__restrict
4780 __abstime) throw ();
4781
4782
4783
4784extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw ();
4785
4786
4787extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw ();
4788
4789
4790
4791extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
4792 __const struct timespec *__restrict
4793 __abstime) throw ();
4794
4795
4796
4797extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw ();
4798
4799
4800
4801
4802
4803extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw ();
4804
4805
4806extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw ();
4807
4808
4809extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
4810 __restrict __attr,
4811 int *__restrict __pshared) throw ();
4812
4813
4814extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
4815 int __pshared) throw ();
4816
4817
4818extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
4819 __restrict __attr,
4820 int *__restrict __pref) throw ();
4821
4822
4823extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
4824 int __pref) throw ();
4825
4826
4827
4828
4829
4830
4831
4832extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
4833 __const pthread_condattr_t *__restrict
4834 __cond_attr) throw ();
4835
4836
4837extern int pthread_cond_destroy (pthread_cond_t *__cond) throw ();
4838
4839
4840extern int pthread_cond_signal (pthread_cond_t *__cond) throw ();
4841
4842
4843extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw ();
4844
4845
4846
4847
4848
4849
4850extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
4851 pthread_mutex_t *__restrict __mutex);
4852# 910 "/usr/include/pthread.h" 3 4
4853extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
4854 pthread_mutex_t *__restrict __mutex,
4855 __const struct timespec *__restrict
4856 __abstime);
4857
4858
4859
4860
4861extern int pthread_condattr_init (pthread_condattr_t *__attr) throw ();
4862
4863
4864extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw ();
4865
4866
4867extern int pthread_condattr_getpshared (__const pthread_condattr_t *
4868 __restrict __attr,
4869 int *__restrict __pshared) throw ();
4870
4871
4872extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
4873 int __pshared) throw ();
4874
4875
4876
4877extern int pthread_condattr_getclock (__const pthread_condattr_t *
4878 __restrict __attr,
4879 __clockid_t *__restrict __clock_id)
4880 throw ();
4881
4882
4883extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
4884 __clockid_t __clock_id) throw ();
4885# 951 "/usr/include/pthread.h" 3 4
4886extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
4887 throw ();
4888
4889
4890extern int pthread_spin_destroy (pthread_spinlock_t *__lock) throw ();
4891
4892
4893extern int pthread_spin_lock (pthread_spinlock_t *__lock) throw ();
4894
4895
4896extern int pthread_spin_trylock (pthread_spinlock_t *__lock) throw ();
4897
4898
4899extern int pthread_spin_unlock (pthread_spinlock_t *__lock) throw ();
4900
4901
4902
4903
4904
4905
4906extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
4907 __const pthread_barrierattr_t *__restrict
4908 __attr, unsigned int __count) throw ();
4909
4910
4911extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) throw ();
4912
4913
4914extern int pthread_barrier_wait (pthread_barrier_t *__barrier) throw ();
4915
4916
4917
4918extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) throw ();
4919
4920
4921extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) throw ();
4922
4923
4924extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
4925 __restrict __attr,
4926 int *__restrict __pshared) throw ();
4927
4928
4929extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
4930 int __pshared) throw ();
4931# 1007 "/usr/include/pthread.h" 3 4
4932extern int pthread_key_create (pthread_key_t *__key,
4933 void (*__destr_function) (void *)) throw ();
4934
4935
4936extern int pthread_key_delete (pthread_key_t __key) throw ();
4937
4938
4939extern void *pthread_getspecific (pthread_key_t __key) throw ();
4940
4941
4942extern int pthread_setspecific (pthread_key_t __key,
4943 __const void *__pointer) throw ();
4944
4945
4946
4947
4948extern int pthread_getcpuclockid (pthread_t __thread_id,
4949 __clockid_t *__clock_id) throw ();
4950# 1039 "/usr/include/pthread.h" 3 4
4951extern int pthread_atfork (void (*__prepare) (void),
4952 void (*__parent) (void),
4953 void (*__child) (void)) throw ();
4954
4955}
4956# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 2 3
4957# 1 "/usr/include/unistd.h" 1 3 4
4958# 28 "/usr/include/unistd.h" 3 4
4959extern "C" {
4960# 171 "/usr/include/unistd.h" 3 4
4961# 1 "/usr/include/bits/posix_opt.h" 1 3 4
4962# 172 "/usr/include/unistd.h" 2 3 4
4963
4964
4965
4966# 1 "/usr/include/bits/environments.h" 1 3 4
4967# 176 "/usr/include/unistd.h" 2 3 4
4968# 195 "/usr/include/unistd.h" 3 4
4969# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
4970# 196 "/usr/include/unistd.h" 2 3 4
4971# 236 "/usr/include/unistd.h" 3 4
4972typedef __intptr_t intptr_t;
4973
4974
4975
4976
4977
4978
4979typedef __socklen_t socklen_t;
4980# 256 "/usr/include/unistd.h" 3 4
4981extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1)));
4982
4983
4984
4985
4986extern int euidaccess (__const char *__name, int __type)
4987 throw () __attribute__ ((__nonnull__ (1)));
4988
4989
4990extern int eaccess (__const char *__name, int __type)
4991 throw () __attribute__ ((__nonnull__ (1)));
4992
4993
4994
4995
4996
4997
4998extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
4999 throw () __attribute__ ((__nonnull__ (2))) ;
5000# 299 "/usr/include/unistd.h" 3 4
5001extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw ();
5002# 310 "/usr/include/unistd.h" 3 4
5003extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
5004 throw ();
5005
5006
5007
5008
5009
5010
5011extern int close (int __fd);
5012
5013
5014
5015
5016
5017
5018extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
5019
5020
5021
5022
5023
5024extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
5025# 341 "/usr/include/unistd.h" 3 4
5026extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
5027 __off_t __offset) ;
5028
5029
5030
5031
5032
5033
5034extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
5035 __off_t __offset) ;
5036# 369 "/usr/include/unistd.h" 3 4
5037extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
5038 __off64_t __offset) ;
5039
5040
5041extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
5042 __off64_t __offset) ;
5043
5044
5045
5046
5047
5048
5049
5050extern int pipe (int __pipedes[2]) throw () ;
5051# 391 "/usr/include/unistd.h" 3 4
5052extern unsigned int alarm (unsigned int __seconds) throw ();
5053# 403 "/usr/include/unistd.h" 3 4
5054extern unsigned int sleep (unsigned int __seconds);
5055
5056
5057
5058
5059
5060
5061extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
5062 throw ();
5063
5064
5065
5066
5067
5068
5069extern int usleep (__useconds_t __useconds);
5070# 427 "/usr/include/unistd.h" 3 4
5071extern int pause (void);
5072
5073
5074
5075extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
5076 throw () __attribute__ ((__nonnull__ (1))) ;
5077
5078
5079
5080extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ;
5081
5082
5083
5084
5085extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
5086 throw () __attribute__ ((__nonnull__ (1))) ;
5087
5088
5089
5090
5091
5092
5093extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
5094 __gid_t __group, int __flag)
5095 throw () __attribute__ ((__nonnull__ (2))) ;
5096
5097
5098
5099extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
5100
5101
5102
5103extern int fchdir (int __fd) throw () ;
5104# 469 "/usr/include/unistd.h" 3 4
5105extern char *getcwd (char *__buf, size_t __size) throw () ;
5106
5107
5108
5109
5110
5111extern char *get_current_dir_name (void) throw ();
5112
5113
5114
5115
5116
5117
5118extern char *getwd (char *__buf)
5119 throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
5120
5121
5122
5123
5124extern int dup (int __fd) throw () ;
5125
5126
5127extern int dup2 (int __fd, int __fd2) throw ();
5128
5129
5130extern char **__environ;
5131
5132extern char **environ;
5133
5134
5135
5136
5137
5138extern int execve (__const char *__path, char *__const __argv[],
5139 char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1)));
5140
5141
5142
5143
5144extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
5145 throw ();
5146
5147
5148
5149
5150extern int execv (__const char *__path, char *__const __argv[])
5151 throw () __attribute__ ((__nonnull__ (1)));
5152
5153
5154
5155extern int execle (__const char *__path, __const char *__arg, ...)
5156 throw () __attribute__ ((__nonnull__ (1)));
5157
5158
5159
5160extern int execl (__const char *__path, __const char *__arg, ...)
5161 throw () __attribute__ ((__nonnull__ (1)));
5162
5163
5164
5165extern int execvp (__const char *__file, char *__const __argv[])
5166 throw () __attribute__ ((__nonnull__ (1)));
5167
5168
5169
5170
5171extern int execlp (__const char *__file, __const char *__arg, ...)
5172 throw () __attribute__ ((__nonnull__ (1)));
5173
5174
5175
5176
5177extern int nice (int __inc) throw () ;
5178
5179
5180
5181
5182extern void _exit (int __status) __attribute__ ((__noreturn__));
5183
5184
5185
5186
5187
5188# 1 "/usr/include/bits/confname.h" 1 3 4
5189# 26 "/usr/include/bits/confname.h" 3 4
5190enum
5191 {
5192 _PC_LINK_MAX,
5193
5194 _PC_MAX_CANON,
5195
5196 _PC_MAX_INPUT,
5197
5198 _PC_NAME_MAX,
5199
5200 _PC_PATH_MAX,
5201
5202 _PC_PIPE_BUF,
5203
5204 _PC_CHOWN_RESTRICTED,
5205
5206 _PC_NO_TRUNC,
5207
5208 _PC_VDISABLE,
5209
5210 _PC_SYNC_IO,
5211
5212 _PC_ASYNC_IO,
5213
5214 _PC_PRIO_IO,
5215
5216 _PC_SOCK_MAXBUF,
5217
5218 _PC_FILESIZEBITS,
5219
5220 _PC_REC_INCR_XFER_SIZE,
5221
5222 _PC_REC_MAX_XFER_SIZE,
5223
5224 _PC_REC_MIN_XFER_SIZE,
5225
5226 _PC_REC_XFER_ALIGN,
5227
5228 _PC_ALLOC_SIZE_MIN,
5229
5230 _PC_SYMLINK_MAX,
5231
5232 _PC_2_SYMLINKS
5233
5234 };
5235
5236
5237enum
5238 {
5239 _SC_ARG_MAX,
5240
5241 _SC_CHILD_MAX,
5242
5243 _SC_CLK_TCK,
5244
5245 _SC_NGROUPS_MAX,
5246
5247 _SC_OPEN_MAX,
5248
5249 _SC_STREAM_MAX,
5250
5251 _SC_TZNAME_MAX,
5252
5253 _SC_JOB_CONTROL,
5254
5255 _SC_SAVED_IDS,
5256
5257 _SC_REALTIME_SIGNALS,
5258
5259 _SC_PRIORITY_SCHEDULING,
5260
5261 _SC_TIMERS,
5262
5263 _SC_ASYNCHRONOUS_IO,
5264
5265 _SC_PRIORITIZED_IO,
5266
5267 _SC_SYNCHRONIZED_IO,
5268
5269 _SC_FSYNC,
5270
5271 _SC_MAPPED_FILES,
5272
5273 _SC_MEMLOCK,
5274
5275 _SC_MEMLOCK_RANGE,
5276
5277 _SC_MEMORY_PROTECTION,
5278
5279 _SC_MESSAGE_PASSING,
5280
5281 _SC_SEMAPHORES,
5282
5283 _SC_SHARED_MEMORY_OBJECTS,
5284
5285 _SC_AIO_LISTIO_MAX,
5286
5287 _SC_AIO_MAX,
5288
5289 _SC_AIO_PRIO_DELTA_MAX,
5290
5291 _SC_DELAYTIMER_MAX,
5292
5293 _SC_MQ_OPEN_MAX,
5294
5295 _SC_MQ_PRIO_MAX,
5296
5297 _SC_VERSION,
5298
5299 _SC_PAGESIZE,
5300
5301
5302 _SC_RTSIG_MAX,
5303
5304 _SC_SEM_NSEMS_MAX,
5305
5306 _SC_SEM_VALUE_MAX,
5307
5308 _SC_SIGQUEUE_MAX,
5309
5310 _SC_TIMER_MAX,
5311
5312
5313
5314
5315 _SC_BC_BASE_MAX,
5316
5317 _SC_BC_DIM_MAX,
5318
5319 _SC_BC_SCALE_MAX,
5320
5321 _SC_BC_STRING_MAX,
5322
5323 _SC_COLL_WEIGHTS_MAX,
5324
5325 _SC_EQUIV_CLASS_MAX,
5326
5327 _SC_EXPR_NEST_MAX,
5328
5329 _SC_LINE_MAX,
5330
5331 _SC_RE_DUP_MAX,
5332
5333 _SC_CHARCLASS_NAME_MAX,
5334
5335
5336 _SC_2_VERSION,
5337
5338 _SC_2_C_BIND,
5339
5340 _SC_2_C_DEV,
5341
5342 _SC_2_FORT_DEV,
5343
5344 _SC_2_FORT_RUN,
5345
5346 _SC_2_SW_DEV,
5347
5348 _SC_2_LOCALEDEF,
5349
5350
5351 _SC_PII,
5352
5353 _SC_PII_XTI,
5354
5355 _SC_PII_SOCKET,
5356
5357 _SC_PII_INTERNET,
5358
5359 _SC_PII_OSI,
5360
5361 _SC_POLL,
5362
5363 _SC_SELECT,
5364
5365 _SC_UIO_MAXIOV,
5366
5367 _SC_IOV_MAX = _SC_UIO_MAXIOV,
5368
5369 _SC_PII_INTERNET_STREAM,
5370
5371 _SC_PII_INTERNET_DGRAM,
5372
5373 _SC_PII_OSI_COTS,
5374
5375 _SC_PII_OSI_CLTS,
5376
5377 _SC_PII_OSI_M,
5378
5379 _SC_T_IOV_MAX,
5380
5381
5382
5383 _SC_THREADS,
5384
5385 _SC_THREAD_SAFE_FUNCTIONS,
5386
5387 _SC_GETGR_R_SIZE_MAX,
5388
5389 _SC_GETPW_R_SIZE_MAX,
5390
5391 _SC_LOGIN_NAME_MAX,
5392
5393 _SC_TTY_NAME_MAX,
5394
5395 _SC_THREAD_DESTRUCTOR_ITERATIONS,
5396
5397 _SC_THREAD_KEYS_MAX,
5398
5399 _SC_THREAD_STACK_MIN,
5400
5401 _SC_THREAD_THREADS_MAX,
5402
5403 _SC_THREAD_ATTR_STACKADDR,
5404
5405 _SC_THREAD_ATTR_STACKSIZE,
5406
5407 _SC_THREAD_PRIORITY_SCHEDULING,
5408
5409 _SC_THREAD_PRIO_INHERIT,
5410
5411 _SC_THREAD_PRIO_PROTECT,
5412
5413 _SC_THREAD_PROCESS_SHARED,
5414
5415
5416 _SC_NPROCESSORS_CONF,
5417
5418 _SC_NPROCESSORS_ONLN,
5419
5420 _SC_PHYS_PAGES,
5421
5422 _SC_AVPHYS_PAGES,
5423
5424 _SC_ATEXIT_MAX,
5425
5426 _SC_PASS_MAX,
5427
5428
5429 _SC_XOPEN_VERSION,
5430
5431 _SC_XOPEN_XCU_VERSION,
5432
5433 _SC_XOPEN_UNIX,
5434
5435 _SC_XOPEN_CRYPT,
5436
5437 _SC_XOPEN_ENH_I18N,
5438
5439 _SC_XOPEN_SHM,
5440
5441
5442 _SC_2_CHAR_TERM,
5443
5444 _SC_2_C_VERSION,
5445
5446 _SC_2_UPE,
5447
5448
5449 _SC_XOPEN_XPG2,
5450
5451 _SC_XOPEN_XPG3,
5452
5453 _SC_XOPEN_XPG4,
5454
5455
5456 _SC_CHAR_BIT,
5457
5458 _SC_CHAR_MAX,
5459
5460 _SC_CHAR_MIN,
5461
5462 _SC_INT_MAX,
5463
5464 _SC_INT_MIN,
5465
5466 _SC_LONG_BIT,
5467
5468 _SC_WORD_BIT,
5469
5470 _SC_MB_LEN_MAX,
5471
5472 _SC_NZERO,
5473
5474 _SC_SSIZE_MAX,
5475
5476 _SC_SCHAR_MAX,
5477
5478 _SC_SCHAR_MIN,
5479
5480 _SC_SHRT_MAX,
5481
5482 _SC_SHRT_MIN,
5483
5484 _SC_UCHAR_MAX,
5485
5486 _SC_UINT_MAX,
5487
5488 _SC_ULONG_MAX,
5489
5490 _SC_USHRT_MAX,
5491
5492
5493 _SC_NL_ARGMAX,
5494
5495 _SC_NL_LANGMAX,
5496
5497 _SC_NL_MSGMAX,
5498
5499 _SC_NL_NMAX,
5500
5501 _SC_NL_SETMAX,
5502
5503 _SC_NL_TEXTMAX,
5504
5505
5506 _SC_XBS5_ILP32_OFF32,
5507
5508 _SC_XBS5_ILP32_OFFBIG,
5509
5510 _SC_XBS5_LP64_OFF64,
5511
5512 _SC_XBS5_LPBIG_OFFBIG,
5513
5514
5515 _SC_XOPEN_LEGACY,
5516
5517 _SC_XOPEN_REALTIME,
5518
5519 _SC_XOPEN_REALTIME_THREADS,
5520
5521
5522 _SC_ADVISORY_INFO,
5523
5524 _SC_BARRIERS,
5525
5526 _SC_BASE,
5527
5528 _SC_C_LANG_SUPPORT,
5529
5530 _SC_C_LANG_SUPPORT_R,
5531
5532 _SC_CLOCK_SELECTION,
5533
5534 _SC_CPUTIME,
5535
5536 _SC_THREAD_CPUTIME,
5537
5538 _SC_DEVICE_IO,
5539
5540 _SC_DEVICE_SPECIFIC,
5541
5542 _SC_DEVICE_SPECIFIC_R,
5543
5544 _SC_FD_MGMT,
5545
5546 _SC_FIFO,
5547
5548 _SC_PIPE,
5549
5550 _SC_FILE_ATTRIBUTES,
5551
5552 _SC_FILE_LOCKING,
5553
5554 _SC_FILE_SYSTEM,
5555
5556 _SC_MONOTONIC_CLOCK,
5557
5558 _SC_MULTI_PROCESS,
5559
5560 _SC_SINGLE_PROCESS,
5561
5562 _SC_NETWORKING,
5563
5564 _SC_READER_WRITER_LOCKS,
5565
5566 _SC_SPIN_LOCKS,
5567
5568 _SC_REGEXP,
5569
5570 _SC_REGEX_VERSION,
5571
5572 _SC_SHELL,
5573
5574 _SC_SIGNALS,
5575
5576 _SC_SPAWN,
5577
5578 _SC_SPORADIC_SERVER,
5579
5580 _SC_THREAD_SPORADIC_SERVER,
5581
5582 _SC_SYSTEM_DATABASE,
5583
5584 _SC_SYSTEM_DATABASE_R,
5585
5586 _SC_TIMEOUTS,
5587
5588 _SC_TYPED_MEMORY_OBJECTS,
5589
5590 _SC_USER_GROUPS,
5591
5592 _SC_USER_GROUPS_R,
5593
5594 _SC_2_PBS,
5595
5596 _SC_2_PBS_ACCOUNTING,
5597
5598 _SC_2_PBS_LOCATE,
5599
5600 _SC_2_PBS_MESSAGE,
5601
5602 _SC_2_PBS_TRACK,
5603
5604 _SC_SYMLOOP_MAX,
5605
5606 _SC_STREAMS,
5607
5608 _SC_2_PBS_CHECKPOINT,
5609
5610
5611 _SC_V6_ILP32_OFF32,
5612
5613 _SC_V6_ILP32_OFFBIG,
5614
5615 _SC_V6_LP64_OFF64,
5616
5617 _SC_V6_LPBIG_OFFBIG,
5618
5619
5620 _SC_HOST_NAME_MAX,
5621
5622 _SC_TRACE,
5623
5624 _SC_TRACE_EVENT_FILTER,
5625
5626 _SC_TRACE_INHERIT,
5627
5628 _SC_TRACE_LOG,
5629
5630
5631 _SC_LEVEL1_ICACHE_SIZE,
5632
5633 _SC_LEVEL1_ICACHE_ASSOC,
5634
5635 _SC_LEVEL1_ICACHE_LINESIZE,
5636
5637 _SC_LEVEL1_DCACHE_SIZE,
5638
5639 _SC_LEVEL1_DCACHE_ASSOC,
5640
5641 _SC_LEVEL1_DCACHE_LINESIZE,
5642
5643 _SC_LEVEL2_CACHE_SIZE,
5644
5645 _SC_LEVEL2_CACHE_ASSOC,
5646
5647 _SC_LEVEL2_CACHE_LINESIZE,
5648
5649 _SC_LEVEL3_CACHE_SIZE,
5650
5651 _SC_LEVEL3_CACHE_ASSOC,
5652
5653 _SC_LEVEL3_CACHE_LINESIZE,
5654
5655 _SC_LEVEL4_CACHE_SIZE,
5656
5657 _SC_LEVEL4_CACHE_ASSOC,
5658
5659 _SC_LEVEL4_CACHE_LINESIZE,
5660
5661
5662
5663 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
5664
5665 _SC_RAW_SOCKETS
5666
5667 };
5668
5669
5670enum
5671 {
5672 _CS_PATH,
5673
5674
5675 _CS_V6_WIDTH_RESTRICTED_ENVS,
5676
5677
5678 _CS_GNU_LIBC_VERSION,
5679
5680 _CS_GNU_LIBPTHREAD_VERSION,
5681
5682
5683 _CS_LFS_CFLAGS = 1000,
5684
5685 _CS_LFS_LDFLAGS,
5686
5687 _CS_LFS_LIBS,
5688
5689 _CS_LFS_LINTFLAGS,
5690
5691 _CS_LFS64_CFLAGS,
5692
5693 _CS_LFS64_LDFLAGS,
5694
5695 _CS_LFS64_LIBS,
5696
5697 _CS_LFS64_LINTFLAGS,
5698
5699
5700 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
5701
5702 _CS_XBS5_ILP32_OFF32_LDFLAGS,
5703
5704 _CS_XBS5_ILP32_OFF32_LIBS,
5705
5706 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
5707
5708 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
5709
5710 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
5711
5712 _CS_XBS5_ILP32_OFFBIG_LIBS,
5713
5714 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
5715
5716 _CS_XBS5_LP64_OFF64_CFLAGS,
5717
5718 _CS_XBS5_LP64_OFF64_LDFLAGS,
5719
5720 _CS_XBS5_LP64_OFF64_LIBS,
5721
5722 _CS_XBS5_LP64_OFF64_LINTFLAGS,
5723
5724 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
5725
5726 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
5727
5728 _CS_XBS5_LPBIG_OFFBIG_LIBS,
5729
5730 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
5731
5732
5733 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
5734
5735 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
5736
5737 _CS_POSIX_V6_ILP32_OFF32_LIBS,
5738
5739 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
5740
5741 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
5742
5743 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
5744
5745 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
5746
5747 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
5748
5749 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
5750
5751 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
5752
5753 _CS_POSIX_V6_LP64_OFF64_LIBS,
5754
5755 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
5756
5757 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
5758
5759 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
5760
5761 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
5762
5763 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
5764
5765 };
5766# 553 "/usr/include/unistd.h" 2 3 4
5767
5768
5769extern long int pathconf (__const char *__path, int __name)
5770 throw () __attribute__ ((__nonnull__ (1)));
5771
5772
5773extern long int fpathconf (int __fd, int __name) throw ();
5774
5775
5776extern long int sysconf (int __name) throw () __attribute__ ((__const__));
5777
5778
5779
5780extern size_t confstr (int __name, char *__buf, size_t __len) throw ();
5781
5782
5783
5784
5785extern __pid_t getpid (void) throw ();
5786
5787
5788extern __pid_t getppid (void) throw ();
5789
5790
5791
5792
5793extern __pid_t getpgrp (void) throw ();
5794# 589 "/usr/include/unistd.h" 3 4
5795extern __pid_t __getpgid (__pid_t __pid) throw ();
5796
5797extern __pid_t getpgid (__pid_t __pid) throw ();
5798
5799
5800
5801
5802
5803
5804extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();
5805# 615 "/usr/include/unistd.h" 3 4
5806extern int setpgrp (void) throw ();
5807# 632 "/usr/include/unistd.h" 3 4
5808extern __pid_t setsid (void) throw ();
5809
5810
5811
5812extern __pid_t getsid (__pid_t __pid) throw ();
5813
5814
5815
5816extern __uid_t getuid (void) throw ();
5817
5818
5819extern __uid_t geteuid (void) throw ();
5820
5821
5822extern __gid_t getgid (void) throw ();
5823
5824
5825extern __gid_t getegid (void) throw ();
5826
5827
5828
5829
5830extern int getgroups (int __size, __gid_t __list[]) throw () ;
5831
5832
5833
5834extern int group_member (__gid_t __gid) throw ();
5835
5836
5837
5838
5839
5840
5841extern int setuid (__uid_t __uid) throw ();
5842
5843
5844
5845
5846extern int setreuid (__uid_t __ruid, __uid_t __euid) throw ();
5847
5848
5849
5850
5851extern int seteuid (__uid_t __uid) throw ();
5852
5853
5854
5855
5856
5857
5858extern int setgid (__gid_t __gid) throw ();
5859
5860
5861
5862
5863extern int setregid (__gid_t __rgid, __gid_t __egid) throw ();
5864
5865
5866
5867
5868extern int setegid (__gid_t __gid) throw ();
5869
5870
5871
5872
5873
5874extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
5875 throw ();
5876
5877
5878
5879extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
5880 throw ();
5881
5882
5883
5884extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
5885 throw ();
5886
5887
5888
5889extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
5890 throw ();
5891
5892
5893
5894
5895
5896
5897extern __pid_t fork (void) throw ();
5898
5899
5900
5901
5902
5903
5904extern __pid_t vfork (void) throw ();
5905
5906
5907
5908
5909
5910extern char *ttyname (int __fd) throw ();
5911
5912
5913
5914extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
5915 throw () __attribute__ ((__nonnull__ (2))) ;
5916
5917
5918
5919extern int isatty (int __fd) throw ();
5920
5921
5922
5923
5924
5925extern int ttyslot (void) throw ();
5926
5927
5928
5929
5930extern int link (__const char *__from, __const char *__to)
5931 throw () __attribute__ ((__nonnull__ (1, 2))) ;
5932
5933
5934
5935
5936extern int linkat (int __fromfd, __const char *__from, int __tofd,
5937 __const char *__to, int __flags)
5938 throw () __attribute__ ((__nonnull__ (2, 4))) ;
5939
5940
5941
5942
5943extern int symlink (__const char *__from, __const char *__to)
5944 throw () __attribute__ ((__nonnull__ (1, 2))) ;
5945
5946
5947
5948
5949extern int readlink (__const char *__restrict __path, char *__restrict __buf,
5950 size_t __len) throw () __attribute__ ((__nonnull__ (1, 2))) ;
5951
5952
5953
5954
5955extern int symlinkat (__const char *__from, int __tofd,
5956 __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ;
5957
5958
5959extern int readlinkat (int __fd, __const char *__restrict __path,
5960 char *__restrict __buf, size_t __len)
5961 throw () __attribute__ ((__nonnull__ (2, 3))) ;
5962
5963
5964
5965extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
5966
5967
5968
5969extern int unlinkat (int __fd, __const char *__name, int __flag)
5970 throw () __attribute__ ((__nonnull__ (2)));
5971
5972
5973
5974extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1)));
5975
5976
5977
5978extern __pid_t tcgetpgrp (int __fd) throw ();
5979
5980
5981extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw ();
5982
5983
5984
5985
5986
5987
5988extern char *getlogin (void);
5989
5990
5991
5992
5993
5994
5995
5996extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
5997
5998
5999
6000
6001extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
6002# 834 "/usr/include/unistd.h" 3 4
6003# 1 "/usr/include/getopt.h" 1 3 4
6004# 50 "/usr/include/getopt.h" 3 4
6005extern "C" {
6006# 59 "/usr/include/getopt.h" 3 4
6007extern char *optarg;
6008# 73 "/usr/include/getopt.h" 3 4
6009extern int optind;
6010
6011
6012
6013
6014extern int opterr;
6015
6016
6017
6018extern int optopt;
6019# 152 "/usr/include/getopt.h" 3 4
6020extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
6021 throw ();
6022# 171 "/usr/include/getopt.h" 3 4
6023}
6024# 835 "/usr/include/unistd.h" 2 3 4
6025
6026
6027
6028
6029
6030
6031
6032extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1)));
6033
6034
6035
6036
6037
6038
6039extern int sethostname (__const char *__name, size_t __len)
6040 throw () __attribute__ ((__nonnull__ (1))) ;
6041
6042
6043
6044extern int sethostid (long int __id) throw () ;
6045
6046
6047
6048
6049
6050extern int getdomainname (char *__name, size_t __len)
6051 throw () __attribute__ ((__nonnull__ (1))) ;
6052extern int setdomainname (__const char *__name, size_t __len)
6053 throw () __attribute__ ((__nonnull__ (1))) ;
6054
6055
6056
6057
6058
6059extern int vhangup (void) throw ();
6060
6061
6062extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ;
6063
6064
6065
6066
6067
6068
6069
6070extern int profil (unsigned short int *__sample_buffer, size_t __size,
6071 size_t __offset, unsigned int __scale)
6072 throw () __attribute__ ((__nonnull__ (1)));
6073
6074
6075
6076
6077
6078extern int acct (__const char *__name) throw ();
6079
6080
6081
6082extern char *getusershell (void) throw ();
6083extern void endusershell (void) throw ();
6084extern void setusershell (void) throw ();
6085
6086
6087
6088
6089
6090extern int daemon (int __nochdir, int __noclose) throw () ;
6091
6092
6093
6094
6095
6096
6097extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
6098
6099
6100
6101extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
6102# 920 "/usr/include/unistd.h" 3 4
6103extern int fsync (int __fd);
6104
6105
6106
6107
6108
6109
6110extern long int gethostid (void);
6111
6112
6113extern void sync (void) throw ();
6114
6115
6116
6117
6118extern int getpagesize (void) throw () __attribute__ ((__const__));
6119
6120
6121
6122
6123extern int getdtablesize (void) throw ();
6124
6125
6126
6127
6128extern int truncate (__const char *__file, __off_t __length)
6129 throw () __attribute__ ((__nonnull__ (1))) ;
6130# 957 "/usr/include/unistd.h" 3 4
6131extern int truncate64 (__const char *__file, __off64_t __length)
6132 throw () __attribute__ ((__nonnull__ (1))) ;
6133# 967 "/usr/include/unistd.h" 3 4
6134extern int ftruncate (int __fd, __off_t __length) throw () ;
6135# 977 "/usr/include/unistd.h" 3 4
6136extern int ftruncate64 (int __fd, __off64_t __length) throw () ;
6137# 987 "/usr/include/unistd.h" 3 4
6138extern int brk (void *__addr) throw () ;
6139
6140
6141
6142
6143
6144extern void *sbrk (intptr_t __delta) throw ();
6145# 1008 "/usr/include/unistd.h" 3 4
6146extern long int syscall (long int __sysno, ...) throw ();
6147# 1031 "/usr/include/unistd.h" 3 4
6148extern int lockf (int __fd, int __cmd, __off_t __len) ;
6149# 1041 "/usr/include/unistd.h" 3 4
6150extern int lockf64 (int __fd, int __cmd, __off64_t __len) ;
6151# 1062 "/usr/include/unistd.h" 3 4
6152extern int fdatasync (int __fildes) throw ();
6153
6154
6155
6156
6157
6158
6159
6160extern char *crypt (__const char *__key, __const char *__salt)
6161 throw () __attribute__ ((__nonnull__ (1, 2)));
6162
6163
6164
6165extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1)));
6166
6167
6168
6169
6170
6171
6172extern void swab (__const void *__restrict __from, void *__restrict __to,
6173 ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
6174
6175
6176
6177
6178
6179
6180
6181extern char *ctermid (char *__s) throw ();
6182# 1100 "/usr/include/unistd.h" 3 4
6183}
6184# 45 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 2 3
6185
6186typedef pthread_key_t __gthread_key_t;
6187typedef pthread_once_t __gthread_once_t;
6188typedef pthread_mutex_t __gthread_mutex_t;
6189typedef pthread_mutex_t __gthread_recursive_mutex_t;
6190# 88 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 3
6191extern __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once")));
6192extern __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific")));
6193extern __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific")));
6194extern __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create")));
6195extern __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel")));
6196extern __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock")));
6197extern __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock")));
6198extern __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock")));
6199extern __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init")));
6200
6201
6202extern __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create")));
6203extern __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete")));
6204extern __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init")));
6205extern __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype")));
6206extern __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy")));
6207# 145 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 3
6208static inline int
6209__gthread_active_p (void)
6210{
6211 static void *const __gthread_active_ptr
6212 = __extension__ (void *) &__gthrw_pthread_cancel;
6213 return __gthread_active_ptr != 0;
6214}
6215# 512 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 3
6216static inline int
6217__gthread_once (__gthread_once_t *once, void (*func) (void))
6218{
6219 if (__gthread_active_p ())
6220 return __gthrw_pthread_once (once, func);
6221 else
6222 return -1;
6223}
6224
6225static inline int
6226__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
6227{
6228 return __gthrw_pthread_key_create (key, dtor);
6229}
6230
6231static inline int
6232__gthread_key_delete (__gthread_key_t key)
6233{
6234 return __gthrw_pthread_key_delete (key);
6235}
6236
6237static inline void *
6238__gthread_getspecific (__gthread_key_t key)
6239{
6240 return __gthrw_pthread_getspecific (key);
6241}
6242
6243static inline int
6244__gthread_setspecific (__gthread_key_t key, const void *ptr)
6245{
6246 return __gthrw_pthread_setspecific (key, ptr);
6247}
6248
6249static inline int
6250__gthread_mutex_lock (__gthread_mutex_t *mutex)
6251{
6252 if (__gthread_active_p ())
6253 return __gthrw_pthread_mutex_lock (mutex);
6254 else
6255 return 0;
6256}
6257
6258static inline int
6259__gthread_mutex_trylock (__gthread_mutex_t *mutex)
6260{
6261 if (__gthread_active_p ())
6262 return __gthrw_pthread_mutex_trylock (mutex);
6263 else
6264 return 0;
6265}
6266
6267static inline int
6268__gthread_mutex_unlock (__gthread_mutex_t *mutex)
6269{
6270 if (__gthread_active_p ())
6271 return __gthrw_pthread_mutex_unlock (mutex);
6272 else
6273 return 0;
6274}
6275# 594 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr-default.h" 3
6276static inline int
6277__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
6278{
6279 return __gthread_mutex_lock (mutex);
6280}
6281
6282static inline int
6283__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
6284{
6285 return __gthread_mutex_trylock (mutex);
6286}
6287
6288static inline int
6289__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
6290{
6291 return __gthread_mutex_unlock (mutex);
6292}
6293# 115 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/gthr.h" 2 3
6294
6295
6296
6297
6298
6299
6300
6301#pragma GCC visibility pop
6302# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++io.h" 2 3
6303
6304namespace std
6305{
6306 typedef __gthread_mutex_t __c_lock;
6307
6308
6309 typedef FILE __c_file;
6310}
6311# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3
6312# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 1 3
6313# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 3
6314
6315# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 3
6316#pragma GCC visibility push(default)
6317
6318
6319# 1 "/usr/include/ctype.h" 1 3 4
6320# 30 "/usr/include/ctype.h" 3 4
6321extern "C" {
6322# 48 "/usr/include/ctype.h" 3 4
6323enum
6324{
6325 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
6326 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
6327 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
6328 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
6329 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
6330 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
6331 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
6332 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
6333 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
6334 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
6335 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
6336 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
6337};
6338# 81 "/usr/include/ctype.h" 3 4
6339extern __const unsigned short int **__ctype_b_loc (void)
6340 __attribute__ ((__const));
6341extern __const __int32_t **__ctype_tolower_loc (void)
6342 __attribute__ ((__const));
6343extern __const __int32_t **__ctype_toupper_loc (void)
6344 __attribute__ ((__const));
6345# 96 "/usr/include/ctype.h" 3 4
6346
6347
6348
6349
6350
6351
6352extern int isalnum (int) throw ();
6353extern int isalpha (int) throw ();
6354extern int iscntrl (int) throw ();
6355extern int isdigit (int) throw ();
6356extern int islower (int) throw ();
6357extern int isgraph (int) throw ();
6358extern int isprint (int) throw ();
6359extern int ispunct (int) throw ();
6360extern int isspace (int) throw ();
6361extern int isupper (int) throw ();
6362extern int isxdigit (int) throw ();
6363
6364
6365
6366extern int tolower (int __c) throw ();
6367
6368
6369extern int toupper (int __c) throw ();
6370
6371
6372
6373
6374
6375
6376
6377
6378extern int isblank (int) throw ();
6379
6380
6381
6382
6383
6384
6385extern int isctype (int __c, int __mask) throw ();
6386
6387
6388
6389
6390
6391
6392extern int isascii (int __c) throw ();
6393
6394
6395
6396extern int toascii (int __c) throw ();
6397
6398
6399
6400extern int _toupper (int) throw ();
6401extern int _tolower (int) throw ();
6402# 247 "/usr/include/ctype.h" 3 4
6403extern int isalnum_l (int, __locale_t) throw ();
6404extern int isalpha_l (int, __locale_t) throw ();
6405extern int iscntrl_l (int, __locale_t) throw ();
6406extern int isdigit_l (int, __locale_t) throw ();
6407extern int islower_l (int, __locale_t) throw ();
6408extern int isgraph_l (int, __locale_t) throw ();
6409extern int isprint_l (int, __locale_t) throw ();
6410extern int ispunct_l (int, __locale_t) throw ();
6411extern int isspace_l (int, __locale_t) throw ();
6412extern int isupper_l (int, __locale_t) throw ();
6413extern int isxdigit_l (int, __locale_t) throw ();
6414
6415extern int isblank_l (int, __locale_t) throw ();
6416
6417
6418
6419extern int __tolower_l (int __c, __locale_t __l) throw ();
6420extern int tolower_l (int __c, __locale_t __l) throw ();
6421
6422
6423extern int __toupper_l (int __c, __locale_t __l) throw ();
6424extern int toupper_l (int __c, __locale_t __l) throw ();
6425# 323 "/usr/include/ctype.h" 3 4
6426}
6427# 53 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 2 3
6428# 69 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 3
6429namespace std
6430{
6431 using ::isalnum;
6432 using ::isalpha;
6433 using ::iscntrl;
6434 using ::isdigit;
6435 using ::isgraph;
6436 using ::islower;
6437 using ::isprint;
6438 using ::ispunct;
6439 using ::isspace;
6440 using ::isupper;
6441 using ::isxdigit;
6442 using ::tolower;
6443 using ::toupper;
6444}
6445
6446#pragma GCC visibility pop
6447# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3
6448
6449# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 1 3
6450# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3
6451
6452# 45 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3
6453
6454# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 1 3
6455# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3
6456
6457# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3
6458#pragma GCC visibility push(default)
6459
6460
6461
6462# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 1 3
6463# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 3
6464
6465# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 3
6466#pragma GCC visibility push(default)
6467# 66 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 3
6468namespace std
6469{
6470 using ::clock_t;
6471 using ::time_t;
6472 using ::tm;
6473
6474 using ::clock;
6475 using ::difftime;
6476 using ::mktime;
6477 using ::time;
6478 using ::asctime;
6479 using ::ctime;
6480 using ::gmtime;
6481 using ::localtime;
6482 using ::strftime;
6483}
6484
6485#pragma GCC visibility pop
6486# 54 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 2 3
6487
6488
6489# 1 "/usr/include/wchar.h" 1 3 4
6490# 40 "/usr/include/wchar.h" 3 4
6491# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
6492# 41 "/usr/include/wchar.h" 2 3 4
6493
6494
6495
6496
6497
6498
6499
6500# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
6501# 49 "/usr/include/wchar.h" 2 3 4
6502# 93 "/usr/include/wchar.h" 3 4
6503
6504
6505typedef __mbstate_t mbstate_t;
6506
6507
6508
6509# 118 "/usr/include/wchar.h" 3 4
6510extern "C" {
6511
6512
6513
6514
6515struct tm;
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525extern wchar_t *wcscpy (wchar_t *__restrict __dest,
6526 __const wchar_t *__restrict __src) throw ();
6527
6528extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
6529 __const wchar_t *__restrict __src, size_t __n)
6530 throw ();
6531
6532
6533extern wchar_t *wcscat (wchar_t *__restrict __dest,
6534 __const wchar_t *__restrict __src) throw ();
6535
6536extern wchar_t *wcsncat (wchar_t *__restrict __dest,
6537 __const wchar_t *__restrict __src, size_t __n)
6538 throw ();
6539
6540
6541extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
6542 throw () __attribute__ ((__pure__));
6543
6544extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
6545 throw () __attribute__ ((__pure__));
6546
6547
6548
6549
6550extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
6551
6552
6553extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
6554 size_t __n) throw ();
6555
6556
6557
6558
6559
6560extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
6561 __locale_t __loc) throw ();
6562
6563extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
6564 size_t __n, __locale_t __loc) throw ();
6565
6566
6567
6568
6569
6570extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
6571
6572
6573
6574extern size_t wcsxfrm (wchar_t *__restrict __s1,
6575 __const wchar_t *__restrict __s2, size_t __n) throw ();
6576
6577
6578
6579
6580
6581
6582
6583
6584extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2,
6585 __locale_t __loc) throw ();
6586
6587
6588
6589
6590extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
6591 size_t __n, __locale_t __loc) throw ();
6592
6593
6594extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__));
6595
6596
6597
6598
6599extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
6600 throw () __attribute__ ((__pure__));
6601
6602extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
6603 throw () __attribute__ ((__pure__));
6604
6605
6606
6607
6608
6609extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
6610 throw () __attribute__ ((__pure__));
6611
6612
6613
6614
6615
6616extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
6617 throw () __attribute__ ((__pure__));
6618
6619
6620extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
6621 throw () __attribute__ ((__pure__));
6622
6623extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
6624 throw () __attribute__ ((__pure__));
6625
6626extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
6627 throw () __attribute__ ((__pure__));
6628
6629
6630extern wchar_t *wcstok (wchar_t *__restrict __s,
6631 __const wchar_t *__restrict __delim,
6632 wchar_t **__restrict __ptr) throw ();
6633
6634
6635extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__));
6636
6637
6638
6639
6640extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
6641 throw () __attribute__ ((__pure__));
6642
6643
6644
6645
6646extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
6647 throw () __attribute__ ((__pure__));
6648
6649
6650
6651
6652
6653extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
6654 throw () __attribute__ ((__pure__));
6655
6656
6657extern int wmemcmp (__const wchar_t *__restrict __s1,
6658 __const wchar_t *__restrict __s2, size_t __n)
6659 throw () __attribute__ ((__pure__));
6660
6661
6662extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
6663 __const wchar_t *__restrict __s2, size_t __n) throw ();
6664
6665
6666
6667extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
6668 throw ();
6669
6670
6671extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw ();
6672
6673
6674
6675
6676
6677extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
6678 __const wchar_t *__restrict __s2, size_t __n)
6679 throw ();
6680
6681
6682
6683
6684
6685
6686extern wint_t btowc (int __c) throw ();
6687
6688
6689
6690extern int wctob (wint_t __c) throw ();
6691
6692
6693
6694extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__));
6695
6696
6697
6698extern size_t mbrtowc (wchar_t *__restrict __pwc,
6699 __const char *__restrict __s, size_t __n,
6700 mbstate_t *__p) throw ();
6701
6702
6703extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
6704 mbstate_t *__restrict __ps) throw ();
6705
6706
6707extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
6708 mbstate_t *__restrict __ps) throw ();
6709extern size_t mbrlen (__const char *__restrict __s, size_t __n,
6710 mbstate_t *__restrict __ps) throw ();
6711
6712# 346 "/usr/include/wchar.h" 3 4
6713
6714
6715
6716extern size_t mbsrtowcs (wchar_t *__restrict __dst,
6717 __const char **__restrict __src, size_t __len,
6718 mbstate_t *__restrict __ps) throw ();
6719
6720
6721
6722extern size_t wcsrtombs (char *__restrict __dst,
6723 __const wchar_t **__restrict __src, size_t __len,
6724 mbstate_t *__restrict __ps) throw ();
6725
6726
6727
6728
6729
6730
6731extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
6732 __const char **__restrict __src, size_t __nmc,
6733 size_t __len, mbstate_t *__restrict __ps) throw ();
6734
6735
6736
6737extern size_t wcsnrtombs (char *__restrict __dst,
6738 __const wchar_t **__restrict __src,
6739 size_t __nwc, size_t __len,
6740 mbstate_t *__restrict __ps) throw ();
6741
6742
6743
6744
6745
6746
6747extern int wcwidth (wchar_t __c) throw ();
6748
6749
6750
6751extern int wcswidth (__const wchar_t *__s, size_t __n) throw ();
6752
6753
6754
6755
6756
6757
6758extern double wcstod (__const wchar_t *__restrict __nptr,
6759 wchar_t **__restrict __endptr) throw ();
6760
6761
6762
6763extern float wcstof (__const wchar_t *__restrict __nptr,
6764 wchar_t **__restrict __endptr) throw ();
6765extern long double wcstold (__const wchar_t *__restrict __nptr,
6766 wchar_t **__restrict __endptr) throw ();
6767
6768
6769
6770
6771
6772extern long int wcstol (__const wchar_t *__restrict __nptr,
6773 wchar_t **__restrict __endptr, int __base) throw ();
6774
6775
6776
6777extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
6778 wchar_t **__restrict __endptr, int __base)
6779 throw ();
6780
6781
6782
6783
6784__extension__
6785extern long long int wcstoll (__const wchar_t *__restrict __nptr,
6786 wchar_t **__restrict __endptr, int __base)
6787 throw ();
6788
6789
6790
6791__extension__
6792extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
6793 wchar_t **__restrict __endptr,
6794 int __base) throw ();
6795
6796
6797
6798
6799
6800
6801__extension__
6802extern long long int wcstoq (__const wchar_t *__restrict __nptr,
6803 wchar_t **__restrict __endptr, int __base)
6804 throw ();
6805
6806
6807
6808__extension__
6809extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
6810 wchar_t **__restrict __endptr,
6811 int __base) throw ();
6812# 465 "/usr/include/wchar.h" 3 4
6813extern long int wcstol_l (__const wchar_t *__restrict __nptr,
6814 wchar_t **__restrict __endptr, int __base,
6815 __locale_t __loc) throw ();
6816
6817extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr,
6818 wchar_t **__restrict __endptr,
6819 int __base, __locale_t __loc) throw ();
6820
6821__extension__
6822extern long long int wcstoll_l (__const wchar_t *__restrict __nptr,
6823 wchar_t **__restrict __endptr,
6824 int __base, __locale_t __loc) throw ();
6825
6826__extension__
6827extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr,
6828 wchar_t **__restrict __endptr,
6829 int __base, __locale_t __loc)
6830 throw ();
6831
6832extern double wcstod_l (__const wchar_t *__restrict __nptr,
6833 wchar_t **__restrict __endptr, __locale_t __loc)
6834 throw ();
6835
6836extern float wcstof_l (__const wchar_t *__restrict __nptr,
6837 wchar_t **__restrict __endptr, __locale_t __loc)
6838 throw ();
6839
6840extern long double wcstold_l (__const wchar_t *__restrict __nptr,
6841 wchar_t **__restrict __endptr,
6842 __locale_t __loc) throw ();
6843
6844
6845
6846
6847
6848extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
6849 wchar_t **__restrict __endptr, int __group)
6850 throw ();
6851extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
6852 wchar_t **__restrict __endptr, int __group)
6853 throw ();
6854extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
6855 wchar_t **__restrict __endptr,
6856 int __group) throw ();
6857
6858
6859extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
6860 wchar_t **__restrict __endptr,
6861 int __base, int __group) throw ();
6862
6863
6864
6865extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
6866 wchar_t **__restrict __endptr,
6867 int __base, int __group) throw ();
6868
6869
6870
6871__extension__
6872extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
6873 wchar_t **__restrict __endptr,
6874 int __base, int __group) throw ();
6875
6876
6877
6878__extension__
6879extern unsigned long long int __wcstoull_internal (__const wchar_t *
6880 __restrict __nptr,
6881 wchar_t **
6882 __restrict __endptr,
6883 int __base,
6884 int __group) throw ();
6885# 587 "/usr/include/wchar.h" 3 4
6886extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw ();
6887
6888
6889
6890extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
6891 throw ();
6892
6893
6894
6895
6896
6897
6898
6899
6900extern int fwide (__FILE *__fp, int __mode) throw ();
6901
6902
6903
6904
6905
6906
6907extern int fwprintf (__FILE *__restrict __stream,
6908 __const wchar_t *__restrict __format, ...)
6909 ;
6910
6911
6912
6913
6914extern int wprintf (__const wchar_t *__restrict __format, ...)
6915 ;
6916
6917extern int swprintf (wchar_t *__restrict __s, size_t __n,
6918 __const wchar_t *__restrict __format, ...)
6919 throw () ;
6920
6921
6922
6923
6924
6925extern int vfwprintf (__FILE *__restrict __s,
6926 __const wchar_t *__restrict __format,
6927 __gnuc_va_list __arg)
6928 ;
6929
6930
6931
6932
6933extern int vwprintf (__const wchar_t *__restrict __format,
6934 __gnuc_va_list __arg)
6935 ;
6936
6937
6938extern int vswprintf (wchar_t *__restrict __s, size_t __n,
6939 __const wchar_t *__restrict __format,
6940 __gnuc_va_list __arg)
6941 throw () ;
6942
6943
6944
6945
6946
6947
6948extern int fwscanf (__FILE *__restrict __stream,
6949 __const wchar_t *__restrict __format, ...)
6950 ;
6951
6952
6953
6954
6955extern int wscanf (__const wchar_t *__restrict __format, ...)
6956 ;
6957
6958extern int swscanf (__const wchar_t *__restrict __s,
6959 __const wchar_t *__restrict __format, ...)
6960 throw () ;
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972extern int vfwscanf (__FILE *__restrict __s,
6973 __const wchar_t *__restrict __format,
6974 __gnuc_va_list __arg)
6975 ;
6976
6977
6978
6979
6980extern int vwscanf (__const wchar_t *__restrict __format,
6981 __gnuc_va_list __arg)
6982 ;
6983
6984extern int vswscanf (__const wchar_t *__restrict __s,
6985 __const wchar_t *__restrict __format,
6986 __gnuc_va_list __arg)
6987 throw () ;
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998extern wint_t fgetwc (__FILE *__stream);
6999extern wint_t getwc (__FILE *__stream);
7000
7001
7002
7003
7004
7005extern wint_t getwchar (void);
7006
7007
7008
7009
7010
7011
7012extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
7013extern wint_t putwc (wchar_t __wc, __FILE *__stream);
7014
7015
7016
7017
7018
7019extern wint_t putwchar (wchar_t __wc);
7020
7021
7022
7023
7024
7025
7026
7027extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
7028 __FILE *__restrict __stream);
7029
7030
7031
7032
7033
7034extern int fputws (__const wchar_t *__restrict __ws,
7035 __FILE *__restrict __stream);
7036
7037
7038
7039
7040
7041
7042extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
7043
7044# 755 "/usr/include/wchar.h" 3 4
7045extern wint_t getwc_unlocked (__FILE *__stream);
7046extern wint_t getwchar_unlocked (void);
7047
7048
7049
7050
7051
7052
7053
7054extern wint_t fgetwc_unlocked (__FILE *__stream);
7055
7056
7057
7058
7059
7060
7061
7062extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
7063# 781 "/usr/include/wchar.h" 3 4
7064extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
7065extern wint_t putwchar_unlocked (wchar_t __wc);
7066# 791 "/usr/include/wchar.h" 3 4
7067extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
7068 __FILE *__restrict __stream);
7069
7070
7071
7072
7073
7074
7075
7076extern int fputws_unlocked (__const wchar_t *__restrict __ws,
7077 __FILE *__restrict __stream);
7078
7079
7080
7081
7082
7083
7084
7085extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
7086 __const wchar_t *__restrict __format,
7087 __const struct tm *__restrict __tp) throw ();
7088
7089
7090
7091
7092
7093
7094
7095extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
7096 __const wchar_t *__restrict __format,
7097 __const struct tm *__restrict __tp,
7098 __locale_t __loc) throw ();
7099# 845 "/usr/include/wchar.h" 3 4
7100}
7101# 57 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 2 3
7102# 71 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3
7103namespace std
7104{
7105 using ::mbstate_t;
7106}
7107# 143 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3
7108namespace std
7109{
7110 using ::wint_t;
7111
7112 using ::btowc;
7113 using ::fgetwc;
7114 using ::fgetws;
7115 using ::fputwc;
7116 using ::fputws;
7117 using ::fwide;
7118 using ::fwprintf;
7119 using ::fwscanf;
7120 using ::getwc;
7121 using ::getwchar;
7122 using ::mbrlen;
7123 using ::mbrtowc;
7124 using ::mbsinit;
7125 using ::mbsrtowcs;
7126 using ::putwc;
7127 using ::putwchar;
7128 using ::swprintf;
7129 using ::swscanf;
7130 using ::ungetwc;
7131 using ::vfwprintf;
7132
7133 using ::vfwscanf;
7134
7135 using ::vswprintf;
7136
7137 using ::vswscanf;
7138
7139 using ::vwprintf;
7140
7141 using ::vwscanf;
7142
7143 using ::wcrtomb;
7144 using ::wcscat;
7145 using ::wcscmp;
7146 using ::wcscoll;
7147 using ::wcscpy;
7148 using ::wcscspn;
7149
7150
7151
7152 using ::wcslen;
7153 using ::wcsncat;
7154 using ::wcsncmp;
7155 using ::wcsncpy;
7156 using ::wcsrtombs;
7157 using ::wcsspn;
7158 using ::wcstod;
7159
7160 using ::wcstof;
7161
7162 using ::wcstok;
7163 using ::wcstol;
7164 using ::wcstoul;
7165 using ::wcsxfrm;
7166 using ::wctob;
7167 using ::wmemcmp;
7168 using ::wmemcpy;
7169 using ::wmemmove;
7170 using ::wmemset;
7171 using ::wprintf;
7172 using ::wscanf;
7173
7174 using ::wcschr;
7175
7176 inline wchar_t*
7177 wcschr(wchar_t* __p, wchar_t __c)
7178 { return wcschr(const_cast<const wchar_t*>(__p), __c); }
7179
7180 using ::wcspbrk;
7181
7182 inline wchar_t*
7183 wcspbrk(wchar_t* __s1, const wchar_t* __s2)
7184 { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
7185
7186 using ::wcsrchr;
7187
7188 inline wchar_t*
7189 wcsrchr(wchar_t* __p, wchar_t __c)
7190 { return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
7191
7192 using ::wcsstr;
7193
7194 inline wchar_t*
7195 wcsstr(wchar_t* __s1, const wchar_t* __s2)
7196 { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
7197
7198 using ::wmemchr;
7199
7200 inline wchar_t*
7201 wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
7202 { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
7203}
7204
7205
7206
7207
7208
7209
7210
7211namespace __gnu_cxx
7212{
7213
7214
7215
7216
7217
7218 using ::wcstold;
7219# 262 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3
7220 using ::wcstoll;
7221 using ::wcstoull;
7222
7223}
7224
7225namespace std
7226{
7227 using __gnu_cxx::wcstold;
7228 using __gnu_cxx::wcstoll;
7229 using __gnu_cxx::wcstoull;
7230}
7231
7232
7233
7234
7235#pragma GCC visibility pop
7236# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 2 3
7237
7238
7239# 1 "/usr/include/stdint.h" 1 3 4
7240# 28 "/usr/include/stdint.h" 3 4
7241# 1 "/usr/include/bits/wordsize.h" 1 3 4
7242# 29 "/usr/include/stdint.h" 2 3 4
7243# 49 "/usr/include/stdint.h" 3 4
7244typedef unsigned char uint8_t;
7245typedef unsigned short int uint16_t;
7246
7247typedef unsigned int uint32_t;
7248
7249
7250
7251
7252
7253__extension__
7254typedef unsigned long long int uint64_t;
7255
7256
7257
7258
7259
7260
7261typedef signed char int_least8_t;
7262typedef short int int_least16_t;
7263typedef int int_least32_t;
7264
7265
7266
7267__extension__
7268typedef long long int int_least64_t;
7269
7270
7271
7272typedef unsigned char uint_least8_t;
7273typedef unsigned short int uint_least16_t;
7274typedef unsigned int uint_least32_t;
7275
7276
7277
7278__extension__
7279typedef unsigned long long int uint_least64_t;
7280
7281
7282
7283
7284
7285
7286typedef signed char int_fast8_t;
7287
7288
7289
7290
7291
7292typedef int int_fast16_t;
7293typedef int int_fast32_t;
7294__extension__
7295typedef long long int int_fast64_t;
7296
7297
7298
7299typedef unsigned char uint_fast8_t;
7300
7301
7302
7303
7304
7305typedef unsigned int uint_fast16_t;
7306typedef unsigned int uint_fast32_t;
7307__extension__
7308typedef unsigned long long int uint_fast64_t;
7309# 129 "/usr/include/stdint.h" 3 4
7310typedef unsigned int uintptr_t;
7311# 138 "/usr/include/stdint.h" 3 4
7312__extension__
7313typedef long long int intmax_t;
7314__extension__
7315typedef unsigned long long int uintmax_t;
7316# 50 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 2 3
7317
7318
7319namespace std
7320{
7321# 72 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3
7322 typedef int64_t streamoff;
7323
7324
7325
7326
7327
7328 typedef ptrdiff_t streamsize;
7329
7330 template<typename _StateT>
7331 class fpos;
7332# 94 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3
7333 template<typename _StateT>
7334 class fpos
7335 {
7336 private:
7337 streamoff _M_off;
7338 _StateT _M_state;
7339
7340 public:
7341
7342
7343
7344
7345 fpos()
7346 : _M_off(0), _M_state() { }
7347# 116 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3
7348 fpos(streamoff __off)
7349 : _M_off(__off), _M_state() { }
7350
7351
7352 operator streamoff() const { return _M_off; }
7353
7354
7355 void
7356 state(_StateT __st)
7357 { _M_state = __st; }
7358
7359
7360 _StateT
7361 state() const
7362 { return _M_state; }
7363
7364
7365
7366
7367
7368
7369 bool
7370 operator==(const fpos& __other) const
7371 { return _M_off == __other._M_off; }
7372
7373
7374 bool
7375 operator!=(const fpos& __other) const
7376 { return _M_off != __other._M_off; }
7377
7378
7379
7380
7381
7382 fpos&
7383 operator+=(streamoff __off)
7384 {
7385 _M_off += __off;
7386 return *this;
7387 }
7388
7389
7390
7391
7392
7393 fpos&
7394 operator-=(streamoff __off)
7395 {
7396 _M_off -= __off;
7397 return *this;
7398 }
7399
7400
7401
7402
7403
7404
7405
7406 fpos
7407 operator+(streamoff __off) const
7408 {
7409 fpos __pos(*this);
7410 __pos += __off;
7411 return __pos;
7412 }
7413
7414
7415
7416
7417
7418
7419
7420 fpos
7421 operator-(streamoff __off) const
7422 {
7423 fpos __pos(*this);
7424 __pos -= __off;
7425 return __pos;
7426 }
7427
7428
7429
7430
7431
7432
7433 streamoff
7434 operator-(const fpos& __other) const
7435 { return _M_off - __other._M_off; }
7436 };
7437
7438
7439
7440
7441
7442 typedef fpos<mbstate_t> streampos;
7443
7444 typedef fpos<mbstate_t> wstreampos;
7445}
7446# 51 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3
7447# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/functexcept.h" 1 3
7448# 41 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/functexcept.h" 3
7449# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/exception_defines.h" 1 3
7450# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/functexcept.h" 2 3
7451
7452namespace std
7453{
7454
7455 void
7456 __throw_bad_exception(void) __attribute__((__noreturn__));
7457
7458
7459 void
7460 __throw_bad_alloc(void) __attribute__((__noreturn__));
7461
7462
7463 void
7464 __throw_bad_cast(void) __attribute__((__noreturn__));
7465
7466 void
7467 __throw_bad_typeid(void) __attribute__((__noreturn__));
7468
7469
7470 void
7471 __throw_logic_error(const char*) __attribute__((__noreturn__));
7472
7473 void
7474 __throw_domain_error(const char*) __attribute__((__noreturn__));
7475
7476 void
7477 __throw_invalid_argument(const char*) __attribute__((__noreturn__));
7478
7479 void
7480 __throw_length_error(const char*) __attribute__((__noreturn__));
7481
7482 void
7483 __throw_out_of_range(const char*) __attribute__((__noreturn__));
7484
7485 void
7486 __throw_runtime_error(const char*) __attribute__((__noreturn__));
7487
7488 void
7489 __throw_range_error(const char*) __attribute__((__noreturn__));
7490
7491 void
7492 __throw_overflow_error(const char*) __attribute__((__noreturn__));
7493
7494 void
7495 __throw_underflow_error(const char*) __attribute__((__noreturn__));
7496
7497
7498 void
7499 __throw_ios_failure(const char*) __attribute__((__noreturn__));
7500}
7501# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3
7502
7503namespace std
7504{
7505 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7506 class basic_ios;
7507
7508 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7509 class basic_streambuf;
7510
7511 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7512 class basic_istream;
7513
7514 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7515 class basic_ostream;
7516
7517 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7518 class basic_iostream;
7519
7520 template<typename _CharT, typename _Traits = char_traits<_CharT>,
7521 typename _Alloc = allocator<_CharT> >
7522 class basic_stringbuf;
7523
7524 template<typename _CharT, typename _Traits = char_traits<_CharT>,
7525 typename _Alloc = allocator<_CharT> >
7526 class basic_istringstream;
7527
7528 template<typename _CharT, typename _Traits = char_traits<_CharT>,
7529 typename _Alloc = allocator<_CharT> >
7530 class basic_ostringstream;
7531
7532 template<typename _CharT, typename _Traits = char_traits<_CharT>,
7533 typename _Alloc = allocator<_CharT> >
7534 class basic_stringstream;
7535
7536 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7537 class basic_filebuf;
7538
7539 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7540 class basic_ifstream;
7541
7542 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7543 class basic_ofstream;
7544
7545 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7546 class basic_fstream;
7547
7548 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7549 class istreambuf_iterator;
7550
7551 template<typename _CharT, typename _Traits = char_traits<_CharT> >
7552 class ostreambuf_iterator;
7553
7554
7555
7556 class ios_base;
7557# 136 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 3
7558 typedef basic_ios<char> ios;
7559 typedef basic_streambuf<char> streambuf;
7560 typedef basic_istream<char> istream;
7561 typedef basic_ostream<char> ostream;
7562 typedef basic_iostream<char> iostream;
7563 typedef basic_stringbuf<char> stringbuf;
7564 typedef basic_istringstream<char> istringstream;
7565 typedef basic_ostringstream<char> ostringstream;
7566 typedef basic_stringstream<char> stringstream;
7567 typedef basic_filebuf<char> filebuf;
7568 typedef basic_ifstream<char> ifstream;
7569 typedef basic_ofstream<char> ofstream;
7570 typedef basic_fstream<char> fstream;
7571
7572
7573 typedef basic_ios<wchar_t> wios;
7574 typedef basic_streambuf<wchar_t> wstreambuf;
7575 typedef basic_istream<wchar_t> wistream;
7576 typedef basic_ostream<wchar_t> wostream;
7577 typedef basic_iostream<wchar_t> wiostream;
7578 typedef basic_stringbuf<wchar_t> wstringbuf;
7579 typedef basic_istringstream<wchar_t> wistringstream;
7580 typedef basic_ostringstream<wchar_t> wostringstream;
7581 typedef basic_stringstream<wchar_t> wstringstream;
7582 typedef basic_filebuf<wchar_t> wfilebuf;
7583 typedef basic_ifstream<wchar_t> wifstream;
7584 typedef basic_ofstream<wchar_t> wofstream;
7585 typedef basic_fstream<wchar_t> wfstream;
7586
7587
7588}
7589
7590#pragma GCC visibility pop
7591# 70 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
7592# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_pair.h" 1 3
7593# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_pair.h" 3
7594namespace std
7595{
7596
7597 template<class _T1, class _T2>
7598 struct pair
7599 {
7600 typedef _T1 first_type;
7601 typedef _T2 second_type;
7602
7603 _T1 first;
7604 _T2 second;
7605
7606
7607
7608
7609
7610 pair()
7611 : first(), second() { }
7612
7613
7614 pair(const _T1& __a, const _T2& __b)
7615 : first(__a), second(__b) { }
7616
7617
7618 template<class _U1, class _U2>
7619 pair(const pair<_U1, _U2>& __p)
7620 : first(__p.first), second(__p.second) { }
7621 };
7622
7623
7624 template<class _T1, class _T2>
7625 inline bool
7626 operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
7627 { return __x.first == __y.first && __x.second == __y.second; }
7628
7629
7630 template<class _T1, class _T2>
7631 inline bool
7632 operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
7633 { return __x.first < __y.first
7634 || (!(__y.first < __x.first) && __x.second < __y.second); }
7635
7636
7637 template<class _T1, class _T2>
7638 inline bool
7639 operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
7640 { return !(__x == __y); }
7641
7642
7643 template<class _T1, class _T2>
7644 inline bool
7645 operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
7646 { return __y < __x; }
7647
7648
7649 template<class _T1, class _T2>
7650 inline bool
7651 operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
7652 { return !(__y < __x); }
7653
7654
7655 template<class _T1, class _T2>
7656 inline bool
7657 operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
7658 { return !(__x < __y); }
7659# 142 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_pair.h" 3
7660 template<class _T1, class _T2>
7661 inline pair<_T1, _T2>
7662 make_pair(_T1 __x, _T2 __y)
7663 { return pair<_T1, _T2>(__x, __y); }
7664}
7665# 71 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
7666# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 1 3
7667# 41 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 3
7668
7669# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 3
7670# 75 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 3
7671namespace __gnu_internal
7672{
7673 typedef char __one;
7674 typedef char __two[2];
7675
7676 template<typename _Tp>
7677 __one __test_type(int _Tp::*);
7678 template<typename _Tp>
7679 __two& __test_type(...);
7680}
7681
7682
7683namespace __gnu_cxx
7684{
7685 template<typename _Iterator, typename _Container>
7686 class __normal_iterator;
7687}
7688
7689struct __true_type { };
7690struct __false_type { };
7691
7692namespace std
7693{
7694 template<bool>
7695 struct __truth_type
7696 { typedef __false_type __type; };
7697
7698 template<>
7699 struct __truth_type<true>
7700 { typedef __true_type __type; };
7701
7702
7703
7704 template<class _Sp, class _Tp>
7705 struct __traitor
7706 {
7707 enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
7708 typedef typename __truth_type<__value>::__type __type;
7709 };
7710
7711
7712 template<typename, typename>
7713 struct __are_same
7714 {
7715 enum { __value = 0 };
7716 typedef __false_type __type;
7717 };
7718
7719 template<typename _Tp>
7720 struct __are_same<_Tp, _Tp>
7721 {
7722 enum { __value = 1 };
7723 typedef __true_type __type;
7724 };
7725
7726
7727 template<typename, bool>
7728 struct __enable_if
7729 {
7730 };
7731
7732 template<typename _Tp>
7733 struct __enable_if<_Tp, true>
7734 {
7735 typedef _Tp __type;
7736 };
7737
7738
7739 template<typename _Tp>
7740 struct __is_void
7741 {
7742 enum { __value = 0 };
7743 typedef __false_type __type;
7744 };
7745
7746 template<>
7747 struct __is_void<void>
7748 {
7749 enum { __value = 1 };
7750 typedef __true_type __type;
7751 };
7752
7753
7754
7755
7756 template<typename _Tp>
7757 struct __is_integer
7758 {
7759 enum { __value = 0 };
7760 typedef __false_type __type;
7761 };
7762
7763
7764
7765
7766 template<>
7767 struct __is_integer<bool>
7768 {
7769 enum { __value = 1 };
7770 typedef __true_type __type;
7771 };
7772
7773 template<>
7774 struct __is_integer<char>
7775 {
7776 enum { __value = 1 };
7777 typedef __true_type __type;
7778 };
7779
7780 template<>
7781 struct __is_integer<signed char>
7782 {
7783 enum { __value = 1 };
7784 typedef __true_type __type;
7785 };
7786
7787 template<>
7788 struct __is_integer<unsigned char>
7789 {
7790 enum { __value = 1 };
7791 typedef __true_type __type;
7792 };
7793
7794
7795 template<>
7796 struct __is_integer<wchar_t>
7797 {
7798 enum { __value = 1 };
7799 typedef __true_type __type;
7800 };
7801
7802
7803 template<>
7804 struct __is_integer<short>
7805 {
7806 enum { __value = 1 };
7807 typedef __true_type __type;
7808 };
7809
7810 template<>
7811 struct __is_integer<unsigned short>
7812 {
7813 enum { __value = 1 };
7814 typedef __true_type __type;
7815 };
7816
7817 template<>
7818 struct __is_integer<int>
7819 {
7820 enum { __value = 1 };
7821 typedef __true_type __type;
7822 };
7823
7824 template<>
7825 struct __is_integer<unsigned int>
7826 {
7827 enum { __value = 1 };
7828 typedef __true_type __type;
7829 };
7830
7831 template<>
7832 struct __is_integer<long>
7833 {
7834 enum { __value = 1 };
7835 typedef __true_type __type;
7836 };
7837
7838 template<>
7839 struct __is_integer<unsigned long>
7840 {
7841 enum { __value = 1 };
7842 typedef __true_type __type;
7843 };
7844
7845 template<>
7846 struct __is_integer<long long>
7847 {
7848 enum { __value = 1 };
7849 typedef __true_type __type;
7850 };
7851
7852 template<>
7853 struct __is_integer<unsigned long long>
7854 {
7855 enum { __value = 1 };
7856 typedef __true_type __type;
7857 };
7858
7859
7860
7861
7862 template<typename _Tp>
7863 struct __is_floating
7864 {
7865 enum { __value = 0 };
7866 typedef __false_type __type;
7867 };
7868
7869
7870 template<>
7871 struct __is_floating<float>
7872 {
7873 enum { __value = 1 };
7874 typedef __true_type __type;
7875 };
7876
7877 template<>
7878 struct __is_floating<double>
7879 {
7880 enum { __value = 1 };
7881 typedef __true_type __type;
7882 };
7883
7884 template<>
7885 struct __is_floating<long double>
7886 {
7887 enum { __value = 1 };
7888 typedef __true_type __type;
7889 };
7890
7891
7892
7893
7894 template<typename _Tp>
7895 struct __is_pointer
7896 {
7897 enum { __value = 0 };
7898 typedef __false_type __type;
7899 };
7900
7901 template<typename _Tp>
7902 struct __is_pointer<_Tp*>
7903 {
7904 enum { __value = 1 };
7905 typedef __true_type __type;
7906 };
7907
7908
7909
7910
7911 template<typename _Tp>
7912 struct __is_normal_iterator
7913 {
7914 enum { __value = 0 };
7915 typedef __false_type __type;
7916 };
7917
7918 template<typename _Iterator, typename _Container>
7919 struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
7920 _Container> >
7921 {
7922 enum { __value = 1 };
7923 typedef __true_type __type;
7924 };
7925
7926
7927
7928
7929 template<typename _Tp>
7930 struct __is_arithmetic
7931 : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
7932 { };
7933
7934
7935
7936
7937 template<typename _Tp>
7938 struct __is_fundamental
7939 : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
7940 { };
7941
7942
7943
7944
7945 template<typename _Tp>
7946 struct __is_scalar
7947 : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
7948 { };
7949
7950
7951
7952
7953 template<typename _Tp>
7954 struct __is_pod
7955 {
7956 enum
7957 {
7958 __value = (sizeof(__gnu_internal::__test_type<_Tp>(0))
7959 != sizeof(__gnu_internal::__one))
7960 };
7961 };
7962
7963
7964
7965
7966 template<typename _Tp>
7967 struct __is_empty
7968 {
7969 private:
7970 template<typename>
7971 struct __first { };
7972 template<typename _Up>
7973 struct __second
7974 : public _Up { };
7975
7976 public:
7977 enum
7978 {
7979 __value = sizeof(__first<_Tp>) == sizeof(__second<_Tp>)
7980 };
7981 };
7982
7983}
7984# 72 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
7985# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 1 3
7986# 67 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3
7987
7988# 68 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3
7989
7990namespace std
7991{
7992# 80 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3
7993 struct input_iterator_tag {};
7994
7995 struct output_iterator_tag {};
7996
7997 struct forward_iterator_tag : public input_iterator_tag {};
7998
7999
8000 struct bidirectional_iterator_tag : public forward_iterator_tag {};
8001
8002
8003 struct random_access_iterator_tag : public bidirectional_iterator_tag {};
8004# 104 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3
8005 template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
8006 typename _Pointer = _Tp*, typename _Reference = _Tp&>
8007 struct iterator
8008 {
8009
8010 typedef _Category iterator_category;
8011
8012 typedef _Tp value_type;
8013
8014 typedef _Distance difference_type;
8015
8016 typedef _Pointer pointer;
8017
8018 typedef _Reference reference;
8019 };
8020
8021
8022
8023
8024
8025
8026
8027 template<typename _Iterator>
8028 struct iterator_traits
8029 {
8030 typedef typename _Iterator::iterator_category iterator_category;
8031 typedef typename _Iterator::value_type value_type;
8032 typedef typename _Iterator::difference_type difference_type;
8033 typedef typename _Iterator::pointer pointer;
8034 typedef typename _Iterator::reference reference;
8035 };
8036
8037 template<typename _Tp>
8038 struct iterator_traits<_Tp*>
8039 {
8040 typedef random_access_iterator_tag iterator_category;
8041 typedef _Tp value_type;
8042 typedef ptrdiff_t difference_type;
8043 typedef _Tp* pointer;
8044 typedef _Tp& reference;
8045 };
8046
8047 template<typename _Tp>
8048 struct iterator_traits<const _Tp*>
8049 {
8050 typedef random_access_iterator_tag iterator_category;
8051 typedef _Tp value_type;
8052 typedef ptrdiff_t difference_type;
8053 typedef const _Tp* pointer;
8054 typedef const _Tp& reference;
8055 };
8056
8057
8058
8059
8060
8061
8062
8063 template<typename _Iter>
8064 inline typename iterator_traits<_Iter>::iterator_category
8065 __iterator_category(const _Iter&)
8066 { return typename iterator_traits<_Iter>::iterator_category(); }
8067
8068}
8069# 73 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
8070# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3
8071# 67 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
8072
8073# 68 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
8074# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/concept_check.h" 1 3
8075# 38 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/concept_check.h" 3
8076
8077# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/concept_check.h" 3
8078# 69 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 2 3
8079
8080namespace std
8081{
8082 template<typename _InputIterator>
8083 inline typename iterator_traits<_InputIterator>::difference_type
8084 __distance(_InputIterator __first, _InputIterator __last,
8085 input_iterator_tag)
8086 {
8087
8088
8089
8090 typename iterator_traits<_InputIterator>::difference_type __n = 0;
8091 while (__first != __last)
8092 {
8093 ++__first;
8094 ++__n;
8095 }
8096 return __n;
8097 }
8098
8099 template<typename _RandomAccessIterator>
8100 inline typename iterator_traits<_RandomAccessIterator>::difference_type
8101 __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
8102 random_access_iterator_tag)
8103 {
8104
8105
8106
8107 return __last - __first;
8108 }
8109# 112 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
8110 template<typename _InputIterator>
8111 inline typename iterator_traits<_InputIterator>::difference_type
8112 distance(_InputIterator __first, _InputIterator __last)
8113 {
8114
8115 return std::__distance(__first, __last,
8116 std::__iterator_category(__first));
8117 }
8118
8119 template<typename _InputIterator, typename _Distance>
8120 inline void
8121 __advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
8122 {
8123
8124
8125 while (__n--)
8126 ++__i;
8127 }
8128
8129 template<typename _BidirectionalIterator, typename _Distance>
8130 inline void
8131 __advance(_BidirectionalIterator& __i, _Distance __n,
8132 bidirectional_iterator_tag)
8133 {
8134
8135
8136
8137 if (__n > 0)
8138 while (__n--)
8139 ++__i;
8140 else
8141 while (__n++)
8142 --__i;
8143 }
8144
8145 template<typename _RandomAccessIterator, typename _Distance>
8146 inline void
8147 __advance(_RandomAccessIterator& __i, _Distance __n,
8148 random_access_iterator_tag)
8149 {
8150
8151
8152
8153 __i += __n;
8154 }
8155# 170 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
8156 template<typename _InputIterator, typename _Distance>
8157 inline void
8158 advance(_InputIterator& __i, _Distance __n)
8159 {
8160
8161 std::__advance(__i, __n, std::__iterator_category(__i));
8162 }
8163}
8164# 74 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
8165# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 1 3
8166# 70 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8167namespace std
8168{
8169# 91 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8170 template<typename _Iterator>
8171 class reverse_iterator
8172 : public iterator<typename iterator_traits<_Iterator>::iterator_category,
8173 typename iterator_traits<_Iterator>::value_type,
8174 typename iterator_traits<_Iterator>::difference_type,
8175 typename iterator_traits<_Iterator>::pointer,
8176 typename iterator_traits<_Iterator>::reference>
8177 {
8178 protected:
8179 _Iterator current;
8180
8181 public:
8182 typedef _Iterator iterator_type;
8183 typedef typename iterator_traits<_Iterator>::difference_type
8184 difference_type;
8185 typedef typename iterator_traits<_Iterator>::reference reference;
8186 typedef typename iterator_traits<_Iterator>::pointer pointer;
8187
8188 public:
8189
8190
8191
8192
8193
8194
8195 reverse_iterator() : current() { }
8196
8197
8198
8199
8200 explicit
8201 reverse_iterator(iterator_type __x) : current(__x) { }
8202
8203
8204
8205
8206 reverse_iterator(const reverse_iterator& __x)
8207 : current(__x.current) { }
8208
8209
8210
8211
8212
8213 template<typename _Iter>
8214 reverse_iterator(const reverse_iterator<_Iter>& __x)
8215 : current(__x.base()) { }
8216
8217
8218
8219
8220 iterator_type
8221 base() const
8222 { return current; }
8223
8224
8225
8226
8227
8228
8229 reference
8230 operator*() const
8231 {
8232 _Iterator __tmp = current;
8233 return *--__tmp;
8234 }
8235
8236
8237
8238
8239
8240
8241 pointer
8242 operator->() const
8243 { return &(operator*()); }
8244
8245
8246
8247
8248
8249
8250 reverse_iterator&
8251 operator++()
8252 {
8253 --current;
8254 return *this;
8255 }
8256
8257
8258
8259
8260
8261
8262 reverse_iterator
8263 operator++(int)
8264 {
8265 reverse_iterator __tmp = *this;
8266 --current;
8267 return __tmp;
8268 }
8269
8270
8271
8272
8273
8274
8275 reverse_iterator&
8276 operator--()
8277 {
8278 ++current;
8279 return *this;
8280 }
8281
8282
8283
8284
8285
8286
8287 reverse_iterator
8288 operator--(int)
8289 {
8290 reverse_iterator __tmp = *this;
8291 ++current;
8292 return __tmp;
8293 }
8294
8295
8296
8297
8298
8299
8300 reverse_iterator
8301 operator+(difference_type __n) const
8302 { return reverse_iterator(current - __n); }
8303
8304
8305
8306
8307
8308
8309 reverse_iterator&
8310 operator+=(difference_type __n)
8311 {
8312 current -= __n;
8313 return *this;
8314 }
8315
8316
8317
8318
8319
8320
8321 reverse_iterator
8322 operator-(difference_type __n) const
8323 { return reverse_iterator(current + __n); }
8324
8325
8326
8327
8328
8329
8330 reverse_iterator&
8331 operator-=(difference_type __n)
8332 {
8333 current += __n;
8334 return *this;
8335 }
8336
8337
8338
8339
8340
8341
8342 reference
8343 operator[](difference_type __n) const
8344 { return *(*this + __n); }
8345 };
8346# 278 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8347 template<typename _Iterator>
8348 inline bool
8349 operator==(const reverse_iterator<_Iterator>& __x,
8350 const reverse_iterator<_Iterator>& __y)
8351 { return __x.base() == __y.base(); }
8352
8353 template<typename _Iterator>
8354 inline bool
8355 operator<(const reverse_iterator<_Iterator>& __x,
8356 const reverse_iterator<_Iterator>& __y)
8357 { return __y.base() < __x.base(); }
8358
8359 template<typename _Iterator>
8360 inline bool
8361 operator!=(const reverse_iterator<_Iterator>& __x,
8362 const reverse_iterator<_Iterator>& __y)
8363 { return !(__x == __y); }
8364
8365 template<typename _Iterator>
8366 inline bool
8367 operator>(const reverse_iterator<_Iterator>& __x,
8368 const reverse_iterator<_Iterator>& __y)
8369 { return __y < __x; }
8370
8371 template<typename _Iterator>
8372 inline bool
8373 operator<=(const reverse_iterator<_Iterator>& __x,
8374 const reverse_iterator<_Iterator>& __y)
8375 { return !(__y < __x); }
8376
8377 template<typename _Iterator>
8378 inline bool
8379 operator>=(const reverse_iterator<_Iterator>& __x,
8380 const reverse_iterator<_Iterator>& __y)
8381 { return !(__x < __y); }
8382
8383 template<typename _Iterator>
8384 inline typename reverse_iterator<_Iterator>::difference_type
8385 operator-(const reverse_iterator<_Iterator>& __x,
8386 const reverse_iterator<_Iterator>& __y)
8387 { return __y.base() - __x.base(); }
8388
8389 template<typename _Iterator>
8390 inline reverse_iterator<_Iterator>
8391 operator+(typename reverse_iterator<_Iterator>::difference_type __n,
8392 const reverse_iterator<_Iterator>& __x)
8393 { return reverse_iterator<_Iterator>(__x.base() - __n); }
8394
8395
8396
8397 template<typename _IteratorL, typename _IteratorR>
8398 inline bool
8399 operator==(const reverse_iterator<_IteratorL>& __x,
8400 const reverse_iterator<_IteratorR>& __y)
8401 { return __x.base() == __y.base(); }
8402
8403 template<typename _IteratorL, typename _IteratorR>
8404 inline bool
8405 operator<(const reverse_iterator<_IteratorL>& __x,
8406 const reverse_iterator<_IteratorR>& __y)
8407 { return __y.base() < __x.base(); }
8408
8409 template<typename _IteratorL, typename _IteratorR>
8410 inline bool
8411 operator!=(const reverse_iterator<_IteratorL>& __x,
8412 const reverse_iterator<_IteratorR>& __y)
8413 { return !(__x == __y); }
8414
8415 template<typename _IteratorL, typename _IteratorR>
8416 inline bool
8417 operator>(const reverse_iterator<_IteratorL>& __x,
8418 const reverse_iterator<_IteratorR>& __y)
8419 { return __y < __x; }
8420
8421 template<typename _IteratorL, typename _IteratorR>
8422 inline bool
8423 operator<=(const reverse_iterator<_IteratorL>& __x,
8424 const reverse_iterator<_IteratorR>& __y)
8425 { return !(__y < __x); }
8426
8427 template<typename _IteratorL, typename _IteratorR>
8428 inline bool
8429 operator>=(const reverse_iterator<_IteratorL>& __x,
8430 const reverse_iterator<_IteratorR>& __y)
8431 { return !(__x < __y); }
8432
8433 template<typename _IteratorL, typename _IteratorR>
8434 inline typename reverse_iterator<_IteratorL>::difference_type
8435 operator-(const reverse_iterator<_IteratorL>& __x,
8436 const reverse_iterator<_IteratorR>& __y)
8437 { return __y.base() - __x.base(); }
8438# 382 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8439 template<typename _Container>
8440 class back_insert_iterator
8441 : public iterator<output_iterator_tag, void, void, void, void>
8442 {
8443 protected:
8444 _Container* container;
8445
8446 public:
8447
8448 typedef _Container container_type;
8449
8450
8451 explicit
8452 back_insert_iterator(_Container& __x) : container(&__x) { }
8453# 408 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8454 back_insert_iterator&
8455 operator=(typename _Container::const_reference __value)
8456 {
8457 container->push_back(__value);
8458 return *this;
8459 }
8460
8461
8462 back_insert_iterator&
8463 operator*()
8464 { return *this; }
8465
8466
8467 back_insert_iterator&
8468 operator++()
8469 { return *this; }
8470
8471
8472 back_insert_iterator
8473 operator++(int)
8474 { return *this; }
8475 };
8476# 442 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8477 template<typename _Container>
8478 inline back_insert_iterator<_Container>
8479 back_inserter(_Container& __x)
8480 { return back_insert_iterator<_Container>(__x); }
8481# 457 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8482 template<typename _Container>
8483 class front_insert_iterator
8484 : public iterator<output_iterator_tag, void, void, void, void>
8485 {
8486 protected:
8487 _Container* container;
8488
8489 public:
8490
8491 typedef _Container container_type;
8492
8493
8494 explicit front_insert_iterator(_Container& __x) : container(&__x) { }
8495# 482 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8496 front_insert_iterator&
8497 operator=(typename _Container::const_reference __value)
8498 {
8499 container->push_front(__value);
8500 return *this;
8501 }
8502
8503
8504 front_insert_iterator&
8505 operator*()
8506 { return *this; }
8507
8508
8509 front_insert_iterator&
8510 operator++()
8511 { return *this; }
8512
8513
8514 front_insert_iterator
8515 operator++(int)
8516 { return *this; }
8517 };
8518# 516 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8519 template<typename _Container>
8520 inline front_insert_iterator<_Container>
8521 front_inserter(_Container& __x)
8522 { return front_insert_iterator<_Container>(__x); }
8523# 535 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8524 template<typename _Container>
8525 class insert_iterator
8526 : public iterator<output_iterator_tag, void, void, void, void>
8527 {
8528 protected:
8529 _Container* container;
8530 typename _Container::iterator iter;
8531
8532 public:
8533
8534 typedef _Container container_type;
8535
8536
8537
8538
8539
8540 insert_iterator(_Container& __x, typename _Container::iterator __i)
8541 : container(&__x), iter(__i) {}
8542# 577 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8543 insert_iterator&
8544 operator=(const typename _Container::const_reference __value)
8545 {
8546 iter = container->insert(iter, __value);
8547 ++iter;
8548 return *this;
8549 }
8550
8551
8552 insert_iterator&
8553 operator*()
8554 { return *this; }
8555
8556
8557 insert_iterator&
8558 operator++()
8559 { return *this; }
8560
8561
8562 insert_iterator&
8563 operator++(int)
8564 { return *this; }
8565 };
8566# 612 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8567 template<typename _Container, typename _Iterator>
8568 inline insert_iterator<_Container>
8569 inserter(_Container& __x, _Iterator __i)
8570 {
8571 return insert_iterator<_Container>(__x,
8572 typename _Container::iterator(__i));
8573 }
8574}
8575
8576namespace __gnu_cxx
8577{
8578
8579
8580
8581
8582
8583
8584
8585 using std::iterator_traits;
8586 using std::iterator;
8587 template<typename _Iterator, typename _Container>
8588 class __normal_iterator
8589 {
8590 protected:
8591 _Iterator _M_current;
8592
8593 public:
8594 typedef typename iterator_traits<_Iterator>::iterator_category
8595 iterator_category;
8596 typedef typename iterator_traits<_Iterator>::value_type value_type;
8597 typedef typename iterator_traits<_Iterator>::difference_type
8598 difference_type;
8599 typedef typename iterator_traits<_Iterator>::reference reference;
8600 typedef typename iterator_traits<_Iterator>::pointer pointer;
8601
8602 __normal_iterator() : _M_current(_Iterator()) { }
8603
8604 explicit
8605 __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
8606
8607
8608 template<typename _Iter>
8609 __normal_iterator(const __normal_iterator<_Iter,
8610 typename std::__enable_if<_Container,
8611 (std::__are_same<_Iter,
8612 typename _Container::pointer>::__value)
8613 >::__type>& __i)
8614 : _M_current(__i.base()) { }
8615
8616
8617 reference
8618 operator*() const
8619 { return *_M_current; }
8620
8621 pointer
8622 operator->() const
8623 { return _M_current; }
8624
8625 __normal_iterator&
8626 operator++()
8627 {
8628 ++_M_current;
8629 return *this;
8630 }
8631
8632 __normal_iterator
8633 operator++(int)
8634 { return __normal_iterator(_M_current++); }
8635
8636
8637 __normal_iterator&
8638 operator--()
8639 {
8640 --_M_current;
8641 return *this;
8642 }
8643
8644 __normal_iterator
8645 operator--(int)
8646 { return __normal_iterator(_M_current--); }
8647
8648
8649 reference
8650 operator[](const difference_type& __n) const
8651 { return _M_current[__n]; }
8652
8653 __normal_iterator&
8654 operator+=(const difference_type& __n)
8655 { _M_current += __n; return *this; }
8656
8657 __normal_iterator
8658 operator+(const difference_type& __n) const
8659 { return __normal_iterator(_M_current + __n); }
8660
8661 __normal_iterator&
8662 operator-=(const difference_type& __n)
8663 { _M_current -= __n; return *this; }
8664
8665 __normal_iterator
8666 operator-(const difference_type& __n) const
8667 { return __normal_iterator(_M_current - __n); }
8668
8669 const _Iterator&
8670 base() const
8671 { return _M_current; }
8672 };
8673# 728 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3
8674 template<typename _IteratorL, typename _IteratorR, typename _Container>
8675 inline bool
8676 operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
8677 const __normal_iterator<_IteratorR, _Container>& __rhs)
8678 { return __lhs.base() == __rhs.base(); }
8679
8680 template<typename _Iterator, typename _Container>
8681 inline bool
8682 operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
8683 const __normal_iterator<_Iterator, _Container>& __rhs)
8684 { return __lhs.base() == __rhs.base(); }
8685
8686 template<typename _IteratorL, typename _IteratorR, typename _Container>
8687 inline bool
8688 operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
8689 const __normal_iterator<_IteratorR, _Container>& __rhs)
8690 { return __lhs.base() != __rhs.base(); }
8691
8692 template<typename _Iterator, typename _Container>
8693 inline bool
8694 operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
8695 const __normal_iterator<_Iterator, _Container>& __rhs)
8696 { return __lhs.base() != __rhs.base(); }
8697
8698
8699 template<typename _IteratorL, typename _IteratorR, typename _Container>
8700 inline bool
8701 operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
8702 const __normal_iterator<_IteratorR, _Container>& __rhs)
8703 { return __lhs.base() < __rhs.base(); }
8704
8705 template<typename _Iterator, typename _Container>
8706 inline bool
8707 operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
8708 const __normal_iterator<_Iterator, _Container>& __rhs)
8709 { return __lhs.base() < __rhs.base(); }
8710
8711 template<typename _IteratorL, typename _IteratorR, typename _Container>
8712 inline bool
8713 operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
8714 const __normal_iterator<_IteratorR, _Container>& __rhs)
8715 { return __lhs.base() > __rhs.base(); }
8716
8717 template<typename _Iterator, typename _Container>
8718 inline bool
8719 operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
8720 const __normal_iterator<_Iterator, _Container>& __rhs)
8721 { return __lhs.base() > __rhs.base(); }
8722
8723 template<typename _IteratorL, typename _IteratorR, typename _Container>
8724 inline bool
8725 operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
8726 const __normal_iterator<_IteratorR, _Container>& __rhs)
8727 { return __lhs.base() <= __rhs.base(); }
8728
8729 template<typename _Iterator, typename _Container>
8730 inline bool
8731 operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
8732 const __normal_iterator<_Iterator, _Container>& __rhs)
8733 { return __lhs.base() <= __rhs.base(); }
8734
8735 template<typename _IteratorL, typename _IteratorR, typename _Container>
8736 inline bool
8737 operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
8738 const __normal_iterator<_IteratorR, _Container>& __rhs)
8739 { return __lhs.base() >= __rhs.base(); }
8740
8741 template<typename _Iterator, typename _Container>
8742 inline bool
8743 operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
8744 const __normal_iterator<_Iterator, _Container>& __rhs)
8745 { return __lhs.base() >= __rhs.base(); }
8746
8747
8748
8749
8750
8751 template<typename _IteratorL, typename _IteratorR, typename _Container>
8752 inline typename __normal_iterator<_IteratorL, _Container>::difference_type
8753 operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
8754 const __normal_iterator<_IteratorR, _Container>& __rhs)
8755 { return __lhs.base() - __rhs.base(); }
8756
8757 template<typename _Iterator, typename _Container>
8758 inline __normal_iterator<_Iterator, _Container>
8759 operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
8760 __n, const __normal_iterator<_Iterator, _Container>& __i)
8761 { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
8762}
8763# 75 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
8764
8765# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/debug/debug.h" 1 3
8766# 77 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3
8767
8768namespace std
8769{
8770# 90 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
8771 template<typename _Tp>
8772 inline void
8773 swap(_Tp& __a, _Tp& __b)
8774 {
8775
8776
8777
8778 _Tp __tmp = __a;
8779 __a = __b;
8780 __b = __tmp;
8781 }
8782
8783
8784
8785
8786 template<bool _BoolType>
8787 struct __iter_swap
8788 {
8789 template<typename _ForwardIterator1, typename _ForwardIterator2>
8790 static void
8791 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
8792 {
8793 typedef typename iterator_traits<_ForwardIterator1>::value_type
8794 _ValueType1;
8795 _ValueType1 __tmp = *__a;
8796 *__a = *__b;
8797 *__b = __tmp;
8798 }
8799 };
8800
8801 template<>
8802 struct __iter_swap<true>
8803 {
8804 template<typename _ForwardIterator1, typename _ForwardIterator2>
8805 static void
8806 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
8807 {
8808 swap(*__a, *__b);
8809 }
8810 };
8811# 140 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
8812 template<typename _ForwardIterator1, typename _ForwardIterator2>
8813 inline void
8814 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
8815 {
8816 typedef typename iterator_traits<_ForwardIterator1>::value_type
8817 _ValueType1;
8818 typedef typename iterator_traits<_ForwardIterator2>::value_type
8819 _ValueType2;
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831 typedef typename iterator_traits<_ForwardIterator1>::reference
8832 _ReferenceType1;
8833 typedef typename iterator_traits<_ForwardIterator2>::reference
8834 _ReferenceType2;
8835 std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value &&
8836 __are_same<_ValueType1 &, _ReferenceType1>::__value &&
8837 __are_same<_ValueType2 &, _ReferenceType2>::__value>::
8838 iter_swap(__a, __b);
8839 }
8840# 182 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
8841 template<typename _Tp>
8842 inline const _Tp&
8843 min(const _Tp& __a, const _Tp& __b)
8844 {
8845
8846
8847
8848 if (__b < __a)
8849 return __b;
8850 return __a;
8851 }
8852# 204 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
8853 template<typename _Tp>
8854 inline const _Tp&
8855 max(const _Tp& __a, const _Tp& __b)
8856 {
8857
8858
8859
8860 if (__a < __b)
8861 return __b;
8862 return __a;
8863 }
8864# 226 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
8865 template<typename _Tp, typename _Compare>
8866 inline const _Tp&
8867 min(const _Tp& __a, const _Tp& __b, _Compare __comp)
8868 {
8869
8870 if (__comp(__b, __a))
8871 return __b;
8872 return __a;
8873 }
8874# 246 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
8875 template<typename _Tp, typename _Compare>
8876 inline const _Tp&
8877 max(const _Tp& __a, const _Tp& __b, _Compare __comp)
8878 {
8879
8880 if (__comp(__a, __b))
8881 return __b;
8882 return __a;
8883 }
8884
8885
8886
8887
8888
8889
8890
8891 template<bool, typename>
8892 struct __copy
8893 {
8894 template<typename _II, typename _OI>
8895 static _OI
8896 copy(_II __first, _II __last, _OI __result)
8897 {
8898 for (; __first != __last; ++__result, ++__first)
8899 *__result = *__first;
8900 return __result;
8901 }
8902 };
8903
8904 template<bool _BoolType>
8905 struct __copy<_BoolType, random_access_iterator_tag>
8906 {
8907 template<typename _II, typename _OI>
8908 static _OI
8909 copy(_II __first, _II __last, _OI __result)
8910 {
8911 typedef typename iterator_traits<_II>::difference_type _Distance;
8912 for(_Distance __n = __last - __first; __n > 0; --__n)
8913 {
8914 *__result = *__first;
8915 ++__first;
8916 ++__result;
8917 }
8918 return __result;
8919 }
8920 };
8921
8922 template<>
8923 struct __copy<true, random_access_iterator_tag>
8924 {
8925 template<typename _Tp>
8926 static _Tp*
8927 copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
8928 {
8929 std::memmove(__result, __first, sizeof(_Tp) * (__last - __first));
8930 return __result + (__last - __first);
8931 }
8932 };
8933
8934 template<typename _II, typename _OI>
8935 inline _OI
8936 __copy_aux(_II __first, _II __last, _OI __result)
8937 {
8938 typedef typename iterator_traits<_II>::value_type _ValueTypeI;
8939 typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
8940 typedef typename iterator_traits<_II>::iterator_category _Category;
8941 const bool __simple = (__is_scalar<_ValueTypeI>::__value
8942 && __is_pointer<_II>::__value
8943 && __is_pointer<_OI>::__value
8944 && __are_same<_ValueTypeI, _ValueTypeO>::__value);
8945
8946 return std::__copy<__simple, _Category>::copy(__first, __last, __result);
8947 }
8948
8949 template<bool, bool>
8950 struct __copy_normal
8951 {
8952 template<typename _II, typename _OI>
8953 static _OI
8954 copy_n(_II __first, _II __last, _OI __result)
8955 { return std::__copy_aux(__first, __last, __result); }
8956 };
8957
8958 template<>
8959 struct __copy_normal<true, false>
8960 {
8961 template<typename _II, typename _OI>
8962 static _OI
8963 copy_n(_II __first, _II __last, _OI __result)
8964 { return std::__copy_aux(__first.base(), __last.base(), __result); }
8965 };
8966
8967 template<>
8968 struct __copy_normal<false, true>
8969 {
8970 template<typename _II, typename _OI>
8971 static _OI
8972 copy_n(_II __first, _II __last, _OI __result)
8973 { return _OI(std::__copy_aux(__first, __last, __result.base())); }
8974 };
8975
8976 template<>
8977 struct __copy_normal<true, true>
8978 {
8979 template<typename _II, typename _OI>
8980 static _OI
8981 copy_n(_II __first, _II __last, _OI __result)
8982 { return _OI(std::__copy_aux(__first.base(), __last.base(),
8983 __result.base())); }
8984 };
8985# 373 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
8986 template<typename _InputIterator, typename _OutputIterator>
8987 inline _OutputIterator
8988 copy(_InputIterator __first, _InputIterator __last,
8989 _OutputIterator __result)
8990 {
8991
8992
8993
8994
8995 ;
8996
8997 const bool __in = __is_normal_iterator<_InputIterator>::__value;
8998 const bool __out = __is_normal_iterator<_OutputIterator>::__value;
8999 return std::__copy_normal<__in, __out>::copy_n(__first, __last,
9000 __result);
9001 }
9002
9003 template<bool, typename>
9004 struct __copy_backward
9005 {
9006 template<typename _BI1, typename _BI2>
9007 static _BI2
9008 copy_b(_BI1 __first, _BI1 __last, _BI2 __result)
9009 {
9010 while (__first != __last)
9011 *--__result = *--__last;
9012 return __result;
9013 }
9014 };
9015
9016 template<bool _BoolType>
9017 struct __copy_backward<_BoolType, random_access_iterator_tag>
9018 {
9019 template<typename _BI1, typename _BI2>
9020 static _BI2
9021 copy_b(_BI1 __first, _BI1 __last, _BI2 __result)
9022 {
9023 typename iterator_traits<_BI1>::difference_type __n;
9024 for (__n = __last - __first; __n > 0; --__n)
9025 *--__result = *--__last;
9026 return __result;
9027 }
9028 };
9029
9030 template<>
9031 struct __copy_backward<true, random_access_iterator_tag>
9032 {
9033 template<typename _Tp>
9034 static _Tp*
9035 copy_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
9036 {
9037 const ptrdiff_t _Num = __last - __first;
9038 std::memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
9039 return __result - _Num;
9040 }
9041 };
9042
9043 template<typename _BI1, typename _BI2>
9044 inline _BI2
9045 __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result)
9046 {
9047 typedef typename iterator_traits<_BI1>::value_type _ValueType1;
9048 typedef typename iterator_traits<_BI2>::value_type _ValueType2;
9049 typedef typename iterator_traits<_BI1>::iterator_category _Category;
9050 const bool __simple = (__is_scalar<_ValueType1>::__value
9051 && __is_pointer<_BI1>::__value
9052 && __is_pointer<_BI2>::__value
9053 && __are_same<_ValueType1, _ValueType2>::__value);
9054
9055 return std::__copy_backward<__simple, _Category>::copy_b(__first, __last,
9056 __result);
9057 }
9058
9059 template<bool, bool>
9060 struct __copy_backward_normal
9061 {
9062 template<typename _BI1, typename _BI2>
9063 static _BI2
9064 copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
9065 { return std::__copy_backward_aux(__first, __last, __result); }
9066 };
9067
9068 template<>
9069 struct __copy_backward_normal<true, false>
9070 {
9071 template<typename _BI1, typename _BI2>
9072 static _BI2
9073 copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
9074 { return std::__copy_backward_aux(__first.base(), __last.base(),
9075 __result); }
9076 };
9077
9078 template<>
9079 struct __copy_backward_normal<false, true>
9080 {
9081 template<typename _BI1, typename _BI2>
9082 static _BI2
9083 copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
9084 { return _BI2(std::__copy_backward_aux(__first, __last,
9085 __result.base())); }
9086 };
9087
9088 template<>
9089 struct __copy_backward_normal<true, true>
9090 {
9091 template<typename _BI1, typename _BI2>
9092 static _BI2
9093 copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
9094 { return _BI2(std::__copy_backward_aux(__first.base(), __last.base(),
9095 __result.base())); }
9096 };
9097# 502 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9098 template <typename _BI1, typename _BI2>
9099 inline _BI2
9100 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
9101 {
9102
9103
9104
9105
9106
9107
9108 ;
9109
9110 const bool __bi1 = __is_normal_iterator<_BI1>::__value;
9111 const bool __bi2 = __is_normal_iterator<_BI2>::__value;
9112 return std::__copy_backward_normal<__bi1, __bi2>::copy_b_n(__first, __last,
9113 __result);
9114 }
9115
9116 template<bool>
9117 struct __fill
9118 {
9119 template<typename _ForwardIterator, typename _Tp>
9120 static void
9121 fill(_ForwardIterator __first, _ForwardIterator __last,
9122 const _Tp& __value)
9123 {
9124 for (; __first != __last; ++__first)
9125 *__first = __value;
9126 }
9127 };
9128
9129 template<>
9130 struct __fill<true>
9131 {
9132 template<typename _ForwardIterator, typename _Tp>
9133 static void
9134 fill(_ForwardIterator __first, _ForwardIterator __last,
9135 const _Tp& __value)
9136 {
9137 const _Tp __tmp = __value;
9138 for (; __first != __last; ++__first)
9139 *__first = __tmp;
9140 }
9141 };
9142# 558 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9143 template<typename _ForwardIterator, typename _Tp>
9144 void
9145 fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
9146 {
9147
9148
9149
9150 ;
9151
9152 const bool __scalar = __is_scalar<_Tp>::__value;
9153 std::__fill<__scalar>::fill(__first, __last, __value);
9154 }
9155
9156
9157 inline void
9158 fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c)
9159 {
9160 ;
9161 const unsigned char __tmp = __c;
9162 std::memset(__first, __tmp, __last - __first);
9163 }
9164
9165 inline void
9166 fill(signed char* __first, signed char* __last, const signed char& __c)
9167 {
9168 ;
9169 const signed char __tmp = __c;
9170 std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
9171 }
9172
9173 inline void
9174 fill(char* __first, char* __last, const char& __c)
9175 {
9176 ;
9177 const char __tmp = __c;
9178 std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
9179 }
9180
9181 template<bool>
9182 struct __fill_n
9183 {
9184 template<typename _OutputIterator, typename _Size, typename _Tp>
9185 static _OutputIterator
9186 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
9187 {
9188 for (; __n > 0; --__n, ++__first)
9189 *__first = __value;
9190 return __first;
9191 }
9192 };
9193
9194 template<>
9195 struct __fill_n<true>
9196 {
9197 template<typename _OutputIterator, typename _Size, typename _Tp>
9198 static _OutputIterator
9199 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
9200 {
9201 const _Tp __tmp = __value;
9202 for (; __n > 0; --__n, ++__first)
9203 *__first = __tmp;
9204 return __first;
9205 }
9206 };
9207# 634 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9208 template<typename _OutputIterator, typename _Size, typename _Tp>
9209 _OutputIterator
9210 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
9211 {
9212
9213
9214
9215 const bool __scalar = __is_scalar<_Tp>::__value;
9216 return std::__fill_n<__scalar>::fill_n(__first, __n, __value);
9217 }
9218
9219 template<typename _Size>
9220 inline unsigned char*
9221 fill_n(unsigned char* __first, _Size __n, const unsigned char& __c)
9222 {
9223 std::fill(__first, __first + __n, __c);
9224 return __first + __n;
9225 }
9226
9227 template<typename _Size>
9228 inline signed char*
9229 fill_n(char* __first, _Size __n, const signed char& __c)
9230 {
9231 std::fill(__first, __first + __n, __c);
9232 return __first + __n;
9233 }
9234
9235 template<typename _Size>
9236 inline char*
9237 fill_n(char* __first, _Size __n, const char& __c)
9238 {
9239 std::fill(__first, __first + __n, __c);
9240 return __first + __n;
9241 }
9242# 681 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9243 template<typename _InputIterator1, typename _InputIterator2>
9244 pair<_InputIterator1, _InputIterator2>
9245 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
9246 _InputIterator2 __first2)
9247 {
9248
9249
9250
9251
9252
9253
9254 ;
9255
9256 while (__first1 != __last1 && *__first1 == *__first2)
9257 {
9258 ++__first1;
9259 ++__first2;
9260 }
9261 return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
9262 }
9263# 716 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9264 template<typename _InputIterator1, typename _InputIterator2,
9265 typename _BinaryPredicate>
9266 pair<_InputIterator1, _InputIterator2>
9267 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
9268 _InputIterator2 __first2, _BinaryPredicate __binary_pred)
9269 {
9270
9271
9272
9273 ;
9274
9275 while (__first1 != __last1 && __binary_pred(*__first1, *__first2))
9276 {
9277 ++__first1;
9278 ++__first2;
9279 }
9280 return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
9281 }
9282# 746 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9283 template<typename _InputIterator1, typename _InputIterator2>
9284 inline bool
9285 equal(_InputIterator1 __first1, _InputIterator1 __last1,
9286 _InputIterator2 __first2)
9287 {
9288
9289
9290
9291
9292
9293
9294 ;
9295
9296 for (; __first1 != __last1; ++__first1, ++__first2)
9297 if (!(*__first1 == *__first2))
9298 return false;
9299 return true;
9300 }
9301# 778 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9302 template<typename _InputIterator1, typename _InputIterator2,
9303 typename _BinaryPredicate>
9304 inline bool
9305 equal(_InputIterator1 __first1, _InputIterator1 __last1,
9306 _InputIterator2 __first2,
9307 _BinaryPredicate __binary_pred)
9308 {
9309
9310
9311
9312 ;
9313
9314 for (; __first1 != __last1; ++__first1, ++__first2)
9315 if (!__binary_pred(*__first1, *__first2))
9316 return false;
9317 return true;
9318 }
9319# 810 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9320 template<typename _InputIterator1, typename _InputIterator2>
9321 bool
9322 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
9323 _InputIterator2 __first2, _InputIterator2 __last2)
9324 {
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334 ;
9335 ;
9336
9337 for (; __first1 != __last1 && __first2 != __last2;
9338 ++__first1, ++__first2)
9339 {
9340 if (*__first1 < *__first2)
9341 return true;
9342 if (*__first2 < *__first1)
9343 return false;
9344 }
9345 return __first1 == __last1 && __first2 != __last2;
9346 }
9347# 850 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3
9348 template<typename _InputIterator1, typename _InputIterator2,
9349 typename _Compare>
9350 bool
9351 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
9352 _InputIterator2 __first2, _InputIterator2 __last2,
9353 _Compare __comp)
9354 {
9355
9356
9357
9358 ;
9359 ;
9360
9361 for (; __first1 != __last1 && __first2 != __last2;
9362 ++__first1, ++__first2)
9363 {
9364 if (__comp(*__first1, *__first2))
9365 return true;
9366 if (__comp(*__first2, *__first1))
9367 return false;
9368 }
9369 return __first1 == __last1 && __first2 != __last2;
9370 }
9371
9372 inline bool
9373 lexicographical_compare(const unsigned char* __first1,
9374 const unsigned char* __last1,
9375 const unsigned char* __first2,
9376 const unsigned char* __last2)
9377 {
9378 ;
9379 ;
9380
9381 const size_t __len1 = __last1 - __first1;
9382 const size_t __len2 = __last2 - __first2;
9383 const int __result = std::memcmp(__first1, __first2,
9384 std::min(__len1, __len2));
9385 return __result != 0 ? __result < 0 : __len1 < __len2;
9386 }
9387
9388 inline bool
9389 lexicographical_compare(const char* __first1, const char* __last1,
9390 const char* __first2, const char* __last2)
9391 {
9392 ;
9393 ;
9394
9395
9396 return std::lexicographical_compare((const signed char*) __first1,
9397 (const signed char*) __last1,
9398 (const signed char*) __first2,
9399 (const signed char*) __last2);
9400
9401
9402
9403
9404
9405
9406 }
9407
9408}
9409# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 2 3
9410
9411
9412namespace __gnu_cxx
9413{
9414# 61 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3
9415 template <class _CharT>
9416 struct _Char_types
9417 {
9418 typedef unsigned long int_type;
9419 typedef std::streampos pos_type;
9420 typedef std::streamoff off_type;
9421 typedef std::mbstate_t state_type;
9422 };
9423# 86 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3
9424 template<typename _CharT>
9425 struct char_traits
9426 {
9427 typedef _CharT char_type;
9428 typedef typename _Char_types<_CharT>::int_type int_type;
9429 typedef typename _Char_types<_CharT>::pos_type pos_type;
9430 typedef typename _Char_types<_CharT>::off_type off_type;
9431 typedef typename _Char_types<_CharT>::state_type state_type;
9432
9433 static void
9434 assign(char_type& __c1, const char_type& __c2)
9435 { __c1 = __c2; }
9436
9437 static bool
9438 eq(const char_type& __c1, const char_type& __c2)
9439 { return __c1 == __c2; }
9440
9441 static bool
9442 lt(const char_type& __c1, const char_type& __c2)
9443 { return __c1 < __c2; }
9444
9445 static int
9446 compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
9447
9448 static std::size_t
9449 length(const char_type* __s);
9450
9451 static const char_type*
9452 find(const char_type* __s, std::size_t __n, const char_type& __a);
9453
9454 static char_type*
9455 move(char_type* __s1, const char_type* __s2, std::size_t __n);
9456
9457 static char_type*
9458 copy(char_type* __s1, const char_type* __s2, std::size_t __n);
9459
9460 static char_type*
9461 assign(char_type* __s, std::size_t __n, char_type __a);
9462
9463 static char_type
9464 to_char_type(const int_type& __c)
9465 { return static_cast<char_type>(__c); }
9466
9467 static int_type
9468 to_int_type(const char_type& __c)
9469 { return static_cast<int_type>(__c); }
9470
9471 static bool
9472 eq_int_type(const int_type& __c1, const int_type& __c2)
9473 { return __c1 == __c2; }
9474
9475 static int_type
9476 eof()
9477 { return static_cast<int_type>((-1)); }
9478
9479 static int_type
9480 not_eof(const int_type& __c)
9481 { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
9482 };
9483
9484 template<typename _CharT>
9485 int
9486 char_traits<_CharT>::
9487 compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
9488 {
9489 for (size_t __i = 0; __i < __n; ++__i)
9490 if (lt(__s1[__i], __s2[__i]))
9491 return -1;
9492 else if (lt(__s2[__i], __s1[__i]))
9493 return 1;
9494 return 0;
9495 }
9496
9497 template<typename _CharT>
9498 std::size_t
9499 char_traits<_CharT>::
9500 length(const char_type* __p)
9501 {
9502 std::size_t __i = 0;
9503 while (!eq(__p[__i], char_type()))
9504 ++__i;
9505 return __i;
9506 }
9507
9508 template<typename _CharT>
9509 const typename char_traits<_CharT>::char_type*
9510 char_traits<_CharT>::
9511 find(const char_type* __s, std::size_t __n, const char_type& __a)
9512 {
9513 for (std::size_t __i = 0; __i < __n; ++__i)
9514 if (eq(__s[__i], __a))
9515 return __s + __i;
9516 return 0;
9517 }
9518
9519 template<typename _CharT>
9520 typename char_traits<_CharT>::char_type*
9521 char_traits<_CharT>::
9522 move(char_type* __s1, const char_type* __s2, std::size_t __n)
9523 {
9524 return static_cast<_CharT*>(std::memmove(__s1, __s2,
9525 __n * sizeof(char_type)));
9526 }
9527
9528 template<typename _CharT>
9529 typename char_traits<_CharT>::char_type*
9530 char_traits<_CharT>::
9531 copy(char_type* __s1, const char_type* __s2, std::size_t __n)
9532 {
9533 std::copy(__s2, __s2 + __n, __s1);
9534 return __s1;
9535 }
9536
9537 template<typename _CharT>
9538 typename char_traits<_CharT>::char_type*
9539 char_traits<_CharT>::
9540 assign(char_type* __s, std::size_t __n, char_type __a)
9541 {
9542 std::fill_n(__s, __n, __a);
9543 return __s;
9544 }
9545}
9546
9547namespace std
9548{
9549# 224 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3
9550 template<class _CharT>
9551 struct char_traits : public __gnu_cxx::char_traits<_CharT>
9552 { };
9553
9554
9555
9556 template<>
9557 struct char_traits<char>
9558 {
9559 typedef char char_type;
9560 typedef int int_type;
9561 typedef streampos pos_type;
9562 typedef streamoff off_type;
9563 typedef mbstate_t state_type;
9564
9565 static void
9566 assign(char_type& __c1, const char_type& __c2)
9567 { __c1 = __c2; }
9568
9569 static bool
9570 eq(const char_type& __c1, const char_type& __c2)
9571 { return __c1 == __c2; }
9572
9573 static bool
9574 lt(const char_type& __c1, const char_type& __c2)
9575 { return __c1 < __c2; }
9576
9577 static int
9578 compare(const char_type* __s1, const char_type* __s2, size_t __n)
9579 { return memcmp(__s1, __s2, __n); }
9580
9581 static size_t
9582 length(const char_type* __s)
9583 { return strlen(__s); }
9584
9585 static const char_type*
9586 find(const char_type* __s, size_t __n, const char_type& __a)
9587 { return static_cast<const char_type*>(memchr(__s, __a, __n)); }
9588
9589 static char_type*
9590 move(char_type* __s1, const char_type* __s2, size_t __n)
9591 { return static_cast<char_type*>(memmove(__s1, __s2, __n)); }
9592
9593 static char_type*
9594 copy(char_type* __s1, const char_type* __s2, size_t __n)
9595 { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
9596
9597 static char_type*
9598 assign(char_type* __s, size_t __n, char_type __a)
9599 { return static_cast<char_type*>(memset(__s, __a, __n)); }
9600
9601 static char_type
9602 to_char_type(const int_type& __c)
9603 { return static_cast<char_type>(__c); }
9604
9605
9606
9607 static int_type
9608 to_int_type(const char_type& __c)
9609 { return static_cast<int_type>(static_cast<unsigned char>(__c)); }
9610
9611 static bool
9612 eq_int_type(const int_type& __c1, const int_type& __c2)
9613 { return __c1 == __c2; }
9614
9615 static int_type
9616 eof() { return static_cast<int_type>((-1)); }
9617
9618 static int_type
9619 not_eof(const int_type& __c)
9620 { return (__c == eof()) ? 0 : __c; }
9621 };
9622
9623
9624
9625
9626 template<>
9627 struct char_traits<wchar_t>
9628 {
9629 typedef wchar_t char_type;
9630 typedef wint_t int_type;
9631 typedef streamoff off_type;
9632 typedef wstreampos pos_type;
9633 typedef mbstate_t state_type;
9634
9635 static void
9636 assign(char_type& __c1, const char_type& __c2)
9637 { __c1 = __c2; }
9638
9639 static bool
9640 eq(const char_type& __c1, const char_type& __c2)
9641 { return __c1 == __c2; }
9642
9643 static bool
9644 lt(const char_type& __c1, const char_type& __c2)
9645 { return __c1 < __c2; }
9646
9647 static int
9648 compare(const char_type* __s1, const char_type* __s2, size_t __n)
9649 { return wmemcmp(__s1, __s2, __n); }
9650
9651 static size_t
9652 length(const char_type* __s)
9653 { return wcslen(__s); }
9654
9655 static const char_type*
9656 find(const char_type* __s, size_t __n, const char_type& __a)
9657 { return wmemchr(__s, __a, __n); }
9658
9659 static char_type*
9660 move(char_type* __s1, const char_type* __s2, size_t __n)
9661 { return wmemmove(__s1, __s2, __n); }
9662
9663 static char_type*
9664 copy(char_type* __s1, const char_type* __s2, size_t __n)
9665 { return wmemcpy(__s1, __s2, __n); }
9666
9667 static char_type*
9668 assign(char_type* __s, size_t __n, char_type __a)
9669 { return wmemset(__s, __a, __n); }
9670
9671 static char_type
9672 to_char_type(const int_type& __c) { return char_type(__c); }
9673
9674 static int_type
9675 to_int_type(const char_type& __c) { return int_type(__c); }
9676
9677 static bool
9678 eq_int_type(const int_type& __c1, const int_type& __c2)
9679 { return __c1 == __c2; }
9680
9681 static int_type
9682 eof() { return static_cast<int_type>((0xffffffffu)); }
9683
9684 static int_type
9685 not_eof(const int_type& __c)
9686 { return eq_int_type(__c, eof()) ? 0 : __c; }
9687 };
9688
9689
9690}
9691# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
9692# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 1 3
9693# 51 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
9694
9695# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
9696#pragma GCC visibility push(default)
9697
9698
9699# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/allocator.h" 1 3
9700# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/allocator.h" 3
9701# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++allocator.h" 1 3
9702# 34 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++allocator.h" 3
9703# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/new_allocator.h" 1 3
9704# 37 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/new_allocator.h" 3
9705#pragma GCC visibility push(default)
9706
9707# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/new" 1 3
9708# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/new" 3
9709# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/exception" 1 3
9710# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3
9711#pragma GCC visibility push(default)
9712
9713extern "C++" {
9714
9715namespace std
9716{
9717# 54 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3
9718 class exception
9719 {
9720 public:
9721 exception() throw() { }
9722 virtual ~exception() throw();
9723
9724
9725 virtual const char* what() const throw();
9726 };
9727
9728
9729
9730 class bad_exception : public exception
9731 {
9732 public:
9733 bad_exception() throw() { }
9734
9735
9736 virtual ~bad_exception() throw();
9737 };
9738
9739
9740 typedef void (*terminate_handler) ();
9741
9742 typedef void (*unexpected_handler) ();
9743
9744
9745 terminate_handler set_terminate(terminate_handler) throw();
9746
9747
9748 void terminate() __attribute__ ((__noreturn__));
9749
9750
9751 unexpected_handler set_unexpected(unexpected_handler) throw();
9752
9753
9754 void unexpected() __attribute__ ((__noreturn__));
9755# 102 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3
9756 bool uncaught_exception() throw();
9757}
9758
9759namespace __gnu_cxx
9760{
9761# 117 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3
9762 void __verbose_terminate_handler ();
9763}
9764
9765}
9766
9767#pragma GCC visibility pop
9768# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/new" 2 3
9769
9770#pragma GCC visibility push(default)
9771
9772extern "C++" {
9773
9774namespace std
9775{
9776
9777
9778
9779
9780
9781 class bad_alloc : public exception
9782 {
9783 public:
9784 bad_alloc() throw() { }
9785
9786
9787 virtual ~bad_alloc() throw();
9788 };
9789
9790 struct nothrow_t { };
9791 extern const nothrow_t nothrow;
9792
9793
9794 typedef void (*new_handler)();
9795
9796 new_handler set_new_handler(new_handler) throw();
9797}
9798# 84 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/new" 3
9799void* operator new(std::size_t) throw (std::bad_alloc);
9800void* operator new[](std::size_t) throw (std::bad_alloc);
9801void operator delete(void*) throw();
9802void operator delete[](void*) throw();
9803void* operator new(std::size_t, const std::nothrow_t&) throw();
9804void* operator new[](std::size_t, const std::nothrow_t&) throw();
9805void operator delete(void*, const std::nothrow_t&) throw();
9806void operator delete[](void*, const std::nothrow_t&) throw();
9807
9808
9809inline void* operator new(std::size_t, void* __p) throw() { return __p; }
9810inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
9811
9812
9813inline void operator delete (void*, void*) throw() { }
9814inline void operator delete[](void*, void*) throw() { }
9815
9816}
9817
9818#pragma GCC visibility pop
9819# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/new_allocator.h" 2 3
9820
9821
9822namespace __gnu_cxx
9823{
9824
9825
9826
9827
9828
9829
9830
9831 template<typename _Tp>
9832 class new_allocator
9833 {
9834 public:
9835 typedef size_t size_type;
9836 typedef ptrdiff_t difference_type;
9837 typedef _Tp* pointer;
9838 typedef const _Tp* const_pointer;
9839 typedef _Tp& reference;
9840 typedef const _Tp& const_reference;
9841 typedef _Tp value_type;
9842
9843 template<typename _Tp1>
9844 struct rebind
9845 { typedef new_allocator<_Tp1> other; };
9846
9847 new_allocator() throw() { }
9848
9849 new_allocator(const new_allocator&) throw() { }
9850
9851 template<typename _Tp1>
9852 new_allocator(const new_allocator<_Tp1>&) throw() { }
9853
9854 ~new_allocator() throw() { }
9855
9856 pointer
9857 address(reference __x) const { return &__x; }
9858
9859 const_pointer
9860 address(const_reference __x) const { return &__x; }
9861
9862
9863
9864 pointer
9865 allocate(size_type __n, const void* = 0)
9866 {
9867 if (__builtin_expect(__n > this->max_size(), false))
9868 std::__throw_bad_alloc();
9869
9870 return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
9871 }
9872
9873
9874 void
9875 deallocate(pointer __p, size_type)
9876 { ::operator delete(__p); }
9877
9878 size_type
9879 max_size() const throw()
9880 { return size_t(-1) / sizeof(_Tp); }
9881
9882
9883
9884 void
9885 construct(pointer __p, const _Tp& __val)
9886 { ::new(__p) _Tp(__val); }
9887
9888 void
9889 destroy(pointer __p) { __p->~_Tp(); }
9890 };
9891
9892 template<typename _Tp>
9893 inline bool
9894 operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
9895 { return true; }
9896
9897 template<typename _Tp>
9898 inline bool
9899 operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
9900 { return false; }
9901}
9902
9903#pragma GCC visibility pop
9904# 35 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/c++allocator.h" 2 3
9905# 53 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/allocator.h" 2 3
9906
9907namespace std
9908{
9909 template<typename _Tp>
9910 class allocator;
9911
9912
9913 template<>
9914 class allocator<void>
9915 {
9916 public:
9917 typedef size_t size_type;
9918 typedef ptrdiff_t difference_type;
9919 typedef void* pointer;
9920 typedef const void* const_pointer;
9921 typedef void value_type;
9922
9923 template<typename _Tp1>
9924 struct rebind
9925 { typedef allocator<_Tp1> other; };
9926 };
9927
9928
9929
9930
9931
9932
9933
9934 template<typename _Tp>
9935 class allocator: public __gnu_cxx::new_allocator<_Tp>
9936 {
9937 public:
9938 typedef size_t size_type;
9939 typedef ptrdiff_t difference_type;
9940 typedef _Tp* pointer;
9941 typedef const _Tp* const_pointer;
9942 typedef _Tp& reference;
9943 typedef const _Tp& const_reference;
9944 typedef _Tp value_type;
9945
9946 template<typename _Tp1>
9947 struct rebind
9948 { typedef allocator<_Tp1> other; };
9949
9950 allocator() throw() { }
9951
9952 allocator(const allocator& __a) throw()
9953 : __gnu_cxx::new_allocator<_Tp>(__a) { }
9954
9955 template<typename _Tp1>
9956 allocator(const allocator<_Tp1>&) throw() { }
9957
9958 ~allocator() throw() { }
9959
9960
9961 };
9962
9963 template<typename _T1, typename _T2>
9964 inline bool
9965 operator==(const allocator<_T1>&, const allocator<_T2>&)
9966 { return true; }
9967
9968 template<typename _T1, typename _T2>
9969 inline bool
9970 operator!=(const allocator<_T1>&, const allocator<_T2>&)
9971 { return false; }
9972
9973
9974
9975
9976
9977 extern template class allocator<char>;
9978 extern template class allocator<wchar_t>;
9979
9980
9981
9982
9983}
9984# 56 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3
9985# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 1 3
9986# 67 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3
9987namespace std
9988{
9989
9990
9991
9992
9993
9994
9995 template<typename _T1, typename _T2>
9996 inline void
9997 _Construct(_T1* __p, const _T2& __value)
9998 {
9999
10000
10001 ::new(static_cast<void*>(__p)) _T1(__value);
10002 }
10003
10004
10005
10006
10007
10008
10009
10010 template<typename _T1>
10011 inline void
10012 _Construct(_T1* __p)
10013 {
10014
10015
10016 ::new(static_cast<void*>(__p)) _T1();
10017 }
10018
10019
10020
10021
10022
10023
10024 template<typename _Tp>
10025 inline void
10026 _Destroy(_Tp* __pointer)
10027 { __pointer->~_Tp(); }
10028# 116 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3
10029 template<typename _ForwardIterator>
10030 inline void
10031 __destroy_aux(_ForwardIterator __first, _ForwardIterator __last,
10032 __false_type)
10033 {
10034 for (; __first != __last; ++__first)
10035 std::_Destroy(&*__first);
10036 }
10037# 134 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3
10038 template<typename _ForwardIterator>
10039 inline void
10040 __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type)
10041 { }
10042# 146 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3
10043 template<typename _ForwardIterator>
10044 inline void
10045 _Destroy(_ForwardIterator __first, _ForwardIterator __last)
10046 {
10047 typedef typename iterator_traits<_ForwardIterator>::value_type
10048 _Value_type;
10049 typedef typename std::__is_scalar<_Value_type>::__type
10050 _Has_trivial_destructor;
10051
10052 std::__destroy_aux(__first, __last, _Has_trivial_destructor());
10053 }
10054# 166 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3
10055 template <typename _Tp> class allocator;
10056
10057 template<typename _ForwardIterator, typename _Allocator>
10058 void
10059 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
10060 _Allocator __alloc)
10061 {
10062 for (; __first != __last; ++__first)
10063 __alloc.destroy(&*__first);
10064 }
10065
10066 template<typename _ForwardIterator, typename _Tp>
10067 inline void
10068 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
10069 allocator<_Tp>)
10070 {
10071 _Destroy(__first, __last);
10072 }
10073
10074
10075}
10076# 57 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3
10077
10078# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 1 3
10079# 66 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3
10080namespace std
10081{
10082
10083 template<typename _InputIterator, typename _ForwardIterator>
10084 inline _ForwardIterator
10085 __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
10086 _ForwardIterator __result,
10087 __true_type)
10088 { return std::copy(__first, __last, __result); }
10089
10090 template<typename _InputIterator, typename _ForwardIterator>
10091 inline _ForwardIterator
10092 __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
10093 _ForwardIterator __result,
10094 __false_type)
10095 {
10096 _ForwardIterator __cur = __result;
10097 try
10098 {
10099 for (; __first != __last; ++__first, ++__cur)
10100 std::_Construct(&*__cur, *__first);
10101 return __cur;
10102 }
10103 catch(...)
10104 {
10105 std::_Destroy(__result, __cur);
10106 throw;
10107 }
10108 }
10109# 105 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3
10110 template<typename _InputIterator, typename _ForwardIterator>
10111 inline _ForwardIterator
10112 uninitialized_copy(_InputIterator __first, _InputIterator __last,
10113 _ForwardIterator __result)
10114 {
10115 typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
10116 typedef typename std::__is_scalar<_ValueType>::__type _Is_POD;
10117 return std::__uninitialized_copy_aux(__first, __last, __result,
10118 _Is_POD());
10119 }
10120
10121 inline char*
10122 uninitialized_copy(const char* __first, const char* __last, char* __result)
10123 {
10124 std::memmove(__result, __first, __last - __first);
10125 return __result + (__last - __first);
10126 }
10127
10128 inline wchar_t*
10129 uninitialized_copy(const wchar_t* __first, const wchar_t* __last,
10130 wchar_t* __result)
10131 {
10132 std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
10133 return __result + (__last - __first);
10134 }
10135
10136
10137
10138 template<typename _ForwardIterator, typename _Tp>
10139 inline void
10140 __uninitialized_fill_aux(_ForwardIterator __first,
10141 _ForwardIterator __last,
10142 const _Tp& __x, __true_type)
10143 { std::fill(__first, __last, __x); }
10144
10145 template<typename _ForwardIterator, typename _Tp>
10146 void
10147 __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
10148 const _Tp& __x, __false_type)
10149 {
10150 _ForwardIterator __cur = __first;
10151 try
10152 {
10153 for (; __cur != __last; ++__cur)
10154 std::_Construct(&*__cur, __x);
10155 }
10156 catch(...)
10157 {
10158 std::_Destroy(__first, __cur);
10159 throw;
10160 }
10161 }
10162# 167 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3
10163 template<typename _ForwardIterator, typename _Tp>
10164 inline void
10165 uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last,
10166 const _Tp& __x)
10167 {
10168 typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
10169 typedef typename std::__is_scalar<_ValueType>::__type _Is_POD;
10170 std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD());
10171 }
10172
10173
10174
10175 template<typename _ForwardIterator, typename _Size, typename _Tp>
10176 inline void
10177 __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
10178 const _Tp& __x, __true_type)
10179 { std::fill_n(__first, __n, __x); }
10180
10181 template<typename _ForwardIterator, typename _Size, typename _Tp>
10182 void
10183 __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
10184 const _Tp& __x, __false_type)
10185 {
10186 _ForwardIterator __cur = __first;
10187 try
10188 {
10189 for (; __n > 0; --__n, ++__cur)
10190 std::_Construct(&*__cur, __x);
10191 }
10192 catch(...)
10193 {
10194 std::_Destroy(__first, __cur);
10195 throw;
10196 }
10197 }
10198# 212 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3
10199 template<typename _ForwardIterator, typename _Size, typename _Tp>
10200 inline void
10201 uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
10202 {
10203 typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
10204 typedef typename std::__is_scalar<_ValueType>::__type _Is_POD;
10205 std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
10206 }
10207
10208
10209
10210
10211
10212
10213
10214 template<typename _InputIterator, typename _ForwardIterator,
10215 typename _Allocator>
10216 _ForwardIterator
10217 __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
10218 _ForwardIterator __result,
10219 _Allocator __alloc)
10220 {
10221 _ForwardIterator __cur = __result;
10222 try
10223 {
10224 for (; __first != __last; ++__first, ++__cur)
10225 __alloc.construct(&*__cur, *__first);
10226 return __cur;
10227 }
10228 catch(...)
10229 {
10230 std::_Destroy(__result, __cur, __alloc);
10231 throw;
10232 }
10233 }
10234
10235 template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
10236 inline _ForwardIterator
10237 __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
10238 _ForwardIterator __result,
10239 allocator<_Tp>)
10240 {
10241 return std::uninitialized_copy(__first, __last, __result);
10242 }
10243
10244 template<typename _ForwardIterator, typename _Tp, typename _Allocator>
10245 void
10246 __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
10247 const _Tp& __x, _Allocator __alloc)
10248 {
10249 _ForwardIterator __cur = __first;
10250 try
10251 {
10252 for (; __cur != __last; ++__cur)
10253 __alloc.construct(&*__cur, __x);
10254 }
10255 catch(...)
10256 {
10257 std::_Destroy(__first, __cur, __alloc);
10258 throw;
10259 }
10260 }
10261
10262 template<typename _ForwardIterator, typename _Tp, typename _Tp2>
10263 inline void
10264 __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
10265 const _Tp& __x, allocator<_Tp2>)
10266 {
10267 std::uninitialized_fill(__first, __last, __x);
10268 }
10269
10270 template<typename _ForwardIterator, typename _Size, typename _Tp,
10271 typename _Allocator>
10272 void
10273 __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
10274 const _Tp& __x,
10275 _Allocator __alloc)
10276 {
10277 _ForwardIterator __cur = __first;
10278 try
10279 {
10280 for (; __n > 0; --__n, ++__cur)
10281 __alloc.construct(&*__cur, __x);
10282 }
10283 catch(...)
10284 {
10285 std::_Destroy(__first, __cur, __alloc);
10286 throw;
10287 }
10288 }
10289
10290 template<typename _ForwardIterator, typename _Size, typename _Tp,
10291 typename _Tp2>
10292 void
10293 __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
10294 const _Tp& __x,
10295 allocator<_Tp2>)
10296 {
10297 std::uninitialized_fill_n(__first, __n, __x);
10298 }
10299# 323 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3
10300 template<typename _InputIterator1, typename _InputIterator2,
10301 typename _ForwardIterator, typename _Allocator>
10302 inline _ForwardIterator
10303 __uninitialized_copy_copy(_InputIterator1 __first1,
10304 _InputIterator1 __last1,
10305 _InputIterator2 __first2,
10306 _InputIterator2 __last2,
10307 _ForwardIterator __result,
10308 _Allocator __alloc)
10309 {
10310 _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
10311 __result,
10312 __alloc);
10313 try
10314 {
10315 return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
10316 }
10317 catch(...)
10318 {
10319 std::_Destroy(__result, __mid, __alloc);
10320 throw;
10321 }
10322 }
10323
10324
10325
10326
10327 template<typename _ForwardIterator, typename _Tp, typename _InputIterator,
10328 typename _Allocator>
10329 inline _ForwardIterator
10330 __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid,
10331 const _Tp& __x, _InputIterator __first,
10332 _InputIterator __last,
10333 _Allocator __alloc)
10334 {
10335 std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
10336 try
10337 {
10338 return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
10339 }
10340 catch(...)
10341 {
10342 std::_Destroy(__result, __mid, __alloc);
10343 throw;
10344 }
10345 }
10346
10347
10348
10349
10350 template<typename _InputIterator, typename _ForwardIterator, typename _Tp,
10351 typename _Allocator>
10352 inline void
10353 __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1,
10354 _ForwardIterator __first2,
10355 _ForwardIterator __last2, const _Tp& __x,
10356 _Allocator __alloc)
10357 {
10358 _ForwardIterator __mid2 = std::__uninitialized_copy_a(__first1, __last1,
10359 __first2,
10360 __alloc);
10361 try
10362 {
10363 std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
10364 }
10365 catch(...)
10366 {
10367 std::_Destroy(__first2, __mid2, __alloc);
10368 throw;
10369 }
10370 }
10371
10372}
10373# 59 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3
10374# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_raw_storage_iter.h" 1 3
10375# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_raw_storage_iter.h" 3
10376namespace std
10377{
10378
10379
10380
10381
10382 template <class _ForwardIterator, class _Tp>
10383 class raw_storage_iterator
10384 : public iterator<output_iterator_tag, void, void, void, void>
10385 {
10386 protected:
10387 _ForwardIterator _M_iter;
10388
10389 public:
10390 explicit
10391 raw_storage_iterator(_ForwardIterator __x)
10392 : _M_iter(__x) {}
10393
10394 raw_storage_iterator&
10395 operator*() { return *this; }
10396
10397 raw_storage_iterator&
10398 operator=(const _Tp& __element)
10399 {
10400 std::_Construct(&*_M_iter, __element);
10401 return *this;
10402 }
10403
10404 raw_storage_iterator<_ForwardIterator, _Tp>&
10405 operator++()
10406 {
10407 ++_M_iter;
10408 return *this;
10409 }
10410
10411 raw_storage_iterator<_ForwardIterator, _Tp>
10412 operator++(int)
10413 {
10414 raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
10415 ++_M_iter;
10416 return __tmp;
10417 }
10418 };
10419}
10420# 60 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3
10421
10422# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/limits" 1 3
10423# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3
10424
10425# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3
10426#pragma GCC visibility push(default)
10427# 151 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3
10428namespace std
10429{
10430
10431
10432
10433
10434
10435 enum float_round_style
10436 {
10437 round_indeterminate = -1,
10438 round_toward_zero = 0,
10439 round_to_nearest = 1,
10440 round_toward_infinity = 2,
10441 round_toward_neg_infinity = 3
10442 };
10443
10444
10445
10446
10447
10448
10449
10450 enum float_denorm_style
10451 {
10452
10453 denorm_indeterminate = -1,
10454
10455 denorm_absent = 0,
10456
10457 denorm_present = 1
10458 };
10459# 193 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3
10460 struct __numeric_limits_base
10461 {
10462
10463
10464 static const bool is_specialized = false;
10465
10466
10467
10468
10469 static const int digits = 0;
10470
10471 static const int digits10 = 0;
10472
10473 static const bool is_signed = false;
10474
10475
10476
10477
10478
10479 static const bool is_integer = false;
10480
10481
10482
10483
10484 static const bool is_exact = false;
10485
10486
10487 static const int radix = 0;
10488
10489
10490
10491 static const int min_exponent = 0;
10492
10493
10494 static const int min_exponent10 = 0;
10495
10496
10497
10498 static const int max_exponent = 0;
10499
10500
10501 static const int max_exponent10 = 0;
10502
10503
10504 static const bool has_infinity = false;
10505
10506
10507 static const bool has_quiet_NaN = false;
10508
10509
10510 static const bool has_signaling_NaN = false;
10511
10512 static const float_denorm_style has_denorm = denorm_absent;
10513
10514
10515 static const bool has_denorm_loss = false;
10516
10517
10518
10519 static const bool is_iec559 = false;
10520
10521
10522
10523 static const bool is_bounded = false;
10524
10525
10526
10527
10528 static const bool is_modulo = false;
10529
10530
10531 static const bool traps = false;
10532
10533 static const bool tinyness_before = false;
10534
10535
10536
10537 static const float_round_style round_style = round_toward_zero;
10538 };
10539# 286 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3
10540 template<typename _Tp>
10541 struct numeric_limits : public __numeric_limits_base
10542 {
10543
10544
10545 static _Tp min() throw() { return static_cast<_Tp>(0); }
10546
10547 static _Tp max() throw() { return static_cast<_Tp>(0); }
10548
10549
10550 static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
10551
10552 static _Tp round_error() throw() { return static_cast<_Tp>(0); }
10553
10554 static _Tp infinity() throw() { return static_cast<_Tp>(0); }
10555
10556 static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
10557
10558
10559 static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
10560
10561
10562
10563 static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
10564 };
10565
10566
10567
10568
10569
10570 template<>
10571 struct numeric_limits<bool>
10572 {
10573 static const bool is_specialized = true;
10574
10575 static bool min() throw()
10576 { return false; }
10577 static bool max() throw()
10578 { return true; }
10579
10580 static const int digits = 1;
10581 static const int digits10 = 0;
10582 static const bool is_signed = false;
10583 static const bool is_integer = true;
10584 static const bool is_exact = true;
10585 static const int radix = 2;
10586 static bool epsilon() throw()
10587 { return false; }
10588 static bool round_error() throw()
10589 { return false; }
10590
10591 static const int min_exponent = 0;
10592 static const int min_exponent10 = 0;
10593 static const int max_exponent = 0;
10594 static const int max_exponent10 = 0;
10595
10596 static const bool has_infinity = false;
10597 static const bool has_quiet_NaN = false;
10598 static const bool has_signaling_NaN = false;
10599 static const float_denorm_style has_denorm = denorm_absent;
10600 static const bool has_denorm_loss = false;
10601
10602 static bool infinity() throw()
10603 { return false; }
10604 static bool quiet_NaN() throw()
10605 { return false; }
10606 static bool signaling_NaN() throw()
10607 { return false; }
10608 static bool denorm_min() throw()
10609 { return false; }
10610
10611 static const bool is_iec559 = false;
10612 static const bool is_bounded = true;
10613 static const bool is_modulo = false;
10614
10615
10616
10617
10618 static const bool traps = true;
10619 static const bool tinyness_before = false;
10620 static const float_round_style round_style = round_toward_zero;
10621 };
10622
10623
10624 template<>
10625 struct numeric_limits<char>
10626 {
10627 static const bool is_specialized = true;
10628
10629 static char min() throw()
10630 { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); }
10631 static char max() throw()
10632 { return (((char)(-1) < 0) ? ((char)1 << (sizeof(char) * 8 - ((char)(-1) < 0))) - 1 : ~(char)0); }
10633
10634 static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0));
10635 static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136);
10636 static const bool is_signed = ((char)(-1) < 0);
10637 static const bool is_integer = true;
10638 static const bool is_exact = true;
10639 static const int radix = 2;
10640 static char epsilon() throw()
10641 { return 0; }
10642 static char round_error() throw()
10643 { return 0; }
10644
10645 static const int min_exponent = 0;
10646 static const int min_exponent10 = 0;
10647 static const int max_exponent = 0;
10648 static const int max_exponent10 = 0;
10649
10650 static const bool has_infinity = false;
10651 static const bool has_quiet_NaN = false;
10652 static const bool has_signaling_NaN = false;
10653 static const float_denorm_style has_denorm = denorm_absent;
10654 static const bool has_denorm_loss = false;
10655
10656 static char infinity() throw()
10657 { return char(); }
10658 static char quiet_NaN() throw()
10659 { return char(); }
10660 static char signaling_NaN() throw()
10661 { return char(); }
10662 static char denorm_min() throw()
10663 { return static_cast<char>(0); }
10664
10665 static const bool is_iec559 = false;
10666 static const bool is_bounded = true;
10667 static const bool is_modulo = true;
10668
10669 static const bool traps = true;
10670 static const bool tinyness_before = false;
10671 static const float_round_style round_style = round_toward_zero;
10672 };
10673
10674
10675 template<>
10676 struct numeric_limits<signed char>
10677 {
10678 static const bool is_specialized = true;
10679
10680 static signed char min() throw()
10681 { return -127 - 1; }
10682 static signed char max() throw()
10683 { return 127; }
10684
10685 static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0));
10686 static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136);
10687 static const bool is_signed = true;
10688 static const bool is_integer = true;
10689 static const bool is_exact = true;
10690 static const int radix = 2;
10691 static signed char epsilon() throw()
10692 { return 0; }
10693 static signed char round_error() throw()
10694 { return 0; }
10695
10696 static const int min_exponent = 0;
10697 static const int min_exponent10 = 0;
10698 static const int max_exponent = 0;
10699 static const int max_exponent10 = 0;
10700
10701 static const bool has_infinity = false;
10702 static const bool has_quiet_NaN = false;
10703 static const bool has_signaling_NaN = false;
10704 static const float_denorm_style has_denorm = denorm_absent;
10705 static const bool has_denorm_loss = false;
10706
10707 static signed char infinity() throw()
10708 { return static_cast<signed char>(0); }
10709 static signed char quiet_NaN() throw()
10710 { return static_cast<signed char>(0); }
10711 static signed char signaling_NaN() throw()
10712 { return static_cast<signed char>(0); }
10713 static signed char denorm_min() throw()
10714 { return static_cast<signed char>(0); }
10715
10716 static const bool is_iec559 = false;
10717 static const bool is_bounded = true;
10718 static const bool is_modulo = true;
10719
10720 static const bool traps = true;
10721 static const bool tinyness_before = false;
10722 static const float_round_style round_style = round_toward_zero;
10723 };
10724
10725
10726 template<>
10727 struct numeric_limits<unsigned char>
10728 {
10729 static const bool is_specialized = true;
10730
10731 static unsigned char min() throw()
10732 { return 0; }
10733 static unsigned char max() throw()
10734 { return 127 * 2U + 1; }
10735
10736 static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0));
10737 static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136);
10738 static const bool is_signed = false;
10739 static const bool is_integer = true;
10740 static const bool is_exact = true;
10741 static const int radix = 2;
10742 static unsigned char epsilon() throw()
10743 { return 0; }
10744 static unsigned char round_error() throw()
10745 { return 0; }
10746
10747 static const int min_exponent = 0;
10748 static const int min_exponent10 = 0;
10749 static const int max_exponent = 0;
10750 static const int max_exponent10 = 0;
10751
10752 static const bool has_infinity = false;
10753 static const bool has_quiet_NaN = false;
10754 static const bool has_signaling_NaN = false;
10755 static const float_denorm_style has_denorm = denorm_absent;
10756 static const bool has_denorm_loss = false;
10757
10758 static unsigned char infinity() throw()
10759 { return static_cast<unsigned char>(0); }
10760 static unsigned char quiet_NaN() throw()
10761 { return static_cast<unsigned char>(0); }
10762 static unsigned char signaling_NaN() throw()
10763 { return static_cast<unsigned char>(0); }
10764 static unsigned char denorm_min() throw()
10765 { return static_cast<unsigned char>(0); }
10766
10767 static const bool is_iec559 = false;
10768 static const bool is_bounded = true;
10769 static const bool is_modulo = true;
10770
10771 static const bool traps = true;
10772 static const bool tinyness_before = false;
10773 static const float_round_style round_style = round_toward_zero;
10774 };
10775
10776
10777 template<>
10778 struct numeric_limits<wchar_t>
10779 {
10780 static const bool is_specialized = true;
10781
10782 static wchar_t min() throw()
10783 { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); }
10784 static wchar_t max() throw()
10785 { return (((wchar_t)(-1) < 0) ? ((wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0))) - 1 : ~(wchar_t)0); }
10786
10787 static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0));
10788 static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136);
10789 static const bool is_signed = ((wchar_t)(-1) < 0);
10790 static const bool is_integer = true;
10791 static const bool is_exact = true;
10792 static const int radix = 2;
10793 static wchar_t epsilon() throw()
10794 { return 0; }
10795 static wchar_t round_error() throw()
10796 { return 0; }
10797
10798 static const int min_exponent = 0;
10799 static const int min_exponent10 = 0;
10800 static const int max_exponent = 0;
10801 static const int max_exponent10 = 0;
10802
10803 static const bool has_infinity = false;
10804 static const bool has_quiet_NaN = false;
10805 static const bool has_signaling_NaN = false;
10806 static const float_denorm_style has_denorm = denorm_absent;
10807 static const bool has_denorm_loss = false;
10808
10809 static wchar_t infinity() throw()
10810 { return wchar_t(); }
10811 static wchar_t quiet_NaN() throw()
10812 { return wchar_t(); }
10813 static wchar_t signaling_NaN() throw()
10814 { return wchar_t(); }
10815 static wchar_t denorm_min() throw()
10816 { return wchar_t(); }
10817
10818 static const bool is_iec559 = false;
10819 static const bool is_bounded = true;
10820 static const bool is_modulo = true;
10821
10822 static const bool traps = true;
10823 static const bool tinyness_before = false;
10824 static const float_round_style round_style = round_toward_zero;
10825 };
10826
10827
10828 template<>
10829 struct numeric_limits<short>
10830 {
10831 static const bool is_specialized = true;
10832
10833 static short min() throw()
10834 { return -32767 - 1; }
10835 static short max() throw()
10836 { return 32767; }
10837
10838 static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0));
10839 static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136);
10840 static const bool is_signed = true;
10841 static const bool is_integer = true;
10842 static const bool is_exact = true;
10843 static const int radix = 2;
10844 static short epsilon() throw()
10845 { return 0; }
10846 static short round_error() throw()
10847 { return 0; }
10848
10849 static const int min_exponent = 0;
10850 static const int min_exponent10 = 0;
10851 static const int max_exponent = 0;
10852 static const int max_exponent10 = 0;
10853
10854 static const bool has_infinity = false;
10855 static const bool has_quiet_NaN = false;
10856 static const bool has_signaling_NaN = false;
10857 static const float_denorm_style has_denorm = denorm_absent;
10858 static const bool has_denorm_loss = false;
10859
10860 static short infinity() throw()
10861 { return short(); }
10862 static short quiet_NaN() throw()
10863 { return short(); }
10864 static short signaling_NaN() throw()
10865 { return short(); }
10866 static short denorm_min() throw()
10867 { return short(); }
10868
10869 static const bool is_iec559 = false;
10870 static const bool is_bounded = true;
10871 static const bool is_modulo = true;
10872
10873 static const bool traps = true;
10874 static const bool tinyness_before = false;
10875 static const float_round_style round_style = round_toward_zero;
10876 };
10877
10878
10879 template<>
10880 struct numeric_limits<unsigned short>
10881 {
10882 static const bool is_specialized = true;
10883
10884 static unsigned short min() throw()
10885 { return 0; }
10886 static unsigned short max() throw()
10887 { return 32767 * 2U + 1; }
10888
10889 static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0));
10890 static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136);
10891 static const bool is_signed = false;
10892 static const bool is_integer = true;
10893 static const bool is_exact = true;
10894 static const int radix = 2;
10895 static unsigned short epsilon() throw()
10896 { return 0; }
10897 static unsigned short round_error() throw()
10898 { return 0; }
10899
10900 static const int min_exponent = 0;
10901 static const int min_exponent10 = 0;
10902 static const int max_exponent = 0;
10903 static const int max_exponent10 = 0;
10904
10905 static const bool has_infinity = false;
10906 static const bool has_quiet_NaN = false;
10907 static const bool has_signaling_NaN = false;
10908 static const float_denorm_style has_denorm = denorm_absent;
10909 static const bool has_denorm_loss = false;
10910
10911 static unsigned short infinity() throw()
10912 { return static_cast<unsigned short>(0); }
10913 static unsigned short quiet_NaN() throw()
10914 { return static_cast<unsigned short>(0); }
10915 static unsigned short signaling_NaN() throw()
10916 { return static_cast<unsigned short>(0); }
10917 static unsigned short denorm_min() throw()
10918 { return static_cast<unsigned short>(0); }
10919
10920 static const bool is_iec559 = false;
10921 static const bool is_bounded = true;
10922 static const bool is_modulo = true;
10923
10924 static const bool traps = true;
10925 static const bool tinyness_before = false;
10926 static const float_round_style round_style = round_toward_zero;
10927 };
10928
10929
10930 template<>
10931 struct numeric_limits<int>
10932 {
10933 static const bool is_specialized = true;
10934
10935 static int min() throw()
10936 { return -2147483647 - 1; }
10937 static int max() throw()
10938 { return 2147483647; }
10939
10940 static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0));
10941 static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136);
10942 static const bool is_signed = true;
10943 static const bool is_integer = true;
10944 static const bool is_exact = true;
10945 static const int radix = 2;
10946 static int epsilon() throw()
10947 { return 0; }
10948 static int round_error() throw()
10949 { return 0; }
10950
10951 static const int min_exponent = 0;
10952 static const int min_exponent10 = 0;
10953 static const int max_exponent = 0;
10954 static const int max_exponent10 = 0;
10955
10956 static const bool has_infinity = false;
10957 static const bool has_quiet_NaN = false;
10958 static const bool has_signaling_NaN = false;
10959 static const float_denorm_style has_denorm = denorm_absent;
10960 static const bool has_denorm_loss = false;
10961
10962 static int infinity() throw()
10963 { return static_cast<int>(0); }
10964 static int quiet_NaN() throw()
10965 { return static_cast<int>(0); }
10966 static int signaling_NaN() throw()
10967 { return static_cast<int>(0); }
10968 static int denorm_min() throw()
10969 { return static_cast<int>(0); }
10970
10971 static const bool is_iec559 = false;
10972 static const bool is_bounded = true;
10973 static const bool is_modulo = true;
10974
10975 static const bool traps = true;
10976 static const bool tinyness_before = false;
10977 static const float_round_style round_style = round_toward_zero;
10978 };
10979
10980
10981 template<>
10982 struct numeric_limits<unsigned int>
10983 {
10984 static const bool is_specialized = true;
10985
10986 static unsigned int min() throw()
10987 { return 0; }
10988 static unsigned int max() throw()
10989 { return 2147483647 * 2U + 1; }
10990
10991 static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0));
10992 static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136);
10993 static const bool is_signed = false;
10994 static const bool is_integer = true;
10995 static const bool is_exact = true;
10996 static const int radix = 2;
10997 static unsigned int epsilon() throw()
10998 { return 0; }
10999 static unsigned int round_error() throw()
11000 { return 0; }
11001
11002 static const int min_exponent = 0;
11003 static const int min_exponent10 = 0;
11004 static const int max_exponent = 0;
11005 static const int max_exponent10 = 0;
11006
11007 static const bool has_infinity = false;
11008 static const bool has_quiet_NaN = false;
11009 static const bool has_signaling_NaN = false;
11010 static const float_denorm_style has_denorm = denorm_absent;
11011 static const bool has_denorm_loss = false;
11012
11013 static unsigned int infinity() throw()
11014 { return static_cast<unsigned int>(0); }
11015 static unsigned int quiet_NaN() throw()
11016 { return static_cast<unsigned int>(0); }
11017 static unsigned int signaling_NaN() throw()
11018 { return static_cast<unsigned int>(0); }
11019 static unsigned int denorm_min() throw()
11020 { return static_cast<unsigned int>(0); }
11021
11022 static const bool is_iec559 = false;
11023 static const bool is_bounded = true;
11024 static const bool is_modulo = true;
11025
11026 static const bool traps = true;
11027 static const bool tinyness_before = false;
11028 static const float_round_style round_style = round_toward_zero;
11029 };
11030
11031
11032 template<>
11033 struct numeric_limits<long>
11034 {
11035 static const bool is_specialized = true;
11036
11037 static long min() throw()
11038 { return -2147483647L - 1; }
11039 static long max() throw()
11040 { return 2147483647L; }
11041
11042 static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0));
11043 static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136);
11044 static const bool is_signed = true;
11045 static const bool is_integer = true;
11046 static const bool is_exact = true;
11047 static const int radix = 2;
11048 static long epsilon() throw()
11049 { return 0; }
11050 static long round_error() throw()
11051 { return 0; }
11052
11053 static const int min_exponent = 0;
11054 static const int min_exponent10 = 0;
11055 static const int max_exponent = 0;
11056 static const int max_exponent10 = 0;
11057
11058 static const bool has_infinity = false;
11059 static const bool has_quiet_NaN = false;
11060 static const bool has_signaling_NaN = false;
11061 static const float_denorm_style has_denorm = denorm_absent;
11062 static const bool has_denorm_loss = false;
11063
11064 static long infinity() throw()
11065 { return static_cast<long>(0); }
11066 static long quiet_NaN() throw()
11067 { return static_cast<long>(0); }
11068 static long signaling_NaN() throw()
11069 { return static_cast<long>(0); }
11070 static long denorm_min() throw()
11071 { return static_cast<long>(0); }
11072
11073 static const bool is_iec559 = false;
11074 static const bool is_bounded = true;
11075 static const bool is_modulo = true;
11076
11077 static const bool traps = true;
11078 static const bool tinyness_before = false;
11079 static const float_round_style round_style = round_toward_zero;
11080 };
11081
11082
11083 template<>
11084 struct numeric_limits<unsigned long>
11085 {
11086 static const bool is_specialized = true;
11087
11088 static unsigned long min() throw()
11089 { return 0; }
11090 static unsigned long max() throw()
11091 { return 2147483647L * 2UL + 1; }
11092
11093 static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0));
11094 static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136);
11095 static const bool is_signed = false;
11096 static const bool is_integer = true;
11097 static const bool is_exact = true;
11098 static const int radix = 2;
11099 static unsigned long epsilon() throw()
11100 { return 0; }
11101 static unsigned long round_error() throw()
11102 { return 0; }
11103
11104 static const int min_exponent = 0;
11105 static const int min_exponent10 = 0;
11106 static const int max_exponent = 0;
11107 static const int max_exponent10 = 0;
11108
11109 static const bool has_infinity = false;
11110 static const bool has_quiet_NaN = false;
11111 static const bool has_signaling_NaN = false;
11112 static const float_denorm_style has_denorm = denorm_absent;
11113 static const bool has_denorm_loss = false;
11114
11115 static unsigned long infinity() throw()
11116 { return static_cast<unsigned long>(0); }
11117 static unsigned long quiet_NaN() throw()
11118 { return static_cast<unsigned long>(0); }
11119 static unsigned long signaling_NaN() throw()
11120 { return static_cast<unsigned long>(0); }
11121 static unsigned long denorm_min() throw()
11122 { return static_cast<unsigned long>(0); }
11123
11124 static const bool is_iec559 = false;
11125 static const bool is_bounded = true;
11126 static const bool is_modulo = true;
11127
11128 static const bool traps = true;
11129 static const bool tinyness_before = false;
11130 static const float_round_style round_style = round_toward_zero;
11131 };
11132
11133
11134 template<>
11135 struct numeric_limits<long long>
11136 {
11137 static const bool is_specialized = true;
11138
11139 static long long min() throw()
11140 { return -9223372036854775807LL - 1; }
11141 static long long max() throw()
11142 { return 9223372036854775807LL; }
11143
11144 static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0));
11145 static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136);
11146 static const bool is_signed = true;
11147 static const bool is_integer = true;
11148 static const bool is_exact = true;
11149 static const int radix = 2;
11150 static long long epsilon() throw()
11151 { return 0; }
11152 static long long round_error() throw()
11153 { return 0; }
11154
11155 static const int min_exponent = 0;
11156 static const int min_exponent10 = 0;
11157 static const int max_exponent = 0;
11158 static const int max_exponent10 = 0;
11159
11160 static const bool has_infinity = false;
11161 static const bool has_quiet_NaN = false;
11162 static const bool has_signaling_NaN = false;
11163 static const float_denorm_style has_denorm = denorm_absent;
11164 static const bool has_denorm_loss = false;
11165
11166 static long long infinity() throw()
11167 { return static_cast<long long>(0); }
11168 static long long quiet_NaN() throw()
11169 { return static_cast<long long>(0); }
11170 static long long signaling_NaN() throw()
11171 { return static_cast<long long>(0); }
11172 static long long denorm_min() throw()
11173 { return static_cast<long long>(0); }
11174
11175 static const bool is_iec559 = false;
11176 static const bool is_bounded = true;
11177 static const bool is_modulo = true;
11178
11179 static const bool traps = true;
11180 static const bool tinyness_before = false;
11181 static const float_round_style round_style = round_toward_zero;
11182 };
11183
11184
11185 template<>
11186 struct numeric_limits<unsigned long long>
11187 {
11188 static const bool is_specialized = true;
11189
11190 static unsigned long long min() throw()
11191 { return 0; }
11192 static unsigned long long max() throw()
11193 { return 9223372036854775807LL * 2ULL + 1; }
11194
11195 static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0));
11196 static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136);
11197 static const bool is_signed = false;
11198 static const bool is_integer = true;
11199 static const bool is_exact = true;
11200 static const int radix = 2;
11201 static unsigned long long epsilon() throw()
11202 { return 0; }
11203 static unsigned long long round_error() throw()
11204 { return 0; }
11205
11206 static const int min_exponent = 0;
11207 static const int min_exponent10 = 0;
11208 static const int max_exponent = 0;
11209 static const int max_exponent10 = 0;
11210
11211 static const bool has_infinity = false;
11212 static const bool has_quiet_NaN = false;
11213 static const bool has_signaling_NaN = false;
11214 static const float_denorm_style has_denorm = denorm_absent;
11215 static const bool has_denorm_loss = false;
11216
11217 static unsigned long long infinity() throw()
11218 { return static_cast<unsigned long long>(0); }
11219 static unsigned long long quiet_NaN() throw()
11220 { return static_cast<unsigned long long>(0); }
11221 static unsigned long long signaling_NaN() throw()
11222 { return static_cast<unsigned long long>(0); }
11223 static unsigned long long denorm_min() throw()
11224 { return static_cast<unsigned long long>(0); }
11225
11226 static const bool is_iec559 = false;
11227 static const bool is_bounded = true;
11228 static const bool is_modulo = true;
11229
11230 static const bool traps = true;
11231 static const bool tinyness_before = false;
11232 static const float_round_style round_style = round_toward_zero;
11233 };
11234
11235
11236 template<>
11237 struct numeric_limits<float>
11238 {
11239 static const bool is_specialized = true;
11240
11241 static float min() throw()
11242 { return 1.17549435e-38F; }
11243 static float max() throw()
11244 { return 3.40282347e+38F; }
11245
11246 static const int digits = 24;
11247 static const int digits10 = 6;
11248 static const bool is_signed = true;
11249 static const bool is_integer = false;
11250 static const bool is_exact = false;
11251 static const int radix = 2;
11252 static float epsilon() throw()
11253 { return 1.19209290e-7F; }
11254 static float round_error() throw()
11255 { return 0.5F; }
11256
11257 static const int min_exponent = (-125);
11258 static const int min_exponent10 = (-37);
11259 static const int max_exponent = 128;
11260 static const int max_exponent10 = 38;
11261
11262 static const bool has_infinity = 1;
11263 static const bool has_quiet_NaN = 1;
11264 static const bool has_signaling_NaN = has_quiet_NaN;
11265 static const float_denorm_style has_denorm
11266 = bool(1.40129846e-45F) ? denorm_present : denorm_absent;
11267 static const bool has_denorm_loss = false;
11268
11269 static float infinity() throw()
11270 { return __builtin_huge_valf (); }
11271 static float quiet_NaN() throw()
11272 { return __builtin_nanf (""); }
11273 static float signaling_NaN() throw()
11274 { return __builtin_nansf (""); }
11275 static float denorm_min() throw()
11276 { return 1.40129846e-45F; }
11277
11278 static const bool is_iec559
11279 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
11280 static const bool is_bounded = true;
11281 static const bool is_modulo = false;
11282
11283 static const bool traps = false;
11284 static const bool tinyness_before = false;
11285 static const float_round_style round_style = round_to_nearest;
11286 };
11287
11288
11289
11290
11291
11292
11293 template<>
11294 struct numeric_limits<double>
11295 {
11296 static const bool is_specialized = true;
11297
11298 static double min() throw()
11299 { return 2.2250738585072014e-308; }
11300 static double max() throw()
11301 { return 1.7976931348623157e+308; }
11302
11303 static const int digits = 53;
11304 static const int digits10 = 15;
11305 static const bool is_signed = true;
11306 static const bool is_integer = false;
11307 static const bool is_exact = false;
11308 static const int radix = 2;
11309 static double epsilon() throw()
11310 { return 2.2204460492503131e-16; }
11311 static double round_error() throw()
11312 { return 0.5; }
11313
11314 static const int min_exponent = (-1021);
11315 static const int min_exponent10 = (-307);
11316 static const int max_exponent = 1024;
11317 static const int max_exponent10 = 308;
11318
11319 static const bool has_infinity = 1;
11320 static const bool has_quiet_NaN = 1;
11321 static const bool has_signaling_NaN = has_quiet_NaN;
11322 static const float_denorm_style has_denorm
11323 = bool(4.9406564584124654e-324) ? denorm_present : denorm_absent;
11324 static const bool has_denorm_loss = false;
11325
11326 static double infinity() throw()
11327 { return __builtin_huge_val(); }
11328 static double quiet_NaN() throw()
11329 { return __builtin_nan (""); }
11330 static double signaling_NaN() throw()
11331 { return __builtin_nans (""); }
11332 static double denorm_min() throw()
11333 { return 4.9406564584124654e-324; }
11334
11335 static const bool is_iec559
11336 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
11337 static const bool is_bounded = true;
11338 static const bool is_modulo = false;
11339
11340 static const bool traps = false;
11341 static const bool tinyness_before = false;
11342 static const float_round_style round_style = round_to_nearest;
11343 };
11344
11345
11346
11347
11348
11349
11350 template<>
11351 struct numeric_limits<long double>
11352 {
11353 static const bool is_specialized = true;
11354
11355 static long double min() throw()
11356 { return 3.36210314311209350626e-4932L; }
11357 static long double max() throw()
11358 { return 1.18973149535723176502e+4932L; }
11359
11360 static const int digits = 64;
11361 static const int digits10 = 18;
11362 static const bool is_signed = true;
11363 static const bool is_integer = false;
11364 static const bool is_exact = false;
11365 static const int radix = 2;
11366 static long double epsilon() throw()
11367 { return 1.08420217248550443401e-19L; }
11368 static long double round_error() throw()
11369 { return 0.5L; }
11370
11371 static const int min_exponent = (-16381);
11372 static const int min_exponent10 = (-4931);
11373 static const int max_exponent = 16384;
11374 static const int max_exponent10 = 4932;
11375
11376 static const bool has_infinity = 1;
11377 static const bool has_quiet_NaN = 1;
11378 static const bool has_signaling_NaN = has_quiet_NaN;
11379 static const float_denorm_style has_denorm
11380 = bool(3.64519953188247460253e-4951L) ? denorm_present : denorm_absent;
11381 static const bool has_denorm_loss
11382 = false;
11383
11384 static long double infinity() throw()
11385 { return __builtin_huge_vall (); }
11386 static long double quiet_NaN() throw()
11387 { return __builtin_nanl (""); }
11388 static long double signaling_NaN() throw()
11389 { return __builtin_nansl (""); }
11390 static long double denorm_min() throw()
11391 { return 3.64519953188247460253e-4951L; }
11392
11393 static const bool is_iec559
11394 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
11395 static const bool is_bounded = true;
11396 static const bool is_modulo = false;
11397
11398 static const bool traps = false;
11399 static const bool tinyness_before = false;
11400 static const float_round_style round_style = round_to_nearest;
11401 };
11402
11403
11404
11405
11406
11407}
11408
11409
11410
11411
11412
11413
11414
11415#pragma GCC visibility pop
11416# 62 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3
11417
11418namespace std
11419{
11420# 73 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11421 template<typename _Tp>
11422 pair<_Tp*, ptrdiff_t>
11423 __get_temporary_buffer(ptrdiff_t __len, _Tp*)
11424 {
11425 const ptrdiff_t __max = numeric_limits<ptrdiff_t>::max() / sizeof(_Tp);
11426 if (__len > __max)
11427 __len = __max;
11428
11429 while (__len > 0)
11430 {
11431 _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp),
11432 nothrow));
11433 if (__tmp != 0)
11434 return pair<_Tp*, ptrdiff_t>(__tmp, __len);
11435 __len /= 2;
11436 }
11437 return pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0);
11438 }
11439# 109 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11440 template<typename _Tp>
11441 inline pair<_Tp*, ptrdiff_t>
11442 get_temporary_buffer(ptrdiff_t __len)
11443 { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); }
11444# 121 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11445 template<typename _Tp>
11446 void
11447 return_temporary_buffer(_Tp* __p)
11448 { ::operator delete(__p, nothrow); }
11449# 133 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11450 template<typename _Tp1>
11451 struct auto_ptr_ref
11452 {
11453 _Tp1* _M_ptr;
11454
11455 explicit
11456 auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
11457 };
11458# 174 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11459 template<typename _Tp>
11460 class auto_ptr
11461 {
11462 private:
11463 _Tp* _M_ptr;
11464
11465 public:
11466
11467 typedef _Tp element_type;
11468
11469
11470
11471
11472
11473
11474
11475 explicit
11476 auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
11477# 200 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11478 auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
11479# 212 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11480 template<typename _Tp1>
11481 auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
11482# 223 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11483 auto_ptr&
11484 operator=(auto_ptr& __a) throw()
11485 {
11486 reset(__a.release());
11487 return *this;
11488 }
11489# 240 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11490 template<typename _Tp1>
11491 auto_ptr&
11492 operator=(auto_ptr<_Tp1>& __a) throw()
11493 {
11494 reset(__a.release());
11495 return *this;
11496 }
11497# 260 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11498 ~auto_ptr() { delete _M_ptr; }
11499# 270 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11500 element_type&
11501 operator*() const throw()
11502 {
11503 ;
11504 return *_M_ptr;
11505 }
11506
11507
11508
11509
11510
11511
11512
11513 element_type*
11514 operator->() const throw()
11515 {
11516 ;
11517 return _M_ptr;
11518 }
11519# 300 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11520 element_type*
11521 get() const throw() { return _M_ptr; }
11522# 314 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11523 element_type*
11524 release() throw()
11525 {
11526 element_type* __tmp = _M_ptr;
11527 _M_ptr = 0;
11528 return __tmp;
11529 }
11530# 329 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11531 void
11532 reset(element_type* __p = 0) throw()
11533 {
11534 if (__p != _M_ptr)
11535 {
11536 delete _M_ptr;
11537 _M_ptr = __p;
11538 }
11539 }
11540# 350 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3
11541 auto_ptr(auto_ptr_ref<element_type> __ref) throw()
11542 : _M_ptr(__ref._M_ptr) { }
11543
11544 auto_ptr&
11545 operator=(auto_ptr_ref<element_type> __ref) throw()
11546 {
11547 if (__ref._M_ptr != this->get())
11548 {
11549 delete _M_ptr;
11550 _M_ptr = __ref._M_ptr;
11551 }
11552 return *this;
11553 }
11554
11555 template<typename _Tp1>
11556 operator auto_ptr_ref<_Tp1>() throw()
11557 { return auto_ptr_ref<_Tp1>(this->release()); }
11558
11559 template<typename _Tp1>
11560 operator auto_ptr<_Tp1>() throw()
11561 { return auto_ptr<_Tp1>(this->release()); }
11562 };
11563}
11564
11565#pragma GCC visibility pop
11566# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
11567
11568
11569
11570# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 1 3
11571# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11572namespace std
11573{
11574# 101 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11575 template <class _Arg, class _Result>
11576 struct unary_function
11577 {
11578 typedef _Arg argument_type;
11579
11580
11581 typedef _Result result_type;
11582 };
11583
11584
11585
11586
11587 template <class _Arg1, class _Arg2, class _Result>
11588 struct binary_function
11589 {
11590 typedef _Arg1 first_argument_type;
11591
11592
11593 typedef _Arg2 second_argument_type;
11594 typedef _Result result_type;
11595 };
11596# 133 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11597 template <class _Tp>
11598 struct plus : public binary_function<_Tp, _Tp, _Tp>
11599 {
11600 _Tp
11601 operator()(const _Tp& __x, const _Tp& __y) const
11602 { return __x + __y; }
11603 };
11604
11605
11606 template <class _Tp>
11607 struct minus : public binary_function<_Tp, _Tp, _Tp>
11608 {
11609 _Tp
11610 operator()(const _Tp& __x, const _Tp& __y) const
11611 { return __x - __y; }
11612 };
11613
11614
11615 template <class _Tp>
11616 struct multiplies : public binary_function<_Tp, _Tp, _Tp>
11617 {
11618 _Tp
11619 operator()(const _Tp& __x, const _Tp& __y) const
11620 { return __x * __y; }
11621 };
11622
11623
11624 template <class _Tp>
11625 struct divides : public binary_function<_Tp, _Tp, _Tp>
11626 {
11627 _Tp
11628 operator()(const _Tp& __x, const _Tp& __y) const
11629 { return __x / __y; }
11630 };
11631
11632
11633 template <class _Tp>
11634 struct modulus : public binary_function<_Tp, _Tp, _Tp>
11635 {
11636 _Tp
11637 operator()(const _Tp& __x, const _Tp& __y) const
11638 { return __x % __y; }
11639 };
11640
11641
11642 template <class _Tp>
11643 struct negate : public unary_function<_Tp, _Tp>
11644 {
11645 _Tp
11646 operator()(const _Tp& __x) const
11647 { return -__x; }
11648 };
11649# 195 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11650 template <class _Tp>
11651 struct equal_to : public binary_function<_Tp, _Tp, bool>
11652 {
11653 bool
11654 operator()(const _Tp& __x, const _Tp& __y) const
11655 { return __x == __y; }
11656 };
11657
11658
11659 template <class _Tp>
11660 struct not_equal_to : public binary_function<_Tp, _Tp, bool>
11661 {
11662 bool
11663 operator()(const _Tp& __x, const _Tp& __y) const
11664 { return __x != __y; }
11665 };
11666
11667
11668 template <class _Tp>
11669 struct greater : public binary_function<_Tp, _Tp, bool>
11670 {
11671 bool
11672 operator()(const _Tp& __x, const _Tp& __y) const
11673 { return __x > __y; }
11674 };
11675
11676
11677 template <class _Tp>
11678 struct less : public binary_function<_Tp, _Tp, bool>
11679 {
11680 bool
11681 operator()(const _Tp& __x, const _Tp& __y) const
11682 { return __x < __y; }
11683 };
11684
11685
11686 template <class _Tp>
11687 struct greater_equal : public binary_function<_Tp, _Tp, bool>
11688 {
11689 bool
11690 operator()(const _Tp& __x, const _Tp& __y) const
11691 { return __x >= __y; }
11692 };
11693
11694
11695 template <class _Tp>
11696 struct less_equal : public binary_function<_Tp, _Tp, bool>
11697 {
11698 bool
11699 operator()(const _Tp& __x, const _Tp& __y) const
11700 { return __x <= __y; }
11701 };
11702# 256 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11703 template <class _Tp>
11704 struct logical_and : public binary_function<_Tp, _Tp, bool>
11705 {
11706 bool
11707 operator()(const _Tp& __x, const _Tp& __y) const
11708 { return __x && __y; }
11709 };
11710
11711
11712 template <class _Tp>
11713 struct logical_or : public binary_function<_Tp, _Tp, bool>
11714 {
11715 bool
11716 operator()(const _Tp& __x, const _Tp& __y) const
11717 { return __x || __y; }
11718 };
11719
11720
11721 template <class _Tp>
11722 struct logical_not : public unary_function<_Tp, bool>
11723 {
11724 bool
11725 operator()(const _Tp& __x) const
11726 { return !__x; }
11727 };
11728# 311 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11729 template <class _Predicate>
11730 class unary_negate
11731 : public unary_function<typename _Predicate::argument_type, bool>
11732 {
11733 protected:
11734 _Predicate _M_pred;
11735 public:
11736 explicit
11737 unary_negate(const _Predicate& __x) : _M_pred(__x) {}
11738
11739 bool
11740 operator()(const typename _Predicate::argument_type& __x) const
11741 { return !_M_pred(__x); }
11742 };
11743
11744
11745 template <class _Predicate>
11746 inline unary_negate<_Predicate>
11747 not1(const _Predicate& __pred)
11748 { return unary_negate<_Predicate>(__pred); }
11749
11750
11751 template <class _Predicate>
11752 class binary_negate
11753 : public binary_function<typename _Predicate::first_argument_type,
11754 typename _Predicate::second_argument_type,
11755 bool>
11756 {
11757 protected:
11758 _Predicate _M_pred;
11759 public:
11760 explicit
11761 binary_negate(const _Predicate& __x)
11762 : _M_pred(__x) { }
11763
11764 bool
11765 operator()(const typename _Predicate::first_argument_type& __x,
11766 const typename _Predicate::second_argument_type& __y) const
11767 { return !_M_pred(__x, __y); }
11768 };
11769
11770
11771 template <class _Predicate>
11772 inline binary_negate<_Predicate>
11773 not2(const _Predicate& __pred)
11774 { return binary_negate<_Predicate>(__pred); }
11775# 391 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11776 template <class _Operation>
11777 class binder1st
11778 : public unary_function<typename _Operation::second_argument_type,
11779 typename _Operation::result_type>
11780 {
11781 protected:
11782 _Operation op;
11783 typename _Operation::first_argument_type value;
11784 public:
11785 binder1st(const _Operation& __x,
11786 const typename _Operation::first_argument_type& __y)
11787 : op(__x), value(__y) {}
11788
11789 typename _Operation::result_type
11790 operator()(const typename _Operation::second_argument_type& __x) const
11791 { return op(value, __x); }
11792
11793
11794
11795 typename _Operation::result_type
11796 operator()(typename _Operation::second_argument_type& __x) const
11797 { return op(value, __x); }
11798 };
11799
11800
11801 template <class _Operation, class _Tp>
11802 inline binder1st<_Operation>
11803 bind1st(const _Operation& __fn, const _Tp& __x)
11804 {
11805 typedef typename _Operation::first_argument_type _Arg1_type;
11806 return binder1st<_Operation>(__fn, _Arg1_type(__x));
11807 }
11808
11809
11810 template <class _Operation>
11811 class binder2nd
11812 : public unary_function<typename _Operation::first_argument_type,
11813 typename _Operation::result_type>
11814 {
11815 protected:
11816 _Operation op;
11817 typename _Operation::second_argument_type value;
11818 public:
11819 binder2nd(const _Operation& __x,
11820 const typename _Operation::second_argument_type& __y)
11821 : op(__x), value(__y) {}
11822
11823 typename _Operation::result_type
11824 operator()(const typename _Operation::first_argument_type& __x) const
11825 { return op(__x, value); }
11826
11827
11828
11829 typename _Operation::result_type
11830 operator()(typename _Operation::first_argument_type& __x) const
11831 { return op(__x, value); }
11832 };
11833
11834
11835 template <class _Operation, class _Tp>
11836 inline binder2nd<_Operation>
11837 bind2nd(const _Operation& __fn, const _Tp& __x)
11838 {
11839 typedef typename _Operation::second_argument_type _Arg2_type;
11840 return binder2nd<_Operation>(__fn, _Arg2_type(__x));
11841 }
11842# 480 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11843 template <class _Arg, class _Result>
11844 class pointer_to_unary_function : public unary_function<_Arg, _Result>
11845 {
11846 protected:
11847 _Result (*_M_ptr)(_Arg);
11848 public:
11849 pointer_to_unary_function() {}
11850
11851 explicit
11852 pointer_to_unary_function(_Result (*__x)(_Arg))
11853 : _M_ptr(__x) {}
11854
11855 _Result
11856 operator()(_Arg __x) const
11857 { return _M_ptr(__x); }
11858 };
11859
11860
11861 template <class _Arg, class _Result>
11862 inline pointer_to_unary_function<_Arg, _Result>
11863 ptr_fun(_Result (*__x)(_Arg))
11864 { return pointer_to_unary_function<_Arg, _Result>(__x); }
11865
11866
11867 template <class _Arg1, class _Arg2, class _Result>
11868 class pointer_to_binary_function
11869 : public binary_function<_Arg1, _Arg2, _Result>
11870 {
11871 protected:
11872 _Result (*_M_ptr)(_Arg1, _Arg2);
11873 public:
11874 pointer_to_binary_function() {}
11875
11876 explicit
11877 pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
11878 : _M_ptr(__x) {}
11879
11880 _Result
11881 operator()(_Arg1 __x, _Arg2 __y) const
11882 { return _M_ptr(__x, __y); }
11883 };
11884
11885
11886 template <class _Arg1, class _Arg2, class _Result>
11887 inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
11888 ptr_fun(_Result (*__x)(_Arg1, _Arg2))
11889 { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
11890
11891
11892 template <class _Tp>
11893 struct _Identity : public unary_function<_Tp,_Tp>
11894 {
11895 _Tp&
11896 operator()(_Tp& __x) const
11897 { return __x; }
11898
11899 const _Tp&
11900 operator()(const _Tp& __x) const
11901 { return __x; }
11902 };
11903
11904 template <class _Pair>
11905 struct _Select1st : public unary_function<_Pair,
11906 typename _Pair::first_type>
11907 {
11908 typename _Pair::first_type&
11909 operator()(_Pair& __x) const
11910 { return __x.first; }
11911
11912 const typename _Pair::first_type&
11913 operator()(const _Pair& __x) const
11914 { return __x.first; }
11915 };
11916
11917 template <class _Pair>
11918 struct _Select2nd : public unary_function<_Pair,
11919 typename _Pair::second_type>
11920 {
11921 typename _Pair::second_type&
11922 operator()(_Pair& __x) const
11923 { return __x.second; }
11924
11925 const typename _Pair::second_type&
11926 operator()(const _Pair& __x) const
11927 { return __x.second; }
11928 };
11929# 582 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3
11930 template <class _Ret, class _Tp>
11931 class mem_fun_t : public unary_function<_Tp*, _Ret>
11932 {
11933 public:
11934 explicit
11935 mem_fun_t(_Ret (_Tp::*__pf)())
11936 : _M_f(__pf) {}
11937
11938 _Ret
11939 operator()(_Tp* __p) const
11940 { return (__p->*_M_f)(); }
11941 private:
11942 _Ret (_Tp::*_M_f)();
11943 };
11944
11945
11946 template <class _Ret, class _Tp>
11947 class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
11948 {
11949 public:
11950 explicit
11951 const_mem_fun_t(_Ret (_Tp::*__pf)() const)
11952 : _M_f(__pf) {}
11953
11954 _Ret
11955 operator()(const _Tp* __p) const
11956 { return (__p->*_M_f)(); }
11957 private:
11958 _Ret (_Tp::*_M_f)() const;
11959 };
11960
11961
11962 template <class _Ret, class _Tp>
11963 class mem_fun_ref_t : public unary_function<_Tp, _Ret>
11964 {
11965 public:
11966 explicit
11967 mem_fun_ref_t(_Ret (_Tp::*__pf)())
11968 : _M_f(__pf) {}
11969
11970 _Ret
11971 operator()(_Tp& __r) const
11972 { return (__r.*_M_f)(); }
11973 private:
11974 _Ret (_Tp::*_M_f)();
11975 };
11976
11977
11978 template <class _Ret, class _Tp>
11979 class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
11980 {
11981 public:
11982 explicit
11983 const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
11984 : _M_f(__pf) {}
11985
11986 _Ret
11987 operator()(const _Tp& __r) const
11988 { return (__r.*_M_f)(); }
11989 private:
11990 _Ret (_Tp::*_M_f)() const;
11991 };
11992
11993
11994 template <class _Ret, class _Tp, class _Arg>
11995 class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
11996 {
11997 public:
11998 explicit
11999 mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
12000 : _M_f(__pf) {}
12001
12002 _Ret
12003 operator()(_Tp* __p, _Arg __x) const
12004 { return (__p->*_M_f)(__x); }
12005 private:
12006 _Ret (_Tp::*_M_f)(_Arg);
12007 };
12008
12009
12010 template <class _Ret, class _Tp, class _Arg>
12011 class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
12012 {
12013 public:
12014 explicit
12015 const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
12016 : _M_f(__pf) {}
12017
12018 _Ret
12019 operator()(const _Tp* __p, _Arg __x) const
12020 { return (__p->*_M_f)(__x); }
12021 private:
12022 _Ret (_Tp::*_M_f)(_Arg) const;
12023 };
12024
12025
12026 template <class _Ret, class _Tp, class _Arg>
12027 class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
12028 {
12029 public:
12030 explicit
12031 mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
12032 : _M_f(__pf) {}
12033
12034 _Ret
12035 operator()(_Tp& __r, _Arg __x) const
12036 { return (__r.*_M_f)(__x); }
12037 private:
12038 _Ret (_Tp::*_M_f)(_Arg);
12039 };
12040
12041
12042 template <class _Ret, class _Tp, class _Arg>
12043 class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
12044 {
12045 public:
12046 explicit
12047 const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
12048 : _M_f(__pf) {}
12049
12050 _Ret
12051 operator()(const _Tp& __r, _Arg __x) const
12052 { return (__r.*_M_f)(__x); }
12053 private:
12054 _Ret (_Tp::*_M_f)(_Arg) const;
12055 };
12056
12057
12058
12059 template <class _Ret, class _Tp>
12060 inline mem_fun_t<_Ret, _Tp>
12061 mem_fun(_Ret (_Tp::*__f)())
12062 { return mem_fun_t<_Ret, _Tp>(__f); }
12063
12064 template <class _Ret, class _Tp>
12065 inline const_mem_fun_t<_Ret, _Tp>
12066 mem_fun(_Ret (_Tp::*__f)() const)
12067 { return const_mem_fun_t<_Ret, _Tp>(__f); }
12068
12069 template <class _Ret, class _Tp>
12070 inline mem_fun_ref_t<_Ret, _Tp>
12071 mem_fun_ref(_Ret (_Tp::*__f)())
12072 { return mem_fun_ref_t<_Ret, _Tp>(__f); }
12073
12074 template <class _Ret, class _Tp>
12075 inline const_mem_fun_ref_t<_Ret, _Tp>
12076 mem_fun_ref(_Ret (_Tp::*__f)() const)
12077 { return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
12078
12079 template <class _Ret, class _Tp, class _Arg>
12080 inline mem_fun1_t<_Ret, _Tp, _Arg>
12081 mem_fun(_Ret (_Tp::*__f)(_Arg))
12082 { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
12083
12084 template <class _Ret, class _Tp, class _Arg>
12085 inline const_mem_fun1_t<_Ret, _Tp, _Arg>
12086 mem_fun(_Ret (_Tp::*__f)(_Arg) const)
12087 { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
12088
12089 template <class _Ret, class _Tp, class _Arg>
12090 inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
12091 mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
12092 { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
12093
12094 template <class _Ret, class _Tp, class _Arg>
12095 inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
12096 mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
12097 { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
12098
12099
12100
12101}
12102# 53 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
12103# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 1 3
12104# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12105
12106# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12107
12108# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/atomicity.h" 1 3
12109# 38 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/atomicity.h" 3
12110# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/atomic_word.h" 1 3
12111# 33 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/atomic_word.h" 3
12112typedef int _Atomic_word;
12113# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/atomicity.h" 2 3
12114
12115namespace __gnu_cxx
12116{
12117 _Atomic_word
12118 __attribute__ ((__unused__))
12119 __exchange_and_add(volatile _Atomic_word* __mem, int __val);
12120
12121 void
12122 __attribute__ ((__unused__))
12123 __atomic_add(volatile _Atomic_word* __mem, int __val);
12124}
12125# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 2 3
12126
12127
12128namespace std
12129{
12130# 109 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12131 template<typename _CharT, typename _Traits, typename _Alloc>
12132 class basic_string
12133 {
12134 typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
12135
12136
12137 public:
12138 typedef _Traits traits_type;
12139 typedef typename _Traits::char_type value_type;
12140 typedef _Alloc allocator_type;
12141 typedef typename _CharT_alloc_type::size_type size_type;
12142 typedef typename _CharT_alloc_type::difference_type difference_type;
12143 typedef typename _CharT_alloc_type::reference reference;
12144 typedef typename _CharT_alloc_type::const_reference const_reference;
12145 typedef typename _CharT_alloc_type::pointer pointer;
12146 typedef typename _CharT_alloc_type::const_pointer const_pointer;
12147 typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator;
12148 typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string>
12149 const_iterator;
12150 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
12151 typedef std::reverse_iterator<iterator> reverse_iterator;
12152
12153 private:
12154# 146 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12155 struct _Rep_base
12156 {
12157 size_type _M_length;
12158 size_type _M_capacity;
12159 _Atomic_word _M_refcount;
12160 };
12161
12162 struct _Rep : _Rep_base
12163 {
12164
12165 typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;
12166# 171 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12167 static const size_type _S_max_size;
12168 static const _CharT _S_terminal;
12169
12170
12171
12172 static size_type _S_empty_rep_storage[];
12173
12174 static _Rep&
12175 _S_empty_rep()
12176 {
12177 void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
12178 return *reinterpret_cast<_Rep*>(__p);
12179 }
12180
12181 bool
12182 _M_is_leaked() const
12183 { return this->_M_refcount < 0; }
12184
12185 bool
12186 _M_is_shared() const
12187 { return this->_M_refcount > 0; }
12188
12189 void
12190 _M_set_leaked()
12191 { this->_M_refcount = -1; }
12192
12193 void
12194 _M_set_sharable()
12195 { this->_M_refcount = 0; }
12196
12197 void
12198 _M_set_length_and_sharable(size_type __n)
12199 {
12200 this->_M_set_sharable();
12201 this->_M_length = __n;
12202 traits_type::assign(this->_M_refdata()[__n], _S_terminal);
12203
12204
12205 }
12206
12207 _CharT*
12208 _M_refdata() throw()
12209 { return reinterpret_cast<_CharT*>(this + 1); }
12210
12211 _CharT*
12212 _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)
12213 {
12214 return (!_M_is_leaked() && __alloc1 == __alloc2)
12215 ? _M_refcopy() : _M_clone(__alloc1);
12216 }
12217
12218
12219 static _Rep*
12220 _S_create(size_type, size_type, const _Alloc&);
12221
12222 void
12223 _M_dispose(const _Alloc& __a)
12224 {
12225
12226 if (__builtin_expect(this != &_S_empty_rep(), false))
12227
12228 if (__gnu_cxx::__exchange_and_add(&this->_M_refcount, -1) <= 0)
12229 _M_destroy(__a);
12230 }
12231
12232 void
12233 _M_destroy(const _Alloc&) throw();
12234
12235 _CharT*
12236 _M_refcopy() throw()
12237 {
12238
12239 if (__builtin_expect(this != &_S_empty_rep(), false))
12240
12241 __gnu_cxx::__atomic_add(&this->_M_refcount, 1);
12242 return _M_refdata();
12243 }
12244
12245 _CharT*
12246 _M_clone(const _Alloc&, size_type __res = 0);
12247 };
12248
12249
12250 struct _Alloc_hider : _Alloc
12251 {
12252 _Alloc_hider(_CharT* __dat, const _Alloc& __a)
12253 : _Alloc(__a), _M_p(__dat) { }
12254
12255 _CharT* _M_p;
12256 };
12257
12258 public:
12259
12260
12261
12262
12263 static const size_type npos = static_cast<size_type>(-1);
12264
12265 private:
12266
12267 mutable _Alloc_hider _M_dataplus;
12268
12269 _CharT*
12270 _M_data() const
12271 { return _M_dataplus._M_p; }
12272
12273 _CharT*
12274 _M_data(_CharT* __p)
12275 { return (_M_dataplus._M_p = __p); }
12276
12277 _Rep*
12278 _M_rep() const
12279 { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }
12280
12281
12282
12283 iterator
12284 _M_ibegin() const
12285 { return iterator(_M_data()); }
12286
12287 iterator
12288 _M_iend() const
12289 { return iterator(_M_data() + this->size()); }
12290
12291 void
12292 _M_leak()
12293 {
12294 if (!_M_rep()->_M_is_leaked())
12295 _M_leak_hard();
12296 }
12297
12298 size_type
12299 _M_check(size_type __pos, const char* __s) const
12300 {
12301 if (__pos > this->size())
12302 __throw_out_of_range((__s));
12303 return __pos;
12304 }
12305
12306 void
12307 _M_check_length(size_type __n1, size_type __n2, const char* __s) const
12308 {
12309 if (this->max_size() - (this->size() - __n1) < __n2)
12310 __throw_length_error((__s));
12311 }
12312
12313
12314 size_type
12315 _M_limit(size_type __pos, size_type __off) const
12316 {
12317 const bool __testoff = __off < this->size() - __pos;
12318 return __testoff ? __off : this->size() - __pos;
12319 }
12320
12321
12322 bool
12323 _M_disjunct(const _CharT* __s) const
12324 {
12325 return (less<const _CharT*>()(__s, _M_data())
12326 || less<const _CharT*>()(_M_data() + this->size(), __s));
12327 }
12328
12329
12330
12331 static void
12332 _M_copy(_CharT* __d, const _CharT* __s, size_type __n)
12333 {
12334 if (__n == 1)
12335 traits_type::assign(*__d, *__s);
12336 else
12337 traits_type::copy(__d, __s, __n);
12338 }
12339
12340 static void
12341 _M_move(_CharT* __d, const _CharT* __s, size_type __n)
12342 {
12343 if (__n == 1)
12344 traits_type::assign(*__d, *__s);
12345 else
12346 traits_type::move(__d, __s, __n);
12347 }
12348
12349 static void
12350 _M_assign(_CharT* __d, size_type __n, _CharT __c)
12351 {
12352 if (__n == 1)
12353 traits_type::assign(*__d, __c);
12354 else
12355 traits_type::assign(__d, __n, __c);
12356 }
12357
12358
12359
12360 template<class _Iterator>
12361 static void
12362 _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
12363 {
12364 for (; __k1 != __k2; ++__k1, ++__p)
12365 traits_type::assign(*__p, *__k1);
12366 }
12367
12368 static void
12369 _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2)
12370 { _S_copy_chars(__p, __k1.base(), __k2.base()); }
12371
12372 static void
12373 _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)
12374 { _S_copy_chars(__p, __k1.base(), __k2.base()); }
12375
12376 static void
12377 _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
12378 { _M_copy(__p, __k1, __k2 - __k1); }
12379
12380 static void
12381 _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
12382 { _M_copy(__p, __k1, __k2 - __k1); }
12383
12384 void
12385 _M_mutate(size_type __pos, size_type __len1, size_type __len2);
12386
12387 void
12388 _M_leak_hard();
12389
12390 static _Rep&
12391 _S_empty_rep()
12392 { return _Rep::_S_empty_rep(); }
12393
12394 public:
12395
12396
12397
12398
12399
12400
12401
12402 inline
12403 basic_string();
12404
12405
12406
12407
12408 explicit
12409 basic_string(const _Alloc& __a);
12410
12411
12412
12413
12414
12415
12416 basic_string(const basic_string& __str);
12417
12418
12419
12420
12421
12422
12423 basic_string(const basic_string& __str, size_type __pos,
12424 size_type __n = npos);
12425
12426
12427
12428
12429
12430
12431
12432 basic_string(const basic_string& __str, size_type __pos,
12433 size_type __n, const _Alloc& __a);
12434# 448 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12435 basic_string(const _CharT* __s, size_type __n,
12436 const _Alloc& __a = _Alloc());
12437
12438
12439
12440
12441
12442 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
12443
12444
12445
12446
12447
12448
12449 basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
12450
12451
12452
12453
12454
12455
12456
12457 template<class _InputIterator>
12458 basic_string(_InputIterator __beg, _InputIterator __end,
12459 const _Alloc& __a = _Alloc());
12460
12461
12462
12463
12464 ~basic_string()
12465 { _M_rep()->_M_dispose(this->get_allocator()); }
12466
12467
12468
12469
12470
12471 basic_string&
12472 operator=(const basic_string& __str)
12473 { return this->assign(__str); }
12474
12475
12476
12477
12478
12479 basic_string&
12480 operator=(const _CharT* __s)
12481 { return this->assign(__s); }
12482# 503 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12483 basic_string&
12484 operator=(_CharT __c)
12485 {
12486 this->assign(1, __c);
12487 return *this;
12488 }
12489
12490
12491
12492
12493
12494
12495 iterator
12496 begin()
12497 {
12498 _M_leak();
12499 return iterator(_M_data());
12500 }
12501
12502
12503
12504
12505
12506 const_iterator
12507 begin() const
12508 { return const_iterator(_M_data()); }
12509
12510
12511
12512
12513
12514 iterator
12515 end()
12516 {
12517 _M_leak();
12518 return iterator(_M_data() + this->size());
12519 }
12520
12521
12522
12523
12524
12525 const_iterator
12526 end() const
12527 { return const_iterator(_M_data() + this->size()); }
12528
12529
12530
12531
12532
12533
12534 reverse_iterator
12535 rbegin()
12536 { return reverse_iterator(this->end()); }
12537
12538
12539
12540
12541
12542
12543 const_reverse_iterator
12544 rbegin() const
12545 { return const_reverse_iterator(this->end()); }
12546
12547
12548
12549
12550
12551
12552 reverse_iterator
12553 rend()
12554 { return reverse_iterator(this->begin()); }
12555
12556
12557
12558
12559
12560
12561 const_reverse_iterator
12562 rend() const
12563 { return const_reverse_iterator(this->begin()); }
12564
12565 public:
12566
12567
12568
12569 size_type
12570 size() const
12571 { return _M_rep()->_M_length; }
12572
12573
12574
12575 size_type
12576 length() const
12577 { return _M_rep()->_M_length; }
12578
12579
12580 size_type
12581 max_size() const
12582 { return _Rep::_S_max_size; }
12583# 614 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12584 void
12585 resize(size_type __n, _CharT __c);
12586# 627 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12587 void
12588 resize(size_type __n)
12589 { this->resize(__n, _CharT()); }
12590
12591
12592
12593
12594
12595 size_type
12596 capacity() const
12597 { return _M_rep()->_M_capacity; }
12598# 656 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12599 void
12600 reserve(size_type __res_arg = 0);
12601
12602
12603
12604
12605 void
12606 clear()
12607 { _M_mutate(0, this->size(), 0); }
12608
12609
12610
12611
12612 bool
12613 empty() const
12614 { return this->size() == 0; }
12615# 684 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12616 const_reference
12617 operator[] (size_type __pos) const
12618 {
12619 ;
12620 return _M_data()[__pos];
12621 }
12622# 701 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12623 reference
12624 operator[](size_type __pos)
12625 {
12626
12627 ;
12628
12629 ;
12630 _M_leak();
12631 return _M_data()[__pos];
12632 }
12633# 722 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12634 const_reference
12635 at(size_type __n) const
12636 {
12637 if (__n >= this->size())
12638 __throw_out_of_range(("basic_string::at"));
12639 return _M_data()[__n];
12640 }
12641# 741 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12642 reference
12643 at(size_type __n)
12644 {
12645 if (__n >= size())
12646 __throw_out_of_range(("basic_string::at"));
12647 _M_leak();
12648 return _M_data()[__n];
12649 }
12650
12651
12652
12653
12654
12655
12656
12657 basic_string&
12658 operator+=(const basic_string& __str)
12659 { return this->append(__str); }
12660
12661
12662
12663
12664
12665
12666 basic_string&
12667 operator+=(const _CharT* __s)
12668 { return this->append(__s); }
12669
12670
12671
12672
12673
12674
12675 basic_string&
12676 operator+=(_CharT __c)
12677 {
12678 this->push_back(__c);
12679 return *this;
12680 }
12681
12682
12683
12684
12685
12686
12687 basic_string&
12688 append(const basic_string& __str);
12689# 801 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12690 basic_string&
12691 append(const basic_string& __str, size_type __pos, size_type __n);
12692
12693
12694
12695
12696
12697
12698
12699 basic_string&
12700 append(const _CharT* __s, size_type __n);
12701
12702
12703
12704
12705
12706
12707 basic_string&
12708 append(const _CharT* __s)
12709 {
12710 ;
12711 return this->append(__s, traits_type::length(__s));
12712 }
12713# 833 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12714 basic_string&
12715 append(size_type __n, _CharT __c);
12716# 844 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12717 template<class _InputIterator>
12718 basic_string&
12719 append(_InputIterator __first, _InputIterator __last)
12720 { return this->replace(_M_iend(), _M_iend(), __first, __last); }
12721
12722
12723
12724
12725
12726 void
12727 push_back(_CharT __c)
12728 {
12729 const size_type __len = 1 + this->size();
12730 if (__len > this->capacity() || _M_rep()->_M_is_shared())
12731 this->reserve(__len);
12732 traits_type::assign(_M_data()[this->size()], __c);
12733 _M_rep()->_M_set_length_and_sharable(__len);
12734 }
12735
12736
12737
12738
12739
12740
12741 basic_string&
12742 assign(const basic_string& __str);
12743# 883 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12744 basic_string&
12745 assign(const basic_string& __str, size_type __pos, size_type __n)
12746 { return this->assign(__str._M_data()
12747 + __str._M_check(__pos, "basic_string::assign"),
12748 __str._M_limit(__pos, __n)); }
12749# 899 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12750 basic_string&
12751 assign(const _CharT* __s, size_type __n);
12752# 911 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12753 basic_string&
12754 assign(const _CharT* __s)
12755 {
12756 ;
12757 return this->assign(__s, traits_type::length(__s));
12758 }
12759# 927 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12760 basic_string&
12761 assign(size_type __n, _CharT __c)
12762 { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
12763# 939 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12764 template<class _InputIterator>
12765 basic_string&
12766 assign(_InputIterator __first, _InputIterator __last)
12767 { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
12768# 956 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12769 void
12770 insert(iterator __p, size_type __n, _CharT __c)
12771 { this->replace(__p, __p, __n, __c); }
12772# 971 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12773 template<class _InputIterator>
12774 void
12775 insert(iterator __p, _InputIterator __beg, _InputIterator __end)
12776 { this->replace(__p, __p, __beg, __end); }
12777# 987 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12778 basic_string&
12779 insert(size_type __pos1, const basic_string& __str)
12780 { return this->insert(__pos1, __str, size_type(0), __str.size()); }
12781# 1009 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12782 basic_string&
12783 insert(size_type __pos1, const basic_string& __str,
12784 size_type __pos2, size_type __n)
12785 { return this->insert(__pos1, __str._M_data()
12786 + __str._M_check(__pos2, "basic_string::insert"),
12787 __str._M_limit(__pos2, __n)); }
12788# 1032 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12789 basic_string&
12790 insert(size_type __pos, const _CharT* __s, size_type __n);
12791# 1050 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12792 basic_string&
12793 insert(size_type __pos, const _CharT* __s)
12794 {
12795 ;
12796 return this->insert(__pos, __s, traits_type::length(__s));
12797 }
12798# 1073 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12799 basic_string&
12800 insert(size_type __pos, size_type __n, _CharT __c)
12801 { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
12802 size_type(0), __n, __c); }
12803# 1090 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12804 iterator
12805 insert(iterator __p, _CharT __c)
12806 {
12807 ;
12808 const size_type __pos = __p - _M_ibegin();
12809 _M_replace_aux(__pos, size_type(0), size_type(1), __c);
12810 _M_rep()->_M_set_leaked();
12811 return this->_M_ibegin() + __pos;
12812 }
12813# 1114 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12814 basic_string&
12815 erase(size_type __pos = 0, size_type __n = npos)
12816 {
12817 _M_mutate(_M_check(__pos, "basic_string::erase"),
12818 _M_limit(__pos, __n), size_type(0));
12819 return *this;
12820 }
12821# 1130 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12822 iterator
12823 erase(iterator __position)
12824 {
12825 ;
12826
12827 const size_type __pos = __position - _M_ibegin();
12828 _M_mutate(__pos, size_type(1), size_type(0));
12829 _M_rep()->_M_set_leaked();
12830 return _M_ibegin() + __pos;
12831 }
12832# 1150 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12833 iterator
12834 erase(iterator __first, iterator __last)
12835 {
12836 ;
12837
12838 const size_type __pos = __first - _M_ibegin();
12839 _M_mutate(__pos, __last - __first, size_type(0));
12840 _M_rep()->_M_set_leaked();
12841 return _M_ibegin() + __pos;
12842 }
12843# 1177 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12844 basic_string&
12845 replace(size_type __pos, size_type __n, const basic_string& __str)
12846 { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
12847# 1199 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12848 basic_string&
12849 replace(size_type __pos1, size_type __n1, const basic_string& __str,
12850 size_type __pos2, size_type __n2)
12851 { return this->replace(__pos1, __n1, __str._M_data()
12852 + __str._M_check(__pos2, "basic_string::replace"),
12853 __str._M_limit(__pos2, __n2)); }
12854# 1223 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12855 basic_string&
12856 replace(size_type __pos, size_type __n1, const _CharT* __s,
12857 size_type __n2);
12858# 1242 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12859 basic_string&
12860 replace(size_type __pos, size_type __n1, const _CharT* __s)
12861 {
12862 ;
12863 return this->replace(__pos, __n1, __s, traits_type::length(__s));
12864 }
12865# 1265 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12866 basic_string&
12867 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
12868 { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
12869 _M_limit(__pos, __n1), __n2, __c); }
12870# 1283 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12871 basic_string&
12872 replace(iterator __i1, iterator __i2, const basic_string& __str)
12873 { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
12874# 1301 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12875 basic_string&
12876 replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
12877 {
12878 ;
12879
12880 return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
12881 }
12882# 1322 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12883 basic_string&
12884 replace(iterator __i1, iterator __i2, const _CharT* __s)
12885 {
12886 ;
12887 return this->replace(__i1, __i2, __s, traits_type::length(__s));
12888 }
12889# 1343 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12890 basic_string&
12891 replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
12892 {
12893 ;
12894
12895 return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
12896 }
12897# 1365 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
12898 template<class _InputIterator>
12899 basic_string&
12900 replace(iterator __i1, iterator __i2,
12901 _InputIterator __k1, _InputIterator __k2)
12902 {
12903 ;
12904
12905 ;
12906 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
12907 return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
12908 }
12909
12910
12911
12912 basic_string&
12913 replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
12914 {
12915 ;
12916
12917 ;
12918 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
12919 __k1, __k2 - __k1);
12920 }
12921
12922 basic_string&
12923 replace(iterator __i1, iterator __i2,
12924 const _CharT* __k1, const _CharT* __k2)
12925 {
12926 ;
12927
12928 ;
12929 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
12930 __k1, __k2 - __k1);
12931 }
12932
12933 basic_string&
12934 replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
12935 {
12936 ;
12937
12938 ;
12939 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
12940 __k1.base(), __k2 - __k1);
12941 }
12942
12943 basic_string&
12944 replace(iterator __i1, iterator __i2,
12945 const_iterator __k1, const_iterator __k2)
12946 {
12947 ;
12948
12949 ;
12950 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
12951 __k1.base(), __k2 - __k1);
12952 }
12953
12954 private:
12955 template<class _Integer>
12956 basic_string&
12957 _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,
12958 _Integer __val, __true_type)
12959 { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
12960
12961 template<class _InputIterator>
12962 basic_string&
12963 _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
12964 _InputIterator __k2, __false_type);
12965
12966 basic_string&
12967 _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
12968 _CharT __c);
12969
12970 basic_string&
12971 _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
12972 size_type __n2);
12973
12974
12975
12976 template<class _InIterator>
12977 static _CharT*
12978 _S_construct_aux(_InIterator __beg, _InIterator __end,
12979 const _Alloc& __a, __false_type)
12980 {
12981 typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
12982 return _S_construct(__beg, __end, __a, _Tag());
12983 }
12984
12985 template<class _InIterator>
12986 static _CharT*
12987 _S_construct_aux(_InIterator __beg, _InIterator __end,
12988 const _Alloc& __a, __true_type)
12989 { return _S_construct(static_cast<size_type>(__beg),
12990 static_cast<value_type>(__end), __a); }
12991
12992 template<class _InIterator>
12993 static _CharT*
12994 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
12995 {
12996 typedef typename std::__is_integer<_InIterator>::__type _Integral;
12997 return _S_construct_aux(__beg, __end, __a, _Integral());
12998 }
12999
13000
13001 template<class _InIterator>
13002 static _CharT*
13003 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
13004 input_iterator_tag);
13005
13006
13007
13008 template<class _FwdIterator>
13009 static _CharT*
13010 _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
13011 forward_iterator_tag);
13012
13013 static _CharT*
13014 _S_construct(size_type __req, _CharT __c, const _Alloc& __a);
13015
13016 public:
13017# 1496 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13018 size_type
13019 copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
13020# 1506 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13021 void
13022 swap(basic_string& __s);
13023# 1516 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13024 const _CharT*
13025 c_str() const
13026 { return _M_data(); }
13027
13028
13029
13030
13031
13032
13033
13034 const _CharT*
13035 data() const
13036 { return _M_data(); }
13037
13038
13039
13040
13041 allocator_type
13042 get_allocator() const
13043 { return _M_dataplus; }
13044# 1548 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13045 size_type
13046 find(const _CharT* __s, size_type __pos, size_type __n) const;
13047# 1561 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13048 size_type
13049 find(const basic_string& __str, size_type __pos = 0) const
13050 { return this->find(__str.data(), __pos, __str.size()); }
13051# 1575 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13052 size_type
13053 find(const _CharT* __s, size_type __pos = 0) const
13054 {
13055 ;
13056 return this->find(__s, __pos, traits_type::length(__s));
13057 }
13058# 1592 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13059 size_type
13060 find(_CharT __c, size_type __pos = 0) const;
13061# 1605 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13062 size_type
13063 rfind(const basic_string& __str, size_type __pos = npos) const
13064 { return this->rfind(__str.data(), __pos, __str.size()); }
13065# 1620 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13066 size_type
13067 rfind(const _CharT* __s, size_type __pos, size_type __n) const;
13068# 1633 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13069 size_type
13070 rfind(const _CharT* __s, size_type __pos = npos) const
13071 {
13072 ;
13073 return this->rfind(__s, __pos, traits_type::length(__s));
13074 }
13075# 1650 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13076 size_type
13077 rfind(_CharT __c, size_type __pos = npos) const;
13078# 1663 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13079 size_type
13080 find_first_of(const basic_string& __str, size_type __pos = 0) const
13081 { return this->find_first_of(__str.data(), __pos, __str.size()); }
13082# 1678 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13083 size_type
13084 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
13085# 1691 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13086 size_type
13087 find_first_of(const _CharT* __s, size_type __pos = 0) const
13088 {
13089 ;
13090 return this->find_first_of(__s, __pos, traits_type::length(__s));
13091 }
13092# 1710 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13093 size_type
13094 find_first_of(_CharT __c, size_type __pos = 0) const
13095 { return this->find(__c, __pos); }
13096# 1724 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13097 size_type
13098 find_last_of(const basic_string& __str, size_type __pos = npos) const
13099 { return this->find_last_of(__str.data(), __pos, __str.size()); }
13100# 1739 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13101 size_type
13102 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
13103# 1752 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13104 size_type
13105 find_last_of(const _CharT* __s, size_type __pos = npos) const
13106 {
13107 ;
13108 return this->find_last_of(__s, __pos, traits_type::length(__s));
13109 }
13110# 1771 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13111 size_type
13112 find_last_of(_CharT __c, size_type __pos = npos) const
13113 { return this->rfind(__c, __pos); }
13114# 1785 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13115 size_type
13116 find_first_not_of(const basic_string& __str, size_type __pos = 0) const
13117 { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
13118# 1800 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13119 size_type
13120 find_first_not_of(const _CharT* __s, size_type __pos,
13121 size_type __n) const;
13122# 1814 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13123 size_type
13124 find_first_not_of(const _CharT* __s, size_type __pos = 0) const
13125 {
13126 ;
13127 return this->find_first_not_of(__s, __pos, traits_type::length(__s));
13128 }
13129# 1831 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13130 size_type
13131 find_first_not_of(_CharT __c, size_type __pos = 0) const;
13132# 1844 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13133 size_type
13134 find_last_not_of(const basic_string& __str, size_type __pos = npos) const
13135 { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
13136# 1860 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13137 size_type
13138 find_last_not_of(const _CharT* __s, size_type __pos,
13139 size_type __n) const;
13140# 1873 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13141 size_type
13142 find_last_not_of(const _CharT* __s, size_type __pos = npos) const
13143 {
13144 ;
13145 return this->find_last_not_of(__s, __pos, traits_type::length(__s));
13146 }
13147# 1890 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13148 size_type
13149 find_last_not_of(_CharT __c, size_type __pos = npos) const;
13150# 1905 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13151 basic_string
13152 substr(size_type __pos = 0, size_type __n = npos) const
13153 { return basic_string(*this,
13154 _M_check(__pos, "basic_string::substr"), __n); }
13155# 1923 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13156 int
13157 compare(const basic_string& __str) const
13158 {
13159 const size_type __size = this->size();
13160 const size_type __osize = __str.size();
13161 const size_type __len = std::min(__size, __osize);
13162
13163 int __r = traits_type::compare(_M_data(), __str.data(), __len);
13164 if (!__r)
13165 __r = __size - __osize;
13166 return __r;
13167 }
13168# 1953 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13169 int
13170 compare(size_type __pos, size_type __n, const basic_string& __str) const;
13171# 1977 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13172 int
13173 compare(size_type __pos1, size_type __n1, const basic_string& __str,
13174 size_type __pos2, size_type __n2) const;
13175# 1995 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13176 int
13177 compare(const _CharT* __s) const;
13178# 2018 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13179 int
13180 compare(size_type __pos, size_type __n1, const _CharT* __s) const;
13181# 2043 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13182 int
13183 compare(size_type __pos, size_type __n1, const _CharT* __s,
13184 size_type __n2) const;
13185 };
13186
13187 template<typename _CharT, typename _Traits, typename _Alloc>
13188 inline basic_string<_CharT, _Traits, _Alloc>::
13189 basic_string()
13190
13191 : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { }
13192# 2064 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13193 template<typename _CharT, typename _Traits, typename _Alloc>
13194 basic_string<_CharT, _Traits, _Alloc>
13195 operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13196 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13197 {
13198 basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
13199 __str.append(__rhs);
13200 return __str;
13201 }
13202
13203
13204
13205
13206
13207
13208
13209 template<typename _CharT, typename _Traits, typename _Alloc>
13210 basic_string<_CharT,_Traits,_Alloc>
13211 operator+(const _CharT* __lhs,
13212 const basic_string<_CharT,_Traits,_Alloc>& __rhs);
13213
13214
13215
13216
13217
13218
13219
13220 template<typename _CharT, typename _Traits, typename _Alloc>
13221 basic_string<_CharT,_Traits,_Alloc>
13222 operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
13223
13224
13225
13226
13227
13228
13229
13230 template<typename _CharT, typename _Traits, typename _Alloc>
13231 inline basic_string<_CharT, _Traits, _Alloc>
13232 operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13233 const _CharT* __rhs)
13234 {
13235 basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
13236 __str.append(__rhs);
13237 return __str;
13238 }
13239
13240
13241
13242
13243
13244
13245
13246 template<typename _CharT, typename _Traits, typename _Alloc>
13247 inline basic_string<_CharT, _Traits, _Alloc>
13248 operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
13249 {
13250 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
13251 typedef typename __string_type::size_type __size_type;
13252 __string_type __str(__lhs);
13253 __str.append(__size_type(1), __rhs);
13254 return __str;
13255 }
13256# 2135 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13257 template<typename _CharT, typename _Traits, typename _Alloc>
13258 inline bool
13259 operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13260 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13261 { return __lhs.compare(__rhs) == 0; }
13262
13263
13264
13265
13266
13267
13268
13269 template<typename _CharT, typename _Traits, typename _Alloc>
13270 inline bool
13271 operator==(const _CharT* __lhs,
13272 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13273 { return __rhs.compare(__lhs) == 0; }
13274
13275
13276
13277
13278
13279
13280
13281 template<typename _CharT, typename _Traits, typename _Alloc>
13282 inline bool
13283 operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13284 const _CharT* __rhs)
13285 { return __lhs.compare(__rhs) == 0; }
13286# 2172 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13287 template<typename _CharT, typename _Traits, typename _Alloc>
13288 inline bool
13289 operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13290 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13291 { return __rhs.compare(__lhs) != 0; }
13292
13293
13294
13295
13296
13297
13298
13299 template<typename _CharT, typename _Traits, typename _Alloc>
13300 inline bool
13301 operator!=(const _CharT* __lhs,
13302 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13303 { return __rhs.compare(__lhs) != 0; }
13304
13305
13306
13307
13308
13309
13310
13311 template<typename _CharT, typename _Traits, typename _Alloc>
13312 inline bool
13313 operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13314 const _CharT* __rhs)
13315 { return __lhs.compare(__rhs) != 0; }
13316# 2209 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13317 template<typename _CharT, typename _Traits, typename _Alloc>
13318 inline bool
13319 operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13320 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13321 { return __lhs.compare(__rhs) < 0; }
13322
13323
13324
13325
13326
13327
13328
13329 template<typename _CharT, typename _Traits, typename _Alloc>
13330 inline bool
13331 operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13332 const _CharT* __rhs)
13333 { return __lhs.compare(__rhs) < 0; }
13334
13335
13336
13337
13338
13339
13340
13341 template<typename _CharT, typename _Traits, typename _Alloc>
13342 inline bool
13343 operator<(const _CharT* __lhs,
13344 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13345 { return __rhs.compare(__lhs) > 0; }
13346# 2246 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13347 template<typename _CharT, typename _Traits, typename _Alloc>
13348 inline bool
13349 operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13350 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13351 { return __lhs.compare(__rhs) > 0; }
13352
13353
13354
13355
13356
13357
13358
13359 template<typename _CharT, typename _Traits, typename _Alloc>
13360 inline bool
13361 operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13362 const _CharT* __rhs)
13363 { return __lhs.compare(__rhs) > 0; }
13364
13365
13366
13367
13368
13369
13370
13371 template<typename _CharT, typename _Traits, typename _Alloc>
13372 inline bool
13373 operator>(const _CharT* __lhs,
13374 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13375 { return __rhs.compare(__lhs) < 0; }
13376# 2283 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13377 template<typename _CharT, typename _Traits, typename _Alloc>
13378 inline bool
13379 operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13380 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13381 { return __lhs.compare(__rhs) <= 0; }
13382
13383
13384
13385
13386
13387
13388
13389 template<typename _CharT, typename _Traits, typename _Alloc>
13390 inline bool
13391 operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13392 const _CharT* __rhs)
13393 { return __lhs.compare(__rhs) <= 0; }
13394
13395
13396
13397
13398
13399
13400
13401 template<typename _CharT, typename _Traits, typename _Alloc>
13402 inline bool
13403 operator<=(const _CharT* __lhs,
13404 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13405 { return __rhs.compare(__lhs) >= 0; }
13406# 2320 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13407 template<typename _CharT, typename _Traits, typename _Alloc>
13408 inline bool
13409 operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13410 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13411 { return __lhs.compare(__rhs) >= 0; }
13412
13413
13414
13415
13416
13417
13418
13419 template<typename _CharT, typename _Traits, typename _Alloc>
13420 inline bool
13421 operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
13422 const _CharT* __rhs)
13423 { return __lhs.compare(__rhs) >= 0; }
13424
13425
13426
13427
13428
13429
13430
13431 template<typename _CharT, typename _Traits, typename _Alloc>
13432 inline bool
13433 operator>=(const _CharT* __lhs,
13434 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
13435 { return __rhs.compare(__lhs) <= 0; }
13436# 2357 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13437 template<typename _CharT, typename _Traits, typename _Alloc>
13438 inline void
13439 swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
13440 basic_string<_CharT, _Traits, _Alloc>& __rhs)
13441 { __lhs.swap(__rhs); }
13442# 2374 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13443 template<typename _CharT, typename _Traits, typename _Alloc>
13444 basic_istream<_CharT, _Traits>&
13445 operator>>(basic_istream<_CharT, _Traits>& __is,
13446 basic_string<_CharT, _Traits, _Alloc>& __str);
13447
13448 template<>
13449 basic_istream<char>&
13450 operator>>(basic_istream<char>& __is, basic_string<char>& __str);
13451# 2392 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13452 template<typename _CharT, typename _Traits, typename _Alloc>
13453 basic_ostream<_CharT, _Traits>&
13454 operator<<(basic_ostream<_CharT, _Traits>& __os,
13455 const basic_string<_CharT, _Traits, _Alloc>& __str);
13456# 2410 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13457 template<typename _CharT, typename _Traits, typename _Alloc>
13458 basic_istream<_CharT, _Traits>&
13459 getline(basic_istream<_CharT, _Traits>& __is,
13460 basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
13461# 2427 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3
13462 template<typename _CharT, typename _Traits, typename _Alloc>
13463 inline basic_istream<_CharT, _Traits>&
13464 getline(basic_istream<_CharT, _Traits>& __is,
13465 basic_string<_CharT, _Traits, _Alloc>& __str);
13466
13467 template<>
13468 basic_istream<char>&
13469 getline(basic_istream<char>& __in, basic_string<char>& __str,
13470 char __delim);
13471
13472
13473 template<>
13474 basic_istream<wchar_t>&
13475 getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,
13476 wchar_t __delim);
13477
13478}
13479# 54 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
13480
13481
13482# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 1 3
13483# 63 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 3
13484
13485# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 3
13486#pragma GCC visibility push(default)
13487
13488
13489
13490
13491# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 1 3
13492# 65 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
13493# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 1 3
13494# 65 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13495namespace std
13496{
13497
13498
13499
13500 template<typename _RandomAccessIterator, typename _Distance>
13501 bool
13502 __is_heap(_RandomAccessIterator __first, _Distance __n)
13503 {
13504 _Distance __parent = 0;
13505 for (_Distance __child = 1; __child < __n; ++__child)
13506 {
13507 if (__first[__parent] < __first[__child])
13508 return false;
13509 if ((__child & 1) == 0)
13510 ++__parent;
13511 }
13512 return true;
13513 }
13514
13515 template<typename _RandomAccessIterator, typename _Distance,
13516 typename _StrictWeakOrdering>
13517 bool
13518 __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp,
13519 _Distance __n)
13520 {
13521 _Distance __parent = 0;
13522 for (_Distance __child = 1; __child < __n; ++__child)
13523 {
13524 if (__comp(__first[__parent], __first[__child]))
13525 return false;
13526 if ((__child & 1) == 0)
13527 ++__parent;
13528 }
13529 return true;
13530 }
13531
13532 template<typename _RandomAccessIterator>
13533 bool
13534 __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
13535 { return std::__is_heap(__first, std::distance(__first, __last)); }
13536
13537 template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
13538 bool
13539 __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
13540 _StrictWeakOrdering __comp)
13541 { return std::__is_heap(__first, __comp, std::distance(__first, __last)); }
13542
13543
13544
13545 template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
13546 void
13547 __push_heap(_RandomAccessIterator __first,
13548 _Distance __holeIndex, _Distance __topIndex, _Tp __value)
13549 {
13550 _Distance __parent = (__holeIndex - 1) / 2;
13551 while (__holeIndex > __topIndex && *(__first + __parent) < __value)
13552 {
13553 *(__first + __holeIndex) = *(__first + __parent);
13554 __holeIndex = __parent;
13555 __parent = (__holeIndex - 1) / 2;
13556 }
13557 *(__first + __holeIndex) = __value;
13558 }
13559# 139 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13560 template<typename _RandomAccessIterator>
13561 inline void
13562 push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
13563 {
13564 typedef typename iterator_traits<_RandomAccessIterator>::value_type
13565 _ValueType;
13566 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
13567 _DistanceType;
13568
13569
13570
13571
13572
13573 ;
13574
13575
13576 std::__push_heap(__first, _DistanceType((__last - __first) - 1),
13577 _DistanceType(0), _ValueType(*(__last - 1)));
13578 }
13579
13580 template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
13581 typename _Compare>
13582 void
13583 __push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
13584 _Distance __topIndex, _Tp __value, _Compare __comp)
13585 {
13586 _Distance __parent = (__holeIndex - 1) / 2;
13587 while (__holeIndex > __topIndex
13588 && __comp(*(__first + __parent), __value))
13589 {
13590 *(__first + __holeIndex) = *(__first + __parent);
13591 __holeIndex = __parent;
13592 __parent = (__holeIndex - 1) / 2;
13593 }
13594 *(__first + __holeIndex) = __value;
13595 }
13596# 187 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13597 template<typename _RandomAccessIterator, typename _Compare>
13598 inline void
13599 push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
13600 _Compare __comp)
13601 {
13602 typedef typename iterator_traits<_RandomAccessIterator>::value_type
13603 _ValueType;
13604 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
13605 _DistanceType;
13606
13607
13608
13609
13610 ;
13611 ;
13612
13613 std::__push_heap(__first, _DistanceType((__last - __first) - 1),
13614 _DistanceType(0), _ValueType(*(__last - 1)), __comp);
13615 }
13616
13617 template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
13618 void
13619 __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
13620 _Distance __len, _Tp __value)
13621 {
13622 const _Distance __topIndex = __holeIndex;
13623 _Distance __secondChild = 2 * __holeIndex + 2;
13624 while (__secondChild < __len)
13625 {
13626 if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
13627 __secondChild--;
13628 *(__first + __holeIndex) = *(__first + __secondChild);
13629 __holeIndex = __secondChild;
13630 __secondChild = 2 * (__secondChild + 1);
13631 }
13632 if (__secondChild == __len)
13633 {
13634 *(__first + __holeIndex) = *(__first + (__secondChild - 1));
13635 __holeIndex = __secondChild - 1;
13636 }
13637 std::__push_heap(__first, __holeIndex, __topIndex, __value);
13638 }
13639
13640 template<typename _RandomAccessIterator, typename _Tp>
13641 inline void
13642 __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
13643 _RandomAccessIterator __result, _Tp __value)
13644 {
13645 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
13646 _Distance;
13647 *__result = *__first;
13648 std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
13649 __value);
13650 }
13651# 251 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13652 template<typename _RandomAccessIterator>
13653 inline void
13654 pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
13655 {
13656 typedef typename iterator_traits<_RandomAccessIterator>::value_type
13657 _ValueType;
13658
13659
13660
13661
13662
13663 ;
13664 ;
13665
13666 std::__pop_heap(__first, __last - 1, __last - 1,
13667 _ValueType(*(__last - 1)));
13668 }
13669
13670 template<typename _RandomAccessIterator, typename _Distance,
13671 typename _Tp, typename _Compare>
13672 void
13673 __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
13674 _Distance __len, _Tp __value, _Compare __comp)
13675 {
13676 const _Distance __topIndex = __holeIndex;
13677 _Distance __secondChild = 2 * __holeIndex + 2;
13678 while (__secondChild < __len)
13679 {
13680 if (__comp(*(__first + __secondChild),
13681 *(__first + (__secondChild - 1))))
13682 __secondChild--;
13683 *(__first + __holeIndex) = *(__first + __secondChild);
13684 __holeIndex = __secondChild;
13685 __secondChild = 2 * (__secondChild + 1);
13686 }
13687 if (__secondChild == __len)
13688 {
13689 *(__first + __holeIndex) = *(__first + (__secondChild - 1));
13690 __holeIndex = __secondChild - 1;
13691 }
13692 std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp);
13693 }
13694
13695 template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
13696 inline void
13697 __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
13698 _RandomAccessIterator __result, _Tp __value, _Compare __comp)
13699 {
13700 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
13701 _Distance;
13702 *__result = *__first;
13703 std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
13704 __value, __comp);
13705 }
13706# 317 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13707 template<typename _RandomAccessIterator, typename _Compare>
13708 inline void
13709 pop_heap(_RandomAccessIterator __first,
13710 _RandomAccessIterator __last, _Compare __comp)
13711 {
13712
13713
13714
13715 ;
13716 ;
13717
13718 typedef typename iterator_traits<_RandomAccessIterator>::value_type
13719 _ValueType;
13720 std::__pop_heap(__first, __last - 1, __last - 1,
13721 _ValueType(*(__last - 1)), __comp);
13722 }
13723# 342 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13724 template<typename _RandomAccessIterator>
13725 void
13726 make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
13727 {
13728 typedef typename iterator_traits<_RandomAccessIterator>::value_type
13729 _ValueType;
13730 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
13731 _DistanceType;
13732
13733
13734
13735
13736
13737 ;
13738
13739 if (__last - __first < 2)
13740 return;
13741
13742 const _DistanceType __len = __last - __first;
13743 _DistanceType __parent = (__len - 2) / 2;
13744 while (true)
13745 {
13746 std::__adjust_heap(__first, __parent, __len,
13747 _ValueType(*(__first + __parent)));
13748 if (__parent == 0)
13749 return;
13750 __parent--;
13751 }
13752 }
13753# 382 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13754 template<typename _RandomAccessIterator, typename _Compare>
13755 inline void
13756 make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
13757 _Compare __comp)
13758 {
13759 typedef typename iterator_traits<_RandomAccessIterator>::value_type
13760 _ValueType;
13761 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
13762 _DistanceType;
13763
13764
13765
13766
13767 ;
13768
13769 if (__last - __first < 2)
13770 return;
13771
13772 const _DistanceType __len = __last - __first;
13773 _DistanceType __parent = (__len - 2) / 2;
13774 while (true)
13775 {
13776 std::__adjust_heap(__first, __parent, __len,
13777 _ValueType(*(__first + __parent)), __comp);
13778 if (__parent == 0)
13779 return;
13780 __parent--;
13781 }
13782 }
13783# 420 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13784 template<typename _RandomAccessIterator>
13785 void
13786 sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
13787 {
13788
13789
13790
13791
13792
13793 ;
13794
13795
13796 while (__last - __first > 1)
13797 std::pop_heap(__first, __last--);
13798 }
13799# 446 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3
13800 template<typename _RandomAccessIterator, typename _Compare>
13801 void
13802 sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
13803 _Compare __comp)
13804 {
13805
13806
13807
13808 ;
13809 ;
13810
13811 while (__last - __first > 1)
13812 std::pop_heap(__first, __last--, __comp);
13813 }
13814
13815}
13816# 66 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 2 3
13817# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_tempbuf.h" 1 3
13818# 66 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_tempbuf.h" 3
13819namespace std
13820{
13821
13822
13823
13824
13825
13826
13827
13828 template<typename _ForwardIterator, typename _Tp>
13829 class _Temporary_buffer
13830 {
13831
13832
13833
13834 public:
13835 typedef _Tp value_type;
13836 typedef value_type* pointer;
13837 typedef pointer iterator;
13838 typedef ptrdiff_t size_type;
13839
13840 protected:
13841 size_type _M_original_len;
13842 size_type _M_len;
13843 pointer _M_buffer;
13844
13845 void
13846 _M_initialize_buffer(const _Tp&, __true_type) { }
13847
13848 void
13849 _M_initialize_buffer(const _Tp& val, __false_type)
13850 { std::uninitialized_fill_n(_M_buffer, _M_len, val); }
13851
13852 public:
13853
13854 size_type
13855 size() const
13856 { return _M_len; }
13857
13858
13859 size_type
13860 requested_size() const
13861 { return _M_original_len; }
13862
13863
13864 iterator
13865 begin()
13866 { return _M_buffer; }
13867
13868
13869 iterator
13870 end()
13871 { return _M_buffer + _M_len; }
13872
13873
13874
13875
13876
13877 _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last);
13878
13879 ~_Temporary_buffer()
13880 {
13881 std::_Destroy(_M_buffer, _M_buffer + _M_len);
13882 std::return_temporary_buffer(_M_buffer);
13883 }
13884
13885 private:
13886
13887 _Temporary_buffer(const _Temporary_buffer&);
13888
13889 void
13890 operator=(const _Temporary_buffer&);
13891 };
13892
13893
13894 template<typename _ForwardIterator, typename _Tp>
13895 _Temporary_buffer<_ForwardIterator, _Tp>::
13896 _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
13897 : _M_original_len(std::distance(__first, __last)),
13898 _M_len(0), _M_buffer(0)
13899 {
13900
13901 typedef typename std::__is_scalar<_Tp>::__type _Trivial;
13902
13903 try
13904 {
13905 pair<pointer, size_type> __p(get_temporary_buffer<
13906 value_type>(_M_original_len));
13907 _M_buffer = __p.first;
13908 _M_len = __p.second;
13909 if (_M_len > 0)
13910 _M_initialize_buffer(*__first, _Trivial());
13911 }
13912 catch(...)
13913 {
13914 std::return_temporary_buffer(_M_buffer);
13915 _M_buffer = 0;
13916 _M_len = 0;
13917 throw;
13918 }
13919 }
13920}
13921# 67 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 2 3
13922
13923
13924
13925
13926namespace std
13927{
13928# 85 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
13929 template<typename _Tp>
13930 inline const _Tp&
13931 __median(const _Tp& __a, const _Tp& __b, const _Tp& __c)
13932 {
13933
13934
13935 if (__a < __b)
13936 if (__b < __c)
13937 return __b;
13938 else if (__a < __c)
13939 return __c;
13940 else
13941 return __a;
13942 else if (__a < __c)
13943 return __a;
13944 else if (__b < __c)
13945 return __c;
13946 else
13947 return __b;
13948 }
13949# 119 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
13950 template<typename _Tp, typename _Compare>
13951 inline const _Tp&
13952 __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp)
13953 {
13954
13955
13956 if (__comp(__a, __b))
13957 if (__comp(__b, __c))
13958 return __b;
13959 else if (__comp(__a, __c))
13960 return __c;
13961 else
13962 return __a;
13963 else if (__comp(__a, __c))
13964 return __a;
13965 else if (__comp(__b, __c))
13966 return __c;
13967 else
13968 return __b;
13969 }
13970# 151 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
13971 template<typename _InputIterator, typename _Function>
13972 _Function
13973 for_each(_InputIterator __first, _InputIterator __last, _Function __f)
13974 {
13975
13976
13977 ;
13978 for ( ; __first != __last; ++__first)
13979 __f(*__first);
13980 return __f;
13981 }
13982
13983
13984
13985
13986
13987
13988 template<typename _InputIterator, typename _Tp>
13989 inline _InputIterator
13990 __find(_InputIterator __first, _InputIterator __last,
13991 const _Tp& __val, input_iterator_tag)
13992 {
13993 while (__first != __last && !(*__first == __val))
13994 ++__first;
13995 return __first;
13996 }
13997
13998
13999
14000
14001
14002
14003 template<typename _InputIterator, typename _Predicate>
14004 inline _InputIterator
14005 __find_if(_InputIterator __first, _InputIterator __last,
14006 _Predicate __pred, input_iterator_tag)
14007 {
14008 while (__first != __last && !__pred(*__first))
14009 ++__first;
14010 return __first;
14011 }
14012
14013
14014
14015
14016
14017
14018 template<typename _RandomAccessIterator, typename _Tp>
14019 _RandomAccessIterator
14020 __find(_RandomAccessIterator __first, _RandomAccessIterator __last,
14021 const _Tp& __val, random_access_iterator_tag)
14022 {
14023 typename iterator_traits<_RandomAccessIterator>::difference_type
14024 __trip_count = (__last - __first) >> 2;
14025
14026 for ( ; __trip_count > 0 ; --__trip_count)
14027 {
14028 if (*__first == __val)
14029 return __first;
14030 ++__first;
14031
14032 if (*__first == __val)
14033 return __first;
14034 ++__first;
14035
14036 if (*__first == __val)
14037 return __first;
14038 ++__first;
14039
14040 if (*__first == __val)
14041 return __first;
14042 ++__first;
14043 }
14044
14045 switch (__last - __first)
14046 {
14047 case 3:
14048 if (*__first == __val)
14049 return __first;
14050 ++__first;
14051 case 2:
14052 if (*__first == __val)
14053 return __first;
14054 ++__first;
14055 case 1:
14056 if (*__first == __val)
14057 return __first;
14058 ++__first;
14059 case 0:
14060 default:
14061 return __last;
14062 }
14063 }
14064
14065
14066
14067
14068
14069
14070 template<typename _RandomAccessIterator, typename _Predicate>
14071 _RandomAccessIterator
14072 __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
14073 _Predicate __pred, random_access_iterator_tag)
14074 {
14075 typename iterator_traits<_RandomAccessIterator>::difference_type
14076 __trip_count = (__last - __first) >> 2;
14077
14078 for ( ; __trip_count > 0 ; --__trip_count)
14079 {
14080 if (__pred(*__first))
14081 return __first;
14082 ++__first;
14083
14084 if (__pred(*__first))
14085 return __first;
14086 ++__first;
14087
14088 if (__pred(*__first))
14089 return __first;
14090 ++__first;
14091
14092 if (__pred(*__first))
14093 return __first;
14094 ++__first;
14095 }
14096
14097 switch (__last - __first)
14098 {
14099 case 3:
14100 if (__pred(*__first))
14101 return __first;
14102 ++__first;
14103 case 2:
14104 if (__pred(*__first))
14105 return __first;
14106 ++__first;
14107 case 1:
14108 if (__pred(*__first))
14109 return __first;
14110 ++__first;
14111 case 0:
14112 default:
14113 return __last;
14114 }
14115 }
14116# 305 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14117 template<typename _InputIterator, typename _Tp>
14118 inline _InputIterator
14119 find(_InputIterator __first, _InputIterator __last,
14120 const _Tp& __val)
14121 {
14122
14123
14124
14125
14126 ;
14127 return std::__find(__first, __last, __val,
14128 std::__iterator_category(__first));
14129 }
14130# 327 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14131 template<typename _InputIterator, typename _Predicate>
14132 inline _InputIterator
14133 find_if(_InputIterator __first, _InputIterator __last,
14134 _Predicate __pred)
14135 {
14136
14137
14138
14139
14140 ;
14141 return std::__find_if(__first, __last, __pred,
14142 std::__iterator_category(__first));
14143 }
14144# 349 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14145 template<typename _ForwardIterator>
14146 _ForwardIterator
14147 adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
14148 {
14149
14150
14151
14152
14153 ;
14154 if (__first == __last)
14155 return __last;
14156 _ForwardIterator __next = __first;
14157 while(++__next != __last)
14158 {
14159 if (*__first == *__next)
14160 return __first;
14161 __first = __next;
14162 }
14163 return __last;
14164 }
14165# 380 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14166 template<typename _ForwardIterator, typename _BinaryPredicate>
14167 _ForwardIterator
14168 adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
14169 _BinaryPredicate __binary_pred)
14170 {
14171
14172
14173
14174
14175
14176 ;
14177 if (__first == __last)
14178 return __last;
14179 _ForwardIterator __next = __first;
14180 while(++__next != __last)
14181 {
14182 if (__binary_pred(*__first, *__next))
14183 return __first;
14184 __first = __next;
14185 }
14186 return __last;
14187 }
14188# 411 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14189 template<typename _InputIterator, typename _Tp>
14190 typename iterator_traits<_InputIterator>::difference_type
14191 count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
14192 {
14193
14194
14195
14196
14197 ;
14198 typename iterator_traits<_InputIterator>::difference_type __n = 0;
14199 for ( ; __first != __last; ++__first)
14200 if (*__first == __value)
14201 ++__n;
14202 return __n;
14203 }
14204# 435 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14205 template<typename _InputIterator, typename _Predicate>
14206 typename iterator_traits<_InputIterator>::difference_type
14207 count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
14208 {
14209
14210
14211
14212
14213 ;
14214 typename iterator_traits<_InputIterator>::difference_type __n = 0;
14215 for ( ; __first != __last; ++__first)
14216 if (__pred(*__first))
14217 ++__n;
14218 return __n;
14219 }
14220# 474 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14221 template<typename _ForwardIterator1, typename _ForwardIterator2>
14222 _ForwardIterator1
14223 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
14224 _ForwardIterator2 __first2, _ForwardIterator2 __last2)
14225 {
14226
14227
14228
14229
14230
14231
14232 ;
14233 ;
14234
14235 if (__first1 == __last1 || __first2 == __last2)
14236 return __first1;
14237
14238
14239 _ForwardIterator2 __tmp(__first2);
14240 ++__tmp;
14241 if (__tmp == __last2)
14242 return std::find(__first1, __last1, *__first2);
14243
14244
14245 _ForwardIterator2 __p1, __p;
14246 __p1 = __first2; ++__p1;
14247 _ForwardIterator1 __current = __first1;
14248
14249 while (__first1 != __last1)
14250 {
14251 __first1 = std::find(__first1, __last1, *__first2);
14252 if (__first1 == __last1)
14253 return __last1;
14254
14255 __p = __p1;
14256 __current = __first1;
14257 if (++__current == __last1)
14258 return __last1;
14259
14260 while (*__current == *__p)
14261 {
14262 if (++__p == __last2)
14263 return __first1;
14264 if (++__current == __last1)
14265 return __last1;
14266 }
14267 ++__first1;
14268 }
14269 return __first1;
14270 }
14271# 545 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14272 template<typename _ForwardIterator1, typename _ForwardIterator2,
14273 typename _BinaryPredicate>
14274 _ForwardIterator1
14275 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
14276 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
14277 _BinaryPredicate __predicate)
14278 {
14279
14280
14281
14282
14283
14284
14285 ;
14286 ;
14287
14288
14289 if (__first1 == __last1 || __first2 == __last2)
14290 return __first1;
14291
14292
14293 _ForwardIterator2 __tmp(__first2);
14294 ++__tmp;
14295 if (__tmp == __last2)
14296 {
14297 while (__first1 != __last1 && !__predicate(*__first1, *__first2))
14298 ++__first1;
14299 return __first1;
14300 }
14301
14302
14303 _ForwardIterator2 __p1, __p;
14304 __p1 = __first2; ++__p1;
14305 _ForwardIterator1 __current = __first1;
14306
14307 while (__first1 != __last1)
14308 {
14309 while (__first1 != __last1)
14310 {
14311 if (__predicate(*__first1, *__first2))
14312 break;
14313 ++__first1;
14314 }
14315 while (__first1 != __last1 && !__predicate(*__first1, *__first2))
14316 ++__first1;
14317 if (__first1 == __last1)
14318 return __last1;
14319
14320 __p = __p1;
14321 __current = __first1;
14322 if (++__current == __last1)
14323 return __last1;
14324
14325 while (__predicate(*__current, *__p))
14326 {
14327 if (++__p == __last2)
14328 return __first1;
14329 if (++__current == __last1)
14330 return __last1;
14331 }
14332 ++__first1;
14333 }
14334 return __first1;
14335 }
14336# 617 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14337 template<typename _ForwardIterator, typename _Integer, typename _Tp>
14338 _ForwardIterator
14339 __search_n(_ForwardIterator __first, _ForwardIterator __last,
14340 _Integer __count, const _Tp& __val,
14341 std::forward_iterator_tag)
14342 {
14343 __first = std::find(__first, __last, __val);
14344 while (__first != __last)
14345 {
14346 typename iterator_traits<_ForwardIterator>::difference_type
14347 __n = __count;
14348 _ForwardIterator __i = __first;
14349 ++__i;
14350 while (__i != __last && __n != 1 && *__i == __val)
14351 {
14352 ++__i;
14353 --__n;
14354 }
14355 if (__n == 1)
14356 return __first;
14357 if (__i == __last)
14358 return __last;
14359 __first = std::find(++__i, __last, __val);
14360 }
14361 return __last;
14362 }
14363# 651 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14364 template<typename _RandomAccessIter, typename _Integer, typename _Tp>
14365 _RandomAccessIter
14366 __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
14367 _Integer __count, const _Tp& __val,
14368 std::random_access_iterator_tag)
14369 {
14370
14371 typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
14372 _DistanceType;
14373
14374 _DistanceType __tailSize = __last - __first;
14375 const _DistanceType __pattSize = __count;
14376
14377 if (__tailSize < __pattSize)
14378 return __last;
14379
14380 const _DistanceType __skipOffset = __pattSize - 1;
14381 _RandomAccessIter __lookAhead = __first + __skipOffset;
14382 __tailSize -= __pattSize;
14383
14384 while (1)
14385 {
14386
14387
14388 while (!(*__lookAhead == __val))
14389 {
14390 if (__tailSize < __pattSize)
14391 return __last;
14392 __lookAhead += __pattSize;
14393 __tailSize -= __pattSize;
14394 }
14395 _DistanceType __remainder = __skipOffset;
14396 for (_RandomAccessIter __backTrack = __lookAhead - 1;
14397 *__backTrack == __val; --__backTrack)
14398 {
14399 if (--__remainder == 0)
14400 return (__lookAhead - __skipOffset);
14401 }
14402 if (__remainder > __tailSize)
14403 return __last;
14404 __lookAhead += __remainder;
14405 __tailSize -= __remainder;
14406 }
14407 }
14408# 709 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14409 template<typename _ForwardIterator, typename _Integer, typename _Tp>
14410 _ForwardIterator
14411 search_n(_ForwardIterator __first, _ForwardIterator __last,
14412 _Integer __count, const _Tp& __val)
14413 {
14414
14415
14416
14417
14418 ;
14419
14420 if (__count <= 0)
14421 return __first;
14422 if (__count == 1)
14423 return std::find(__first, __last, __val);
14424 return std::__search_n(__first, __last, __count, __val,
14425 std::__iterator_category(__first));
14426 }
14427# 736 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14428 template<typename _ForwardIterator, typename _Integer, typename _Tp,
14429 typename _BinaryPredicate>
14430 _ForwardIterator
14431 __search_n(_ForwardIterator __first, _ForwardIterator __last,
14432 _Integer __count, const _Tp& __val,
14433 _BinaryPredicate __binary_pred, std::forward_iterator_tag)
14434 {
14435 while (__first != __last && !__binary_pred(*__first, __val))
14436 ++__first;
14437
14438 while (__first != __last)
14439 {
14440 typename iterator_traits<_ForwardIterator>::difference_type
14441 __n = __count;
14442 _ForwardIterator __i = __first;
14443 ++__i;
14444 while (__i != __last && __n != 1 && __binary_pred(*__i, __val))
14445 {
14446 ++__i;
14447 --__n;
14448 }
14449 if (__n == 1)
14450 return __first;
14451 if (__i == __last)
14452 return __last;
14453 __first = ++__i;
14454 while (__first != __last && !__binary_pred(*__first, __val))
14455 ++__first;
14456 }
14457 return __last;
14458 }
14459# 776 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14460 template<typename _RandomAccessIter, typename _Integer, typename _Tp,
14461 typename _BinaryPredicate>
14462 _RandomAccessIter
14463 __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
14464 _Integer __count, const _Tp& __val,
14465 _BinaryPredicate __binary_pred, std::random_access_iterator_tag)
14466 {
14467
14468 typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
14469 _DistanceType;
14470
14471 _DistanceType __tailSize = __last - __first;
14472 const _DistanceType __pattSize = __count;
14473
14474 if (__tailSize < __pattSize)
14475 return __last;
14476
14477 const _DistanceType __skipOffset = __pattSize - 1;
14478 _RandomAccessIter __lookAhead = __first + __skipOffset;
14479 __tailSize -= __pattSize;
14480
14481 while (1)
14482 {
14483
14484
14485 while (!__binary_pred(*__lookAhead, __val))
14486 {
14487 if (__tailSize < __pattSize)
14488 return __last;
14489 __lookAhead += __pattSize;
14490 __tailSize -= __pattSize;
14491 }
14492 _DistanceType __remainder = __skipOffset;
14493 for (_RandomAccessIter __backTrack = __lookAhead - 1;
14494 __binary_pred(*__backTrack, __val); --__backTrack)
14495 {
14496 if (--__remainder == 0)
14497 return (__lookAhead - __skipOffset);
14498 }
14499 if (__remainder > __tailSize)
14500 return __last;
14501 __lookAhead += __remainder;
14502 __tailSize -= __remainder;
14503 }
14504 }
14505# 837 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14506 template<typename _ForwardIterator, typename _Integer, typename _Tp,
14507 typename _BinaryPredicate>
14508 _ForwardIterator
14509 search_n(_ForwardIterator __first, _ForwardIterator __last,
14510 _Integer __count, const _Tp& __val,
14511 _BinaryPredicate __binary_pred)
14512 {
14513
14514
14515
14516
14517 ;
14518
14519 if (__count <= 0)
14520 return __first;
14521 if (__count == 1)
14522 {
14523 while (__first != __last && !__binary_pred(*__first, __val))
14524 ++__first;
14525 return __first;
14526 }
14527 return std::__search_n(__first, __last, __count, __val, __binary_pred,
14528 std::__iterator_category(__first));
14529 }
14530# 873 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14531 template<typename _ForwardIterator1, typename _ForwardIterator2>
14532 _ForwardIterator2
14533 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
14534 _ForwardIterator2 __first2)
14535 {
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547 ;
14548
14549 for ( ; __first1 != __last1; ++__first1, ++__first2)
14550 std::iter_swap(__first1, __first2);
14551 return __first2;
14552 }
14553# 911 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14554 template<typename _InputIterator, typename _OutputIterator,
14555 typename _UnaryOperation>
14556 _OutputIterator
14557 transform(_InputIterator __first, _InputIterator __last,
14558 _OutputIterator __result, _UnaryOperation __unary_op)
14559 {
14560
14561
14562
14563
14564
14565 ;
14566
14567 for ( ; __first != __last; ++__first, ++__result)
14568 *__result = __unary_op(*__first);
14569 return __result;
14570 }
14571# 946 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14572 template<typename _InputIterator1, typename _InputIterator2,
14573 typename _OutputIterator, typename _BinaryOperation>
14574 _OutputIterator
14575 transform(_InputIterator1 __first1, _InputIterator1 __last1,
14576 _InputIterator2 __first2, _OutputIterator __result,
14577 _BinaryOperation __binary_op)
14578 {
14579
14580
14581
14582
14583
14584
14585 ;
14586
14587 for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
14588 *__result = __binary_op(*__first1, *__first2);
14589 return __result;
14590 }
14591# 978 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14592 template<typename _ForwardIterator, typename _Tp>
14593 void
14594 replace(_ForwardIterator __first, _ForwardIterator __last,
14595 const _Tp& __old_value, const _Tp& __new_value)
14596 {
14597
14598
14599
14600
14601
14602
14603
14604 ;
14605
14606 for ( ; __first != __last; ++__first)
14607 if (*__first == __old_value)
14608 *__first = __new_value;
14609 }
14610# 1009 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14611 template<typename _ForwardIterator, typename _Predicate, typename _Tp>
14612 void
14613 replace_if(_ForwardIterator __first, _ForwardIterator __last,
14614 _Predicate __pred, const _Tp& __new_value)
14615 {
14616
14617
14618
14619
14620
14621
14622
14623 ;
14624
14625 for ( ; __first != __last; ++__first)
14626 if (__pred(*__first))
14627 *__first = __new_value;
14628 }
14629# 1042 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14630 template<typename _InputIterator, typename _OutputIterator, typename _Tp>
14631 _OutputIterator
14632 replace_copy(_InputIterator __first, _InputIterator __last,
14633 _OutputIterator __result,
14634 const _Tp& __old_value, const _Tp& __new_value)
14635 {
14636
14637
14638
14639
14640
14641
14642 ;
14643
14644 for ( ; __first != __last; ++__first, ++__result)
14645 if (*__first == __old_value)
14646 *__result = __new_value;
14647 else
14648 *__result = *__first;
14649 return __result;
14650 }
14651# 1078 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14652 template<typename _InputIterator, typename _OutputIterator,
14653 typename _Predicate, typename _Tp>
14654 _OutputIterator
14655 replace_copy_if(_InputIterator __first, _InputIterator __last,
14656 _OutputIterator __result,
14657 _Predicate __pred, const _Tp& __new_value)
14658 {
14659
14660
14661
14662
14663
14664
14665 ;
14666
14667 for ( ; __first != __last; ++__first, ++__result)
14668 if (__pred(*__first))
14669 *__result = __new_value;
14670 else
14671 *__result = *__first;
14672 return __result;
14673 }
14674# 1112 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14675 template<typename _ForwardIterator, typename _Generator>
14676 void
14677 generate(_ForwardIterator __first, _ForwardIterator __last,
14678 _Generator __gen)
14679 {
14680
14681
14682
14683
14684 ;
14685
14686 for ( ; __first != __last; ++__first)
14687 *__first = __gen();
14688 }
14689# 1138 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14690 template<typename _OutputIterator, typename _Size, typename _Generator>
14691 _OutputIterator
14692 generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
14693 {
14694
14695
14696
14697
14698
14699 for ( ; __n > 0; --__n, ++__first)
14700 *__first = __gen();
14701 return __first;
14702 }
14703# 1165 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14704 template<typename _InputIterator, typename _OutputIterator, typename _Tp>
14705 _OutputIterator
14706 remove_copy(_InputIterator __first, _InputIterator __last,
14707 _OutputIterator __result, const _Tp& __value)
14708 {
14709
14710
14711
14712
14713
14714
14715 ;
14716
14717 for ( ; __first != __last; ++__first)
14718 if (!(*__first == __value))
14719 {
14720 *__result = *__first;
14721 ++__result;
14722 }
14723 return __result;
14724 }
14725# 1201 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14726 template<typename _InputIterator, typename _OutputIterator,
14727 typename _Predicate>
14728 _OutputIterator
14729 remove_copy_if(_InputIterator __first, _InputIterator __last,
14730 _OutputIterator __result, _Predicate __pred)
14731 {
14732
14733
14734
14735
14736
14737
14738 ;
14739
14740 for ( ; __first != __last; ++__first)
14741 if (!__pred(*__first))
14742 {
14743 *__result = *__first;
14744 ++__result;
14745 }
14746 return __result;
14747 }
14748# 1240 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14749 template<typename _ForwardIterator, typename _Tp>
14750 _ForwardIterator
14751 remove(_ForwardIterator __first, _ForwardIterator __last,
14752 const _Tp& __value)
14753 {
14754
14755
14756
14757
14758
14759 ;
14760
14761 __first = std::find(__first, __last, __value);
14762 _ForwardIterator __i = __first;
14763 return __first == __last ? __first
14764 : std::remove_copy(++__i, __last,
14765 __first, __value);
14766 }
14767# 1275 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14768 template<typename _ForwardIterator, typename _Predicate>
14769 _ForwardIterator
14770 remove_if(_ForwardIterator __first, _ForwardIterator __last,
14771 _Predicate __pred)
14772 {
14773
14774
14775
14776
14777
14778 ;
14779
14780 __first = std::find_if(__first, __last, __pred);
14781 _ForwardIterator __i = __first;
14782 return __first == __last ? __first
14783 : std::remove_copy_if(++__i, __last,
14784 __first, __pred);
14785 }
14786# 1301 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14787 template<typename _InputIterator, typename _OutputIterator>
14788 _OutputIterator
14789 __unique_copy(_InputIterator __first, _InputIterator __last,
14790 _OutputIterator __result,
14791 output_iterator_tag)
14792 {
14793
14794 typename iterator_traits<_InputIterator>::value_type __value = *__first;
14795 *__result = __value;
14796 while (++__first != __last)
14797 if (!(__value == *__first))
14798 {
14799 __value = *__first;
14800 *++__result = __value;
14801 }
14802 return ++__result;
14803 }
14804# 1326 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14805 template<typename _InputIterator, typename _ForwardIterator>
14806 _ForwardIterator
14807 __unique_copy(_InputIterator __first, _InputIterator __last,
14808 _ForwardIterator __result,
14809 forward_iterator_tag)
14810 {
14811
14812 *__result = *__first;
14813 while (++__first != __last)
14814 if (!(*__result == *__first))
14815 *++__result = *__first;
14816 return ++__result;
14817 }
14818# 1348 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14819 template<typename _InputIterator, typename _OutputIterator,
14820 typename _BinaryPredicate>
14821 _OutputIterator
14822 __unique_copy(_InputIterator __first, _InputIterator __last,
14823 _OutputIterator __result,
14824 _BinaryPredicate __binary_pred,
14825 output_iterator_tag)
14826 {
14827
14828
14829
14830
14831
14832 typename iterator_traits<_InputIterator>::value_type __value = *__first;
14833 *__result = __value;
14834 while (++__first != __last)
14835 if (!__binary_pred(__value, *__first))
14836 {
14837 __value = *__first;
14838 *++__result = __value;
14839 }
14840 return ++__result;
14841 }
14842# 1380 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14843 template<typename _InputIterator, typename _ForwardIterator,
14844 typename _BinaryPredicate>
14845 _ForwardIterator
14846 __unique_copy(_InputIterator __first, _InputIterator __last,
14847 _ForwardIterator __result,
14848 _BinaryPredicate __binary_pred,
14849 forward_iterator_tag)
14850 {
14851
14852
14853
14854
14855
14856 *__result = *__first;
14857 while (++__first != __last)
14858 if (!__binary_pred(*__result, *__first)) *++__result = *__first;
14859 return ++__result;
14860 }
14861# 1412 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14862 template<typename _InputIterator, typename _OutputIterator>
14863 inline _OutputIterator
14864 unique_copy(_InputIterator __first, _InputIterator __last,
14865 _OutputIterator __result)
14866 {
14867
14868
14869
14870
14871
14872
14873 ;
14874
14875 typedef typename iterator_traits<_OutputIterator>::iterator_category
14876 _IterType;
14877
14878 if (__first == __last) return __result;
14879 return std::__unique_copy(__first, __last, __result, _IterType());
14880 }
14881# 1447 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14882 template<typename _InputIterator, typename _OutputIterator,
14883 typename _BinaryPredicate>
14884 inline _OutputIterator
14885 unique_copy(_InputIterator __first, _InputIterator __last,
14886 _OutputIterator __result,
14887 _BinaryPredicate __binary_pred)
14888 {
14889
14890
14891
14892
14893 ;
14894
14895 typedef typename iterator_traits<_OutputIterator>::iterator_category
14896 _IterType;
14897
14898 if (__first == __last) return __result;
14899 return std::__unique_copy(__first, __last, __result,
14900 __binary_pred, _IterType());
14901 }
14902# 1481 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14903 template<typename _ForwardIterator>
14904 _ForwardIterator
14905 unique(_ForwardIterator __first, _ForwardIterator __last)
14906 {
14907
14908
14909
14910
14911
14912 ;
14913
14914
14915 __first = std::adjacent_find(__first, __last);
14916 if (__first == __last)
14917 return __last;
14918
14919
14920 _ForwardIterator __dest = __first;
14921 ++__first;
14922 while (++__first != __last)
14923 if (!(*__dest == *__first))
14924 *++__dest = *__first;
14925 return ++__dest;
14926 }
14927# 1520 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14928 template<typename _ForwardIterator, typename _BinaryPredicate>
14929 _ForwardIterator
14930 unique(_ForwardIterator __first, _ForwardIterator __last,
14931 _BinaryPredicate __binary_pred)
14932 {
14933
14934
14935
14936
14937
14938
14939 ;
14940
14941
14942 __first = std::adjacent_find(__first, __last, __binary_pred);
14943 if (__first == __last)
14944 return __last;
14945
14946
14947 _ForwardIterator __dest = __first;
14948 ++__first;
14949 while (++__first != __last)
14950 if (!__binary_pred(*__dest, *__first))
14951 *++__dest = *__first;
14952 return ++__dest;
14953 }
14954# 1554 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14955 template<typename _BidirectionalIterator>
14956 void
14957 __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last,
14958 bidirectional_iterator_tag)
14959 {
14960 while (true)
14961 if (__first == __last || __first == --__last)
14962 return;
14963 else
14964 {
14965 std::iter_swap(__first, __last);
14966 ++__first;
14967 }
14968 }
14969# 1576 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14970 template<typename _RandomAccessIterator>
14971 void
14972 __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last,
14973 random_access_iterator_tag)
14974 {
14975 if (__first == __last)
14976 return;
14977 --__last;
14978 while (__first < __last)
14979 {
14980 std::iter_swap(__first, __last);
14981 ++__first;
14982 --__last;
14983 }
14984 }
14985# 1603 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14986 template<typename _BidirectionalIterator>
14987 inline void
14988 reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
14989 {
14990
14991
14992
14993 ;
14994 std::__reverse(__first, __last, std::__iterator_category(__first));
14995 }
14996# 1629 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
14997 template<typename _BidirectionalIterator, typename _OutputIterator>
14998 _OutputIterator
14999 reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last,
15000 _OutputIterator __result)
15001 {
15002
15003
15004
15005
15006
15007 ;
15008
15009 while (__first != __last)
15010 {
15011 --__last;
15012 *__result = *__last;
15013 ++__result;
15014 }
15015 return __result;
15016 }
15017# 1657 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15018 template<typename _EuclideanRingElement>
15019 _EuclideanRingElement
15020 __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
15021 {
15022 while (__n != 0)
15023 {
15024 _EuclideanRingElement __t = __m % __n;
15025 __m = __n;
15026 __n = __t;
15027 }
15028 return __m;
15029 }
15030
15031
15032
15033
15034
15035
15036 template<typename _ForwardIterator>
15037 void
15038 __rotate(_ForwardIterator __first,
15039 _ForwardIterator __middle,
15040 _ForwardIterator __last,
15041 forward_iterator_tag)
15042 {
15043 if (__first == __middle || __last == __middle)
15044 return;
15045
15046 _ForwardIterator __first2 = __middle;
15047 do
15048 {
15049 swap(*__first, *__first2);
15050 ++__first;
15051 ++__first2;
15052 if (__first == __middle)
15053 __middle = __first2;
15054 }
15055 while (__first2 != __last);
15056
15057 __first2 = __middle;
15058
15059 while (__first2 != __last)
15060 {
15061 swap(*__first, *__first2);
15062 ++__first;
15063 ++__first2;
15064 if (__first == __middle)
15065 __middle = __first2;
15066 else if (__first2 == __last)
15067 __first2 = __middle;
15068 }
15069 }
15070
15071
15072
15073
15074
15075
15076 template<typename _BidirectionalIterator>
15077 void
15078 __rotate(_BidirectionalIterator __first,
15079 _BidirectionalIterator __middle,
15080 _BidirectionalIterator __last,
15081 bidirectional_iterator_tag)
15082 {
15083
15084
15085
15086
15087 if (__first == __middle || __last == __middle)
15088 return;
15089
15090 std::__reverse(__first, __middle, bidirectional_iterator_tag());
15091 std::__reverse(__middle, __last, bidirectional_iterator_tag());
15092
15093 while (__first != __middle && __middle != __last)
15094 {
15095 swap(*__first, *--__last);
15096 ++__first;
15097 }
15098
15099 if (__first == __middle)
15100 std::__reverse(__middle, __last, bidirectional_iterator_tag());
15101 else
15102 std::__reverse(__first, __middle, bidirectional_iterator_tag());
15103 }
15104
15105
15106
15107
15108
15109
15110 template<typename _RandomAccessIterator>
15111 void
15112 __rotate(_RandomAccessIterator __first,
15113 _RandomAccessIterator __middle,
15114 _RandomAccessIterator __last,
15115 random_access_iterator_tag)
15116 {
15117
15118
15119
15120
15121 if (__first == __middle || __last == __middle)
15122 return;
15123
15124 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
15125 _Distance;
15126 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15127 _ValueType;
15128
15129 const _Distance __n = __last - __first;
15130 const _Distance __k = __middle - __first;
15131 const _Distance __l = __n - __k;
15132
15133 if (__k == __l)
15134 {
15135 std::swap_ranges(__first, __middle, __middle);
15136 return;
15137 }
15138
15139 const _Distance __d = __gcd(__n, __k);
15140
15141 for (_Distance __i = 0; __i < __d; __i++)
15142 {
15143 _ValueType __tmp = *__first;
15144 _RandomAccessIterator __p = __first;
15145
15146 if (__k < __l)
15147 {
15148 for (_Distance __j = 0; __j < __l / __d; __j++)
15149 {
15150 if (__p > __first + __l)
15151 {
15152 *__p = *(__p - __l);
15153 __p -= __l;
15154 }
15155
15156 *__p = *(__p + __k);
15157 __p += __k;
15158 }
15159 }
15160 else
15161 {
15162 for (_Distance __j = 0; __j < __k / __d - 1; __j ++)
15163 {
15164 if (__p < __last - __k)
15165 {
15166 *__p = *(__p + __k);
15167 __p += __k;
15168 }
15169 *__p = * (__p - __l);
15170 __p -= __l;
15171 }
15172 }
15173
15174 *__p = __tmp;
15175 ++__first;
15176 }
15177 }
15178# 1836 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15179 template<typename _ForwardIterator>
15180 inline void
15181 rotate(_ForwardIterator __first, _ForwardIterator __middle,
15182 _ForwardIterator __last)
15183 {
15184
15185
15186
15187 ;
15188 ;
15189
15190 typedef typename iterator_traits<_ForwardIterator>::iterator_category
15191 _IterType;
15192 std::__rotate(__first, __middle, __last, _IterType());
15193 }
15194# 1869 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15195 template<typename _ForwardIterator, typename _OutputIterator>
15196 _OutputIterator
15197 rotate_copy(_ForwardIterator __first, _ForwardIterator __middle,
15198 _ForwardIterator __last, _OutputIterator __result)
15199 {
15200
15201
15202
15203
15204 ;
15205 ;
15206
15207 return std::copy(__first, __middle,
15208 std::copy(__middle, __last, __result));
15209 }
15210# 1895 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15211 template<typename _RandomAccessIterator>
15212 inline void
15213 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
15214 {
15215
15216
15217
15218 ;
15219
15220 if (__first != __last)
15221 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
15222 std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
15223 }
15224# 1922 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15225 template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
15226 void
15227 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
15228 _RandomNumberGenerator& __rand)
15229 {
15230
15231
15232
15233 ;
15234
15235 if (__first == __last)
15236 return;
15237 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
15238 std::iter_swap(__i, __first + __rand((__i - __first) + 1));
15239 }
15240
15241
15242
15243
15244
15245
15246
15247 template<typename _ForwardIterator, typename _Predicate>
15248 _ForwardIterator
15249 __partition(_ForwardIterator __first, _ForwardIterator __last,
15250 _Predicate __pred,
15251 forward_iterator_tag)
15252 {
15253 if (__first == __last)
15254 return __first;
15255
15256 while (__pred(*__first))
15257 if (++__first == __last)
15258 return __first;
15259
15260 _ForwardIterator __next = __first;
15261
15262 while (++__next != __last)
15263 if (__pred(*__next))
15264 {
15265 swap(*__first, *__next);
15266 ++__first;
15267 }
15268
15269 return __first;
15270 }
15271
15272
15273
15274
15275
15276
15277 template<typename _BidirectionalIterator, typename _Predicate>
15278 _BidirectionalIterator
15279 __partition(_BidirectionalIterator __first, _BidirectionalIterator __last,
15280 _Predicate __pred,
15281 bidirectional_iterator_tag)
15282 {
15283 while (true)
15284 {
15285 while (true)
15286 if (__first == __last)
15287 return __first;
15288 else if (__pred(*__first))
15289 ++__first;
15290 else
15291 break;
15292 --__last;
15293 while (true)
15294 if (__first == __last)
15295 return __first;
15296 else if (!__pred(*__last))
15297 --__last;
15298 else
15299 break;
15300 std::iter_swap(__first, __last);
15301 ++__first;
15302 }
15303 }
15304# 2016 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15305 template<typename _ForwardIterator, typename _Predicate>
15306 inline _ForwardIterator
15307 partition(_ForwardIterator __first, _ForwardIterator __last,
15308 _Predicate __pred)
15309 {
15310
15311
15312
15313
15314
15315 ;
15316
15317 return std::__partition(__first, __last, __pred,
15318 std::__iterator_category(__first));
15319 }
15320
15321
15322
15323
15324
15325
15326
15327 template<typename _ForwardIterator, typename _Predicate, typename _Distance>
15328 _ForwardIterator
15329 __inplace_stable_partition(_ForwardIterator __first,
15330 _ForwardIterator __last,
15331 _Predicate __pred, _Distance __len)
15332 {
15333 if (__len == 1)
15334 return __pred(*__first) ? __last : __first;
15335 _ForwardIterator __middle = __first;
15336 std::advance(__middle, __len / 2);
15337 _ForwardIterator __begin = std::__inplace_stable_partition(__first,
15338 __middle,
15339 __pred,
15340 __len / 2);
15341 _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last,
15342 __pred,
15343 __len
15344 - __len / 2);
15345 std::rotate(__begin, __middle, __end);
15346 std::advance(__begin, std::distance(__middle, __end));
15347 return __begin;
15348 }
15349
15350
15351
15352
15353
15354
15355 template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
15356 typename _Distance>
15357 _ForwardIterator
15358 __stable_partition_adaptive(_ForwardIterator __first,
15359 _ForwardIterator __last,
15360 _Predicate __pred, _Distance __len,
15361 _Pointer __buffer,
15362 _Distance __buffer_size)
15363 {
15364 if (__len <= __buffer_size)
15365 {
15366 _ForwardIterator __result1 = __first;
15367 _Pointer __result2 = __buffer;
15368 for ( ; __first != __last ; ++__first)
15369 if (__pred(*__first))
15370 {
15371 *__result1 = *__first;
15372 ++__result1;
15373 }
15374 else
15375 {
15376 *__result2 = *__first;
15377 ++__result2;
15378 }
15379 std::copy(__buffer, __result2, __result1);
15380 return __result1;
15381 }
15382 else
15383 {
15384 _ForwardIterator __middle = __first;
15385 std::advance(__middle, __len / 2);
15386 _ForwardIterator __begin =
15387 std::__stable_partition_adaptive(__first, __middle, __pred,
15388 __len / 2, __buffer,
15389 __buffer_size);
15390 _ForwardIterator __end =
15391 std::__stable_partition_adaptive(__middle, __last, __pred,
15392 __len - __len / 2,
15393 __buffer, __buffer_size);
15394 std::rotate(__begin, __middle, __end);
15395 std::advance(__begin, std::distance(__middle, __end));
15396 return __begin;
15397 }
15398 }
15399# 2127 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15400 template<typename _ForwardIterator, typename _Predicate>
15401 _ForwardIterator
15402 stable_partition(_ForwardIterator __first, _ForwardIterator __last,
15403 _Predicate __pred)
15404 {
15405
15406
15407
15408
15409
15410 ;
15411
15412 if (__first == __last)
15413 return __first;
15414 else
15415 {
15416 typedef typename iterator_traits<_ForwardIterator>::value_type
15417 _ValueType;
15418 typedef typename iterator_traits<_ForwardIterator>::difference_type
15419 _DistanceType;
15420
15421 _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first,
15422 __last);
15423 if (__buf.size() > 0)
15424 return
15425 std::__stable_partition_adaptive(__first, __last, __pred,
15426 _DistanceType(__buf.requested_size()),
15427 __buf.begin(), __buf.size());
15428 else
15429 return
15430 std::__inplace_stable_partition(__first, __last, __pred,
15431 _DistanceType(__buf.requested_size()));
15432 }
15433 }
15434
15435
15436
15437
15438
15439
15440 template<typename _RandomAccessIterator, typename _Tp>
15441 _RandomAccessIterator
15442 __unguarded_partition(_RandomAccessIterator __first,
15443 _RandomAccessIterator __last, _Tp __pivot)
15444 {
15445 while (true)
15446 {
15447 while (*__first < __pivot)
15448 ++__first;
15449 --__last;
15450 while (__pivot < *__last)
15451 --__last;
15452 if (!(__first < __last))
15453 return __first;
15454 std::iter_swap(__first, __last);
15455 ++__first;
15456 }
15457 }
15458
15459
15460
15461
15462
15463
15464 template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
15465 _RandomAccessIterator
15466 __unguarded_partition(_RandomAccessIterator __first,
15467 _RandomAccessIterator __last,
15468 _Tp __pivot, _Compare __comp)
15469 {
15470 while (true)
15471 {
15472 while (__comp(*__first, __pivot))
15473 ++__first;
15474 --__last;
15475 while (__comp(__pivot, *__last))
15476 --__last;
15477 if (!(__first < __last))
15478 return __first;
15479 std::iter_swap(__first, __last);
15480 ++__first;
15481 }
15482 }
15483
15484
15485
15486
15487
15488
15489
15490 enum { _S_threshold = 16 };
15491
15492
15493
15494
15495
15496
15497 template<typename _RandomAccessIterator, typename _Tp>
15498 void
15499 __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val)
15500 {
15501 _RandomAccessIterator __next = __last;
15502 --__next;
15503 while (__val < *__next)
15504 {
15505 *__last = *__next;
15506 __last = __next;
15507 --__next;
15508 }
15509 *__last = __val;
15510 }
15511
15512
15513
15514
15515
15516
15517 template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
15518 void
15519 __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val,
15520 _Compare __comp)
15521 {
15522 _RandomAccessIterator __next = __last;
15523 --__next;
15524 while (__comp(__val, *__next))
15525 {
15526 *__last = *__next;
15527 __last = __next;
15528 --__next;
15529 }
15530 *__last = __val;
15531 }
15532
15533
15534
15535
15536
15537
15538 template<typename _RandomAccessIterator>
15539 void
15540 __insertion_sort(_RandomAccessIterator __first,
15541 _RandomAccessIterator __last)
15542 {
15543 if (__first == __last)
15544 return;
15545
15546 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
15547 {
15548 typename iterator_traits<_RandomAccessIterator>::value_type
15549 __val = *__i;
15550 if (__val < *__first)
15551 {
15552 std::copy_backward(__first, __i, __i + 1);
15553 *__first = __val;
15554 }
15555 else
15556 std::__unguarded_linear_insert(__i, __val);
15557 }
15558 }
15559
15560
15561
15562
15563
15564
15565 template<typename _RandomAccessIterator, typename _Compare>
15566 void
15567 __insertion_sort(_RandomAccessIterator __first,
15568 _RandomAccessIterator __last, _Compare __comp)
15569 {
15570 if (__first == __last) return;
15571
15572 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
15573 {
15574 typename iterator_traits<_RandomAccessIterator>::value_type
15575 __val = *__i;
15576 if (__comp(__val, *__first))
15577 {
15578 std::copy_backward(__first, __i, __i + 1);
15579 *__first = __val;
15580 }
15581 else
15582 std::__unguarded_linear_insert(__i, __val, __comp);
15583 }
15584 }
15585
15586
15587
15588
15589
15590
15591 template<typename _RandomAccessIterator>
15592 inline void
15593 __unguarded_insertion_sort(_RandomAccessIterator __first,
15594 _RandomAccessIterator __last)
15595 {
15596 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15597 _ValueType;
15598
15599 for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
15600 std::__unguarded_linear_insert(__i, _ValueType(*__i));
15601 }
15602
15603
15604
15605
15606
15607
15608 template<typename _RandomAccessIterator, typename _Compare>
15609 inline void
15610 __unguarded_insertion_sort(_RandomAccessIterator __first,
15611 _RandomAccessIterator __last, _Compare __comp)
15612 {
15613 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15614 _ValueType;
15615
15616 for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
15617 std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp);
15618 }
15619
15620
15621
15622
15623
15624
15625 template<typename _RandomAccessIterator>
15626 void
15627 __final_insertion_sort(_RandomAccessIterator __first,
15628 _RandomAccessIterator __last)
15629 {
15630 if (__last - __first > int(_S_threshold))
15631 {
15632 std::__insertion_sort(__first, __first + int(_S_threshold));
15633 std::__unguarded_insertion_sort(__first + int(_S_threshold), __last);
15634 }
15635 else
15636 std::__insertion_sort(__first, __last);
15637 }
15638
15639
15640
15641
15642
15643
15644 template<typename _RandomAccessIterator, typename _Compare>
15645 void
15646 __final_insertion_sort(_RandomAccessIterator __first,
15647 _RandomAccessIterator __last, _Compare __comp)
15648 {
15649 if (__last - __first > int(_S_threshold))
15650 {
15651 std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
15652 std::__unguarded_insertion_sort(__first + int(_S_threshold), __last,
15653 __comp);
15654 }
15655 else
15656 std::__insertion_sort(__first, __last, __comp);
15657 }
15658
15659
15660
15661
15662
15663
15664 template<typename _Size>
15665 inline _Size
15666 __lg(_Size __n)
15667 {
15668 _Size __k;
15669 for (__k = 0; __n != 1; __n >>= 1)
15670 ++__k;
15671 return __k;
15672 }
15673# 2416 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15674 template<typename _RandomAccessIterator>
15675 void
15676 partial_sort(_RandomAccessIterator __first,
15677 _RandomAccessIterator __middle,
15678 _RandomAccessIterator __last)
15679 {
15680 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15681 _ValueType;
15682
15683
15684
15685
15686
15687 ;
15688 ;
15689
15690 std::make_heap(__first, __middle);
15691 for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
15692 if (*__i < *__first)
15693 std::__pop_heap(__first, __middle, __i, _ValueType(*__i));
15694 std::sort_heap(__first, __middle);
15695 }
15696# 2457 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15697 template<typename _RandomAccessIterator, typename _Compare>
15698 void
15699 partial_sort(_RandomAccessIterator __first,
15700 _RandomAccessIterator __middle,
15701 _RandomAccessIterator __last,
15702 _Compare __comp)
15703 {
15704 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15705 _ValueType;
15706
15707
15708
15709
15710
15711
15712 ;
15713 ;
15714
15715 std::make_heap(__first, __middle, __comp);
15716 for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
15717 if (__comp(*__i, *__first))
15718 std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp);
15719 std::sort_heap(__first, __middle, __comp);
15720 }
15721# 2499 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15722 template<typename _InputIterator, typename _RandomAccessIterator>
15723 _RandomAccessIterator
15724 partial_sort_copy(_InputIterator __first, _InputIterator __last,
15725 _RandomAccessIterator __result_first,
15726 _RandomAccessIterator __result_last)
15727 {
15728 typedef typename iterator_traits<_InputIterator>::value_type
15729 _InputValueType;
15730 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15731 _OutputValueType;
15732 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
15733 _DistanceType;
15734
15735
15736
15737
15738
15739
15740
15741 ;
15742 ;
15743
15744 if (__result_first == __result_last)
15745 return __result_last;
15746 _RandomAccessIterator __result_real_last = __result_first;
15747 while(__first != __last && __result_real_last != __result_last)
15748 {
15749 *__result_real_last = *__first;
15750 ++__result_real_last;
15751 ++__first;
15752 }
15753 std::make_heap(__result_first, __result_real_last);
15754 while (__first != __last)
15755 {
15756 if (*__first < *__result_first)
15757 std::__adjust_heap(__result_first, _DistanceType(0),
15758 _DistanceType(__result_real_last
15759 - __result_first),
15760 _InputValueType(*__first));
15761 ++__first;
15762 }
15763 std::sort_heap(__result_first, __result_real_last);
15764 return __result_real_last;
15765 }
15766# 2563 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15767 template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare>
15768 _RandomAccessIterator
15769 partial_sort_copy(_InputIterator __first, _InputIterator __last,
15770 _RandomAccessIterator __result_first,
15771 _RandomAccessIterator __result_last,
15772 _Compare __comp)
15773 {
15774 typedef typename iterator_traits<_InputIterator>::value_type
15775 _InputValueType;
15776 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15777 _OutputValueType;
15778 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
15779 _DistanceType;
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789 ;
15790 ;
15791
15792 if (__result_first == __result_last)
15793 return __result_last;
15794 _RandomAccessIterator __result_real_last = __result_first;
15795 while(__first != __last && __result_real_last != __result_last)
15796 {
15797 *__result_real_last = *__first;
15798 ++__result_real_last;
15799 ++__first;
15800 }
15801 std::make_heap(__result_first, __result_real_last, __comp);
15802 while (__first != __last)
15803 {
15804 if (__comp(*__first, *__result_first))
15805 std::__adjust_heap(__result_first, _DistanceType(0),
15806 _DistanceType(__result_real_last
15807 - __result_first),
15808 _InputValueType(*__first),
15809 __comp);
15810 ++__first;
15811 }
15812 std::sort_heap(__result_first, __result_real_last, __comp);
15813 return __result_real_last;
15814 }
15815
15816
15817
15818
15819
15820
15821 template<typename _RandomAccessIterator, typename _Size>
15822 void
15823 __introsort_loop(_RandomAccessIterator __first,
15824 _RandomAccessIterator __last,
15825 _Size __depth_limit)
15826 {
15827 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15828 _ValueType;
15829
15830 while (__last - __first > int(_S_threshold))
15831 {
15832 if (__depth_limit == 0)
15833 {
15834 std::partial_sort(__first, __last, __last);
15835 return;
15836 }
15837 --__depth_limit;
15838 _RandomAccessIterator __cut =
15839 std::__unguarded_partition(__first, __last,
15840 _ValueType(std::__median(*__first,
15841 *(__first
15842 + (__last
15843 - __first)
15844 / 2),
15845 *(__last
15846 - 1))));
15847 std::__introsort_loop(__cut, __last, __depth_limit);
15848 __last = __cut;
15849 }
15850 }
15851
15852
15853
15854
15855
15856
15857 template<typename _RandomAccessIterator, typename _Size, typename _Compare>
15858 void
15859 __introsort_loop(_RandomAccessIterator __first,
15860 _RandomAccessIterator __last,
15861 _Size __depth_limit, _Compare __comp)
15862 {
15863 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15864 _ValueType;
15865
15866 while (__last - __first > int(_S_threshold))
15867 {
15868 if (__depth_limit == 0)
15869 {
15870 std::partial_sort(__first, __last, __last, __comp);
15871 return;
15872 }
15873 --__depth_limit;
15874 _RandomAccessIterator __cut =
15875 std::__unguarded_partition(__first, __last,
15876 _ValueType(std::__median(*__first,
15877 *(__first
15878 + (__last
15879 - __first)
15880 / 2),
15881 *(__last - 1),
15882 __comp)),
15883 __comp);
15884 std::__introsort_loop(__cut, __last, __depth_limit, __comp);
15885 __last = __cut;
15886 }
15887 }
15888# 2698 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15889 template<typename _RandomAccessIterator>
15890 inline void
15891 sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
15892 {
15893 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15894 _ValueType;
15895
15896
15897
15898
15899
15900 ;
15901
15902 if (__first != __last)
15903 {
15904 std::__introsort_loop(__first, __last, __lg(__last - __first) * 2);
15905 std::__final_insertion_sort(__first, __last);
15906 }
15907 }
15908# 2732 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15909 template<typename _RandomAccessIterator, typename _Compare>
15910 inline void
15911 sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
15912 _Compare __comp)
15913 {
15914 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15915 _ValueType;
15916
15917
15918
15919
15920
15921
15922 ;
15923
15924 if (__first != __last)
15925 {
15926 std::__introsort_loop(__first, __last, __lg(__last - __first) * 2,
15927 __comp);
15928 std::__final_insertion_sort(__first, __last, __comp);
15929 }
15930 }
15931# 2765 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15932 template<typename _ForwardIterator, typename _Tp>
15933 _ForwardIterator
15934 lower_bound(_ForwardIterator __first, _ForwardIterator __last,
15935 const _Tp& __val)
15936 {
15937 typedef typename iterator_traits<_ForwardIterator>::value_type
15938 _ValueType;
15939 typedef typename iterator_traits<_ForwardIterator>::difference_type
15940 _DistanceType;
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950 ;
15951
15952 _DistanceType __len = std::distance(__first, __last);
15953 _DistanceType __half;
15954 _ForwardIterator __middle;
15955
15956 while (__len > 0)
15957 {
15958 __half = __len >> 1;
15959 __middle = __first;
15960 std::advance(__middle, __half);
15961 if (*__middle < __val)
15962 {
15963 __first = __middle;
15964 ++__first;
15965 __len = __len - __half - 1;
15966 }
15967 else
15968 __len = __half;
15969 }
15970 return __first;
15971 }
15972# 2820 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
15973 template<typename _ForwardIterator, typename _Tp, typename _Compare>
15974 _ForwardIterator
15975 lower_bound(_ForwardIterator __first, _ForwardIterator __last,
15976 const _Tp& __val, _Compare __comp)
15977 {
15978 typedef typename iterator_traits<_ForwardIterator>::value_type
15979 _ValueType;
15980 typedef typename iterator_traits<_ForwardIterator>::difference_type
15981 _DistanceType;
15982
15983
15984
15985
15986
15987 ;
15988
15989 _DistanceType __len = std::distance(__first, __last);
15990 _DistanceType __half;
15991 _ForwardIterator __middle;
15992
15993 while (__len > 0)
15994 {
15995 __half = __len >> 1;
15996 __middle = __first;
15997 std::advance(__middle, __half);
15998 if (__comp(*__middle, __val))
15999 {
16000 __first = __middle;
16001 ++__first;
16002 __len = __len - __half - 1;
16003 }
16004 else
16005 __len = __half;
16006 }
16007 return __first;
16008 }
16009# 2867 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16010 template<typename _ForwardIterator, typename _Tp>
16011 _ForwardIterator
16012 upper_bound(_ForwardIterator __first, _ForwardIterator __last,
16013 const _Tp& __val)
16014 {
16015 typedef typename iterator_traits<_ForwardIterator>::value_type
16016 _ValueType;
16017 typedef typename iterator_traits<_ForwardIterator>::difference_type
16018 _DistanceType;
16019
16020
16021
16022
16023
16024
16025 ;
16026
16027 _DistanceType __len = std::distance(__first, __last);
16028 _DistanceType __half;
16029 _ForwardIterator __middle;
16030
16031 while (__len > 0)
16032 {
16033 __half = __len >> 1;
16034 __middle = __first;
16035 std::advance(__middle, __half);
16036 if (__val < *__middle)
16037 __len = __half;
16038 else
16039 {
16040 __first = __middle;
16041 ++__first;
16042 __len = __len - __half - 1;
16043 }
16044 }
16045 return __first;
16046 }
16047# 2919 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16048 template<typename _ForwardIterator, typename _Tp, typename _Compare>
16049 _ForwardIterator
16050 upper_bound(_ForwardIterator __first, _ForwardIterator __last,
16051 const _Tp& __val, _Compare __comp)
16052 {
16053 typedef typename iterator_traits<_ForwardIterator>::value_type
16054 _ValueType;
16055 typedef typename iterator_traits<_ForwardIterator>::difference_type
16056 _DistanceType;
16057
16058
16059
16060
16061
16062 ;
16063
16064 _DistanceType __len = std::distance(__first, __last);
16065 _DistanceType __half;
16066 _ForwardIterator __middle;
16067
16068 while (__len > 0)
16069 {
16070 __half = __len >> 1;
16071 __middle = __first;
16072 std::advance(__middle, __half);
16073 if (__comp(__val, *__middle))
16074 __len = __half;
16075 else
16076 {
16077 __first = __middle;
16078 ++__first;
16079 __len = __len - __half - 1;
16080 }
16081 }
16082 return __first;
16083 }
16084
16085
16086
16087
16088
16089
16090 template<typename _BidirectionalIterator, typename _Distance>
16091 void
16092 __merge_without_buffer(_BidirectionalIterator __first,
16093 _BidirectionalIterator __middle,
16094 _BidirectionalIterator __last,
16095 _Distance __len1, _Distance __len2)
16096 {
16097 if (__len1 == 0 || __len2 == 0)
16098 return;
16099 if (__len1 + __len2 == 2)
16100 {
16101 if (*__middle < *__first)
16102 std::iter_swap(__first, __middle);
16103 return;
16104 }
16105 _BidirectionalIterator __first_cut = __first;
16106 _BidirectionalIterator __second_cut = __middle;
16107 _Distance __len11 = 0;
16108 _Distance __len22 = 0;
16109 if (__len1 > __len2)
16110 {
16111 __len11 = __len1 / 2;
16112 std::advance(__first_cut, __len11);
16113 __second_cut = std::lower_bound(__middle, __last, *__first_cut);
16114 __len22 = std::distance(__middle, __second_cut);
16115 }
16116 else
16117 {
16118 __len22 = __len2 / 2;
16119 std::advance(__second_cut, __len22);
16120 __first_cut = std::upper_bound(__first, __middle, *__second_cut);
16121 __len11 = std::distance(__first, __first_cut);
16122 }
16123 std::rotate(__first_cut, __middle, __second_cut);
16124 _BidirectionalIterator __new_middle = __first_cut;
16125 std::advance(__new_middle, std::distance(__middle, __second_cut));
16126 std::__merge_without_buffer(__first, __first_cut, __new_middle,
16127 __len11, __len22);
16128 std::__merge_without_buffer(__new_middle, __second_cut, __last,
16129 __len1 - __len11, __len2 - __len22);
16130 }
16131
16132
16133
16134
16135
16136
16137 template<typename _BidirectionalIterator, typename _Distance,
16138 typename _Compare>
16139 void
16140 __merge_without_buffer(_BidirectionalIterator __first,
16141 _BidirectionalIterator __middle,
16142 _BidirectionalIterator __last,
16143 _Distance __len1, _Distance __len2,
16144 _Compare __comp)
16145 {
16146 if (__len1 == 0 || __len2 == 0)
16147 return;
16148 if (__len1 + __len2 == 2)
16149 {
16150 if (__comp(*__middle, *__first))
16151 std::iter_swap(__first, __middle);
16152 return;
16153 }
16154 _BidirectionalIterator __first_cut = __first;
16155 _BidirectionalIterator __second_cut = __middle;
16156 _Distance __len11 = 0;
16157 _Distance __len22 = 0;
16158 if (__len1 > __len2)
16159 {
16160 __len11 = __len1 / 2;
16161 std::advance(__first_cut, __len11);
16162 __second_cut = std::lower_bound(__middle, __last, *__first_cut,
16163 __comp);
16164 __len22 = std::distance(__middle, __second_cut);
16165 }
16166 else
16167 {
16168 __len22 = __len2 / 2;
16169 std::advance(__second_cut, __len22);
16170 __first_cut = std::upper_bound(__first, __middle, *__second_cut,
16171 __comp);
16172 __len11 = std::distance(__first, __first_cut);
16173 }
16174 std::rotate(__first_cut, __middle, __second_cut);
16175 _BidirectionalIterator __new_middle = __first_cut;
16176 std::advance(__new_middle, std::distance(__middle, __second_cut));
16177 std::__merge_without_buffer(__first, __first_cut, __new_middle,
16178 __len11, __len22, __comp);
16179 std::__merge_without_buffer(__new_middle, __second_cut, __last,
16180 __len1 - __len11, __len2 - __len22, __comp);
16181 }
16182
16183
16184
16185
16186
16187
16188 template<typename _RandomAccessIterator>
16189 void
16190 __inplace_stable_sort(_RandomAccessIterator __first,
16191 _RandomAccessIterator __last)
16192 {
16193 if (__last - __first < 15)
16194 {
16195 std::__insertion_sort(__first, __last);
16196 return;
16197 }
16198 _RandomAccessIterator __middle = __first + (__last - __first) / 2;
16199 std::__inplace_stable_sort(__first, __middle);
16200 std::__inplace_stable_sort(__middle, __last);
16201 std::__merge_without_buffer(__first, __middle, __last,
16202 __middle - __first,
16203 __last - __middle);
16204 }
16205
16206
16207
16208
16209
16210
16211 template<typename _RandomAccessIterator, typename _Compare>
16212 void
16213 __inplace_stable_sort(_RandomAccessIterator __first,
16214 _RandomAccessIterator __last, _Compare __comp)
16215 {
16216 if (__last - __first < 15)
16217 {
16218 std::__insertion_sort(__first, __last, __comp);
16219 return;
16220 }
16221 _RandomAccessIterator __middle = __first + (__last - __first) / 2;
16222 std::__inplace_stable_sort(__first, __middle, __comp);
16223 std::__inplace_stable_sort(__middle, __last, __comp);
16224 std::__merge_without_buffer(__first, __middle, __last,
16225 __middle - __first,
16226 __last - __middle,
16227 __comp);
16228 }
16229# 3117 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16230 template<typename _InputIterator1, typename _InputIterator2,
16231 typename _OutputIterator>
16232 _OutputIterator
16233 merge(_InputIterator1 __first1, _InputIterator1 __last1,
16234 _InputIterator2 __first2, _InputIterator2 __last2,
16235 _OutputIterator __result)
16236 {
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247 ;
16248 ;
16249
16250 while (__first1 != __last1 && __first2 != __last2)
16251 {
16252 if (*__first2 < *__first1)
16253 {
16254 *__result = *__first2;
16255 ++__first2;
16256 }
16257 else
16258 {
16259 *__result = *__first1;
16260 ++__first1;
16261 }
16262 ++__result;
16263 }
16264 return std::copy(__first2, __last2, std::copy(__first1, __last1,
16265 __result));
16266 }
16267# 3175 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16268 template<typename _InputIterator1, typename _InputIterator2,
16269 typename _OutputIterator, typename _Compare>
16270 _OutputIterator
16271 merge(_InputIterator1 __first1, _InputIterator1 __last1,
16272 _InputIterator2 __first2, _InputIterator2 __last2,
16273 _OutputIterator __result, _Compare __comp)
16274 {
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286 ;
16287 ;
16288
16289 while (__first1 != __last1 && __first2 != __last2)
16290 {
16291 if (__comp(*__first2, *__first1))
16292 {
16293 *__result = *__first2;
16294 ++__first2;
16295 }
16296 else
16297 {
16298 *__result = *__first1;
16299 ++__first1;
16300 }
16301 ++__result;
16302 }
16303 return std::copy(__first2, __last2, std::copy(__first1, __last1,
16304 __result));
16305 }
16306
16307 template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
16308 typename _Distance>
16309 void
16310 __merge_sort_loop(_RandomAccessIterator1 __first,
16311 _RandomAccessIterator1 __last,
16312 _RandomAccessIterator2 __result,
16313 _Distance __step_size)
16314 {
16315 const _Distance __two_step = 2 * __step_size;
16316
16317 while (__last - __first >= __two_step)
16318 {
16319 __result = std::merge(__first, __first + __step_size,
16320 __first + __step_size, __first + __two_step,
16321 __result);
16322 __first += __two_step;
16323 }
16324
16325 __step_size = std::min(_Distance(__last - __first), __step_size);
16326 std::merge(__first, __first + __step_size, __first + __step_size, __last,
16327 __result);
16328 }
16329
16330 template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
16331 typename _Distance, typename _Compare>
16332 void
16333 __merge_sort_loop(_RandomAccessIterator1 __first,
16334 _RandomAccessIterator1 __last,
16335 _RandomAccessIterator2 __result, _Distance __step_size,
16336 _Compare __comp)
16337 {
16338 const _Distance __two_step = 2 * __step_size;
16339
16340 while (__last - __first >= __two_step)
16341 {
16342 __result = std::merge(__first, __first + __step_size,
16343 __first + __step_size, __first + __two_step,
16344 __result,
16345 __comp);
16346 __first += __two_step;
16347 }
16348 __step_size = std::min(_Distance(__last - __first), __step_size);
16349
16350 std::merge(__first, __first + __step_size,
16351 __first + __step_size, __last,
16352 __result,
16353 __comp);
16354 }
16355
16356 enum { _S_chunk_size = 7 };
16357
16358 template<typename _RandomAccessIterator, typename _Distance>
16359 void
16360 __chunk_insertion_sort(_RandomAccessIterator __first,
16361 _RandomAccessIterator __last,
16362 _Distance __chunk_size)
16363 {
16364 while (__last - __first >= __chunk_size)
16365 {
16366 std::__insertion_sort(__first, __first + __chunk_size);
16367 __first += __chunk_size;
16368 }
16369 std::__insertion_sort(__first, __last);
16370 }
16371
16372 template<typename _RandomAccessIterator, typename _Distance, typename _Compare>
16373 void
16374 __chunk_insertion_sort(_RandomAccessIterator __first,
16375 _RandomAccessIterator __last,
16376 _Distance __chunk_size, _Compare __comp)
16377 {
16378 while (__last - __first >= __chunk_size)
16379 {
16380 std::__insertion_sort(__first, __first + __chunk_size, __comp);
16381 __first += __chunk_size;
16382 }
16383 std::__insertion_sort(__first, __last, __comp);
16384 }
16385
16386 template<typename _RandomAccessIterator, typename _Pointer>
16387 void
16388 __merge_sort_with_buffer(_RandomAccessIterator __first,
16389 _RandomAccessIterator __last,
16390 _Pointer __buffer)
16391 {
16392 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
16393 _Distance;
16394
16395 const _Distance __len = __last - __first;
16396 const _Pointer __buffer_last = __buffer + __len;
16397
16398 _Distance __step_size = _S_chunk_size;
16399 std::__chunk_insertion_sort(__first, __last, __step_size);
16400
16401 while (__step_size < __len)
16402 {
16403 std::__merge_sort_loop(__first, __last, __buffer, __step_size);
16404 __step_size *= 2;
16405 std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
16406 __step_size *= 2;
16407 }
16408 }
16409
16410 template<typename _RandomAccessIterator, typename _Pointer, typename _Compare>
16411 void
16412 __merge_sort_with_buffer(_RandomAccessIterator __first,
16413 _RandomAccessIterator __last,
16414 _Pointer __buffer, _Compare __comp)
16415 {
16416 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
16417 _Distance;
16418
16419 const _Distance __len = __last - __first;
16420 const _Pointer __buffer_last = __buffer + __len;
16421
16422 _Distance __step_size = _S_chunk_size;
16423 std::__chunk_insertion_sort(__first, __last, __step_size, __comp);
16424
16425 while (__step_size < __len)
16426 {
16427 std::__merge_sort_loop(__first, __last, __buffer,
16428 __step_size, __comp);
16429 __step_size *= 2;
16430 std::__merge_sort_loop(__buffer, __buffer_last, __first,
16431 __step_size, __comp);
16432 __step_size *= 2;
16433 }
16434 }
16435
16436
16437
16438
16439
16440
16441 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
16442 typename _BidirectionalIterator3>
16443 _BidirectionalIterator3
16444 __merge_backward(_BidirectionalIterator1 __first1,
16445 _BidirectionalIterator1 __last1,
16446 _BidirectionalIterator2 __first2,
16447 _BidirectionalIterator2 __last2,
16448 _BidirectionalIterator3 __result)
16449 {
16450 if (__first1 == __last1)
16451 return std::copy_backward(__first2, __last2, __result);
16452 if (__first2 == __last2)
16453 return std::copy_backward(__first1, __last1, __result);
16454 --__last1;
16455 --__last2;
16456 while (true)
16457 {
16458 if (*__last2 < *__last1)
16459 {
16460 *--__result = *__last1;
16461 if (__first1 == __last1)
16462 return std::copy_backward(__first2, ++__last2, __result);
16463 --__last1;
16464 }
16465 else
16466 {
16467 *--__result = *__last2;
16468 if (__first2 == __last2)
16469 return std::copy_backward(__first1, ++__last1, __result);
16470 --__last2;
16471 }
16472 }
16473 }
16474
16475
16476
16477
16478
16479
16480 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
16481 typename _BidirectionalIterator3, typename _Compare>
16482 _BidirectionalIterator3
16483 __merge_backward(_BidirectionalIterator1 __first1,
16484 _BidirectionalIterator1 __last1,
16485 _BidirectionalIterator2 __first2,
16486 _BidirectionalIterator2 __last2,
16487 _BidirectionalIterator3 __result,
16488 _Compare __comp)
16489 {
16490 if (__first1 == __last1)
16491 return std::copy_backward(__first2, __last2, __result);
16492 if (__first2 == __last2)
16493 return std::copy_backward(__first1, __last1, __result);
16494 --__last1;
16495 --__last2;
16496 while (true)
16497 {
16498 if (__comp(*__last2, *__last1))
16499 {
16500 *--__result = *__last1;
16501 if (__first1 == __last1)
16502 return std::copy_backward(__first2, ++__last2, __result);
16503 --__last1;
16504 }
16505 else
16506 {
16507 *--__result = *__last2;
16508 if (__first2 == __last2)
16509 return std::copy_backward(__first1, ++__last1, __result);
16510 --__last2;
16511 }
16512 }
16513 }
16514
16515
16516
16517
16518
16519
16520 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
16521 typename _Distance>
16522 _BidirectionalIterator1
16523 __rotate_adaptive(_BidirectionalIterator1 __first,
16524 _BidirectionalIterator1 __middle,
16525 _BidirectionalIterator1 __last,
16526 _Distance __len1, _Distance __len2,
16527 _BidirectionalIterator2 __buffer,
16528 _Distance __buffer_size)
16529 {
16530 _BidirectionalIterator2 __buffer_end;
16531 if (__len1 > __len2 && __len2 <= __buffer_size)
16532 {
16533 __buffer_end = std::copy(__middle, __last, __buffer);
16534 std::copy_backward(__first, __middle, __last);
16535 return std::copy(__buffer, __buffer_end, __first);
16536 }
16537 else if (__len1 <= __buffer_size)
16538 {
16539 __buffer_end = std::copy(__first, __middle, __buffer);
16540 std::copy(__middle, __last, __first);
16541 return std::copy_backward(__buffer, __buffer_end, __last);
16542 }
16543 else
16544 {
16545 std::rotate(__first, __middle, __last);
16546 std::advance(__first, std::distance(__middle, __last));
16547 return __first;
16548 }
16549 }
16550
16551
16552
16553
16554
16555
16556 template<typename _BidirectionalIterator, typename _Distance,
16557 typename _Pointer>
16558 void
16559 __merge_adaptive(_BidirectionalIterator __first,
16560 _BidirectionalIterator __middle,
16561 _BidirectionalIterator __last,
16562 _Distance __len1, _Distance __len2,
16563 _Pointer __buffer, _Distance __buffer_size)
16564 {
16565 if (__len1 <= __len2 && __len1 <= __buffer_size)
16566 {
16567 _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
16568 std::merge(__buffer, __buffer_end, __middle, __last, __first);
16569 }
16570 else if (__len2 <= __buffer_size)
16571 {
16572 _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
16573 std::__merge_backward(__first, __middle, __buffer,
16574 __buffer_end, __last);
16575 }
16576 else
16577 {
16578 _BidirectionalIterator __first_cut = __first;
16579 _BidirectionalIterator __second_cut = __middle;
16580 _Distance __len11 = 0;
16581 _Distance __len22 = 0;
16582 if (__len1 > __len2)
16583 {
16584 __len11 = __len1 / 2;
16585 std::advance(__first_cut, __len11);
16586 __second_cut = std::lower_bound(__middle, __last,
16587 *__first_cut);
16588 __len22 = std::distance(__middle, __second_cut);
16589 }
16590 else
16591 {
16592 __len22 = __len2 / 2;
16593 std::advance(__second_cut, __len22);
16594 __first_cut = std::upper_bound(__first, __middle,
16595 *__second_cut);
16596 __len11 = std::distance(__first, __first_cut);
16597 }
16598 _BidirectionalIterator __new_middle =
16599 std::__rotate_adaptive(__first_cut, __middle, __second_cut,
16600 __len1 - __len11, __len22, __buffer,
16601 __buffer_size);
16602 std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
16603 __len22, __buffer, __buffer_size);
16604 std::__merge_adaptive(__new_middle, __second_cut, __last,
16605 __len1 - __len11,
16606 __len2 - __len22, __buffer, __buffer_size);
16607 }
16608 }
16609
16610
16611
16612
16613
16614
16615 template<typename _BidirectionalIterator, typename _Distance, typename _Pointer,
16616 typename _Compare>
16617 void
16618 __merge_adaptive(_BidirectionalIterator __first,
16619 _BidirectionalIterator __middle,
16620 _BidirectionalIterator __last,
16621 _Distance __len1, _Distance __len2,
16622 _Pointer __buffer, _Distance __buffer_size,
16623 _Compare __comp)
16624 {
16625 if (__len1 <= __len2 && __len1 <= __buffer_size)
16626 {
16627 _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
16628 std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
16629 }
16630 else if (__len2 <= __buffer_size)
16631 {
16632 _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
16633 std::__merge_backward(__first, __middle, __buffer, __buffer_end,
16634 __last, __comp);
16635 }
16636 else
16637 {
16638 _BidirectionalIterator __first_cut = __first;
16639 _BidirectionalIterator __second_cut = __middle;
16640 _Distance __len11 = 0;
16641 _Distance __len22 = 0;
16642 if (__len1 > __len2)
16643 {
16644 __len11 = __len1 / 2;
16645 std::advance(__first_cut, __len11);
16646 __second_cut = std::lower_bound(__middle, __last, *__first_cut,
16647 __comp);
16648 __len22 = std::distance(__middle, __second_cut);
16649 }
16650 else
16651 {
16652 __len22 = __len2 / 2;
16653 std::advance(__second_cut, __len22);
16654 __first_cut = std::upper_bound(__first, __middle, *__second_cut,
16655 __comp);
16656 __len11 = std::distance(__first, __first_cut);
16657 }
16658 _BidirectionalIterator __new_middle =
16659 std::__rotate_adaptive(__first_cut, __middle, __second_cut,
16660 __len1 - __len11, __len22, __buffer,
16661 __buffer_size);
16662 std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
16663 __len22, __buffer, __buffer_size, __comp);
16664 std::__merge_adaptive(__new_middle, __second_cut, __last,
16665 __len1 - __len11,
16666 __len2 - __len22, __buffer,
16667 __buffer_size, __comp);
16668 }
16669 }
16670# 3595 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16671 template<typename _BidirectionalIterator>
16672 void
16673 inplace_merge(_BidirectionalIterator __first,
16674 _BidirectionalIterator __middle,
16675 _BidirectionalIterator __last)
16676 {
16677 typedef typename iterator_traits<_BidirectionalIterator>::value_type
16678 _ValueType;
16679 typedef typename iterator_traits<_BidirectionalIterator>::difference_type
16680 _DistanceType;
16681
16682
16683
16684
16685
16686 ;
16687 ;
16688
16689 if (__first == __middle || __middle == __last)
16690 return;
16691
16692 _DistanceType __len1 = std::distance(__first, __middle);
16693 _DistanceType __len2 = std::distance(__middle, __last);
16694
16695 _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
16696 __last);
16697 if (__buf.begin() == 0)
16698 std::__merge_without_buffer(__first, __middle, __last, __len1, __len2);
16699 else
16700 std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
16701 __buf.begin(), _DistanceType(__buf.size()));
16702 }
16703# 3649 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16704 template<typename _BidirectionalIterator, typename _Compare>
16705 void
16706 inplace_merge(_BidirectionalIterator __first,
16707 _BidirectionalIterator __middle,
16708 _BidirectionalIterator __last,
16709 _Compare __comp)
16710 {
16711 typedef typename iterator_traits<_BidirectionalIterator>::value_type
16712 _ValueType;
16713 typedef typename iterator_traits<_BidirectionalIterator>::difference_type
16714 _DistanceType;
16715
16716
16717
16718
16719
16720
16721 ;
16722 ;
16723
16724 if (__first == __middle || __middle == __last)
16725 return;
16726
16727 const _DistanceType __len1 = std::distance(__first, __middle);
16728 const _DistanceType __len2 = std::distance(__middle, __last);
16729
16730 _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
16731 __last);
16732 if (__buf.begin() == 0)
16733 std::__merge_without_buffer(__first, __middle, __last, __len1,
16734 __len2, __comp);
16735 else
16736 std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
16737 __buf.begin(), _DistanceType(__buf.size()),
16738 __comp);
16739 }
16740
16741 template<typename _RandomAccessIterator, typename _Pointer,
16742 typename _Distance>
16743 void
16744 __stable_sort_adaptive(_RandomAccessIterator __first,
16745 _RandomAccessIterator __last,
16746 _Pointer __buffer, _Distance __buffer_size)
16747 {
16748 const _Distance __len = (__last - __first + 1) / 2;
16749 const _RandomAccessIterator __middle = __first + __len;
16750 if (__len > __buffer_size)
16751 {
16752 std::__stable_sort_adaptive(__first, __middle,
16753 __buffer, __buffer_size);
16754 std::__stable_sort_adaptive(__middle, __last,
16755 __buffer, __buffer_size);
16756 }
16757 else
16758 {
16759 std::__merge_sort_with_buffer(__first, __middle, __buffer);
16760 std::__merge_sort_with_buffer(__middle, __last, __buffer);
16761 }
16762 std::__merge_adaptive(__first, __middle, __last,
16763 _Distance(__middle - __first),
16764 _Distance(__last - __middle),
16765 __buffer, __buffer_size);
16766 }
16767
16768 template<typename _RandomAccessIterator, typename _Pointer,
16769 typename _Distance, typename _Compare>
16770 void
16771 __stable_sort_adaptive(_RandomAccessIterator __first,
16772 _RandomAccessIterator __last,
16773 _Pointer __buffer, _Distance __buffer_size,
16774 _Compare __comp)
16775 {
16776 const _Distance __len = (__last - __first + 1) / 2;
16777 const _RandomAccessIterator __middle = __first + __len;
16778 if (__len > __buffer_size)
16779 {
16780 std::__stable_sort_adaptive(__first, __middle, __buffer,
16781 __buffer_size, __comp);
16782 std::__stable_sort_adaptive(__middle, __last, __buffer,
16783 __buffer_size, __comp);
16784 }
16785 else
16786 {
16787 std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp);
16788 std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp);
16789 }
16790 std::__merge_adaptive(__first, __middle, __last,
16791 _Distance(__middle - __first),
16792 _Distance(__last - __middle),
16793 __buffer, __buffer_size,
16794 __comp);
16795 }
16796# 3758 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16797 template<typename _RandomAccessIterator>
16798 inline void
16799 stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
16800 {
16801 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16802 _ValueType;
16803 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
16804 _DistanceType;
16805
16806
16807
16808
16809
16810 ;
16811
16812 _Temporary_buffer<_RandomAccessIterator, _ValueType>
16813 buf(__first, __last);
16814 if (buf.begin() == 0)
16815 std::__inplace_stable_sort(__first, __last);
16816 else
16817 std::__stable_sort_adaptive(__first, __last, buf.begin(),
16818 _DistanceType(buf.size()));
16819 }
16820# 3799 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16821 template<typename _RandomAccessIterator, typename _Compare>
16822 inline void
16823 stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
16824 _Compare __comp)
16825 {
16826 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16827 _ValueType;
16828 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
16829 _DistanceType;
16830
16831
16832
16833
16834
16835
16836
16837 ;
16838
16839 _Temporary_buffer<_RandomAccessIterator, _ValueType> buf(__first, __last);
16840 if (buf.begin() == 0)
16841 std::__inplace_stable_sort(__first, __last, __comp);
16842 else
16843 std::__stable_sort_adaptive(__first, __last, buf.begin(),
16844 _DistanceType(buf.size()), __comp);
16845 }
16846# 3840 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16847 template<typename _RandomAccessIterator>
16848 void
16849 nth_element(_RandomAccessIterator __first,
16850 _RandomAccessIterator __nth,
16851 _RandomAccessIterator __last)
16852 {
16853 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16854 _ValueType;
16855
16856
16857
16858
16859
16860 ;
16861 ;
16862
16863 while (__last - __first > 3)
16864 {
16865 _RandomAccessIterator __cut =
16866 std::__unguarded_partition(__first, __last,
16867 _ValueType(std::__median(*__first,
16868 *(__first
16869 + (__last
16870 - __first)
16871 / 2),
16872 *(__last
16873 - 1))));
16874 if (__cut <= __nth)
16875 __first = __cut;
16876 else
16877 __last = __cut;
16878 }
16879 std::__insertion_sort(__first, __last);
16880 }
16881# 3891 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16882 template<typename _RandomAccessIterator, typename _Compare>
16883 void
16884 nth_element(_RandomAccessIterator __first,
16885 _RandomAccessIterator __nth,
16886 _RandomAccessIterator __last,
16887 _Compare __comp)
16888 {
16889 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16890 _ValueType;
16891
16892
16893
16894
16895
16896
16897 ;
16898 ;
16899
16900 while (__last - __first > 3)
16901 {
16902 _RandomAccessIterator __cut =
16903 std::__unguarded_partition(__first, __last,
16904 _ValueType(std::__median(*__first,
16905 *(__first
16906 + (__last
16907 - __first)
16908 / 2),
16909 *(__last - 1),
16910 __comp)), __comp);
16911 if (__cut <= __nth)
16912 __first = __cut;
16913 else
16914 __last = __cut;
16915 }
16916 std::__insertion_sort(__first, __last, __comp);
16917 }
16918# 3944 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16919 template<typename _ForwardIterator, typename _Tp>
16920 pair<_ForwardIterator, _ForwardIterator>
16921 equal_range(_ForwardIterator __first, _ForwardIterator __last,
16922 const _Tp& __val)
16923 {
16924 typedef typename iterator_traits<_ForwardIterator>::value_type
16925 _ValueType;
16926 typedef typename iterator_traits<_ForwardIterator>::difference_type
16927 _DistanceType;
16928
16929
16930
16931
16932
16933
16934 ;
16935
16936 _DistanceType __len = std::distance(__first, __last);
16937 _DistanceType __half;
16938 _ForwardIterator __middle, __left, __right;
16939
16940 while (__len > 0)
16941 {
16942 __half = __len >> 1;
16943 __middle = __first;
16944 std::advance(__middle, __half);
16945 if (*__middle < __val)
16946 {
16947 __first = __middle;
16948 ++__first;
16949 __len = __len - __half - 1;
16950 }
16951 else if (__val < *__middle)
16952 __len = __half;
16953 else
16954 {
16955 __left = std::lower_bound(__first, __middle, __val);
16956 std::advance(__first, __len);
16957 __right = std::upper_bound(++__middle, __first, __val);
16958 return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
16959 }
16960 }
16961 return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
16962 }
16963# 4006 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
16964 template<typename _ForwardIterator, typename _Tp, typename _Compare>
16965 pair<_ForwardIterator, _ForwardIterator>
16966 equal_range(_ForwardIterator __first, _ForwardIterator __last,
16967 const _Tp& __val,
16968 _Compare __comp)
16969 {
16970 typedef typename iterator_traits<_ForwardIterator>::value_type
16971 _ValueType;
16972 typedef typename iterator_traits<_ForwardIterator>::difference_type
16973 _DistanceType;
16974
16975
16976
16977
16978
16979
16980
16981 ;
16982
16983 _DistanceType __len = std::distance(__first, __last);
16984 _DistanceType __half;
16985 _ForwardIterator __middle, __left, __right;
16986
16987 while (__len > 0)
16988 {
16989 __half = __len >> 1;
16990 __middle = __first;
16991 std::advance(__middle, __half);
16992 if (__comp(*__middle, __val))
16993 {
16994 __first = __middle;
16995 ++__first;
16996 __len = __len - __half - 1;
16997 }
16998 else if (__comp(__val, *__middle))
16999 __len = __half;
17000 else
17001 {
17002 __left = std::lower_bound(__first, __middle, __val, __comp);
17003 std::advance(__first, __len);
17004 __right = std::upper_bound(++__middle, __first, __val, __comp);
17005 return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
17006 }
17007 }
17008 return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
17009 }
17010# 4064 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17011 template<typename _ForwardIterator, typename _Tp>
17012 bool
17013 binary_search(_ForwardIterator __first, _ForwardIterator __last,
17014 const _Tp& __val)
17015 {
17016
17017
17018
17019
17020
17021
17022 ;
17023
17024 _ForwardIterator __i = std::lower_bound(__first, __last, __val);
17025 return __i != __last && !(__val < *__i);
17026 }
17027# 4096 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17028 template<typename _ForwardIterator, typename _Tp, typename _Compare>
17029 bool
17030 binary_search(_ForwardIterator __first, _ForwardIterator __last,
17031 const _Tp& __val, _Compare __comp)
17032 {
17033
17034
17035
17036
17037
17038
17039 ;
17040
17041 _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp);
17042 return __i != __last && !__comp(__val, *__i);
17043 }
17044# 4134 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17045 template<typename _InputIterator1, typename _InputIterator2>
17046 bool
17047 includes(_InputIterator1 __first1, _InputIterator1 __last1,
17048 _InputIterator2 __first2, _InputIterator2 __last2)
17049 {
17050
17051
17052
17053
17054
17055
17056
17057
17058 ;
17059 ;
17060
17061 while (__first1 != __last1 && __first2 != __last2)
17062 if (*__first2 < *__first1)
17063 return false;
17064 else if(*__first1 < *__first2)
17065 ++__first1;
17066 else
17067 ++__first1, ++__first2;
17068
17069 return __first2 == __last2;
17070 }
17071# 4180 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17072 template<typename _InputIterator1, typename _InputIterator2,
17073 typename _Compare>
17074 bool
17075 includes(_InputIterator1 __first1, _InputIterator1 __last1,
17076 _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
17077 {
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087 ;
17088 ;
17089
17090 while (__first1 != __last1 && __first2 != __last2)
17091 if (__comp(*__first2, *__first1))
17092 return false;
17093 else if(__comp(*__first1, *__first2))
17094 ++__first1;
17095 else
17096 ++__first1, ++__first2;
17097
17098 return __first2 == __last2;
17099 }
17100# 4226 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17101 template<typename _InputIterator1, typename _InputIterator2,
17102 typename _OutputIterator>
17103 _OutputIterator
17104 set_union(_InputIterator1 __first1, _InputIterator1 __last1,
17105 _InputIterator2 __first2, _InputIterator2 __last2,
17106 _OutputIterator __result)
17107 {
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118 ;
17119 ;
17120
17121 while (__first1 != __last1 && __first2 != __last2)
17122 {
17123 if (*__first1 < *__first2)
17124 {
17125 *__result = *__first1;
17126 ++__first1;
17127 }
17128 else if (*__first2 < *__first1)
17129 {
17130 *__result = *__first2;
17131 ++__first2;
17132 }
17133 else
17134 {
17135 *__result = *__first1;
17136 ++__first1;
17137 ++__first2;
17138 }
17139 ++__result;
17140 }
17141 return std::copy(__first2, __last2, std::copy(__first1, __last1,
17142 __result));
17143 }
17144# 4288 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17145 template<typename _InputIterator1, typename _InputIterator2,
17146 typename _OutputIterator, typename _Compare>
17147 _OutputIterator
17148 set_union(_InputIterator1 __first1, _InputIterator1 __last1,
17149 _InputIterator2 __first2, _InputIterator2 __last2,
17150 _OutputIterator __result, _Compare __comp)
17151 {
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163 ;
17164 ;
17165
17166 while (__first1 != __last1 && __first2 != __last2)
17167 {
17168 if (__comp(*__first1, *__first2))
17169 {
17170 *__result = *__first1;
17171 ++__first1;
17172 }
17173 else if (__comp(*__first2, *__first1))
17174 {
17175 *__result = *__first2;
17176 ++__first2;
17177 }
17178 else
17179 {
17180 *__result = *__first1;
17181 ++__first1;
17182 ++__first2;
17183 }
17184 ++__result;
17185 }
17186 return std::copy(__first2, __last2, std::copy(__first1, __last1,
17187 __result));
17188 }
17189# 4349 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17190 template<typename _InputIterator1, typename _InputIterator2,
17191 typename _OutputIterator>
17192 _OutputIterator
17193 set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
17194 _InputIterator2 __first2, _InputIterator2 __last2,
17195 _OutputIterator __result)
17196 {
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207 ;
17208 ;
17209
17210 while (__first1 != __last1 && __first2 != __last2)
17211 if (*__first1 < *__first2)
17212 ++__first1;
17213 else if (*__first2 < *__first1)
17214 ++__first2;
17215 else
17216 {
17217 *__result = *__first1;
17218 ++__first1;
17219 ++__first2;
17220 ++__result;
17221 }
17222 return __result;
17223 }
17224# 4403 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17225 template<typename _InputIterator1, typename _InputIterator2,
17226 typename _OutputIterator, typename _Compare>
17227 _OutputIterator
17228 set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
17229 _InputIterator2 __first2, _InputIterator2 __last2,
17230 _OutputIterator __result, _Compare __comp)
17231 {
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243 ;
17244 ;
17245
17246 while (__first1 != __last1 && __first2 != __last2)
17247 if (__comp(*__first1, *__first2))
17248 ++__first1;
17249 else if (__comp(*__first2, *__first1))
17250 ++__first2;
17251 else
17252 {
17253 *__result = *__first1;
17254 ++__first1;
17255 ++__first2;
17256 ++__result;
17257 }
17258 return __result;
17259 }
17260# 4457 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17261 template<typename _InputIterator1, typename _InputIterator2,
17262 typename _OutputIterator>
17263 _OutputIterator
17264 set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
17265 _InputIterator2 __first2, _InputIterator2 __last2,
17266 _OutputIterator __result)
17267 {
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278 ;
17279 ;
17280
17281 while (__first1 != __last1 && __first2 != __last2)
17282 if (*__first1 < *__first2)
17283 {
17284 *__result = *__first1;
17285 ++__first1;
17286 ++__result;
17287 }
17288 else if (*__first2 < *__first1)
17289 ++__first2;
17290 else
17291 {
17292 ++__first1;
17293 ++__first2;
17294 }
17295 return std::copy(__first1, __last1, __result);
17296 }
17297# 4515 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17298 template<typename _InputIterator1, typename _InputIterator2,
17299 typename _OutputIterator, typename _Compare>
17300 _OutputIterator
17301 set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
17302 _InputIterator2 __first2, _InputIterator2 __last2,
17303 _OutputIterator __result, _Compare __comp)
17304 {
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316 ;
17317 ;
17318
17319 while (__first1 != __last1 && __first2 != __last2)
17320 if (__comp(*__first1, *__first2))
17321 {
17322 *__result = *__first1;
17323 ++__first1;
17324 ++__result;
17325 }
17326 else if (__comp(*__first2, *__first1))
17327 ++__first2;
17328 else
17329 {
17330 ++__first1;
17331 ++__first2;
17332 }
17333 return std::copy(__first1, __last1, __result);
17334 }
17335# 4569 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17336 template<typename _InputIterator1, typename _InputIterator2,
17337 typename _OutputIterator>
17338 _OutputIterator
17339 set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
17340 _InputIterator2 __first2, _InputIterator2 __last2,
17341 _OutputIterator __result)
17342 {
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353 ;
17354 ;
17355
17356 while (__first1 != __last1 && __first2 != __last2)
17357 if (*__first1 < *__first2)
17358 {
17359 *__result = *__first1;
17360 ++__first1;
17361 ++__result;
17362 }
17363 else if (*__first2 < *__first1)
17364 {
17365 *__result = *__first2;
17366 ++__first2;
17367 ++__result;
17368 }
17369 else
17370 {
17371 ++__first1;
17372 ++__first2;
17373 }
17374 return std::copy(__first2, __last2, std::copy(__first1,
17375 __last1, __result));
17376 }
17377# 4630 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17378 template<typename _InputIterator1, typename _InputIterator2,
17379 typename _OutputIterator, typename _Compare>
17380 _OutputIterator
17381 set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
17382 _InputIterator2 __first2, _InputIterator2 __last2,
17383 _OutputIterator __result,
17384 _Compare __comp)
17385 {
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397 ;
17398 ;
17399
17400 while (__first1 != __last1 && __first2 != __last2)
17401 if (__comp(*__first1, *__first2))
17402 {
17403 *__result = *__first1;
17404 ++__first1;
17405 ++__result;
17406 }
17407 else if (__comp(*__first2, *__first1))
17408 {
17409 *__result = *__first2;
17410 ++__first2;
17411 ++__result;
17412 }
17413 else
17414 {
17415 ++__first1;
17416 ++__first2;
17417 }
17418 return std::copy(__first2, __last2, std::copy(__first1,
17419 __last1, __result));
17420 }
17421# 4683 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17422 template<typename _ForwardIterator>
17423 _ForwardIterator
17424 max_element(_ForwardIterator __first, _ForwardIterator __last)
17425 {
17426
17427
17428
17429
17430 ;
17431
17432 if (__first == __last)
17433 return __first;
17434 _ForwardIterator __result = __first;
17435 while (++__first != __last)
17436 if (*__result < *__first)
17437 __result = __first;
17438 return __result;
17439 }
17440# 4710 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17441 template<typename _ForwardIterator, typename _Compare>
17442 _ForwardIterator
17443 max_element(_ForwardIterator __first, _ForwardIterator __last,
17444 _Compare __comp)
17445 {
17446
17447
17448
17449
17450
17451 ;
17452
17453 if (__first == __last) return __first;
17454 _ForwardIterator __result = __first;
17455 while (++__first != __last)
17456 if (__comp(*__result, *__first)) __result = __first;
17457 return __result;
17458 }
17459
17460
17461
17462
17463
17464
17465
17466 template<typename _ForwardIterator>
17467 _ForwardIterator
17468 min_element(_ForwardIterator __first, _ForwardIterator __last)
17469 {
17470
17471
17472
17473
17474 ;
17475
17476 if (__first == __last)
17477 return __first;
17478 _ForwardIterator __result = __first;
17479 while (++__first != __last)
17480 if (*__first < *__result)
17481 __result = __first;
17482 return __result;
17483 }
17484# 4762 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17485 template<typename _ForwardIterator, typename _Compare>
17486 _ForwardIterator
17487 min_element(_ForwardIterator __first, _ForwardIterator __last,
17488 _Compare __comp)
17489 {
17490
17491
17492
17493
17494
17495 ;
17496
17497 if (__first == __last)
17498 return __first;
17499 _ForwardIterator __result = __first;
17500 while (++__first != __last)
17501 if (__comp(*__first, *__result))
17502 __result = __first;
17503 return __result;
17504 }
17505# 4797 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17506 template<typename _BidirectionalIterator>
17507 bool
17508 next_permutation(_BidirectionalIterator __first,
17509 _BidirectionalIterator __last)
17510 {
17511
17512
17513
17514
17515
17516 ;
17517
17518 if (__first == __last)
17519 return false;
17520 _BidirectionalIterator __i = __first;
17521 ++__i;
17522 if (__i == __last)
17523 return false;
17524 __i = __last;
17525 --__i;
17526
17527 for(;;)
17528 {
17529 _BidirectionalIterator __ii = __i;
17530 --__i;
17531 if (*__i < *__ii)
17532 {
17533 _BidirectionalIterator __j = __last;
17534 while (!(*__i < *--__j))
17535 {}
17536 std::iter_swap(__i, __j);
17537 std::reverse(__ii, __last);
17538 return true;
17539 }
17540 if (__i == __first)
17541 {
17542 std::reverse(__first, __last);
17543 return false;
17544 }
17545 }
17546 }
17547# 4853 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17548 template<typename _BidirectionalIterator, typename _Compare>
17549 bool
17550 next_permutation(_BidirectionalIterator __first,
17551 _BidirectionalIterator __last, _Compare __comp)
17552 {
17553
17554
17555
17556
17557
17558
17559 ;
17560
17561 if (__first == __last)
17562 return false;
17563 _BidirectionalIterator __i = __first;
17564 ++__i;
17565 if (__i == __last)
17566 return false;
17567 __i = __last;
17568 --__i;
17569
17570 for(;;)
17571 {
17572 _BidirectionalIterator __ii = __i;
17573 --__i;
17574 if (__comp(*__i, *__ii))
17575 {
17576 _BidirectionalIterator __j = __last;
17577 while (!__comp(*__i, *--__j))
17578 {}
17579 std::iter_swap(__i, __j);
17580 std::reverse(__ii, __last);
17581 return true;
17582 }
17583 if (__i == __first)
17584 {
17585 std::reverse(__first, __last);
17586 return false;
17587 }
17588 }
17589 }
17590# 4908 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17591 template<typename _BidirectionalIterator>
17592 bool
17593 prev_permutation(_BidirectionalIterator __first,
17594 _BidirectionalIterator __last)
17595 {
17596
17597
17598
17599
17600
17601 ;
17602
17603 if (__first == __last)
17604 return false;
17605 _BidirectionalIterator __i = __first;
17606 ++__i;
17607 if (__i == __last)
17608 return false;
17609 __i = __last;
17610 --__i;
17611
17612 for(;;)
17613 {
17614 _BidirectionalIterator __ii = __i;
17615 --__i;
17616 if (*__ii < *__i)
17617 {
17618 _BidirectionalIterator __j = __last;
17619 while (!(*--__j < *__i))
17620 {}
17621 std::iter_swap(__i, __j);
17622 std::reverse(__ii, __last);
17623 return true;
17624 }
17625 if (__i == __first)
17626 {
17627 std::reverse(__first, __last);
17628 return false;
17629 }
17630 }
17631 }
17632# 4964 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17633 template<typename _BidirectionalIterator, typename _Compare>
17634 bool
17635 prev_permutation(_BidirectionalIterator __first,
17636 _BidirectionalIterator __last, _Compare __comp)
17637 {
17638
17639
17640
17641
17642
17643
17644 ;
17645
17646 if (__first == __last)
17647 return false;
17648 _BidirectionalIterator __i = __first;
17649 ++__i;
17650 if (__i == __last)
17651 return false;
17652 __i = __last;
17653 --__i;
17654
17655 for(;;)
17656 {
17657 _BidirectionalIterator __ii = __i;
17658 --__i;
17659 if (__comp(*__ii, *__i))
17660 {
17661 _BidirectionalIterator __j = __last;
17662 while (!__comp(*--__j, *__i))
17663 {}
17664 std::iter_swap(__i, __j);
17665 std::reverse(__ii, __last);
17666 return true;
17667 }
17668 if (__i == __first)
17669 {
17670 std::reverse(__first, __last);
17671 return false;
17672 }
17673 }
17674 }
17675# 5023 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17676 template<typename _InputIterator, typename _ForwardIterator>
17677 _InputIterator
17678 find_first_of(_InputIterator __first1, _InputIterator __last1,
17679 _ForwardIterator __first2, _ForwardIterator __last2)
17680 {
17681
17682
17683
17684
17685
17686
17687 ;
17688 ;
17689
17690 for ( ; __first1 != __last1; ++__first1)
17691 for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
17692 if (*__first1 == *__iter)
17693 return __first1;
17694 return __last1;
17695 }
17696# 5059 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17697 template<typename _InputIterator, typename _ForwardIterator,
17698 typename _BinaryPredicate>
17699 _InputIterator
17700 find_first_of(_InputIterator __first1, _InputIterator __last1,
17701 _ForwardIterator __first2, _ForwardIterator __last2,
17702 _BinaryPredicate __comp)
17703 {
17704
17705
17706
17707
17708
17709
17710 ;
17711 ;
17712
17713 for ( ; __first1 != __last1; ++__first1)
17714 for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
17715 if (__comp(*__first1, *__iter))
17716 return __first1;
17717 return __last1;
17718 }
17719# 5089 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17720 template<typename _ForwardIterator1, typename _ForwardIterator2>
17721 _ForwardIterator1
17722 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17723 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
17724 forward_iterator_tag, forward_iterator_tag)
17725 {
17726 if (__first2 == __last2)
17727 return __last1;
17728 else
17729 {
17730 _ForwardIterator1 __result = __last1;
17731 while (1)
17732 {
17733 _ForwardIterator1 __new_result
17734 = std::search(__first1, __last1, __first2, __last2);
17735 if (__new_result == __last1)
17736 return __result;
17737 else
17738 {
17739 __result = __new_result;
17740 __first1 = __new_result;
17741 ++__first1;
17742 }
17743 }
17744 }
17745 }
17746
17747 template<typename _ForwardIterator1, typename _ForwardIterator2,
17748 typename _BinaryPredicate>
17749 _ForwardIterator1
17750 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17751 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
17752 forward_iterator_tag, forward_iterator_tag,
17753 _BinaryPredicate __comp)
17754 {
17755 if (__first2 == __last2)
17756 return __last1;
17757 else
17758 {
17759 _ForwardIterator1 __result = __last1;
17760 while (1)
17761 {
17762 _ForwardIterator1 __new_result
17763 = std::search(__first1, __last1, __first2, __last2, __comp);
17764 if (__new_result == __last1)
17765 return __result;
17766 else
17767 {
17768 __result = __new_result;
17769 __first1 = __new_result;
17770 ++__first1;
17771 }
17772 }
17773 }
17774 }
17775
17776
17777 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
17778 _BidirectionalIterator1
17779 __find_end(_BidirectionalIterator1 __first1,
17780 _BidirectionalIterator1 __last1,
17781 _BidirectionalIterator2 __first2,
17782 _BidirectionalIterator2 __last2,
17783 bidirectional_iterator_tag, bidirectional_iterator_tag)
17784 {
17785
17786
17787
17788
17789
17790
17791 typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
17792 typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
17793
17794 _RevIterator1 __rlast1(__first1);
17795 _RevIterator2 __rlast2(__first2);
17796 _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
17797 _RevIterator2(__last2), __rlast2);
17798
17799 if (__rresult == __rlast1)
17800 return __last1;
17801 else
17802 {
17803 _BidirectionalIterator1 __result = __rresult.base();
17804 std::advance(__result, -std::distance(__first2, __last2));
17805 return __result;
17806 }
17807 }
17808
17809 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
17810 typename _BinaryPredicate>
17811 _BidirectionalIterator1
17812 __find_end(_BidirectionalIterator1 __first1,
17813 _BidirectionalIterator1 __last1,
17814 _BidirectionalIterator2 __first2,
17815 _BidirectionalIterator2 __last2,
17816 bidirectional_iterator_tag, bidirectional_iterator_tag,
17817 _BinaryPredicate __comp)
17818 {
17819
17820
17821
17822
17823
17824
17825 typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
17826 typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
17827
17828 _RevIterator1 __rlast1(__first1);
17829 _RevIterator2 __rlast2(__first2);
17830 _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
17831 _RevIterator2(__last2), __rlast2,
17832 __comp);
17833
17834 if (__rresult == __rlast1)
17835 return __last1;
17836 else
17837 {
17838 _BidirectionalIterator1 __result = __rresult.base();
17839 std::advance(__result, -std::distance(__first2, __last2));
17840 return __result;
17841 }
17842 }
17843# 5239 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17844 template<typename _ForwardIterator1, typename _ForwardIterator2>
17845 inline _ForwardIterator1
17846 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17847 _ForwardIterator2 __first2, _ForwardIterator2 __last2)
17848 {
17849
17850
17851
17852
17853
17854
17855 ;
17856 ;
17857
17858 return std::__find_end(__first1, __last1, __first2, __last2,
17859 std::__iterator_category(__first1),
17860 std::__iterator_category(__first2));
17861 }
17862# 5284 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3
17863 template<typename _ForwardIterator1, typename _ForwardIterator2,
17864 typename _BinaryPredicate>
17865 inline _ForwardIterator1
17866 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17867 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
17868 _BinaryPredicate __comp)
17869 {
17870
17871
17872
17873
17874
17875
17876 ;
17877 ;
17878
17879 return std::__find_end(__first1, __last1, __first2, __last2,
17880 std::__iterator_category(__first1),
17881 std::__iterator_category(__first2),
17882 __comp);
17883 }
17884
17885}
17886# 70 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 2 3
17887
17888#pragma GCC visibility pop
17889# 57 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
17890# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 1 3
17891# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 3
17892
17893# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 3
17894
17895namespace std
17896{
17897 template<typename _Type>
17898 inline bool
17899 __is_null_pointer(_Type* __ptr)
17900 { return __ptr == 0; }
17901
17902 template<typename _Type>
17903 inline bool
17904 __is_null_pointer(_Type)
17905 { return false; }
17906
17907 template<typename _CharT, typename _Traits, typename _Alloc>
17908 const typename basic_string<_CharT, _Traits, _Alloc>::size_type
17909 basic_string<_CharT, _Traits, _Alloc>::
17910 _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4;
17911
17912 template<typename _CharT, typename _Traits, typename _Alloc>
17913 const _CharT
17914 basic_string<_CharT, _Traits, _Alloc>::
17915 _Rep::_S_terminal = _CharT();
17916
17917 template<typename _CharT, typename _Traits, typename _Alloc>
17918 const typename basic_string<_CharT, _Traits, _Alloc>::size_type
17919 basic_string<_CharT, _Traits, _Alloc>::npos;
17920
17921
17922
17923 template<typename _CharT, typename _Traits, typename _Alloc>
17924 typename basic_string<_CharT, _Traits, _Alloc>::size_type
17925 basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[
17926 (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) /
17927 sizeof(size_type)];
17928
17929
17930
17931
17932
17933 template<typename _CharT, typename _Traits, typename _Alloc>
17934 template<typename _InIterator>
17935 _CharT*
17936 basic_string<_CharT, _Traits, _Alloc>::
17937 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
17938 input_iterator_tag)
17939 {
17940
17941 if (__beg == __end && __a == _Alloc())
17942 return _S_empty_rep()._M_refdata();
17943
17944
17945 _CharT __buf[128];
17946 size_type __len = 0;
17947 while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
17948 {
17949 __buf[__len++] = *__beg;
17950 ++__beg;
17951 }
17952 _Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
17953 _M_copy(__r->_M_refdata(), __buf, __len);
17954 try
17955 {
17956 while (__beg != __end)
17957 {
17958 if (__len == __r->_M_capacity)
17959 {
17960
17961 _Rep* __another = _Rep::_S_create(__len + 1, __len, __a);
17962 _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len);
17963 __r->_M_destroy(__a);
17964 __r = __another;
17965 }
17966 __r->_M_refdata()[__len++] = *__beg;
17967 ++__beg;
17968 }
17969 }
17970 catch(...)
17971 {
17972 __r->_M_destroy(__a);
17973 throw;
17974 }
17975 __r->_M_set_length_and_sharable(__len);
17976 return __r->_M_refdata();
17977 }
17978
17979 template<typename _CharT, typename _Traits, typename _Alloc>
17980 template <typename _InIterator>
17981 _CharT*
17982 basic_string<_CharT, _Traits, _Alloc>::
17983 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
17984 forward_iterator_tag)
17985 {
17986
17987 if (__beg == __end && __a == _Alloc())
17988 return _S_empty_rep()._M_refdata();
17989
17990
17991 if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0))
17992 __throw_logic_error(("basic_string::_S_construct NULL not valid"));
17993
17994 const size_type __dnew = static_cast<size_type>(std::distance(__beg,
17995 __end));
17996
17997 _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
17998 try
17999 { _S_copy_chars(__r->_M_refdata(), __beg, __end); }
18000 catch(...)
18001 {
18002 __r->_M_destroy(__a);
18003 throw;
18004 }
18005 __r->_M_set_length_and_sharable(__dnew);
18006 return __r->_M_refdata();
18007 }
18008
18009 template<typename _CharT, typename _Traits, typename _Alloc>
18010 _CharT*
18011 basic_string<_CharT, _Traits, _Alloc>::
18012 _S_construct(size_type __n, _CharT __c, const _Alloc& __a)
18013 {
18014
18015 if (__n == 0 && __a == _Alloc())
18016 return _S_empty_rep()._M_refdata();
18017
18018
18019 _Rep* __r = _Rep::_S_create(__n, size_type(0), __a);
18020 if (__n)
18021 _M_assign(__r->_M_refdata(), __n, __c);
18022
18023 __r->_M_set_length_and_sharable(__n);
18024 return __r->_M_refdata();
18025 }
18026
18027 template<typename _CharT, typename _Traits, typename _Alloc>
18028 basic_string<_CharT, _Traits, _Alloc>::
18029 basic_string(const basic_string& __str)
18030 : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
18031 __str.get_allocator()),
18032 __str.get_allocator())
18033 { }
18034
18035 template<typename _CharT, typename _Traits, typename _Alloc>
18036 basic_string<_CharT, _Traits, _Alloc>::
18037 basic_string(const _Alloc& __a)
18038 : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a)
18039 { }
18040
18041 template<typename _CharT, typename _Traits, typename _Alloc>
18042 basic_string<_CharT, _Traits, _Alloc>::
18043 basic_string(const basic_string& __str, size_type __pos, size_type __n)
18044 : _M_dataplus(_S_construct(__str._M_data()
18045 + __str._M_check(__pos,
18046 "basic_string::basic_string"),
18047 __str._M_data() + __str._M_limit(__pos, __n)
18048 + __pos, _Alloc()), _Alloc())
18049 { }
18050
18051 template<typename _CharT, typename _Traits, typename _Alloc>
18052 basic_string<_CharT, _Traits, _Alloc>::
18053 basic_string(const basic_string& __str, size_type __pos,
18054 size_type __n, const _Alloc& __a)
18055 : _M_dataplus(_S_construct(__str._M_data()
18056 + __str._M_check(__pos,
18057 "basic_string::basic_string"),
18058 __str._M_data() + __str._M_limit(__pos, __n)
18059 + __pos, __a), __a)
18060 { }
18061
18062
18063 template<typename _CharT, typename _Traits, typename _Alloc>
18064 basic_string<_CharT, _Traits, _Alloc>::
18065 basic_string(const _CharT* __s, size_type __n, const _Alloc& __a)
18066 : _M_dataplus(_S_construct(__s, __s + __n, __a), __a)
18067 { }
18068
18069
18070 template<typename _CharT, typename _Traits, typename _Alloc>
18071 basic_string<_CharT, _Traits, _Alloc>::
18072 basic_string(const _CharT* __s, const _Alloc& __a)
18073 : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) :
18074 __s + npos, __a), __a)
18075 { }
18076
18077 template<typename _CharT, typename _Traits, typename _Alloc>
18078 basic_string<_CharT, _Traits, _Alloc>::
18079 basic_string(size_type __n, _CharT __c, const _Alloc& __a)
18080 : _M_dataplus(_S_construct(__n, __c, __a), __a)
18081 { }
18082
18083
18084 template<typename _CharT, typename _Traits, typename _Alloc>
18085 template<typename _InputIterator>
18086 basic_string<_CharT, _Traits, _Alloc>::
18087 basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a)
18088 : _M_dataplus(_S_construct(__beg, __end, __a), __a)
18089 { }
18090
18091 template<typename _CharT, typename _Traits, typename _Alloc>
18092 basic_string<_CharT, _Traits, _Alloc>&
18093 basic_string<_CharT, _Traits, _Alloc>::
18094 assign(const basic_string& __str)
18095 {
18096 if (_M_rep() != __str._M_rep())
18097 {
18098
18099 const allocator_type __a = this->get_allocator();
18100 _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator());
18101 _M_rep()->_M_dispose(__a);
18102 _M_data(__tmp);
18103 }
18104 return *this;
18105 }
18106
18107 template<typename _CharT, typename _Traits, typename _Alloc>
18108 basic_string<_CharT, _Traits, _Alloc>&
18109 basic_string<_CharT, _Traits, _Alloc>::
18110 assign(const _CharT* __s, size_type __n)
18111 {
18112 ;
18113 _M_check_length(this->size(), __n, "basic_string::assign");
18114 if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
18115 return _M_replace_safe(size_type(0), this->size(), __s, __n);
18116 else
18117 {
18118
18119 const size_type __pos = __s - _M_data();
18120 if (__pos >= __n)
18121 _M_copy(_M_data(), __s, __n);
18122 else if (__pos)
18123 _M_move(_M_data(), __s, __n);
18124 _M_rep()->_M_set_length_and_sharable(__n);
18125 return *this;
18126 }
18127 }
18128
18129 template<typename _CharT, typename _Traits, typename _Alloc>
18130 basic_string<_CharT, _Traits, _Alloc>&
18131 basic_string<_CharT, _Traits, _Alloc>::
18132 append(size_type __n, _CharT __c)
18133 {
18134 if (__n)
18135 {
18136 _M_check_length(size_type(0), __n, "basic_string::append");
18137 const size_type __len = __n + this->size();
18138 if (__len > this->capacity() || _M_rep()->_M_is_shared())
18139 this->reserve(__len);
18140 _M_assign(_M_data() + this->size(), __n, __c);
18141 _M_rep()->_M_set_length_and_sharable(__len);
18142 }
18143 return *this;
18144 }
18145
18146 template<typename _CharT, typename _Traits, typename _Alloc>
18147 basic_string<_CharT, _Traits, _Alloc>&
18148 basic_string<_CharT, _Traits, _Alloc>::
18149 append(const _CharT* __s, size_type __n)
18150 {
18151 ;
18152 if (__n)
18153 {
18154 _M_check_length(size_type(0), __n, "basic_string::append");
18155 const size_type __len = __n + this->size();
18156 if (__len > this->capacity() || _M_rep()->_M_is_shared())
18157 {
18158 if (_M_disjunct(__s))
18159 this->reserve(__len);
18160 else
18161 {
18162 const size_type __off = __s - _M_data();
18163 this->reserve(__len);
18164 __s = _M_data() + __off;
18165 }
18166 }
18167 _M_copy(_M_data() + this->size(), __s, __n);
18168 _M_rep()->_M_set_length_and_sharable(__len);
18169 }
18170 return *this;
18171 }
18172
18173 template<typename _CharT, typename _Traits, typename _Alloc>
18174 basic_string<_CharT, _Traits, _Alloc>&
18175 basic_string<_CharT, _Traits, _Alloc>::
18176 append(const basic_string& __str)
18177 {
18178 const size_type __size = __str.size();
18179 if (__size)
18180 {
18181 const size_type __len = __size + this->size();
18182 if (__len > this->capacity() || _M_rep()->_M_is_shared())
18183 this->reserve(__len);
18184 _M_copy(_M_data() + this->size(), __str._M_data(), __size);
18185 _M_rep()->_M_set_length_and_sharable(__len);
18186 }
18187 return *this;
18188 }
18189
18190 template<typename _CharT, typename _Traits, typename _Alloc>
18191 basic_string<_CharT, _Traits, _Alloc>&
18192 basic_string<_CharT, _Traits, _Alloc>::
18193 append(const basic_string& __str, size_type __pos, size_type __n)
18194 {
18195 __str._M_check(__pos, "basic_string::append");
18196 __n = __str._M_limit(__pos, __n);
18197 if (__n)
18198 {
18199 const size_type __len = __n + this->size();
18200 if (__len > this->capacity() || _M_rep()->_M_is_shared())
18201 this->reserve(__len);
18202 _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n);
18203 _M_rep()->_M_set_length_and_sharable(__len);
18204 }
18205 return *this;
18206 }
18207
18208 template<typename _CharT, typename _Traits, typename _Alloc>
18209 basic_string<_CharT, _Traits, _Alloc>&
18210 basic_string<_CharT, _Traits, _Alloc>::
18211 insert(size_type __pos, const _CharT* __s, size_type __n)
18212 {
18213 ;
18214 _M_check(__pos, "basic_string::insert");
18215 _M_check_length(size_type(0), __n, "basic_string::insert");
18216 if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
18217 return _M_replace_safe(__pos, size_type(0), __s, __n);
18218 else
18219 {
18220
18221 const size_type __off = __s - _M_data();
18222 _M_mutate(__pos, 0, __n);
18223 __s = _M_data() + __off;
18224 _CharT* __p = _M_data() + __pos;
18225 if (__s + __n <= __p)
18226 _M_copy(__p, __s, __n);
18227 else if (__s >= __p)
18228 _M_copy(__p, __s + __n, __n);
18229 else
18230 {
18231 const size_type __nleft = __p - __s;
18232 _M_copy(__p, __s, __nleft);
18233 _M_copy(__p + __nleft, __p + __n, __n - __nleft);
18234 }
18235 return *this;
18236 }
18237 }
18238
18239 template<typename _CharT, typename _Traits, typename _Alloc>
18240 basic_string<_CharT, _Traits, _Alloc>&
18241 basic_string<_CharT, _Traits, _Alloc>::
18242 replace(size_type __pos, size_type __n1, const _CharT* __s,
18243 size_type __n2)
18244 {
18245 ;
18246 _M_check(__pos, "basic_string::replace");
18247 __n1 = _M_limit(__pos, __n1);
18248 _M_check_length(__n1, __n2, "basic_string::replace");
18249 bool __left;
18250 if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
18251 return _M_replace_safe(__pos, __n1, __s, __n2);
18252 else if ((__left = __s + __n2 <= _M_data() + __pos)
18253 || _M_data() + __pos + __n1 <= __s)
18254 {
18255
18256 size_type __off = __s - _M_data();
18257 __left ? __off : (__off += __n2 - __n1);
18258 _M_mutate(__pos, __n1, __n2);
18259 _M_copy(_M_data() + __pos, _M_data() + __off, __n2);
18260 return *this;
18261 }
18262 else
18263 {
18264
18265 const basic_string __tmp(__s, __n2);
18266 return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2);
18267 }
18268 }
18269
18270 template<typename _CharT, typename _Traits, typename _Alloc>
18271 void
18272 basic_string<_CharT, _Traits, _Alloc>::_Rep::
18273 _M_destroy(const _Alloc& __a) throw ()
18274 {
18275 const size_type __size = sizeof(_Rep_base) +
18276 (this->_M_capacity + 1) * sizeof(_CharT);
18277 _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size);
18278 }
18279
18280 template<typename _CharT, typename _Traits, typename _Alloc>
18281 void
18282 basic_string<_CharT, _Traits, _Alloc>::
18283 _M_leak_hard()
18284 {
18285
18286 if (_M_rep() == &_S_empty_rep())
18287 return;
18288
18289 if (_M_rep()->_M_is_shared())
18290 _M_mutate(0, 0, 0);
18291 _M_rep()->_M_set_leaked();
18292 }
18293
18294 template<typename _CharT, typename _Traits, typename _Alloc>
18295 void
18296 basic_string<_CharT, _Traits, _Alloc>::
18297 _M_mutate(size_type __pos, size_type __len1, size_type __len2)
18298 {
18299 const size_type __old_size = this->size();
18300 const size_type __new_size = __old_size + __len2 - __len1;
18301 const size_type __how_much = __old_size - __pos - __len1;
18302
18303 if (__new_size > this->capacity() || _M_rep()->_M_is_shared())
18304 {
18305
18306 const allocator_type __a = get_allocator();
18307 _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a);
18308
18309 if (__pos)
18310 _M_copy(__r->_M_refdata(), _M_data(), __pos);
18311 if (__how_much)
18312 _M_copy(__r->_M_refdata() + __pos + __len2,
18313 _M_data() + __pos + __len1, __how_much);
18314
18315 _M_rep()->_M_dispose(__a);
18316 _M_data(__r->_M_refdata());
18317 }
18318 else if (__how_much && __len1 != __len2)
18319 {
18320
18321 _M_move(_M_data() + __pos + __len2,
18322 _M_data() + __pos + __len1, __how_much);
18323 }
18324 _M_rep()->_M_set_length_and_sharable(__new_size);
18325 }
18326
18327 template<typename _CharT, typename _Traits, typename _Alloc>
18328 void
18329 basic_string<_CharT, _Traits, _Alloc>::
18330 reserve(size_type __res)
18331 {
18332 if (__res != this->capacity() || _M_rep()->_M_is_shared())
18333 {
18334
18335 if (__res < this->size())
18336 __res = this->size();
18337 const allocator_type __a = get_allocator();
18338 _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size());
18339 _M_rep()->_M_dispose(__a);
18340 _M_data(__tmp);
18341 }
18342 }
18343
18344 template<typename _CharT, typename _Traits, typename _Alloc>
18345 void
18346 basic_string<_CharT, _Traits, _Alloc>::
18347 swap(basic_string& __s)
18348 {
18349 if (_M_rep()->_M_is_leaked())
18350 _M_rep()->_M_set_sharable();
18351 if (__s._M_rep()->_M_is_leaked())
18352 __s._M_rep()->_M_set_sharable();
18353 if (this->get_allocator() == __s.get_allocator())
18354 {
18355 _CharT* __tmp = _M_data();
18356 _M_data(__s._M_data());
18357 __s._M_data(__tmp);
18358 }
18359
18360 else
18361 {
18362 const basic_string __tmp1(_M_ibegin(), _M_iend(),
18363 __s.get_allocator());
18364 const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(),
18365 this->get_allocator());
18366 *this = __tmp2;
18367 __s = __tmp1;
18368 }
18369 }
18370
18371 template<typename _CharT, typename _Traits, typename _Alloc>
18372 typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
18373 basic_string<_CharT, _Traits, _Alloc>::_Rep::
18374 _S_create(size_type __capacity, size_type __old_capacity,
18375 const _Alloc& __alloc)
18376 {
18377
18378
18379 if (__capacity > _S_max_size)
18380 __throw_length_error(("basic_string::_S_create"));
18381# 558 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 3
18382 const size_type __pagesize = 4096;
18383 const size_type __malloc_header_size = 4 * sizeof(void*);
18384
18385
18386
18387
18388
18389
18390
18391 if (__capacity > __old_capacity && __capacity < 2 * __old_capacity)
18392 __capacity = 2 * __old_capacity;
18393
18394
18395
18396
18397 size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
18398
18399 const size_type __adj_size = __size + __malloc_header_size;
18400 if (__adj_size > __pagesize && __capacity > __old_capacity)
18401 {
18402 const size_type __extra = __pagesize - __adj_size % __pagesize;
18403 __capacity += __extra / sizeof(_CharT);
18404
18405 if (__capacity > _S_max_size)
18406 __capacity = _S_max_size;
18407 __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
18408 }
18409
18410
18411
18412 void* __place = _Raw_bytes_alloc(__alloc).allocate(__size);
18413 _Rep *__p = new (__place) _Rep;
18414 __p->_M_capacity = __capacity;
18415 return __p;
18416 }
18417
18418 template<typename _CharT, typename _Traits, typename _Alloc>
18419 _CharT*
18420 basic_string<_CharT, _Traits, _Alloc>::_Rep::
18421 _M_clone(const _Alloc& __alloc, size_type __res)
18422 {
18423
18424 const size_type __requested_cap = this->_M_length + __res;
18425 _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity,
18426 __alloc);
18427 if (this->_M_length)
18428 _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length);
18429
18430 __r->_M_set_length_and_sharable(this->_M_length);
18431 return __r->_M_refdata();
18432 }
18433
18434 template<typename _CharT, typename _Traits, typename _Alloc>
18435 void
18436 basic_string<_CharT, _Traits, _Alloc>::
18437 resize(size_type __n, _CharT __c)
18438 {
18439 const size_type __size = this->size();
18440 _M_check_length(__size, __n, "basic_string::resize");
18441 if (__size < __n)
18442 this->append(__n - __size, __c);
18443 else if (__n < __size)
18444 this->erase(__n);
18445
18446 }
18447
18448 template<typename _CharT, typename _Traits, typename _Alloc>
18449 template<typename _InputIterator>
18450 basic_string<_CharT, _Traits, _Alloc>&
18451 basic_string<_CharT, _Traits, _Alloc>::
18452 _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
18453 _InputIterator __k2, __false_type)
18454 {
18455 const basic_string __s(__k1, __k2);
18456 const size_type __n1 = __i2 - __i1;
18457 _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch");
18458 return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
18459 __s.size());
18460 }
18461
18462 template<typename _CharT, typename _Traits, typename _Alloc>
18463 basic_string<_CharT, _Traits, _Alloc>&
18464 basic_string<_CharT, _Traits, _Alloc>::
18465 _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
18466 _CharT __c)
18467 {
18468 _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
18469 _M_mutate(__pos1, __n1, __n2);
18470 if (__n2)
18471 _M_assign(_M_data() + __pos1, __n2, __c);
18472 return *this;
18473 }
18474
18475 template<typename _CharT, typename _Traits, typename _Alloc>
18476 basic_string<_CharT, _Traits, _Alloc>&
18477 basic_string<_CharT, _Traits, _Alloc>::
18478 _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
18479 size_type __n2)
18480 {
18481 _M_mutate(__pos1, __n1, __n2);
18482 if (__n2)
18483 _M_copy(_M_data() + __pos1, __s, __n2);
18484 return *this;
18485 }
18486
18487 template<typename _CharT, typename _Traits, typename _Alloc>
18488 basic_string<_CharT, _Traits, _Alloc>
18489 operator+(const _CharT* __lhs,
18490 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
18491 {
18492 ;
18493 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
18494 typedef typename __string_type::size_type __size_type;
18495 const __size_type __len = _Traits::length(__lhs);
18496 __string_type __str;
18497 __str.reserve(__len + __rhs.size());
18498 __str.append(__lhs, __len);
18499 __str.append(__rhs);
18500 return __str;
18501 }
18502
18503 template<typename _CharT, typename _Traits, typename _Alloc>
18504 basic_string<_CharT, _Traits, _Alloc>
18505 operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
18506 {
18507 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
18508 typedef typename __string_type::size_type __size_type;
18509 __string_type __str;
18510 const __size_type __len = __rhs.size();
18511 __str.reserve(__len + 1);
18512 __str.append(__size_type(1), __lhs);
18513 __str.append(__rhs);
18514 return __str;
18515 }
18516
18517 template<typename _CharT, typename _Traits, typename _Alloc>
18518 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18519 basic_string<_CharT, _Traits, _Alloc>::
18520 copy(_CharT* __s, size_type __n, size_type __pos) const
18521 {
18522 _M_check(__pos, "basic_string::copy");
18523 __n = _M_limit(__pos, __n);
18524 ;
18525 if (__n)
18526 _M_copy(__s, _M_data() + __pos, __n);
18527
18528 return __n;
18529 }
18530
18531 template<typename _CharT, typename _Traits, typename _Alloc>
18532 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18533 basic_string<_CharT, _Traits, _Alloc>::
18534 find(const _CharT* __s, size_type __pos, size_type __n) const
18535 {
18536 ;
18537 size_type __ret = npos;
18538 const size_type __size = this->size();
18539 if (__pos + __n <= __size)
18540 {
18541 const _CharT* __data = _M_data();
18542 const _CharT* __p = std::search(__data + __pos, __data + __size,
18543 __s, __s + __n, traits_type::eq);
18544 if (__p != __data + __size || __n == 0)
18545 __ret = __p - __data;
18546 }
18547 return __ret;
18548 }
18549
18550 template<typename _CharT, typename _Traits, typename _Alloc>
18551 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18552 basic_string<_CharT, _Traits, _Alloc>::
18553 find(_CharT __c, size_type __pos) const
18554 {
18555 size_type __ret = npos;
18556 const size_type __size = this->size();
18557 if (__pos < __size)
18558 {
18559 const _CharT* __data = _M_data();
18560 const size_type __n = __size - __pos;
18561 const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
18562 if (__p)
18563 __ret = __p - __data;
18564 }
18565 return __ret;
18566 }
18567
18568 template<typename _CharT, typename _Traits, typename _Alloc>
18569 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18570 basic_string<_CharT, _Traits, _Alloc>::
18571 rfind(const _CharT* __s, size_type __pos, size_type __n) const
18572 {
18573 ;
18574 const size_type __size = this->size();
18575 if (__n <= __size)
18576 {
18577 __pos = std::min(size_type(__size - __n), __pos);
18578 const _CharT* __data = _M_data();
18579 do
18580 {
18581 if (traits_type::compare(__data + __pos, __s, __n) == 0)
18582 return __pos;
18583 }
18584 while (__pos-- > 0);
18585 }
18586 return npos;
18587 }
18588
18589 template<typename _CharT, typename _Traits, typename _Alloc>
18590 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18591 basic_string<_CharT, _Traits, _Alloc>::
18592 rfind(_CharT __c, size_type __pos) const
18593 {
18594 size_type __size = this->size();
18595 if (__size)
18596 {
18597 if (--__size > __pos)
18598 __size = __pos;
18599 for (++__size; __size-- > 0; )
18600 if (traits_type::eq(_M_data()[__size], __c))
18601 return __size;
18602 }
18603 return npos;
18604 }
18605
18606 template<typename _CharT, typename _Traits, typename _Alloc>
18607 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18608 basic_string<_CharT, _Traits, _Alloc>::
18609 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
18610 {
18611 ;
18612 for (; __n && __pos < this->size(); ++__pos)
18613 {
18614 const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);
18615 if (__p)
18616 return __pos;
18617 }
18618 return npos;
18619 }
18620
18621 template<typename _CharT, typename _Traits, typename _Alloc>
18622 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18623 basic_string<_CharT, _Traits, _Alloc>::
18624 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
18625 {
18626 ;
18627 size_type __size = this->size();
18628 if (__size && __n)
18629 {
18630 if (--__size > __pos)
18631 __size = __pos;
18632 do
18633 {
18634 if (traits_type::find(__s, __n, _M_data()[__size]))
18635 return __size;
18636 }
18637 while (__size-- != 0);
18638 }
18639 return npos;
18640 }
18641
18642 template<typename _CharT, typename _Traits, typename _Alloc>
18643 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18644 basic_string<_CharT, _Traits, _Alloc>::
18645 find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
18646 {
18647 ;
18648 for (; __pos < this->size(); ++__pos)
18649 if (!traits_type::find(__s, __n, _M_data()[__pos]))
18650 return __pos;
18651 return npos;
18652 }
18653
18654 template<typename _CharT, typename _Traits, typename _Alloc>
18655 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18656 basic_string<_CharT, _Traits, _Alloc>::
18657 find_first_not_of(_CharT __c, size_type __pos) const
18658 {
18659 for (; __pos < this->size(); ++__pos)
18660 if (!traits_type::eq(_M_data()[__pos], __c))
18661 return __pos;
18662 return npos;
18663 }
18664
18665 template<typename _CharT, typename _Traits, typename _Alloc>
18666 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18667 basic_string<_CharT, _Traits, _Alloc>::
18668 find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
18669 {
18670 ;
18671 size_type __size = this->size();
18672 if (__size)
18673 {
18674 if (--__size > __pos)
18675 __size = __pos;
18676 do
18677 {
18678 if (!traits_type::find(__s, __n, _M_data()[__size]))
18679 return __size;
18680 }
18681 while (__size--);
18682 }
18683 return npos;
18684 }
18685
18686 template<typename _CharT, typename _Traits, typename _Alloc>
18687 typename basic_string<_CharT, _Traits, _Alloc>::size_type
18688 basic_string<_CharT, _Traits, _Alloc>::
18689 find_last_not_of(_CharT __c, size_type __pos) const
18690 {
18691 size_type __size = this->size();
18692 if (__size)
18693 {
18694 if (--__size > __pos)
18695 __size = __pos;
18696 do
18697 {
18698 if (!traits_type::eq(_M_data()[__size], __c))
18699 return __size;
18700 }
18701 while (__size--);
18702 }
18703 return npos;
18704 }
18705
18706 template<typename _CharT, typename _Traits, typename _Alloc>
18707 int
18708 basic_string<_CharT, _Traits, _Alloc>::
18709 compare(size_type __pos, size_type __n, const basic_string& __str) const
18710 {
18711 _M_check(__pos, "basic_string::compare");
18712 __n = _M_limit(__pos, __n);
18713 const size_type __osize = __str.size();
18714 const size_type __len = std::min(__n, __osize);
18715 int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);
18716 if (!__r)
18717 __r = __n - __osize;
18718 return __r;
18719 }
18720
18721 template<typename _CharT, typename _Traits, typename _Alloc>
18722 int
18723 basic_string<_CharT, _Traits, _Alloc>::
18724 compare(size_type __pos1, size_type __n1, const basic_string& __str,
18725 size_type __pos2, size_type __n2) const
18726 {
18727 _M_check(__pos1, "basic_string::compare");
18728 __str._M_check(__pos2, "basic_string::compare");
18729 __n1 = _M_limit(__pos1, __n1);
18730 __n2 = __str._M_limit(__pos2, __n2);
18731 const size_type __len = std::min(__n1, __n2);
18732 int __r = traits_type::compare(_M_data() + __pos1,
18733 __str.data() + __pos2, __len);
18734 if (!__r)
18735 __r = __n1 - __n2;
18736 return __r;
18737 }
18738
18739 template<typename _CharT, typename _Traits, typename _Alloc>
18740 int
18741 basic_string<_CharT, _Traits, _Alloc>::
18742 compare(const _CharT* __s) const
18743 {
18744 ;
18745 const size_type __size = this->size();
18746 const size_type __osize = traits_type::length(__s);
18747 const size_type __len = std::min(__size, __osize);
18748 int __r = traits_type::compare(_M_data(), __s, __len);
18749 if (!__r)
18750 __r = __size - __osize;
18751 return __r;
18752 }
18753
18754 template<typename _CharT, typename _Traits, typename _Alloc>
18755 int
18756 basic_string <_CharT, _Traits, _Alloc>::
18757 compare(size_type __pos, size_type __n1, const _CharT* __s) const
18758 {
18759 ;
18760 _M_check(__pos, "basic_string::compare");
18761 __n1 = _M_limit(__pos, __n1);
18762 const size_type __osize = traits_type::length(__s);
18763 const size_type __len = std::min(__n1, __osize);
18764 int __r = traits_type::compare(_M_data() + __pos, __s, __len);
18765 if (!__r)
18766 __r = __n1 - __osize;
18767 return __r;
18768 }
18769
18770 template<typename _CharT, typename _Traits, typename _Alloc>
18771 int
18772 basic_string <_CharT, _Traits, _Alloc>::
18773 compare(size_type __pos, size_type __n1, const _CharT* __s,
18774 size_type __n2) const
18775 {
18776 ;
18777 _M_check(__pos, "basic_string::compare");
18778 __n1 = _M_limit(__pos, __n1);
18779 const size_type __len = std::min(__n1, __n2);
18780 int __r = traits_type::compare(_M_data() + __pos, __s, __len);
18781 if (!__r)
18782 __r = __n1 - __n2;
18783 return __r;
18784 }
18785
18786
18787
18788
18789
18790 extern template class basic_string<char>;
18791 extern template
18792 basic_istream<char>&
18793 operator>>(basic_istream<char>&, string&);
18794 extern template
18795 basic_ostream<char>&
18796 operator<<(basic_ostream<char>&, const string&);
18797 extern template
18798 basic_istream<char>&
18799 getline(basic_istream<char>&, string&, char);
18800 extern template
18801 basic_istream<char>&
18802 getline(basic_istream<char>&, string&);
18803
18804
18805 extern template class basic_string<wchar_t>;
18806 extern template
18807 basic_istream<wchar_t>&
18808 operator>>(basic_istream<wchar_t>&, wstring&);
18809 extern template
18810 basic_ostream<wchar_t>&
18811 operator<<(basic_ostream<wchar_t>&, const wstring&);
18812 extern template
18813 basic_istream<wchar_t>&
18814 getline(basic_istream<wchar_t>&, wstring&, wchar_t);
18815 extern template
18816 basic_istream<wchar_t>&
18817 getline(basic_istream<wchar_t>&, wstring&);
18818
18819
18820}
18821# 58 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3
18822
18823
18824#pragma GCC visibility pop
18825# 19 "../ast/../error.h" 2
18826
18827# 1 "../ast/../defs.h" 1
18828# 21 "../ast/../error.h" 2
18829# 67 "../ast/../error.h"
18830namespace jl {
18831
18832
18833
18834
18835class ErrorException
18836{
18837 protected:
18838 int m_locLine;
18839 const char* m_locFile;
18840 const char* m_excName;
18841
18842 std::string m_message;
18843
18844 public:
18845 virtual ~ErrorException();
18846
18847 ErrorException();
18848 ErrorException( const ErrorException& aSrc );
18849 ErrorException( const char* aMsg, const char* aFile, int aLine );
18850
18851 public:
18852
18853 int GetSourceLine() const;
18854
18855 const char* GetSourceFile() const;
18856
18857
18858 const char* GetName() const;
18859
18860 const char* GetMessage() const;
18861};
18862
18863
18864
18865
18866
18867
18868
18869template< class Tag, class Base = ErrorException > class TException : public Base
18870{
18871 public:
18872 TException() : Base()
18873 {
18874 Base::m_excName = Tag::Name();
18875 }
18876 TException( const TException<Tag,Base>& aSrc ) : Base( aSrc )
18877 {}
18878 TException( const char* aMsg, const char* aFl, int aLn ) : Base( aMsg, aFl, aLn )
18879 {
18880 Base::m_excName = Tag::Name();
18881 }
18882};
18883
18884
18885
18886
18887
18888
18889struct _jl_exc_tagAssertException { static const char* Name() { return "AssertException"; } }; typedef TException<_jl_exc_tagAssertException, ErrorException > AssertException;;
18890# 138 "../ast/../error.h"
18891bool DoAssertFault( const char* aExpr, const char* aMsg, const char* aFile,
18892 unsigned int aLine ) throw(AssertException);
18893
18894};
18895# 20 "../ast/adefs.h" 2
18896# 1 "../ast/../autoptr.h" 1
18897# 20 "../ast/../autoptr.h"
18898namespace jl {
18899
18900
18901namespace aspect
18902{
18903
18904 template< typename T > struct ADefaultDestroy
18905 {
18906 static void destroy( T aObj ) { delete aObj; }
18907 };
18908
18909 template< typename T > struct ANullDestroy
18910 {
18911 static void destroy( T aObj ) {}
18912 };
18913};
18914# 53 "../ast/../autoptr.h"
18915template< typename T, class ADest = aspect::ADefaultDestroy<T*> > class AutoPtr
18916{
18917 private:
18918 T* m_object;
18919
18920 public:
18921 inline AutoPtr() { m_object = 0; }
18922 inline ~AutoPtr() { Destroy(); }
18923
18924
18925 explicit inline AutoPtr( T* aObject )
18926 {
18927 m_object = aObject;
18928 }
18929
18930 private:
18931 inline AutoPtr( const AutoPtr& );
18932
18933 public:
18934 T* operator -> () { return m_object; }
18935 const T* operator -> () const { return m_object; }
18936
18937 T& operator * () { return *m_object; }
18938 const T& operator * () const { return *m_object; }
18939
18940 public:
18941
18942 inline T* Get() const { return m_object; }
18943
18944
18945 inline bool PtrNull() const { return m_object == 0; }
18946
18947 inline bool PtrValid() const { return m_object != 0; }
18948
18949
18950 inline void Yield() { m_object = 0; }
18951
18952 inline void Grab( T* aObject ) { Destroy(); m_object = aObject; }
18953
18954
18955 inline void Destroy()
18956 {
18957 if( this == 0 ) return;
18958
18959 if( m_object )
18960 {
18961 ADest::destroy( m_object );
18962 m_object = 0;
18963 }
18964 }
18965};
18966
18967};
18968# 21 "../ast/adefs.h" 2
18969# 19 "../ast/identifier.h" 2
18970
18971
18972# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/vector" 1 3
18973# 63 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/vector" 3
18974
18975# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/vector" 3
18976#pragma GCC visibility push(default)
18977
18978
18979
18980
18981
18982
18983# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 1 3
18984# 68 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
18985namespace std
18986{
18987
18988
18989
18990
18991
18992 template<typename _Tp, typename _Alloc>
18993 struct _Vector_base
18994 {
18995 typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
18996
18997 struct _Vector_impl
18998 : public _Tp_alloc_type
18999 {
19000 _Tp* _M_start;
19001 _Tp* _M_finish;
19002 _Tp* _M_end_of_storage;
19003 _Vector_impl(_Tp_alloc_type const& __a)
19004 : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
19005 { }
19006 };
19007
19008 public:
19009 typedef _Alloc allocator_type;
19010
19011 _Tp_alloc_type&
19012 _M_get_Tp_allocator()
19013 { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
19014
19015 const _Tp_alloc_type&
19016 _M_get_Tp_allocator() const
19017 { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
19018
19019 allocator_type
19020 get_allocator() const
19021 { return _M_get_Tp_allocator(); }
19022
19023 _Vector_base(const allocator_type& __a)
19024 : _M_impl(__a)
19025 { }
19026
19027 _Vector_base(size_t __n, const allocator_type& __a)
19028 : _M_impl(__a)
19029 {
19030 this->_M_impl._M_start = this->_M_allocate(__n);
19031 this->_M_impl._M_finish = this->_M_impl._M_start;
19032 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
19033 }
19034
19035 ~_Vector_base()
19036 { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage
19037 - this->_M_impl._M_start); }
19038
19039 public:
19040 _Vector_impl _M_impl;
19041
19042 _Tp*
19043 _M_allocate(size_t __n)
19044 { return _M_impl.allocate(__n); }
19045
19046 void
19047 _M_deallocate(_Tp* __p, size_t __n)
19048 {
19049 if (__p)
19050 _M_impl.deallocate(__p, __n);
19051 }
19052 };
19053# 157 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19054 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
19055 class vector : protected _Vector_base<_Tp, _Alloc>
19056 {
19057
19058 typedef typename _Alloc::value_type _Alloc_value_type;
19059
19060
19061
19062 typedef _Vector_base<_Tp, _Alloc> _Base;
19063 typedef vector<_Tp, _Alloc> vector_type;
19064 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
19065
19066 public:
19067 typedef _Tp value_type;
19068 typedef typename _Tp_alloc_type::pointer pointer;
19069 typedef typename _Tp_alloc_type::const_pointer const_pointer;
19070 typedef typename _Tp_alloc_type::reference reference;
19071 typedef typename _Tp_alloc_type::const_reference const_reference;
19072 typedef __gnu_cxx::__normal_iterator<pointer, vector_type> iterator;
19073 typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type>
19074 const_iterator;
19075 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
19076 typedef std::reverse_iterator<iterator> reverse_iterator;
19077 typedef size_t size_type;
19078 typedef ptrdiff_t difference_type;
19079 typedef _Alloc allocator_type;
19080
19081 protected:
19082
19083
19084
19085
19086
19087 using _Base::_M_allocate;
19088 using _Base::_M_deallocate;
19089 using _Base::_M_impl;
19090 using _Base::_M_get_Tp_allocator;
19091
19092 public:
19093
19094
19095
19096
19097
19098 explicit
19099 vector(const allocator_type& __a = allocator_type())
19100 : _Base(__a)
19101 { }
19102# 213 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19103 explicit
19104 vector(size_type __n, const value_type& __value = value_type(),
19105 const allocator_type& __a = allocator_type())
19106 : _Base(__n, __a)
19107 {
19108 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
19109 _M_get_Tp_allocator());
19110 this->_M_impl._M_finish = this->_M_impl._M_start + __n;
19111 }
19112# 232 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19113 vector(const vector& __x)
19114 : _Base(__x.size(), __x.get_allocator())
19115 { this->_M_impl._M_finish =
19116 std::__uninitialized_copy_a(__x.begin(), __x.end(),
19117 this->_M_impl._M_start,
19118 _M_get_Tp_allocator());
19119 }
19120# 255 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19121 template<typename _InputIterator>
19122 vector(_InputIterator __first, _InputIterator __last,
19123 const allocator_type& __a = allocator_type())
19124 : _Base(__a)
19125 {
19126
19127 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
19128 _M_initialize_dispatch(__first, __last, _Integral());
19129 }
19130
19131
19132
19133
19134
19135
19136
19137 ~vector()
19138 { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
19139 _M_get_Tp_allocator());
19140 }
19141# 284 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19142 vector&
19143 operator=(const vector& __x);
19144# 297 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19145 void
19146 assign(size_type __n, const value_type& __val)
19147 { _M_fill_assign(__n, __val); }
19148# 313 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19149 template<typename _InputIterator>
19150 void
19151 assign(_InputIterator __first, _InputIterator __last)
19152 {
19153
19154 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
19155 _M_assign_dispatch(__first, __last, _Integral());
19156 }
19157
19158
19159 using _Base::get_allocator;
19160
19161
19162
19163
19164
19165
19166
19167 iterator
19168 begin()
19169 { return iterator (this->_M_impl._M_start); }
19170
19171
19172
19173
19174
19175
19176 const_iterator
19177 begin() const
19178 { return const_iterator (this->_M_impl._M_start); }
19179
19180
19181
19182
19183
19184
19185 iterator
19186 end()
19187 { return iterator (this->_M_impl._M_finish); }
19188
19189
19190
19191
19192
19193
19194 const_iterator
19195 end() const
19196 { return const_iterator (this->_M_impl._M_finish); }
19197
19198
19199
19200
19201
19202
19203 reverse_iterator
19204 rbegin()
19205 { return reverse_iterator(end()); }
19206
19207
19208
19209
19210
19211
19212 const_reverse_iterator
19213 rbegin() const
19214 { return const_reverse_iterator(end()); }
19215
19216
19217
19218
19219
19220
19221 reverse_iterator
19222 rend()
19223 { return reverse_iterator(begin()); }
19224
19225
19226
19227
19228
19229
19230 const_reverse_iterator
19231 rend() const
19232 { return const_reverse_iterator(begin()); }
19233
19234
19235
19236 size_type
19237 size() const
19238 { return size_type(end() - begin()); }
19239
19240
19241 size_type
19242 max_size() const
19243 { return size_type(-1) / sizeof(value_type); }
19244# 420 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19245 void
19246 resize(size_type __new_size, value_type __x = value_type())
19247 {
19248 if (__new_size < size())
19249 erase(begin() + __new_size, end());
19250 else
19251 insert(end(), __new_size - size(), __x);
19252 }
19253
19254
19255
19256
19257
19258 size_type
19259 capacity() const
19260 { return size_type(const_iterator(this->_M_impl._M_end_of_storage)
19261 - begin()); }
19262
19263
19264
19265
19266
19267 bool
19268 empty() const
19269 { return begin() == end(); }
19270# 463 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19271 void
19272 reserve(size_type __n);
19273# 478 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19274 reference
19275 operator[](size_type __n)
19276 { return *(begin() + __n); }
19277# 493 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19278 const_reference
19279 operator[](size_type __n) const
19280 { return *(begin() + __n); }
19281
19282 protected:
19283
19284 void
19285 _M_range_check(size_type __n) const
19286 {
19287 if (__n >= this->size())
19288 __throw_out_of_range(("vector::_M_range_check"));
19289 }
19290
19291 public:
19292# 518 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19293 reference
19294 at(size_type __n)
19295 {
19296 _M_range_check(__n);
19297 return (*this)[__n];
19298 }
19299# 536 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19300 const_reference
19301 at(size_type __n) const
19302 {
19303 _M_range_check(__n);
19304 return (*this)[__n];
19305 }
19306
19307
19308
19309
19310
19311 reference
19312 front()
19313 { return *begin(); }
19314
19315
19316
19317
19318
19319 const_reference
19320 front() const
19321 { return *begin(); }
19322
19323
19324
19325
19326
19327 reference
19328 back()
19329 { return *(end() - 1); }
19330
19331
19332
19333
19334
19335 const_reference
19336 back() const
19337 { return *(end() - 1); }
19338# 582 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19339 pointer
19340 data()
19341 { return pointer(this->_M_impl._M_start); }
19342
19343 const_pointer
19344 data() const
19345 { return const_pointer(this->_M_impl._M_start); }
19346# 601 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19347 void
19348 push_back(const value_type& __x)
19349 {
19350 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
19351 {
19352 this->_M_impl.construct(this->_M_impl._M_finish, __x);
19353 ++this->_M_impl._M_finish;
19354 }
19355 else
19356 _M_insert_aux(end(), __x);
19357 }
19358# 622 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19359 void
19360 pop_back()
19361 {
19362 --this->_M_impl._M_finish;
19363 this->_M_impl.destroy(this->_M_impl._M_finish);
19364 }
19365# 640 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19366 iterator
19367 insert(iterator __position, const value_type& __x);
19368# 656 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19369 void
19370 insert(iterator __position, size_type __n, const value_type& __x)
19371 { _M_fill_insert(__position, __n, __x); }
19372# 674 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19373 template<typename _InputIterator>
19374 void
19375 insert(iterator __position, _InputIterator __first,
19376 _InputIterator __last)
19377 {
19378
19379 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
19380 _M_insert_dispatch(__position, __first, __last, _Integral());
19381 }
19382# 699 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19383 iterator
19384 erase(iterator __position);
19385# 720 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19386 iterator
19387 erase(iterator __first, iterator __last);
19388# 732 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19389 void
19390 swap(vector& __x)
19391 {
19392 std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
19393 std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
19394 std::swap(this->_M_impl._M_end_of_storage,
19395 __x._M_impl._M_end_of_storage);
19396 }
19397
19398
19399
19400
19401
19402
19403
19404 void
19405 clear()
19406 {
19407 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
19408 _M_get_Tp_allocator());
19409 this->_M_impl._M_finish = this->_M_impl._M_start;
19410 }
19411
19412 protected:
19413
19414
19415
19416
19417
19418
19419 template<typename _ForwardIterator>
19420 pointer
19421 _M_allocate_and_copy(size_type __n,
19422 _ForwardIterator __first, _ForwardIterator __last)
19423 {
19424 pointer __result = this->_M_allocate(__n);
19425 try
19426 {
19427 std::__uninitialized_copy_a(__first, __last, __result,
19428 _M_get_Tp_allocator());
19429 return __result;
19430 }
19431 catch(...)
19432 {
19433 _M_deallocate(__result, __n);
19434 throw;
19435 }
19436 }
19437
19438
19439
19440
19441
19442 template<typename _Integer>
19443 void
19444 _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
19445 {
19446 this->_M_impl._M_start = _M_allocate(__n);
19447 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
19448 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
19449 _M_get_Tp_allocator());
19450 this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
19451 }
19452
19453
19454 template<typename _InputIterator>
19455 void
19456 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
19457 __false_type)
19458 {
19459 typedef typename std::iterator_traits<_InputIterator>::
19460 iterator_category _IterCategory;
19461 _M_range_initialize(__first, __last, _IterCategory());
19462 }
19463
19464
19465 template<typename _InputIterator>
19466 void
19467 _M_range_initialize(_InputIterator __first,
19468 _InputIterator __last, std::input_iterator_tag)
19469 {
19470 for (; __first != __last; ++__first)
19471 push_back(*__first);
19472 }
19473
19474
19475 template<typename _ForwardIterator>
19476 void
19477 _M_range_initialize(_ForwardIterator __first,
19478 _ForwardIterator __last, std::forward_iterator_tag)
19479 {
19480 const size_type __n = std::distance(__first, __last);
19481 this->_M_impl._M_start = this->_M_allocate(__n);
19482 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
19483 this->_M_impl._M_finish =
19484 std::__uninitialized_copy_a(__first, __last,
19485 this->_M_impl._M_start,
19486 _M_get_Tp_allocator());
19487 }
19488
19489
19490
19491
19492
19493
19494 template<typename _Integer>
19495 void
19496 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
19497 {
19498 _M_fill_assign(static_cast<size_type>(__n),
19499 static_cast<value_type>(__val));
19500 }
19501
19502
19503 template<typename _InputIterator>
19504 void
19505 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
19506 __false_type)
19507 {
19508 typedef typename std::iterator_traits<_InputIterator>::
19509 iterator_category _IterCategory;
19510 _M_assign_aux(__first, __last, _IterCategory());
19511 }
19512
19513
19514 template<typename _InputIterator>
19515 void
19516 _M_assign_aux(_InputIterator __first, _InputIterator __last,
19517 std::input_iterator_tag);
19518
19519
19520 template<typename _ForwardIterator>
19521 void
19522 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
19523 std::forward_iterator_tag);
19524
19525
19526
19527 void
19528 _M_fill_assign(size_type __n, const value_type& __val);
19529
19530
19531
19532
19533
19534 template<typename _Integer>
19535 void
19536 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
19537 __true_type)
19538 {
19539 _M_fill_insert(__pos, static_cast<size_type>(__n),
19540 static_cast<value_type>(__val));
19541 }
19542
19543
19544 template<typename _InputIterator>
19545 void
19546 _M_insert_dispatch(iterator __pos, _InputIterator __first,
19547 _InputIterator __last, __false_type)
19548 {
19549 typedef typename std::iterator_traits<_InputIterator>::
19550 iterator_category _IterCategory;
19551 _M_range_insert(__pos, __first, __last, _IterCategory());
19552 }
19553
19554
19555 template<typename _InputIterator>
19556 void
19557 _M_range_insert(iterator __pos, _InputIterator __first,
19558 _InputIterator __last, std::input_iterator_tag);
19559
19560
19561 template<typename _ForwardIterator>
19562 void
19563 _M_range_insert(iterator __pos, _ForwardIterator __first,
19564 _ForwardIterator __last, std::forward_iterator_tag);
19565
19566
19567
19568 void
19569 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
19570
19571
19572 void
19573 _M_insert_aux(iterator __position, const value_type& __x);
19574 };
19575# 930 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19576 template<typename _Tp, typename _Alloc>
19577 inline bool
19578 operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
19579 { return (__x.size() == __y.size()
19580 && std::equal(__x.begin(), __x.end(), __y.begin())); }
19581# 947 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_vector.h" 3
19582 template<typename _Tp, typename _Alloc>
19583 inline bool
19584 operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
19585 { return std::lexicographical_compare(__x.begin(), __x.end(),
19586 __y.begin(), __y.end()); }
19587
19588
19589 template<typename _Tp, typename _Alloc>
19590 inline bool
19591 operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
19592 { return !(__x == __y); }
19593
19594
19595 template<typename _Tp, typename _Alloc>
19596 inline bool
19597 operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
19598 { return __y < __x; }
19599
19600
19601 template<typename _Tp, typename _Alloc>
19602 inline bool
19603 operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
19604 { return !(__y < __x); }
19605
19606
19607 template<typename _Tp, typename _Alloc>
19608 inline bool
19609 operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
19610 { return !(__x < __y); }
19611
19612
19613 template<typename _Tp, typename _Alloc>
19614 inline void
19615 swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
19616 { __x.swap(__y); }
19617}
19618# 72 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/vector" 2 3
19619# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_bvector.h" 1 3
19620# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_bvector.h" 3
19621namespace std
19622{
19623 typedef unsigned long _Bit_type;
19624 enum { _S_word_bit = int(8 * sizeof(_Bit_type)) };
19625
19626 struct _Bit_reference
19627 {
19628 _Bit_type * _M_p;
19629 _Bit_type _M_mask;
19630
19631 _Bit_reference(_Bit_type * __x, _Bit_type __y)
19632 : _M_p(__x), _M_mask(__y) { }
19633
19634 _Bit_reference() : _M_p(0), _M_mask(0) { }
19635
19636 operator bool() const
19637 { return !!(*_M_p & _M_mask); }
19638
19639 _Bit_reference&
19640 operator=(bool __x)
19641 {
19642 if (__x)
19643 *_M_p |= _M_mask;
19644 else
19645 *_M_p &= ~_M_mask;
19646 return *this;
19647 }
19648
19649 _Bit_reference&
19650 operator=(const _Bit_reference& __x)
19651 { return *this = bool(__x); }
19652
19653 bool
19654 operator==(const _Bit_reference& __x) const
19655 { return bool(*this) == bool(__x); }
19656
19657 bool
19658 operator<(const _Bit_reference& __x) const
19659 { return !bool(*this) && bool(__x); }
19660
19661 void
19662 flip()
19663 { *_M_p ^= _M_mask; }
19664 };
19665
19666 struct _Bit_iterator_base
19667 : public std::iterator<std::random_access_iterator_tag, bool>
19668 {
19669 _Bit_type * _M_p;
19670 unsigned int _M_offset;
19671
19672 _Bit_iterator_base(_Bit_type * __x, unsigned int __y)
19673 : _M_p(__x), _M_offset(__y) { }
19674
19675 void
19676 _M_bump_up()
19677 {
19678 if (_M_offset++ == int(_S_word_bit) - 1)
19679 {
19680 _M_offset = 0;
19681 ++_M_p;
19682 }
19683 }
19684
19685 void
19686 _M_bump_down()
19687 {
19688 if (_M_offset-- == 0)
19689 {
19690 _M_offset = int(_S_word_bit) - 1;
19691 --_M_p;
19692 }
19693 }
19694
19695 void
19696 _M_incr(ptrdiff_t __i)
19697 {
19698 difference_type __n = __i + _M_offset;
19699 _M_p += __n / int(_S_word_bit);
19700 __n = __n % int(_S_word_bit);
19701 if (__n < 0)
19702 {
19703 _M_offset = static_cast<unsigned int>(__n + int(_S_word_bit));
19704 --_M_p;
19705 }
19706 else
19707 _M_offset = static_cast<unsigned int>(__n);
19708 }
19709
19710 bool
19711 operator==(const _Bit_iterator_base& __i) const
19712 { return _M_p == __i._M_p && _M_offset == __i._M_offset; }
19713
19714 bool
19715 operator<(const _Bit_iterator_base& __i) const
19716 {
19717 return _M_p < __i._M_p
19718 || (_M_p == __i._M_p && _M_offset < __i._M_offset);
19719 }
19720
19721 bool
19722 operator!=(const _Bit_iterator_base& __i) const
19723 { return !(*this == __i); }
19724
19725 bool
19726 operator>(const _Bit_iterator_base& __i) const
19727 { return __i < *this; }
19728
19729 bool
19730 operator<=(const _Bit_iterator_base& __i) const
19731 { return !(__i < *this); }
19732
19733 bool
19734 operator>=(const _Bit_iterator_base& __i) const
19735 { return !(*this < __i); }
19736 };
19737
19738 inline ptrdiff_t
19739 operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
19740 {
19741 return (int(_S_word_bit) * (__x._M_p - __y._M_p)
19742 + __x._M_offset - __y._M_offset);
19743 }
19744
19745 struct _Bit_iterator : public _Bit_iterator_base
19746 {
19747 typedef _Bit_reference reference;
19748 typedef _Bit_reference* pointer;
19749 typedef _Bit_iterator iterator;
19750
19751 _Bit_iterator() : _Bit_iterator_base(0, 0) { }
19752
19753 _Bit_iterator(_Bit_type * __x, unsigned int __y)
19754 : _Bit_iterator_base(__x, __y) { }
19755
19756 reference
19757 operator*() const
19758 { return reference(_M_p, 1UL << _M_offset); }
19759
19760 iterator&
19761 operator++()
19762 {
19763 _M_bump_up();
19764 return *this;
19765 }
19766
19767 iterator
19768 operator++(int)
19769 {
19770 iterator __tmp = *this;
19771 _M_bump_up();
19772 return __tmp;
19773 }
19774
19775 iterator&
19776 operator--()
19777 {
19778 _M_bump_down();
19779 return *this;
19780 }
19781
19782 iterator
19783 operator--(int)
19784 {
19785 iterator __tmp = *this;
19786 _M_bump_down();
19787 return __tmp;
19788 }
19789
19790 iterator&
19791 operator+=(difference_type __i)
19792 {
19793 _M_incr(__i);
19794 return *this;
19795 }
19796
19797 iterator&
19798 operator-=(difference_type __i)
19799 {
19800 *this += -__i;
19801 return *this;
19802 }
19803
19804 iterator
19805 operator+(difference_type __i) const
19806 {
19807 iterator __tmp = *this;
19808 return __tmp += __i;
19809 }
19810
19811 iterator
19812 operator-(difference_type __i) const
19813 {
19814 iterator __tmp = *this;
19815 return __tmp -= __i;
19816 }
19817
19818 reference
19819 operator[](difference_type __i) const
19820 { return *(*this + __i); }
19821 };
19822
19823 inline _Bit_iterator
19824 operator+(ptrdiff_t __n, const _Bit_iterator& __x)
19825 { return __x + __n; }
19826
19827 struct _Bit_const_iterator : public _Bit_iterator_base
19828 {
19829 typedef bool reference;
19830 typedef bool const_reference;
19831 typedef const bool* pointer;
19832 typedef _Bit_const_iterator const_iterator;
19833
19834 _Bit_const_iterator() : _Bit_iterator_base(0, 0) { }
19835
19836 _Bit_const_iterator(_Bit_type * __x, unsigned int __y)
19837 : _Bit_iterator_base(__x, __y) { }
19838
19839 _Bit_const_iterator(const _Bit_iterator& __x)
19840 : _Bit_iterator_base(__x._M_p, __x._M_offset) { }
19841
19842 const_reference
19843 operator*() const
19844 { return _Bit_reference(_M_p, 1UL << _M_offset); }
19845
19846 const_iterator&
19847 operator++()
19848 {
19849 _M_bump_up();
19850 return *this;
19851 }
19852
19853 const_iterator
19854 operator++(int)
19855 {
19856 const_iterator __tmp = *this;
19857 _M_bump_up();
19858 return __tmp;
19859 }
19860
19861 const_iterator&
19862 operator--()
19863 {
19864 _M_bump_down();
19865 return *this;
19866 }
19867
19868 const_iterator
19869 operator--(int)
19870 {
19871 const_iterator __tmp = *this;
19872 _M_bump_down();
19873 return __tmp;
19874 }
19875
19876 const_iterator&
19877 operator+=(difference_type __i)
19878 {
19879 _M_incr(__i);
19880 return *this;
19881 }
19882
19883 const_iterator&
19884 operator-=(difference_type __i)
19885 {
19886 *this += -__i;
19887 return *this;
19888 }
19889
19890 const_iterator
19891 operator+(difference_type __i) const
19892 {
19893 const_iterator __tmp = *this;
19894 return __tmp += __i;
19895 }
19896
19897 const_iterator
19898 operator-(difference_type __i) const
19899 {
19900 const_iterator __tmp = *this;
19901 return __tmp -= __i;
19902 }
19903
19904 const_reference
19905 operator[](difference_type __i) const
19906 { return *(*this + __i); }
19907 };
19908
19909 inline _Bit_const_iterator
19910 operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
19911 { return __x + __n; }
19912
19913 template<class _Alloc>
19914 class _Bvector_base
19915 {
19916 typedef typename _Alloc::template rebind<_Bit_type>::other
19917 _Bit_alloc_type;
19918
19919 struct _Bvector_impl : public _Bit_alloc_type
19920 {
19921 _Bit_iterator _M_start;
19922 _Bit_iterator _M_finish;
19923 _Bit_type* _M_end_of_storage;
19924 _Bvector_impl(const _Bit_alloc_type& __a)
19925 : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
19926 { }
19927 };
19928
19929 public:
19930 typedef _Alloc allocator_type;
19931
19932 allocator_type
19933 get_allocator() const
19934 { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
19935
19936 _Bvector_base(const allocator_type& __a) : _M_impl(__a) { }
19937
19938 ~_Bvector_base()
19939 { this->_M_deallocate(); }
19940
19941 protected:
19942 _Bvector_impl _M_impl;
19943
19944 _Bit_type*
19945 _M_allocate(size_t __n)
19946 { return _M_impl.allocate((__n + int(_S_word_bit) - 1)
19947 / int(_S_word_bit)); }
19948
19949 void
19950 _M_deallocate()
19951 {
19952 if (_M_impl._M_start._M_p)
19953 _M_impl.deallocate(_M_impl._M_start._M_p,
19954 _M_impl._M_end_of_storage - _M_impl._M_start._M_p);
19955 }
19956 };
19957}
19958
19959
19960
19961
19962namespace std
19963{
19964# 425 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_bvector.h" 3
19965template<typename _Alloc>
19966 class vector<bool, _Alloc> : public _Bvector_base<_Alloc>
19967 {
19968 public:
19969 typedef bool value_type;
19970 typedef size_t size_type;
19971 typedef ptrdiff_t difference_type;
19972 typedef _Bit_reference reference;
19973 typedef bool const_reference;
19974 typedef _Bit_reference* pointer;
19975 typedef const bool* const_pointer;
19976
19977 typedef _Bit_iterator iterator;
19978 typedef _Bit_const_iterator const_iterator;
19979
19980 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
19981 typedef std::reverse_iterator<iterator> reverse_iterator;
19982
19983 typedef typename _Bvector_base<_Alloc>::allocator_type allocator_type;
19984
19985 allocator_type get_allocator() const
19986 { return _Bvector_base<_Alloc>::get_allocator(); }
19987
19988 protected:
19989 using _Bvector_base<_Alloc>::_M_allocate;
19990 using _Bvector_base<_Alloc>::_M_deallocate;
19991
19992 protected:
19993 void
19994 _M_initialize(size_type __n)
19995 {
19996 _Bit_type* __q = this->_M_allocate(__n);
19997 this->_M_impl._M_end_of_storage = (__q
19998 + ((__n + int(_S_word_bit) - 1)
19999 / int(_S_word_bit)));
20000 this->_M_impl._M_start = iterator(__q, 0);
20001 this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
20002 }
20003
20004 void
20005 _M_insert_aux(iterator __position, bool __x)
20006 {
20007 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
20008 {
20009 std::copy_backward(__position, this->_M_impl._M_finish,
20010 this->_M_impl._M_finish + 1);
20011 *__position = __x;
20012 ++this->_M_impl._M_finish;
20013 }
20014 else
20015 {
20016 const size_type __len = size() ? 2 * size()
20017 : static_cast<size_type>(_S_word_bit);
20018 _Bit_type * __q = this->_M_allocate(__len);
20019 iterator __i = std::copy(begin(), __position, iterator(__q, 0));
20020 *__i++ = __x;
20021 this->_M_impl._M_finish = std::copy(__position, end(), __i);
20022 this->_M_deallocate();
20023 this->_M_impl._M_end_of_storage = (__q + ((__len
20024 + int(_S_word_bit) - 1)
20025 / int(_S_word_bit)));
20026 this->_M_impl._M_start = iterator(__q, 0);
20027 }
20028 }
20029
20030 template<class _InputIterator>
20031 void
20032 _M_initialize_range(_InputIterator __first, _InputIterator __last,
20033 std::input_iterator_tag)
20034 {
20035 this->_M_impl._M_start = iterator();
20036 this->_M_impl._M_finish = iterator();
20037 this->_M_impl._M_end_of_storage = 0;
20038 for (; __first != __last; ++__first)
20039 push_back(*__first);
20040 }
20041
20042 template<class _ForwardIterator>
20043 void
20044 _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
20045 std::forward_iterator_tag)
20046 {
20047 const size_type __n = std::distance(__first, __last);
20048 _M_initialize(__n);
20049 std::copy(__first, __last, this->_M_impl._M_start);
20050 }
20051
20052 template<class _InputIterator>
20053 void
20054 _M_insert_range(iterator __pos, _InputIterator __first,
20055 _InputIterator __last, std::input_iterator_tag)
20056 {
20057 for (; __first != __last; ++__first)
20058 {
20059 __pos = insert(__pos, *__first);
20060 ++__pos;
20061 }
20062 }
20063
20064 template<class _ForwardIterator>
20065 void
20066 _M_insert_range(iterator __position, _ForwardIterator __first,
20067 _ForwardIterator __last, std::forward_iterator_tag)
20068 {
20069 if (__first != __last)
20070 {
20071 size_type __n = std::distance(__first, __last);
20072 if (capacity() - size() >= __n)
20073 {
20074 std::copy_backward(__position, end(),
20075 this->_M_impl._M_finish
20076 + difference_type(__n));
20077 std::copy(__first, __last, __position);
20078 this->_M_impl._M_finish += difference_type(__n);
20079 }
20080 else
20081 {
20082 const size_type __len = size() + std::max(size(), __n);
20083 _Bit_type * __q = this->_M_allocate(__len);
20084 iterator __i = std::copy(begin(), __position,
20085 iterator(__q, 0));
20086 __i = std::copy(__first, __last, __i);
20087 this->_M_impl._M_finish = std::copy(__position, end(), __i);
20088 this->_M_deallocate();
20089 this->_M_impl._M_end_of_storage = (__q
20090 + ((__len
20091 + int(_S_word_bit) - 1)
20092 / int(_S_word_bit)));
20093 this->_M_impl._M_start = iterator(__q, 0);
20094 }
20095 }
20096 }
20097
20098 public:
20099 iterator
20100 begin()
20101 { return this->_M_impl._M_start; }
20102
20103 const_iterator
20104 begin() const
20105 { return this->_M_impl._M_start; }
20106
20107 iterator
20108 end()
20109 { return this->_M_impl._M_finish; }
20110
20111 const_iterator
20112 end() const
20113 { return this->_M_impl._M_finish; }
20114
20115 reverse_iterator
20116 rbegin()
20117 { return reverse_iterator(end()); }
20118
20119 const_reverse_iterator
20120 rbegin() const
20121 { return const_reverse_iterator(end()); }
20122
20123 reverse_iterator
20124 rend()
20125 { return reverse_iterator(begin()); }
20126
20127 const_reverse_iterator
20128 rend() const
20129 { return const_reverse_iterator(begin()); }
20130
20131 size_type
20132 size() const
20133 { return size_type(end() - begin()); }
20134
20135 size_type
20136 max_size() const
20137 { return size_type(-1); }
20138
20139 size_type
20140 capacity() const
20141 { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
20142 - begin()); }
20143 bool
20144 empty() const
20145 { return begin() == end(); }
20146
20147 reference
20148 operator[](size_type __n)
20149 { return *(begin() + difference_type(__n)); }
20150
20151 const_reference
20152 operator[](size_type __n) const
20153 { return *(begin() + difference_type(__n)); }
20154
20155 void
20156 _M_range_check(size_type __n) const
20157 {
20158 if (__n >= this->size())
20159 __throw_out_of_range(("vector<bool>::_M_range_check"));
20160 }
20161
20162 reference
20163 at(size_type __n)
20164 { _M_range_check(__n); return (*this)[__n]; }
20165
20166 const_reference
20167 at(size_type __n) const
20168 { _M_range_check(__n); return (*this)[__n]; }
20169
20170 explicit
20171 vector(const allocator_type& __a = allocator_type())
20172 : _Bvector_base<_Alloc>(__a) { }
20173
20174 vector(size_type __n, bool __value,
20175 const allocator_type& __a = allocator_type())
20176 : _Bvector_base<_Alloc>(__a)
20177 {
20178 _M_initialize(__n);
20179 std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage,
20180 __value ? ~0 : 0);
20181 }
20182
20183 explicit
20184 vector(size_type __n)
20185 : _Bvector_base<_Alloc>(allocator_type())
20186 {
20187 _M_initialize(__n);
20188 std::fill(this->_M_impl._M_start._M_p,
20189 this->_M_impl._M_end_of_storage, 0);
20190 }
20191
20192 vector(const vector& __x)
20193 : _Bvector_base<_Alloc>(__x.get_allocator())
20194 {
20195 _M_initialize(__x.size());
20196 std::copy(__x.begin(), __x.end(), this->_M_impl._M_start);
20197 }
20198
20199
20200 template<class _Integer>
20201 void
20202 _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
20203 {
20204 _M_initialize(__n);
20205 std::fill(this->_M_impl._M_start._M_p,
20206 this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
20207 }
20208
20209 template<class _InputIterator>
20210 void
20211 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
20212 __false_type)
20213 { _M_initialize_range(__first, __last,
20214 std::__iterator_category(__first)); }
20215
20216 template<class _InputIterator>
20217 vector(_InputIterator __first, _InputIterator __last,
20218 const allocator_type& __a = allocator_type())
20219 : _Bvector_base<_Alloc>(__a)
20220 {
20221 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
20222 _M_initialize_dispatch(__first, __last, _Integral());
20223 }
20224
20225 ~vector() { }
20226
20227 vector&
20228 operator=(const vector& __x)
20229 {
20230 if (&__x == this)
20231 return *this;
20232 if (__x.size() > capacity())
20233 {
20234 this->_M_deallocate();
20235 _M_initialize(__x.size());
20236 }
20237 std::copy(__x.begin(), __x.end(), begin());
20238 this->_M_impl._M_finish = begin() + difference_type(__x.size());
20239 return *this;
20240 }
20241
20242
20243
20244
20245
20246
20247 void
20248 _M_fill_assign(size_t __n, bool __x)
20249 {
20250 if (__n > size())
20251 {
20252 std::fill(this->_M_impl._M_start._M_p,
20253 this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
20254 insert(end(), __n - size(), __x);
20255 }
20256 else
20257 {
20258 erase(begin() + __n, end());
20259 std::fill(this->_M_impl._M_start._M_p,
20260 this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
20261 }
20262 }
20263
20264 void
20265 assign(size_t __n, bool __x)
20266 { _M_fill_assign(__n, __x); }
20267
20268 template<class _InputIterator>
20269 void
20270 assign(_InputIterator __first, _InputIterator __last)
20271 {
20272 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
20273 _M_assign_dispatch(__first, __last, _Integral());
20274 }
20275
20276 template<class _Integer>
20277 void
20278 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
20279 { _M_fill_assign((size_t) __n, (bool) __val); }
20280
20281 template<class _InputIterator>
20282 void
20283 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
20284 __false_type)
20285 { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
20286
20287 template<class _InputIterator>
20288 void
20289 _M_assign_aux(_InputIterator __first, _InputIterator __last,
20290 std::input_iterator_tag)
20291 {
20292 iterator __cur = begin();
20293 for (; __first != __last && __cur != end(); ++__cur, ++__first)
20294 *__cur = *__first;
20295 if (__first == __last)
20296 erase(__cur, end());
20297 else
20298 insert(end(), __first, __last);
20299 }
20300
20301 template<class _ForwardIterator>
20302 void
20303 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
20304 std::forward_iterator_tag)
20305 {
20306 const size_type __len = std::distance(__first, __last);
20307 if (__len < size())
20308 erase(std::copy(__first, __last, begin()), end());
20309 else
20310 {
20311 _ForwardIterator __mid = __first;
20312 std::advance(__mid, size());
20313 std::copy(__first, __mid, begin());
20314 insert(end(), __mid, __last);
20315 }
20316 }
20317
20318 void
20319 reserve(size_type __n)
20320 {
20321 if (__n > this->max_size())
20322 __throw_length_error(("vector::reserve"));
20323 if (this->capacity() < __n)
20324 {
20325 _Bit_type* __q = this->_M_allocate(__n);
20326 this->_M_impl._M_finish = std::copy(begin(), end(),
20327 iterator(__q, 0));
20328 this->_M_deallocate();
20329 this->_M_impl._M_start = iterator(__q, 0);
20330 this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1)
20331 / int(_S_word_bit));
20332 }
20333 }
20334
20335 reference
20336 front()
20337 { return *begin(); }
20338
20339 const_reference
20340 front() const
20341 { return *begin(); }
20342
20343 reference
20344 back()
20345 { return *(end() - 1); }
20346
20347 const_reference
20348 back() const
20349 { return *(end() - 1); }
20350
20351
20352
20353
20354
20355
20356 void
20357 data() { }
20358
20359 void
20360 push_back(bool __x)
20361 {
20362 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
20363 *this->_M_impl._M_finish++ = __x;
20364 else
20365 _M_insert_aux(end(), __x);
20366 }
20367
20368 void
20369 swap(vector<bool, _Alloc>& __x)
20370 {
20371 std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
20372 std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
20373 std::swap(this->_M_impl._M_end_of_storage,
20374 __x._M_impl._M_end_of_storage);
20375 }
20376
20377
20378 static void
20379 swap(reference __x, reference __y)
20380 {
20381 bool __tmp = __x;
20382 __x = __y;
20383 __y = __tmp;
20384 }
20385
20386 iterator
20387 insert(iterator __position, bool __x = bool())
20388 {
20389 const difference_type __n = __position - begin();
20390 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage
20391 && __position == end())
20392 *this->_M_impl._M_finish++ = __x;
20393 else
20394 _M_insert_aux(__position, __x);
20395 return begin() + __n;
20396 }
20397
20398
20399
20400 template<class _Integer>
20401 void
20402 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
20403 __true_type)
20404 { _M_fill_insert(__pos, __n, __x); }
20405
20406 template<class _InputIterator>
20407 void
20408 _M_insert_dispatch(iterator __pos,
20409 _InputIterator __first, _InputIterator __last,
20410 __false_type)
20411 { _M_insert_range(__pos, __first, __last,
20412 std::__iterator_category(__first)); }
20413
20414 template<class _InputIterator>
20415 void
20416 insert(iterator __position,
20417 _InputIterator __first, _InputIterator __last)
20418 {
20419 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
20420 _M_insert_dispatch(__position, __first, __last, _Integral());
20421 }
20422
20423 void
20424 _M_fill_insert(iterator __position, size_type __n, bool __x)
20425 {
20426 if (__n == 0)
20427 return;
20428 if (capacity() - size() >= __n)
20429 {
20430 std::copy_backward(__position, end(),
20431 this->_M_impl._M_finish + difference_type(__n));
20432 std::fill(__position, __position + difference_type(__n), __x);
20433 this->_M_impl._M_finish += difference_type(__n);
20434 }
20435 else
20436 {
20437 const size_type __len = size() + std::max(size(), __n);
20438 _Bit_type * __q = this->_M_allocate(__len);
20439 iterator __i = std::copy(begin(), __position, iterator(__q, 0));
20440 std::fill_n(__i, __n, __x);
20441 this->_M_impl._M_finish = std::copy(__position, end(),
20442 __i + difference_type(__n));
20443 this->_M_deallocate();
20444 this->_M_impl._M_end_of_storage = (__q + ((__len
20445 + int(_S_word_bit) - 1)
20446 / int(_S_word_bit)));
20447 this->_M_impl._M_start = iterator(__q, 0);
20448 }
20449 }
20450
20451 void
20452 insert(iterator __position, size_type __n, bool __x)
20453 { _M_fill_insert(__position, __n, __x); }
20454
20455 void
20456 pop_back()
20457 { --this->_M_impl._M_finish; }
20458
20459 iterator
20460 erase(iterator __position)
20461 {
20462 if (__position + 1 != end())
20463 std::copy(__position + 1, end(), __position);
20464 --this->_M_impl._M_finish;
20465 return __position;
20466 }
20467
20468 iterator
20469 erase(iterator __first, iterator __last)
20470 {
20471 this->_M_impl._M_finish = std::copy(__last, end(), __first);
20472 return __first;
20473 }
20474
20475 void
20476 resize(size_type __new_size, bool __x = bool())
20477 {
20478 if (__new_size < size())
20479 erase(begin() + difference_type(__new_size), end());
20480 else
20481 insert(end(), __new_size - size(), __x);
20482 }
20483
20484 void
20485 flip()
20486 {
20487 for (_Bit_type * __p = this->_M_impl._M_start._M_p;
20488 __p != this->_M_impl._M_end_of_storage; ++__p)
20489 *__p = ~*__p;
20490 }
20491
20492 void
20493 clear()
20494 { erase(begin(), end()); }
20495 };
20496}
20497# 73 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/vector" 2 3
20498
20499
20500# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/vector.tcc" 1 3
20501# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/vector.tcc" 3
20502namespace std
20503{
20504 template<typename _Tp, typename _Alloc>
20505 void
20506 vector<_Tp, _Alloc>::
20507 reserve(size_type __n)
20508 {
20509 if (__n > this->max_size())
20510 __throw_length_error(("vector::reserve"));
20511 if (this->capacity() < __n)
20512 {
20513 const size_type __old_size = size();
20514 pointer __tmp = _M_allocate_and_copy(__n,
20515 this->_M_impl._M_start,
20516 this->_M_impl._M_finish);
20517 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
20518 _M_get_Tp_allocator());
20519 _M_deallocate(this->_M_impl._M_start,
20520 this->_M_impl._M_end_of_storage
20521 - this->_M_impl._M_start);
20522 this->_M_impl._M_start = __tmp;
20523 this->_M_impl._M_finish = __tmp + __old_size;
20524 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
20525 }
20526 }
20527
20528 template<typename _Tp, typename _Alloc>
20529 typename vector<_Tp, _Alloc>::iterator
20530 vector<_Tp, _Alloc>::
20531 insert(iterator __position, const value_type& __x)
20532 {
20533 const size_type __n = __position - begin();
20534 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
20535 && __position == end())
20536 {
20537 this->_M_impl.construct(this->_M_impl._M_finish, __x);
20538 ++this->_M_impl._M_finish;
20539 }
20540 else
20541 _M_insert_aux(__position, __x);
20542 return begin() + __n;
20543 }
20544
20545 template<typename _Tp, typename _Alloc>
20546 typename vector<_Tp, _Alloc>::iterator
20547 vector<_Tp, _Alloc>::
20548 erase(iterator __position)
20549 {
20550 if (__position + 1 != end())
20551 std::copy(__position + 1, end(), __position);
20552 --this->_M_impl._M_finish;
20553 this->_M_impl.destroy(this->_M_impl._M_finish);
20554 return __position;
20555 }
20556
20557 template<typename _Tp, typename _Alloc>
20558 typename vector<_Tp, _Alloc>::iterator
20559 vector<_Tp, _Alloc>::
20560 erase(iterator __first, iterator __last)
20561 {
20562 iterator __i(std::copy(__last, end(), __first));
20563 std::_Destroy(__i, end(), _M_get_Tp_allocator());
20564 this->_M_impl._M_finish = this->_M_impl._M_finish - (__last - __first);
20565 return __first;
20566 }
20567
20568 template<typename _Tp, typename _Alloc>
20569 vector<_Tp, _Alloc>&
20570 vector<_Tp, _Alloc>::
20571 operator=(const vector<_Tp, _Alloc>& __x)
20572 {
20573 if (&__x != this)
20574 {
20575 const size_type __xlen = __x.size();
20576 if (__xlen > capacity())
20577 {
20578 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
20579 __x.end());
20580 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
20581 _M_get_Tp_allocator());
20582 _M_deallocate(this->_M_impl._M_start,
20583 this->_M_impl._M_end_of_storage
20584 - this->_M_impl._M_start);
20585 this->_M_impl._M_start = __tmp;
20586 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
20587 }
20588 else if (size() >= __xlen)
20589 {
20590 iterator __i(std::copy(__x.begin(), __x.end(), begin()));
20591 std::_Destroy(__i, end(), _M_get_Tp_allocator());
20592 }
20593 else
20594 {
20595 std::copy(__x.begin(), __x.begin() + size(),
20596 this->_M_impl._M_start);
20597 std::__uninitialized_copy_a(__x.begin() + size(),
20598 __x.end(), this->_M_impl._M_finish,
20599 _M_get_Tp_allocator());
20600 }
20601 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
20602 }
20603 return *this;
20604 }
20605
20606 template<typename _Tp, typename _Alloc>
20607 void
20608 vector<_Tp, _Alloc>::
20609 _M_fill_assign(size_t __n, const value_type& __val)
20610 {
20611 if (__n > capacity())
20612 {
20613 vector __tmp(__n, __val, _M_get_Tp_allocator());
20614 __tmp.swap(*this);
20615 }
20616 else if (__n > size())
20617 {
20618 std::fill(begin(), end(), __val);
20619 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
20620 __n - size(), __val,
20621 _M_get_Tp_allocator());
20622 this->_M_impl._M_finish += __n - size();
20623 }
20624 else
20625 erase(std::fill_n(begin(), __n, __val), end());
20626 }
20627
20628 template<typename _Tp, typename _Alloc>
20629 template<typename _InputIterator>
20630 void
20631 vector<_Tp, _Alloc>::
20632 _M_assign_aux(_InputIterator __first, _InputIterator __last,
20633 std::input_iterator_tag)
20634 {
20635 iterator __cur(begin());
20636 for (; __first != __last && __cur != end(); ++__cur, ++__first)
20637 *__cur = *__first;
20638 if (__first == __last)
20639 erase(__cur, end());
20640 else
20641 insert(end(), __first, __last);
20642 }
20643
20644 template<typename _Tp, typename _Alloc>
20645 template<typename _ForwardIterator>
20646 void
20647 vector<_Tp, _Alloc>::
20648 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
20649 std::forward_iterator_tag)
20650 {
20651 const size_type __len = std::distance(__first, __last);
20652
20653 if (__len > capacity())
20654 {
20655 pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
20656 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
20657 _M_get_Tp_allocator());
20658 _M_deallocate(this->_M_impl._M_start,
20659 this->_M_impl._M_end_of_storage
20660 - this->_M_impl._M_start);
20661 this->_M_impl._M_start = __tmp;
20662 this->_M_impl._M_finish = this->_M_impl._M_start + __len;
20663 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
20664 }
20665 else if (size() >= __len)
20666 {
20667 iterator __new_finish(std::copy(__first, __last,
20668 this->_M_impl._M_start));
20669 std::_Destroy(__new_finish, end(), _M_get_Tp_allocator());
20670 this->_M_impl._M_finish = __new_finish.base();
20671 }
20672 else
20673 {
20674 _ForwardIterator __mid = __first;
20675 std::advance(__mid, size());
20676 std::copy(__first, __mid, this->_M_impl._M_start);
20677 this->_M_impl._M_finish =
20678 std::__uninitialized_copy_a(__mid, __last,
20679 this->_M_impl._M_finish,
20680 _M_get_Tp_allocator());
20681 }
20682 }
20683
20684 template<typename _Tp, typename _Alloc>
20685 void
20686 vector<_Tp, _Alloc>::
20687 _M_insert_aux(iterator __position, const _Tp& __x)
20688 {
20689 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
20690 {
20691 this->_M_impl.construct(this->_M_impl._M_finish,
20692 *(this->_M_impl._M_finish - 1));
20693 ++this->_M_impl._M_finish;
20694 _Tp __x_copy = __x;
20695 std::copy_backward(__position,
20696 iterator(this->_M_impl._M_finish-2),
20697 iterator(this->_M_impl._M_finish-1));
20698 *__position = __x_copy;
20699 }
20700 else
20701 {
20702 const size_type __old_size = size();
20703 if (__old_size == this->max_size())
20704 __throw_length_error(("vector::_M_insert_aux"));
20705
20706
20707
20708
20709 size_type __len = __old_size != 0 ? 2 * __old_size : 1;
20710 if (__len < __old_size)
20711 __len = this->max_size();
20712
20713 iterator __new_start(this->_M_allocate(__len));
20714 iterator __new_finish(__new_start);
20715 try
20716 {
20717 __new_finish =
20718 std::__uninitialized_copy_a(iterator(this->_M_impl._M_start),
20719 __position,
20720 __new_start,
20721 _M_get_Tp_allocator());
20722 this->_M_impl.construct(__new_finish.base(), __x);
20723 ++__new_finish;
20724 __new_finish =
20725 std::__uninitialized_copy_a(__position,
20726 iterator(this->_M_impl._M_finish),
20727 __new_finish,
20728 _M_get_Tp_allocator());
20729 }
20730 catch(...)
20731 {
20732 std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
20733 _M_deallocate(__new_start.base(),__len);
20734 throw;
20735 }
20736 std::_Destroy(begin(), end(), _M_get_Tp_allocator());
20737 _M_deallocate(this->_M_impl._M_start,
20738 this->_M_impl._M_end_of_storage
20739 - this->_M_impl._M_start);
20740 this->_M_impl._M_start = __new_start.base();
20741 this->_M_impl._M_finish = __new_finish.base();
20742 this->_M_impl._M_end_of_storage = __new_start.base() + __len;
20743 }
20744 }
20745
20746 template<typename _Tp, typename _Alloc>
20747 void
20748 vector<_Tp, _Alloc>::
20749 _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
20750 {
20751 if (__n != 0)
20752 {
20753 if (size_type(this->_M_impl._M_end_of_storage
20754 - this->_M_impl._M_finish) >= __n)
20755 {
20756 value_type __x_copy = __x;
20757 const size_type __elems_after = end() - __position;
20758 iterator __old_finish(this->_M_impl._M_finish);
20759 if (__elems_after > __n)
20760 {
20761 std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
20762 this->_M_impl._M_finish,
20763 this->_M_impl._M_finish,
20764 _M_get_Tp_allocator());
20765 this->_M_impl._M_finish += __n;
20766 std::copy_backward(__position, __old_finish - __n,
20767 __old_finish);
20768 std::fill(__position, __position + __n, __x_copy);
20769 }
20770 else
20771 {
20772 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
20773 __n - __elems_after,
20774 __x_copy,
20775 _M_get_Tp_allocator());
20776 this->_M_impl._M_finish += __n - __elems_after;
20777 std::__uninitialized_copy_a(__position, __old_finish,
20778 this->_M_impl._M_finish,
20779 _M_get_Tp_allocator());
20780 this->_M_impl._M_finish += __elems_after;
20781 std::fill(__position, __old_finish, __x_copy);
20782 }
20783 }
20784 else
20785 {
20786 const size_type __old_size = size();
20787 if (this->max_size() - __old_size < __n)
20788 __throw_length_error(("vector::_M_fill_insert"));
20789
20790
20791 size_type __len = __old_size + std::max(__old_size, __n);
20792 if (__len < __old_size)
20793 __len = this->max_size();
20794
20795 iterator __new_start(this->_M_allocate(__len));
20796 iterator __new_finish(__new_start);
20797 try
20798 {
20799 __new_finish =
20800 std::__uninitialized_copy_a(begin(), __position,
20801 __new_start,
20802 _M_get_Tp_allocator());
20803 std::__uninitialized_fill_n_a(__new_finish, __n, __x,
20804 _M_get_Tp_allocator());
20805 __new_finish += __n;
20806 __new_finish =
20807 std::__uninitialized_copy_a(__position, end(), __new_finish,
20808 _M_get_Tp_allocator());
20809 }
20810 catch(...)
20811 {
20812 std::_Destroy(__new_start, __new_finish,
20813 _M_get_Tp_allocator());
20814 _M_deallocate(__new_start.base(), __len);
20815 throw;
20816 }
20817 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
20818 _M_get_Tp_allocator());
20819 _M_deallocate(this->_M_impl._M_start,
20820 this->_M_impl._M_end_of_storage
20821 - this->_M_impl._M_start);
20822 this->_M_impl._M_start = __new_start.base();
20823 this->_M_impl._M_finish = __new_finish.base();
20824 this->_M_impl._M_end_of_storage = __new_start.base() + __len;
20825 }
20826 }
20827 }
20828
20829 template<typename _Tp, typename _Alloc> template<typename _InputIterator>
20830 void
20831 vector<_Tp, _Alloc>::
20832 _M_range_insert(iterator __pos, _InputIterator __first,
20833 _InputIterator __last, std::input_iterator_tag)
20834 {
20835 for (; __first != __last; ++__first)
20836 {
20837 __pos = insert(__pos, *__first);
20838 ++__pos;
20839 }
20840 }
20841
20842 template<typename _Tp, typename _Alloc>
20843 template<typename _ForwardIterator>
20844 void
20845 vector<_Tp, _Alloc>::
20846 _M_range_insert(iterator __position, _ForwardIterator __first,
20847 _ForwardIterator __last, std::forward_iterator_tag)
20848 {
20849 if (__first != __last)
20850 {
20851 const size_type __n = std::distance(__first, __last);
20852 if (size_type(this->_M_impl._M_end_of_storage
20853 - this->_M_impl._M_finish) >= __n)
20854 {
20855 const size_type __elems_after = end() - __position;
20856 iterator __old_finish(this->_M_impl._M_finish);
20857 if (__elems_after > __n)
20858 {
20859 std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
20860 this->_M_impl._M_finish,
20861 this->_M_impl._M_finish,
20862 _M_get_Tp_allocator());
20863 this->_M_impl._M_finish += __n;
20864 std::copy_backward(__position, __old_finish - __n,
20865 __old_finish);
20866 std::copy(__first, __last, __position);
20867 }
20868 else
20869 {
20870 _ForwardIterator __mid = __first;
20871 std::advance(__mid, __elems_after);
20872 std::__uninitialized_copy_a(__mid, __last,
20873 this->_M_impl._M_finish,
20874 _M_get_Tp_allocator());
20875 this->_M_impl._M_finish += __n - __elems_after;
20876 std::__uninitialized_copy_a(__position, __old_finish,
20877 this->_M_impl._M_finish,
20878 _M_get_Tp_allocator());
20879 this->_M_impl._M_finish += __elems_after;
20880 std::copy(__first, __mid, __position);
20881 }
20882 }
20883 else
20884 {
20885 const size_type __old_size = size();
20886 if (this->max_size() - __old_size < __n)
20887 __throw_length_error(("vector::_M_range_insert"));
20888
20889
20890 size_type __len = __old_size + std::max(__old_size, __n);
20891 if (__len < __old_size)
20892 __len = this->max_size();
20893
20894 iterator __new_start(this->_M_allocate(__len));
20895 iterator __new_finish(__new_start);
20896 try
20897 {
20898 __new_finish =
20899 std::__uninitialized_copy_a(iterator(this->_M_impl._M_start),
20900 __position,
20901 __new_start,
20902 _M_get_Tp_allocator());
20903 __new_finish =
20904 std::__uninitialized_copy_a(__first, __last, __new_finish,
20905 _M_get_Tp_allocator());
20906 __new_finish =
20907 std::__uninitialized_copy_a(__position,
20908 iterator(this->_M_impl._M_finish),
20909 __new_finish,
20910 _M_get_Tp_allocator());
20911 }
20912 catch(...)
20913 {
20914 std::_Destroy(__new_start,__new_finish,
20915 _M_get_Tp_allocator());
20916 _M_deallocate(__new_start.base(), __len);
20917 throw;
20918 }
20919 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
20920 _M_get_Tp_allocator());
20921 _M_deallocate(this->_M_impl._M_start,
20922 this->_M_impl._M_end_of_storage
20923 - this->_M_impl._M_start);
20924 this->_M_impl._M_start = __new_start.base();
20925 this->_M_impl._M_finish = __new_finish.base();
20926 this->_M_impl._M_end_of_storage = __new_start.base() + __len;
20927 }
20928 }
20929 }
20930}
20931# 76 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/vector" 2 3
20932
20933
20934
20935
20936
20937
20938#pragma GCC visibility pop
20939# 22 "../ast/identifier.h" 2
20940
20941
20942
20943# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hash_map" 1 3
20944# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hash_map" 3
20945#pragma GCC visibility push(default)
20946
20947# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hashtable.h" 1 3
20948# 68 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hashtable.h" 3
20949# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iterator" 1 3
20950# 63 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iterator" 3
20951
20952# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iterator" 3
20953#pragma GCC visibility push(default)
20954
20955
20956
20957
20958
20959
20960# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 1 3
20961# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
20962
20963# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
20964#pragma GCC visibility push(default)
20965
20966# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ios" 1 3
20967# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ios" 3
20968
20969# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ios" 3
20970#pragma GCC visibility push(default)
20971
20972
20973
20974
20975
20976# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/localefwd.h" 1 3
20977# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/localefwd.h" 3
20978
20979# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/localefwd.h" 3
20980
20981
20982
20983
20984
20985
20986namespace std
20987{
20988
20989 class locale;
20990
20991
20992 template<typename _CharT>
20993 inline bool
20994 isspace(_CharT, const locale&);
20995
20996 template<typename _CharT>
20997 inline bool
20998 isprint(_CharT, const locale&);
20999
21000 template<typename _CharT>
21001 inline bool
21002 iscntrl(_CharT, const locale&);
21003
21004 template<typename _CharT>
21005 inline bool
21006 isupper(_CharT, const locale&);
21007
21008 template<typename _CharT>
21009 inline bool
21010 islower(_CharT, const locale&);
21011
21012 template<typename _CharT>
21013 inline bool
21014 isalpha(_CharT, const locale&);
21015
21016 template<typename _CharT>
21017 inline bool
21018 isdigit(_CharT, const locale&);
21019
21020 template<typename _CharT>
21021 inline bool
21022 ispunct(_CharT, const locale&);
21023
21024 template<typename _CharT>
21025 inline bool
21026 isxdigit(_CharT, const locale&);
21027
21028 template<typename _CharT>
21029 inline bool
21030 isalnum(_CharT, const locale&);
21031
21032 template<typename _CharT>
21033 inline bool
21034 isgraph(_CharT, const locale&);
21035
21036 template<typename _CharT>
21037 inline _CharT
21038 toupper(_CharT, const locale&);
21039
21040 template<typename _CharT>
21041 inline _CharT
21042 tolower(_CharT, const locale&);
21043
21044
21045 class ctype_base;
21046 template<typename _CharT>
21047 class ctype;
21048 template<> class ctype<char>;
21049
21050 template<> class ctype<wchar_t>;
21051
21052 template<typename _CharT>
21053 class ctype_byname;
21054
21055
21056 class codecvt_base;
21057 class __enc_traits;
21058 template<typename _InternT, typename _ExternT, typename _StateT>
21059 class codecvt;
21060 template<> class codecvt<char, char, mbstate_t>;
21061
21062 template<> class codecvt<wchar_t, char, mbstate_t>;
21063
21064 template<typename _InternT, typename _ExternT, typename _StateT>
21065 class codecvt_byname;
21066
21067
21068 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
21069 class num_get;
21070 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
21071 class num_put;
21072 template<typename _CharT> class numpunct;
21073 template<typename _CharT> class numpunct_byname;
21074
21075
21076 template<typename _CharT>
21077 class collate;
21078 template<typename _CharT> class
21079 collate_byname;
21080
21081
21082 class time_base;
21083 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
21084 class time_get;
21085 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
21086 class time_get_byname;
21087 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
21088 class time_put;
21089 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
21090 class time_put_byname;
21091
21092
21093 class money_base;
21094 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
21095 class money_get;
21096 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
21097 class money_put;
21098 template<typename _CharT, bool _Intl = false>
21099 class moneypunct;
21100 template<typename _CharT, bool _Intl = false>
21101 class moneypunct_byname;
21102
21103
21104 class messages_base;
21105 template<typename _CharT>
21106 class messages;
21107 template<typename _CharT>
21108 class messages_byname;
21109
21110 template<typename _Facet>
21111 bool
21112 has_facet(const locale& __loc) throw();
21113
21114 template<typename _Facet>
21115 const _Facet&
21116 use_facet(const locale& __loc);
21117
21118 template<typename _Facet>
21119 inline const _Facet&
21120 __check_facet(const _Facet* __f)
21121 {
21122 if (!__f)
21123 __throw_bad_cast();
21124 return *__f;
21125 }
21126}
21127# 50 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3
21128# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 1 3
21129# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21130
21131# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21132
21133
21134
21135# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 1 3
21136# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21137
21138# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21139
21140
21141
21142
21143
21144
21145
21146namespace std
21147{
21148# 67 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21149 class locale
21150 {
21151 public:
21152
21153
21154 typedef int category;
21155
21156
21157 class facet;
21158 class id;
21159 class _Impl;
21160
21161 friend class facet;
21162 friend class _Impl;
21163
21164 template<typename _Facet>
21165 friend bool
21166 has_facet(const locale&) throw();
21167
21168 template<typename _Facet>
21169 friend const _Facet&
21170 use_facet(const locale&);
21171
21172 template<typename _Cache>
21173 friend struct __use_cache;
21174# 105 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21175 static const category none = 0;
21176 static const category ctype = 1L << 0;
21177 static const category numeric = 1L << 1;
21178 static const category collate = 1L << 2;
21179 static const category time = 1L << 3;
21180 static const category monetary = 1L << 4;
21181 static const category messages = 1L << 5;
21182 static const category all = (ctype | numeric | collate |
21183 time | monetary | messages);
21184# 124 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21185 locale() throw();
21186# 133 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21187 locale(const locale& __other) throw();
21188# 143 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21189 explicit
21190 locale(const char* __s);
21191# 158 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21192 locale(const locale& __base, const char* __s, category __cat);
21193# 171 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21194 locale(const locale& __base, const locale& __add, category __cat);
21195# 183 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21196 template<typename _Facet>
21197 locale(const locale& __other, _Facet* __f);
21198
21199
21200 ~locale() throw();
21201# 197 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21202 const locale&
21203 operator=(const locale& __other) throw();
21204# 212 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21205 template<typename _Facet>
21206 locale
21207 combine(const locale& __other) const;
21208
21209
21210
21211
21212
21213
21214 string
21215 name() const;
21216# 231 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21217 bool
21218 operator==(const locale& __other) const throw ();
21219
21220
21221
21222
21223
21224
21225
21226 inline bool
21227 operator!=(const locale& __other) const throw ()
21228 { return !(this->operator==(__other)); }
21229# 259 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21230 template<typename _Char, typename _Traits, typename _Alloc>
21231 bool
21232 operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
21233 const basic_string<_Char, _Traits, _Alloc>& __s2) const;
21234# 275 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21235 static locale
21236 global(const locale&);
21237
21238
21239
21240
21241 static const locale&
21242 classic();
21243
21244 private:
21245
21246 _Impl* _M_impl;
21247
21248
21249 static _Impl* _S_classic;
21250
21251
21252 static _Impl* _S_global;
21253
21254
21255
21256
21257
21258 static const char* const* const _S_categories;
21259# 310 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21260 enum { _S_categories_size = 6 + 6 };
21261
21262
21263 static __gthread_once_t _S_once;
21264
21265
21266 explicit
21267 locale(_Impl*) throw();
21268
21269 static void
21270 _S_initialize();
21271
21272 static void
21273 _S_initialize_once();
21274
21275 static category
21276 _S_normalize_category(category);
21277
21278 void
21279 _M_coalesce(const locale& __base, const locale& __add, category __cat);
21280 };
21281# 343 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21282 class locale::facet
21283 {
21284 private:
21285 friend class locale;
21286 friend class locale::_Impl;
21287
21288 mutable _Atomic_word _M_refcount;
21289
21290
21291 static __c_locale _S_c_locale;
21292
21293
21294 static const char _S_c_name[2];
21295
21296
21297 static __gthread_once_t _S_once;
21298
21299
21300 static void
21301 _S_initialize_once();
21302
21303 protected:
21304# 374 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21305 explicit
21306 facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0)
21307 { }
21308
21309
21310 virtual
21311 ~facet();
21312
21313 static void
21314 _S_create_c_locale(__c_locale& __cloc, const char* __s,
21315 __c_locale __old = 0);
21316
21317 static __c_locale
21318 _S_clone_c_locale(__c_locale& __cloc);
21319
21320 static void
21321 _S_destroy_c_locale(__c_locale& __cloc);
21322
21323
21324
21325 static __c_locale
21326 _S_get_c_locale();
21327
21328 static const char*
21329 _S_get_c_name();
21330
21331 private:
21332 inline void
21333 _M_add_reference() const throw()
21334 { __gnu_cxx::__atomic_add(&_M_refcount, 1); }
21335
21336 inline void
21337 _M_remove_reference() const throw()
21338 {
21339 if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1)
21340 {
21341 try
21342 { delete this; }
21343 catch (...)
21344 { }
21345 }
21346 }
21347
21348 facet(const facet&);
21349
21350 facet&
21351 operator=(const facet&);
21352 };
21353# 434 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3
21354 class locale::id
21355 {
21356 private:
21357 friend class locale;
21358 friend class locale::_Impl;
21359
21360 template<typename _Facet>
21361 friend const _Facet&
21362 use_facet(const locale&);
21363
21364 template<typename _Facet>
21365 friend bool
21366 has_facet(const locale&) throw ();
21367
21368
21369
21370
21371 mutable size_t _M_index;
21372
21373
21374 static _Atomic_word _S_refcount;
21375
21376 void
21377 operator=(const id&);
21378
21379 id(const id&);
21380
21381 public:
21382
21383
21384
21385 id() { }
21386
21387 size_t
21388 _M_id() const;
21389 };
21390
21391
21392
21393 class locale::_Impl
21394 {
21395 public:
21396
21397 friend class locale;
21398 friend class locale::facet;
21399
21400 template<typename _Facet>
21401 friend bool
21402 has_facet(const locale&) throw();
21403
21404 template<typename _Facet>
21405 friend const _Facet&
21406 use_facet(const locale&);
21407
21408 template<typename _Cache>
21409 friend struct __use_cache;
21410
21411 private:
21412
21413 _Atomic_word _M_refcount;
21414 const facet** _M_facets;
21415 size_t _M_facets_size;
21416 const facet** _M_caches;
21417 char** _M_names;
21418 static const locale::id* const _S_id_ctype[];
21419 static const locale::id* const _S_id_numeric[];
21420 static const locale::id* const _S_id_collate[];
21421 static const locale::id* const _S_id_time[];
21422 static const locale::id* const _S_id_monetary[];
21423 static const locale::id* const _S_id_messages[];
21424 static const locale::id* const* const _S_facet_categories[];
21425
21426 inline void
21427 _M_add_reference() throw()
21428 { __gnu_cxx::__atomic_add(&_M_refcount, 1); }
21429
21430 inline void
21431 _M_remove_reference() throw()
21432 {
21433 if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1)
21434 {
21435 try
21436 { delete this; }
21437 catch(...)
21438 { }
21439 }
21440 }
21441
21442 _Impl(const _Impl&, size_t);
21443 _Impl(const char*, size_t);
21444 _Impl(size_t) throw();
21445
21446 ~_Impl() throw();
21447
21448 _Impl(const _Impl&);
21449
21450 void
21451 operator=(const _Impl&);
21452
21453 inline bool
21454 _M_check_same_name()
21455 {
21456 bool __ret = true;
21457 if (_M_names[1])
21458
21459 for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i)
21460 __ret = std::strcmp(_M_names[__i], _M_names[__i + 1]) == 0;
21461 return __ret;
21462 }
21463
21464 void
21465 _M_replace_categories(const _Impl*, category);
21466
21467 void
21468 _M_replace_category(const _Impl*, const locale::id* const*);
21469
21470 void
21471 _M_replace_facet(const _Impl*, const locale::id*);
21472
21473 void
21474 _M_install_facet(const locale::id*, const facet*);
21475
21476 template<typename _Facet>
21477 inline void
21478 _M_init_facet(_Facet* __facet)
21479 { _M_install_facet(&_Facet::id, __facet); }
21480
21481 void
21482 _M_install_cache(const facet*, size_t);
21483 };
21484
21485 template<typename _Facet>
21486 locale::locale(const locale& __other, _Facet* __f)
21487 {
21488 _M_impl = new _Impl(*__other._M_impl, 1);
21489
21490 try
21491 { _M_impl->_M_install_facet(&_Facet::id, __f); }
21492 catch(...)
21493 {
21494 _M_impl->_M_remove_reference();
21495 throw;
21496 }
21497 delete [] _M_impl->_M_names[0];
21498 _M_impl->_M_names[0] = 0;
21499 }
21500}
21501# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 2 3
21502
21503namespace std
21504{
21505
21506
21507
21508
21509 enum _Ios_Fmtflags
21510 {
21511 _S_boolalpha = 1L << 0,
21512 _S_dec = 1L << 1,
21513 _S_fixed = 1L << 2,
21514 _S_hex = 1L << 3,
21515 _S_internal = 1L << 4,
21516 _S_left = 1L << 5,
21517 _S_oct = 1L << 6,
21518 _S_right = 1L << 7,
21519 _S_scientific = 1L << 8,
21520 _S_showbase = 1L << 9,
21521 _S_showpoint = 1L << 10,
21522 _S_showpos = 1L << 11,
21523 _S_skipws = 1L << 12,
21524 _S_unitbuf = 1L << 13,
21525 _S_uppercase = 1L << 14,
21526 _S_adjustfield = _S_left | _S_right | _S_internal,
21527 _S_basefield = _S_dec | _S_oct | _S_hex,
21528 _S_floatfield = _S_scientific | _S_fixed,
21529 _S_ios_fmtflags_end = 1L << 16
21530 };
21531
21532 inline _Ios_Fmtflags
21533 operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
21534 { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
21535
21536 inline _Ios_Fmtflags
21537 operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
21538 { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
21539
21540 inline _Ios_Fmtflags
21541 operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
21542 { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
21543
21544 inline _Ios_Fmtflags&
21545 operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
21546 { return __a = __a | __b; }
21547
21548 inline _Ios_Fmtflags&
21549 operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
21550 { return __a = __a & __b; }
21551
21552 inline _Ios_Fmtflags&
21553 operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
21554 { return __a = __a ^ __b; }
21555
21556 inline _Ios_Fmtflags
21557 operator~(_Ios_Fmtflags __a)
21558 { return _Ios_Fmtflags(~static_cast<int>(__a)); }
21559
21560
21561 enum _Ios_Openmode
21562 {
21563 _S_app = 1L << 0,
21564 _S_ate = 1L << 1,
21565 _S_bin = 1L << 2,
21566 _S_in = 1L << 3,
21567 _S_out = 1L << 4,
21568 _S_trunc = 1L << 5,
21569 _S_ios_openmode_end = 1L << 16
21570 };
21571
21572 inline _Ios_Openmode
21573 operator&(_Ios_Openmode __a, _Ios_Openmode __b)
21574 { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
21575
21576 inline _Ios_Openmode
21577 operator|(_Ios_Openmode __a, _Ios_Openmode __b)
21578 { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
21579
21580 inline _Ios_Openmode
21581 operator^(_Ios_Openmode __a, _Ios_Openmode __b)
21582 { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
21583
21584 inline _Ios_Openmode&
21585 operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
21586 { return __a = __a | __b; }
21587
21588 inline _Ios_Openmode&
21589 operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
21590 { return __a = __a & __b; }
21591
21592 inline _Ios_Openmode&
21593 operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
21594 { return __a = __a ^ __b; }
21595
21596 inline _Ios_Openmode
21597 operator~(_Ios_Openmode __a)
21598 { return _Ios_Openmode(~static_cast<int>(__a)); }
21599
21600
21601 enum _Ios_Iostate
21602 {
21603 _S_goodbit = 0,
21604 _S_badbit = 1L << 0,
21605 _S_eofbit = 1L << 1,
21606 _S_failbit = 1L << 2,
21607 _S_ios_iostate_end = 1L << 16
21608 };
21609
21610 inline _Ios_Iostate
21611 operator&(_Ios_Iostate __a, _Ios_Iostate __b)
21612 { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
21613
21614 inline _Ios_Iostate
21615 operator|(_Ios_Iostate __a, _Ios_Iostate __b)
21616 { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
21617
21618 inline _Ios_Iostate
21619 operator^(_Ios_Iostate __a, _Ios_Iostate __b)
21620 { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
21621
21622 inline _Ios_Iostate&
21623 operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
21624 { return __a = __a | __b; }
21625
21626 inline _Ios_Iostate&
21627 operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
21628 { return __a = __a & __b; }
21629
21630 inline _Ios_Iostate&
21631 operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
21632 { return __a = __a ^ __b; }
21633
21634 inline _Ios_Iostate
21635 operator~(_Ios_Iostate __a)
21636 { return _Ios_Iostate(~static_cast<int>(__a)); }
21637
21638 enum _Ios_Seekdir
21639 {
21640 _S_beg = 0,
21641 _S_cur = 1,
21642 _S_end = 2,
21643 _S_ios_seekdir_end = 1L << 16
21644 };
21645# 201 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21646 class ios_base
21647 {
21648 public:
21649
21650
21651
21652 class failure : public exception
21653 {
21654 public:
21655
21656
21657 explicit
21658 failure(const string& __str) throw();
21659
21660
21661
21662 virtual
21663 ~failure() throw();
21664
21665 virtual const char*
21666 what() const throw();
21667
21668 private:
21669 string _M_msg;
21670 };
21671# 253 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21672 typedef _Ios_Fmtflags fmtflags;
21673
21674
21675 static const fmtflags boolalpha = _S_boolalpha;
21676
21677
21678 static const fmtflags dec = _S_dec;
21679
21680
21681 static const fmtflags fixed = _S_fixed;
21682
21683
21684 static const fmtflags hex = _S_hex;
21685
21686
21687
21688
21689 static const fmtflags internal = _S_internal;
21690
21691
21692
21693 static const fmtflags left = _S_left;
21694
21695
21696 static const fmtflags oct = _S_oct;
21697
21698
21699
21700 static const fmtflags right = _S_right;
21701
21702
21703 static const fmtflags scientific = _S_scientific;
21704
21705
21706
21707 static const fmtflags showbase = _S_showbase;
21708
21709
21710
21711 static const fmtflags showpoint = _S_showpoint;
21712
21713
21714 static const fmtflags showpos = _S_showpos;
21715
21716
21717 static const fmtflags skipws = _S_skipws;
21718
21719
21720 static const fmtflags unitbuf = _S_unitbuf;
21721
21722
21723
21724 static const fmtflags uppercase = _S_uppercase;
21725
21726
21727 static const fmtflags adjustfield = _S_adjustfield;
21728
21729
21730 static const fmtflags basefield = _S_basefield;
21731
21732
21733 static const fmtflags floatfield = _S_floatfield;
21734# 328 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21735 typedef _Ios_Iostate iostate;
21736
21737
21738
21739 static const iostate badbit = _S_badbit;
21740
21741
21742 static const iostate eofbit = _S_eofbit;
21743
21744
21745
21746
21747 static const iostate failbit = _S_failbit;
21748
21749
21750 static const iostate goodbit = _S_goodbit;
21751# 359 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21752 typedef _Ios_Openmode openmode;
21753
21754
21755 static const openmode app = _S_app;
21756
21757
21758 static const openmode ate = _S_ate;
21759
21760
21761
21762
21763
21764 static const openmode binary = _S_bin;
21765
21766
21767 static const openmode in = _S_in;
21768
21769
21770 static const openmode out = _S_out;
21771
21772
21773 static const openmode trunc = _S_trunc;
21774# 392 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21775 typedef _Ios_Seekdir seekdir;
21776
21777
21778 static const seekdir beg = _S_beg;
21779
21780
21781 static const seekdir cur = _S_cur;
21782
21783
21784 static const seekdir end = _S_end;
21785
21786
21787 typedef int io_state;
21788 typedef int open_mode;
21789 typedef int seek_dir;
21790
21791 typedef std::streampos streampos;
21792 typedef std::streamoff streamoff;
21793# 418 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21794 enum event
21795 {
21796 erase_event,
21797 imbue_event,
21798 copyfmt_event
21799 };
21800# 435 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21801 typedef void (*event_callback) (event, ios_base&, int);
21802# 447 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21803 void
21804 register_callback(event_callback __fn, int __index);
21805
21806 protected:
21807
21808
21809
21810
21811
21812
21813 streamsize _M_precision;
21814 streamsize _M_width;
21815 fmtflags _M_flags;
21816 iostate _M_exception;
21817 iostate _M_streambuf_state;
21818
21819
21820
21821
21822 struct _Callback_list
21823 {
21824
21825 _Callback_list* _M_next;
21826 ios_base::event_callback _M_fn;
21827 int _M_index;
21828 _Atomic_word _M_refcount;
21829
21830 _Callback_list(ios_base::event_callback __fn, int __index,
21831 _Callback_list* __cb)
21832 : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
21833
21834 void
21835 _M_add_reference() { __gnu_cxx::__atomic_add(&_M_refcount, 1); }
21836
21837
21838 int
21839 _M_remove_reference()
21840 { return __gnu_cxx::__exchange_and_add(&_M_refcount, -1); }
21841 };
21842
21843 _Callback_list* _M_callbacks;
21844
21845 void
21846 _M_call_callbacks(event __ev) throw();
21847
21848 void
21849 _M_dispose_callbacks(void);
21850
21851
21852 struct _Words
21853 {
21854 void* _M_pword;
21855 long _M_iword;
21856 _Words() : _M_pword(0), _M_iword(0) { }
21857 };
21858
21859
21860 _Words _M_word_zero;
21861
21862
21863
21864 enum { _S_local_word_size = 8 };
21865 _Words _M_local_word[_S_local_word_size];
21866
21867
21868 int _M_word_size;
21869 _Words* _M_word;
21870
21871 _Words&
21872 _M_grow_words(int __index, bool __iword);
21873
21874
21875 locale _M_ios_locale;
21876
21877 void
21878 _M_init();
21879
21880 public:
21881
21882
21883
21884
21885
21886 class Init
21887 {
21888 friend class ios_base;
21889 public:
21890 Init();
21891 ~Init();
21892
21893 private:
21894 static _Atomic_word _S_refcount;
21895 static bool _S_synced_with_stdio;
21896 };
21897
21898
21899
21900
21901
21902
21903 inline fmtflags
21904 flags() const { return _M_flags; }
21905# 557 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21906 inline fmtflags
21907 flags(fmtflags __fmtfl)
21908 {
21909 fmtflags __old = _M_flags;
21910 _M_flags = __fmtfl;
21911 return __old;
21912 }
21913# 573 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21914 inline fmtflags
21915 setf(fmtflags __fmtfl)
21916 {
21917 fmtflags __old = _M_flags;
21918 _M_flags |= __fmtfl;
21919 return __old;
21920 }
21921# 590 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21922 inline fmtflags
21923 setf(fmtflags __fmtfl, fmtflags __mask)
21924 {
21925 fmtflags __old = _M_flags;
21926 _M_flags &= ~__mask;
21927 _M_flags |= (__fmtfl & __mask);
21928 return __old;
21929 }
21930
21931
21932
21933
21934
21935
21936
21937 inline void
21938 unsetf(fmtflags __mask) { _M_flags &= ~__mask; }
21939# 617 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21940 inline streamsize
21941 precision() const { return _M_precision; }
21942
21943
21944
21945
21946
21947
21948 inline streamsize
21949 precision(streamsize __prec)
21950 {
21951 streamsize __old = _M_precision;
21952 _M_precision = __prec;
21953 return __old;
21954 }
21955
21956
21957
21958
21959
21960
21961
21962 inline streamsize
21963 width() const { return _M_width; }
21964
21965
21966
21967
21968
21969
21970 inline streamsize
21971 width(streamsize __wide)
21972 {
21973 streamsize __old = _M_width;
21974 _M_width = __wide;
21975 return __old;
21976 }
21977# 666 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21978 static bool
21979 sync_with_stdio(bool __sync = true);
21980# 678 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21981 locale
21982 imbue(const locale& __loc);
21983# 689 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21984 inline locale
21985 getloc() const { return _M_ios_locale; }
21986# 699 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21987 inline const locale&
21988 _M_getloc() const { return _M_ios_locale; }
21989# 717 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21990 static int
21991 xalloc() throw();
21992# 733 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
21993 inline long&
21994 iword(int __ix)
21995 {
21996 _Words& __word = (__ix < _M_word_size)
21997 ? _M_word[__ix] : _M_grow_words(__ix, true);
21998 return __word._M_iword;
21999 }
22000# 754 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
22001 inline void*&
22002 pword(int __ix)
22003 {
22004 _Words& __word = (__ix < _M_word_size)
22005 ? _M_word[__ix] : _M_grow_words(__ix, false);
22006 return __word._M_pword;
22007 }
22008# 771 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3
22009 virtual ~ios_base();
22010
22011 protected:
22012 ios_base();
22013
22014
22015
22016 private:
22017 ios_base(const ios_base&);
22018
22019 ios_base&
22020 operator=(const ios_base&);
22021 };
22022
22023
22024
22025 inline ios_base&
22026 boolalpha(ios_base& __base)
22027 {
22028 __base.setf(ios_base::boolalpha);
22029 return __base;
22030 }
22031
22032
22033 inline ios_base&
22034 noboolalpha(ios_base& __base)
22035 {
22036 __base.unsetf(ios_base::boolalpha);
22037 return __base;
22038 }
22039
22040
22041 inline ios_base&
22042 showbase(ios_base& __base)
22043 {
22044 __base.setf(ios_base::showbase);
22045 return __base;
22046 }
22047
22048
22049 inline ios_base&
22050 noshowbase(ios_base& __base)
22051 {
22052 __base.unsetf(ios_base::showbase);
22053 return __base;
22054 }
22055
22056
22057 inline ios_base&
22058 showpoint(ios_base& __base)
22059 {
22060 __base.setf(ios_base::showpoint);
22061 return __base;
22062 }
22063
22064
22065 inline ios_base&
22066 noshowpoint(ios_base& __base)
22067 {
22068 __base.unsetf(ios_base::showpoint);
22069 return __base;
22070 }
22071
22072
22073 inline ios_base&
22074 showpos(ios_base& __base)
22075 {
22076 __base.setf(ios_base::showpos);
22077 return __base;
22078 }
22079
22080
22081 inline ios_base&
22082 noshowpos(ios_base& __base)
22083 {
22084 __base.unsetf(ios_base::showpos);
22085 return __base;
22086 }
22087
22088
22089 inline ios_base&
22090 skipws(ios_base& __base)
22091 {
22092 __base.setf(ios_base::skipws);
22093 return __base;
22094 }
22095
22096
22097 inline ios_base&
22098 noskipws(ios_base& __base)
22099 {
22100 __base.unsetf(ios_base::skipws);
22101 return __base;
22102 }
22103
22104
22105 inline ios_base&
22106 uppercase(ios_base& __base)
22107 {
22108 __base.setf(ios_base::uppercase);
22109 return __base;
22110 }
22111
22112
22113 inline ios_base&
22114 nouppercase(ios_base& __base)
22115 {
22116 __base.unsetf(ios_base::uppercase);
22117 return __base;
22118 }
22119
22120
22121 inline ios_base&
22122 unitbuf(ios_base& __base)
22123 {
22124 __base.setf(ios_base::unitbuf);
22125 return __base;
22126 }
22127
22128
22129 inline ios_base&
22130 nounitbuf(ios_base& __base)
22131 {
22132 __base.unsetf(ios_base::unitbuf);
22133 return __base;
22134 }
22135
22136
22137
22138 inline ios_base&
22139 internal(ios_base& __base)
22140 {
22141 __base.setf(ios_base::internal, ios_base::adjustfield);
22142 return __base;
22143 }
22144
22145
22146 inline ios_base&
22147 left(ios_base& __base)
22148 {
22149 __base.setf(ios_base::left, ios_base::adjustfield);
22150 return __base;
22151 }
22152
22153
22154 inline ios_base&
22155 right(ios_base& __base)
22156 {
22157 __base.setf(ios_base::right, ios_base::adjustfield);
22158 return __base;
22159 }
22160
22161
22162
22163 inline ios_base&
22164 dec(ios_base& __base)
22165 {
22166 __base.setf(ios_base::dec, ios_base::basefield);
22167 return __base;
22168 }
22169
22170
22171 inline ios_base&
22172 hex(ios_base& __base)
22173 {
22174 __base.setf(ios_base::hex, ios_base::basefield);
22175 return __base;
22176 }
22177
22178
22179 inline ios_base&
22180 oct(ios_base& __base)
22181 {
22182 __base.setf(ios_base::oct, ios_base::basefield);
22183 return __base;
22184 }
22185
22186
22187
22188 inline ios_base&
22189 fixed(ios_base& __base)
22190 {
22191 __base.setf(ios_base::fixed, ios_base::floatfield);
22192 return __base;
22193 }
22194
22195
22196 inline ios_base&
22197 scientific(ios_base& __base)
22198 {
22199 __base.setf(ios_base::scientific, ios_base::floatfield);
22200 return __base;
22201 }
22202}
22203# 51 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3
22204# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 1 3
22205# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22206
22207# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22208#pragma GCC visibility push(default)
22209
22210
22211
22212
22213
22214
22215namespace std
22216{
22217
22218
22219
22220
22221
22222 template<typename _CharT, typename _Traits>
22223 streamsize
22224 __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
22225 basic_streambuf<_CharT, _Traits>* __sbout);
22226# 122 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22227 template<typename _CharT, typename _Traits>
22228 class basic_streambuf
22229 {
22230 public:
22231
22232
22233
22234
22235
22236
22237 typedef _CharT char_type;
22238 typedef _Traits traits_type;
22239 typedef typename traits_type::int_type int_type;
22240 typedef typename traits_type::pos_type pos_type;
22241 typedef typename traits_type::off_type off_type;
22242# 145 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22243 typedef basic_streambuf<char_type, traits_type> __streambuf_type;
22244
22245
22246 friend class basic_ios<char_type, traits_type>;
22247 friend class basic_istream<char_type, traits_type>;
22248 friend class basic_ostream<char_type, traits_type>;
22249 friend class istreambuf_iterator<char_type, traits_type>;
22250 friend class ostreambuf_iterator<char_type, traits_type>;
22251
22252 friend streamsize
22253 __copy_streambufs<>(__streambuf_type* __sbin,
22254 __streambuf_type* __sbout);
22255
22256 template<typename _CharT2, typename _Traits2>
22257 friend basic_istream<_CharT2, _Traits2>&
22258 operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*);
22259
22260 template<typename _CharT2, typename _Traits2, typename _Alloc>
22261 friend basic_istream<_CharT2, _Traits2>&
22262 operator>>(basic_istream<_CharT2, _Traits2>&,
22263 basic_string<_CharT2, _Traits2, _Alloc>&);
22264
22265 template<typename _CharT2, typename _Traits2, typename _Alloc>
22266 friend basic_istream<_CharT2, _Traits2>&
22267 getline(basic_istream<_CharT2, _Traits2>&,
22268 basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2);
22269
22270 protected:
22271# 183 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22272 char_type* _M_in_beg;
22273 char_type* _M_in_cur;
22274 char_type* _M_in_end;
22275 char_type* _M_out_beg;
22276 char_type* _M_out_cur;
22277 char_type* _M_out_end;
22278
22279
22280
22281
22282
22283
22284 locale _M_buf_locale;
22285
22286 public:
22287
22288 virtual
22289 ~basic_streambuf()
22290 { }
22291# 211 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22292 locale
22293 pubimbue(const locale &__loc)
22294 {
22295 locale __tmp(this->getloc());
22296 this->imbue(__loc);
22297 _M_buf_locale = __loc;
22298 return __tmp;
22299 }
22300# 228 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22301 locale
22302 getloc() const
22303 { return _M_buf_locale; }
22304# 241 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22305 __streambuf_type*
22306 pubsetbuf(char_type* __s, streamsize __n)
22307 { return this->setbuf(__s, __n); }
22308
22309 pos_type
22310 pubseekoff(off_type __off, ios_base::seekdir __way,
22311 ios_base::openmode __mode = ios_base::in | ios_base::out)
22312 { return this->seekoff(__off, __way, __mode); }
22313
22314 pos_type
22315 pubseekpos(pos_type __sp,
22316 ios_base::openmode __mode = ios_base::in | ios_base::out)
22317 { return this->seekpos(__sp, __mode); }
22318
22319 int
22320 pubsync() { return this->sync(); }
22321# 268 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22322 streamsize
22323 in_avail()
22324 {
22325 const streamsize __ret = this->egptr() - this->gptr();
22326 return __ret ? __ret : this->showmanyc();
22327 }
22328# 282 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22329 int_type
22330 snextc()
22331 {
22332 int_type __ret = traits_type::eof();
22333 if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(),
22334 __ret), true))
22335 __ret = this->sgetc();
22336 return __ret;
22337 }
22338# 300 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22339 int_type
22340 sbumpc()
22341 {
22342 int_type __ret;
22343 if (__builtin_expect(this->gptr() < this->egptr(), true))
22344 {
22345 __ret = traits_type::to_int_type(*this->gptr());
22346 this->gbump(1);
22347 }
22348 else
22349 __ret = this->uflow();
22350 return __ret;
22351 }
22352# 322 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22353 int_type
22354 sgetc()
22355 {
22356 int_type __ret;
22357 if (__builtin_expect(this->gptr() < this->egptr(), true))
22358 __ret = traits_type::to_int_type(*this->gptr());
22359 else
22360 __ret = this->underflow();
22361 return __ret;
22362 }
22363# 341 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22364 streamsize
22365 sgetn(char_type* __s, streamsize __n)
22366 { return this->xsgetn(__s, __n); }
22367# 355 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22368 int_type
22369 sputbackc(char_type __c)
22370 {
22371 int_type __ret;
22372 const bool __testpos = this->eback() < this->gptr();
22373 if (__builtin_expect(!__testpos ||
22374 !traits_type::eq(__c, this->gptr()[-1]), false))
22375 __ret = this->pbackfail(traits_type::to_int_type(__c));
22376 else
22377 {
22378 this->gbump(-1);
22379 __ret = traits_type::to_int_type(*this->gptr());
22380 }
22381 return __ret;
22382 }
22383# 380 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22384 int_type
22385 sungetc()
22386 {
22387 int_type __ret;
22388 if (__builtin_expect(this->eback() < this->gptr(), true))
22389 {
22390 this->gbump(-1);
22391 __ret = traits_type::to_int_type(*this->gptr());
22392 }
22393 else
22394 __ret = this->pbackfail();
22395 return __ret;
22396 }
22397# 407 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22398 int_type
22399 sputc(char_type __c)
22400 {
22401 int_type __ret;
22402 if (__builtin_expect(this->pptr() < this->epptr(), true))
22403 {
22404 *this->pptr() = __c;
22405 this->pbump(1);
22406 __ret = traits_type::to_int_type(__c);
22407 }
22408 else
22409 __ret = this->overflow(traits_type::to_int_type(__c));
22410 return __ret;
22411 }
22412# 433 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22413 streamsize
22414 sputn(const char_type* __s, streamsize __n)
22415 { return this->xsputn(__s, __n); }
22416
22417 protected:
22418# 447 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22419 basic_streambuf()
22420 : _M_in_beg(0), _M_in_cur(0), _M_in_end(0),
22421 _M_out_beg(0), _M_out_cur(0), _M_out_end(0),
22422 _M_buf_locale(locale())
22423 { }
22424# 465 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22425 char_type*
22426 eback() const { return _M_in_beg; }
22427
22428 char_type*
22429 gptr() const { return _M_in_cur; }
22430
22431 char_type*
22432 egptr() const { return _M_in_end; }
22433# 481 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22434 void
22435 gbump(int __n) { _M_in_cur += __n; }
22436# 492 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22437 void
22438 setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
22439 {
22440 _M_in_beg = __gbeg;
22441 _M_in_cur = __gnext;
22442 _M_in_end = __gend;
22443 }
22444# 512 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22445 char_type*
22446 pbase() const { return _M_out_beg; }
22447
22448 char_type*
22449 pptr() const { return _M_out_cur; }
22450
22451 char_type*
22452 epptr() const { return _M_out_end; }
22453# 528 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22454 void
22455 pbump(int __n) { _M_out_cur += __n; }
22456# 538 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22457 void
22458 setp(char_type* __pbeg, char_type* __pend)
22459 {
22460 _M_out_beg = _M_out_cur = __pbeg;
22461 _M_out_end = __pend;
22462 }
22463# 559 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22464 virtual void
22465 imbue(const locale&)
22466 { }
22467# 574 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22468 virtual basic_streambuf<char_type,_Traits>*
22469 setbuf(char_type*, streamsize)
22470 { return this; }
22471# 585 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22472 virtual pos_type
22473 seekoff(off_type, ios_base::seekdir,
22474 ios_base::openmode = ios_base::in | ios_base::out)
22475 { return pos_type(off_type(-1)); }
22476# 597 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22477 virtual pos_type
22478 seekpos(pos_type,
22479 ios_base::openmode = ios_base::in | ios_base::out)
22480 { return pos_type(off_type(-1)); }
22481# 610 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22482 virtual int
22483 sync() { return 0; }
22484# 632 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22485 virtual streamsize
22486 showmanyc() { return 0; }
22487# 648 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22488 virtual streamsize
22489 xsgetn(char_type* __s, streamsize __n);
22490# 670 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22491 virtual int_type
22492 underflow()
22493 { return traits_type::eof(); }
22494# 683 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22495 virtual int_type
22496 uflow()
22497 {
22498 int_type __ret = traits_type::eof();
22499 const bool __testeof = traits_type::eq_int_type(this->underflow(),
22500 __ret);
22501 if (!__testeof)
22502 {
22503 __ret = traits_type::to_int_type(*this->gptr());
22504 this->gbump(1);
22505 }
22506 return __ret;
22507 }
22508# 707 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22509 virtual int_type
22510 pbackfail(int_type = traits_type::eof())
22511 { return traits_type::eof(); }
22512# 725 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22513 virtual streamsize
22514 xsputn(const char_type* __s, streamsize __n);
22515# 750 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22516 virtual int_type
22517 overflow(int_type = traits_type::eof())
22518 { return traits_type::eof(); }
22519# 779 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3
22520 private:
22521
22522
22523 basic_streambuf(const __streambuf_type& __sb)
22524 : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur),
22525 _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg),
22526 _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur),
22527 _M_buf_locale(__sb._M_buf_locale)
22528 { }
22529
22530 __streambuf_type&
22531 operator=(const __streambuf_type&) { return *this; };
22532 };
22533
22534
22535 template<>
22536 streamsize
22537 __copy_streambufs(basic_streambuf<char>* __sbin,
22538 basic_streambuf<char>* __sbout);
22539
22540 template<>
22541 streamsize
22542 __copy_streambufs(basic_streambuf<wchar_t>* __sbin,
22543 basic_streambuf<wchar_t>* __sbout);
22544
22545}
22546
22547
22548# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf.tcc" 1 3
22549# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf.tcc" 3
22550
22551# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf.tcc" 3
22552
22553namespace std
22554{
22555 template<typename _CharT, typename _Traits>
22556 streamsize
22557 basic_streambuf<_CharT, _Traits>::
22558 xsgetn(char_type* __s, streamsize __n)
22559 {
22560 streamsize __ret = 0;
22561 while (__ret < __n)
22562 {
22563 const streamsize __buf_len = this->egptr() - this->gptr();
22564 if (__buf_len)
22565 {
22566 const streamsize __remaining = __n - __ret;
22567 const streamsize __len = std::min(__buf_len, __remaining);
22568 traits_type::copy(__s, this->gptr(), __len);
22569 __ret += __len;
22570 __s += __len;
22571 this->gbump(__len);
22572 }
22573
22574 if (__ret < __n)
22575 {
22576 const int_type __c = this->uflow();
22577 if (!traits_type::eq_int_type(__c, traits_type::eof()))
22578 {
22579 traits_type::assign(*__s++, traits_type::to_char_type(__c));
22580 ++__ret;
22581 }
22582 else
22583 break;
22584 }
22585 }
22586 return __ret;
22587 }
22588
22589 template<typename _CharT, typename _Traits>
22590 streamsize
22591 basic_streambuf<_CharT, _Traits>::
22592 xsputn(const char_type* __s, streamsize __n)
22593 {
22594 streamsize __ret = 0;
22595 while (__ret < __n)
22596 {
22597 const streamsize __buf_len = this->epptr() - this->pptr();
22598 if (__buf_len)
22599 {
22600 const streamsize __remaining = __n - __ret;
22601 const streamsize __len = std::min(__buf_len, __remaining);
22602 traits_type::copy(this->pptr(), __s, __len);
22603 __ret += __len;
22604 __s += __len;
22605 this->pbump(__len);
22606 }
22607
22608 if (__ret < __n)
22609 {
22610 int_type __c = this->overflow(traits_type::to_int_type(*__s));
22611 if (!traits_type::eq_int_type(__c, traits_type::eof()))
22612 {
22613 ++__ret;
22614 ++__s;
22615 }
22616 else
22617 break;
22618 }
22619 }
22620 return __ret;
22621 }
22622
22623
22624
22625
22626 template<typename _CharT, typename _Traits>
22627 streamsize
22628 __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
22629 basic_streambuf<_CharT, _Traits>* __sbout)
22630 {
22631 streamsize __ret = 0;
22632 typename _Traits::int_type __c = __sbin->sgetc();
22633 while (!_Traits::eq_int_type(__c, _Traits::eof()))
22634 {
22635 __c = __sbout->sputc(_Traits::to_char_type(__c));
22636 if (_Traits::eq_int_type(__c, _Traits::eof()))
22637 break;
22638 ++__ret;
22639 __c = __sbin->snextc();
22640 }
22641 return __ret;
22642 }
22643
22644
22645
22646
22647
22648 extern template class basic_streambuf<char>;
22649 extern template
22650 streamsize
22651 __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*);
22652
22653
22654 extern template class basic_streambuf<wchar_t>;
22655 extern template
22656 streamsize
22657 __copy_streambufs(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*);
22658
22659
22660}
22661# 808 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 2 3
22662
22663
22664#pragma GCC visibility pop
22665# 52 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3
22666# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 1 3
22667# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
22668
22669# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
22670
22671# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf_iterator.h" 1 3
22672# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf_iterator.h" 3
22673
22674# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf_iterator.h" 3
22675
22676
22677
22678
22679
22680
22681namespace std
22682{
22683
22684
22685 template<typename _CharT, typename _Traits>
22686 class istreambuf_iterator
22687 : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
22688 _CharT*, _CharT&>
22689 {
22690 public:
22691
22692
22693
22694 typedef _CharT char_type;
22695 typedef _Traits traits_type;
22696 typedef typename _Traits::int_type int_type;
22697 typedef basic_streambuf<_CharT, _Traits> streambuf_type;
22698 typedef basic_istream<_CharT, _Traits> istream_type;
22699
22700
22701 private:
22702
22703
22704
22705
22706
22707
22708
22709 mutable streambuf_type* _M_sbuf;
22710 mutable int_type _M_c;
22711
22712 public:
22713
22714 istreambuf_iterator() throw()
22715 : _M_sbuf(0), _M_c(traits_type::eof()) { }
22716
22717
22718 istreambuf_iterator(istream_type& __s) throw()
22719 : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
22720
22721
22722 istreambuf_iterator(streambuf_type* __s) throw()
22723 : _M_sbuf(__s), _M_c(traits_type::eof()) { }
22724
22725
22726
22727
22728 char_type
22729 operator*() const
22730 {
22731
22732
22733
22734
22735
22736
22737
22738 return traits_type::to_char_type(_M_get());
22739 }
22740
22741
22742 istreambuf_iterator&
22743 operator++()
22744 {
22745 ;
22746
22747
22748 if (_M_sbuf)
22749 {
22750 _M_sbuf->sbumpc();
22751 _M_c = traits_type::eof();
22752 }
22753 return *this;
22754 }
22755
22756
22757 istreambuf_iterator
22758 operator++(int)
22759 {
22760 ;
22761
22762
22763
22764 istreambuf_iterator __old = *this;
22765 if (_M_sbuf)
22766 {
22767 __old._M_c = _M_sbuf->sbumpc();
22768 _M_c = traits_type::eof();
22769 }
22770 return __old;
22771 }
22772
22773
22774
22775
22776
22777 bool
22778 equal(const istreambuf_iterator& __b) const
22779 {
22780 const bool __thiseof = _M_at_eof();
22781 const bool __beof = __b._M_at_eof();
22782 return (__thiseof && __beof || (!__thiseof && !__beof));
22783 }
22784
22785 private:
22786 int_type
22787 _M_get() const
22788 {
22789 const int_type __eof = traits_type::eof();
22790 int_type __ret = __eof;
22791 if (_M_sbuf)
22792 {
22793 if (!traits_type::eq_int_type(_M_c, __eof))
22794 __ret = _M_c;
22795 else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()),
22796 __eof))
22797 _M_c = __ret;
22798 else
22799 _M_sbuf = 0;
22800 }
22801 return __ret;
22802 }
22803
22804 bool
22805 _M_at_eof() const
22806 {
22807 const int_type __eof = traits_type::eof();
22808 return traits_type::eq_int_type(_M_get(), __eof);
22809 }
22810 };
22811
22812 template<typename _CharT, typename _Traits>
22813 inline bool
22814 operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
22815 const istreambuf_iterator<_CharT, _Traits>& __b)
22816 { return __a.equal(__b); }
22817
22818 template<typename _CharT, typename _Traits>
22819 inline bool
22820 operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
22821 const istreambuf_iterator<_CharT, _Traits>& __b)
22822 { return !__a.equal(__b); }
22823
22824
22825 template<typename _CharT, typename _Traits>
22826 class ostreambuf_iterator
22827 : public iterator<output_iterator_tag, void, void, void, void>
22828 {
22829 public:
22830
22831
22832
22833 typedef _CharT char_type;
22834 typedef _Traits traits_type;
22835 typedef basic_streambuf<_CharT, _Traits> streambuf_type;
22836 typedef basic_ostream<_CharT, _Traits> ostream_type;
22837
22838
22839 private:
22840 streambuf_type* _M_sbuf;
22841 bool _M_failed;
22842
22843 public:
22844
22845 ostreambuf_iterator(ostream_type& __s) throw ()
22846 : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
22847
22848
22849 ostreambuf_iterator(streambuf_type* __s) throw ()
22850 : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
22851
22852
22853 ostreambuf_iterator&
22854 operator=(_CharT __c)
22855 {
22856 if (!_M_failed &&
22857 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
22858 _M_failed = true;
22859 return *this;
22860 }
22861
22862
22863 ostreambuf_iterator&
22864 operator*()
22865 { return *this; }
22866
22867
22868 ostreambuf_iterator&
22869 operator++(int)
22870 { return *this; }
22871
22872
22873 ostreambuf_iterator&
22874 operator++()
22875 { return *this; }
22876
22877
22878 bool
22879 failed() const throw()
22880 { return _M_failed; }
22881
22882 ostreambuf_iterator&
22883 _M_put(const _CharT* __ws, streamsize __len)
22884 {
22885 if (__builtin_expect(!_M_failed, true)
22886 && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
22887 false))
22888 _M_failed = true;
22889 return *this;
22890 }
22891 };
22892}
22893# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 2 3
22894
22895
22896# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 1 3
22897# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
22898
22899# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
22900
22901
22902# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 1 3
22903# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 3
22904
22905# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 3
22906#pragma GCC visibility push(default)
22907
22908
22909
22910
22911# 1 "/usr/include/wctype.h" 1 3 4
22912# 35 "/usr/include/wctype.h" 3 4
22913# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
22914# 36 "/usr/include/wctype.h" 2 3 4
22915# 45 "/usr/include/wctype.h" 3 4
22916
22917# 63 "/usr/include/wctype.h" 3 4
22918
22919
22920
22921typedef unsigned long int wctype_t;
22922
22923# 85 "/usr/include/wctype.h" 3 4
22924enum
22925{
22926 __ISwupper = 0,
22927 __ISwlower = 1,
22928 __ISwalpha = 2,
22929 __ISwdigit = 3,
22930 __ISwxdigit = 4,
22931 __ISwspace = 5,
22932 __ISwprint = 6,
22933 __ISwgraph = 7,
22934 __ISwblank = 8,
22935 __ISwcntrl = 9,
22936 __ISwpunct = 10,
22937 __ISwalnum = 11,
22938
22939 _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))),
22940 _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))),
22941 _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))),
22942 _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))),
22943 _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))),
22944 _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))),
22945 _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))),
22946 _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))),
22947 _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))),
22948 _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))),
22949 _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))),
22950 _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24))))
22951};
22952
22953
22954
22955extern "C" {
22956
22957
22958
22959
22960
22961
22962
22963
22964extern int iswalnum (wint_t __wc) throw ();
22965
22966
22967
22968
22969
22970extern int iswalpha (wint_t __wc) throw ();
22971
22972
22973extern int iswcntrl (wint_t __wc) throw ();
22974
22975
22976
22977extern int iswdigit (wint_t __wc) throw ();
22978
22979
22980
22981extern int iswgraph (wint_t __wc) throw ();
22982
22983
22984
22985
22986extern int iswlower (wint_t __wc) throw ();
22987
22988
22989extern int iswprint (wint_t __wc) throw ();
22990
22991
22992
22993
22994extern int iswpunct (wint_t __wc) throw ();
22995
22996
22997
22998
22999extern int iswspace (wint_t __wc) throw ();
23000
23001
23002
23003
23004extern int iswupper (wint_t __wc) throw ();
23005
23006
23007
23008
23009extern int iswxdigit (wint_t __wc) throw ();
23010
23011
23012
23013
23014
23015extern int iswblank (wint_t __wc) throw ();
23016# 185 "/usr/include/wctype.h" 3 4
23017extern wctype_t wctype (__const char *__property) throw ();
23018
23019
23020
23021extern int iswctype (wint_t __wc, wctype_t __desc) throw ();
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032typedef __const __int32_t *wctrans_t;
23033
23034
23035
23036
23037
23038
23039
23040extern wint_t towlower (wint_t __wc) throw ();
23041
23042
23043extern wint_t towupper (wint_t __wc) throw ();
23044
23045
23046}
23047# 227 "/usr/include/wctype.h" 3 4
23048extern "C" {
23049
23050
23051
23052
23053extern wctrans_t wctrans (__const char *__property) throw ();
23054
23055
23056extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw ();
23057
23058
23059
23060
23061
23062
23063
23064
23065extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw ();
23066
23067
23068
23069
23070
23071extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw ();
23072
23073
23074extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw ();
23075
23076
23077
23078extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw ();
23079
23080
23081
23082extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw ();
23083
23084
23085
23086
23087extern int iswlower_l (wint_t __wc, __locale_t __locale) throw ();
23088
23089
23090extern int iswprint_l (wint_t __wc, __locale_t __locale) throw ();
23091
23092
23093
23094
23095extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw ();
23096
23097
23098
23099
23100extern int iswspace_l (wint_t __wc, __locale_t __locale) throw ();
23101
23102
23103
23104
23105extern int iswupper_l (wint_t __wc, __locale_t __locale) throw ();
23106
23107
23108
23109
23110extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw ();
23111
23112
23113
23114
23115extern int iswblank_l (wint_t __wc, __locale_t __locale) throw ();
23116
23117
23118
23119extern wctype_t wctype_l (__const char *__property, __locale_t __locale)
23120 throw ();
23121
23122
23123
23124extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale)
23125 throw ();
23126
23127
23128
23129
23130
23131
23132
23133extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw ();
23134
23135
23136extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw ();
23137
23138
23139
23140extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale)
23141 throw ();
23142
23143
23144extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc,
23145 __locale_t __locale) throw ();
23146
23147
23148
23149}
23150# 55 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 2 3
23151# 80 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 3
23152namespace std
23153{
23154 using ::wint_t;
23155
23156 using ::wctype_t;
23157 using ::wctrans_t;
23158
23159 using ::iswalnum;
23160 using ::iswalpha;
23161
23162 using ::iswblank;
23163
23164 using ::iswcntrl;
23165 using ::iswctype;
23166 using ::iswdigit;
23167 using ::iswgraph;
23168 using ::iswlower;
23169 using ::iswprint;
23170 using ::iswpunct;
23171 using ::iswspace;
23172 using ::iswupper;
23173 using ::iswxdigit;
23174 using ::towctrans;
23175 using ::towlower;
23176 using ::towupper;
23177 using ::wctrans;
23178 using ::wctype;
23179}
23180
23181
23182#pragma GCC visibility pop
23183# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3
23184
23185
23186
23187
23188namespace std
23189{
23190# 63 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23191 template<typename _Tv>
23192 void
23193 __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err,
23194 const __c_locale& __cloc);
23195
23196
23197 template<>
23198 void
23199 __convert_to_v(const char*, float&, ios_base::iostate&,
23200 const __c_locale&);
23201
23202 template<>
23203 void
23204 __convert_to_v(const char*, double&, ios_base::iostate&,
23205 const __c_locale&);
23206
23207 template<>
23208 void
23209 __convert_to_v(const char*, long double&, ios_base::iostate&,
23210 const __c_locale&);
23211
23212
23213
23214 template<typename _CharT, typename _Traits>
23215 struct __pad
23216 {
23217 static void
23218 _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
23219 const _CharT* __olds, const streamsize __newlen,
23220 const streamsize __oldlen, const bool __num);
23221 };
23222
23223
23224
23225
23226
23227
23228 template<typename _CharT>
23229 _CharT*
23230 __add_grouping(_CharT* __s, _CharT __sep,
23231 const char* __gbeg, size_t __gsize,
23232 const _CharT* __first, const _CharT* __last);
23233
23234
23235
23236
23237 template<typename _CharT>
23238 inline
23239 ostreambuf_iterator<_CharT>
23240 __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len)
23241 {
23242 __s._M_put(__ws, __len);
23243 return __s;
23244 }
23245
23246
23247 template<typename _CharT, typename _OutIter>
23248 inline
23249 _OutIter
23250 __write(_OutIter __s, const _CharT* __ws, int __len)
23251 {
23252 for (int __j = 0; __j < __len; __j++, ++__s)
23253 *__s = __ws[__j];
23254 return __s;
23255 }
23256
23257
23258
23259
23260# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/ctype_base.h" 1 3
23261# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/ctype_base.h" 3
23262 struct ctype_base
23263 {
23264
23265 typedef const int* __to_type;
23266
23267
23268
23269 typedef unsigned short mask;
23270 static const mask upper = _ISupper;
23271 static const mask lower = _ISlower;
23272 static const mask alpha = _ISalpha;
23273 static const mask digit = _ISdigit;
23274 static const mask xdigit = _ISxdigit;
23275 static const mask space = _ISspace;
23276 static const mask print = _ISprint;
23277 static const mask graph = _ISalpha | _ISdigit | _ISpunct;
23278 static const mask cntrl = _IScntrl;
23279 static const mask punct = _ISpunct;
23280 static const mask alnum = _ISalpha | _ISdigit;
23281 };
23282# 133 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3
23283# 144 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23284 template<typename _CharT>
23285 class __ctype_abstract_base : public locale::facet, public ctype_base
23286 {
23287 public:
23288
23289
23290 typedef _CharT char_type;
23291# 162 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23292 bool
23293 is(mask __m, char_type __c) const
23294 { return this->do_is(__m, __c); }
23295# 179 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23296 const char_type*
23297 is(const char_type *__lo, const char_type *__hi, mask *__vec) const
23298 { return this->do_is(__lo, __hi, __vec); }
23299# 195 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23300 const char_type*
23301 scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
23302 { return this->do_scan_is(__m, __lo, __hi); }
23303# 211 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23304 const char_type*
23305 scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
23306 { return this->do_scan_not(__m, __lo, __hi); }
23307# 225 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23308 char_type
23309 toupper(char_type __c) const
23310 { return this->do_toupper(__c); }
23311# 240 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23312 const char_type*
23313 toupper(char_type *__lo, const char_type* __hi) const
23314 { return this->do_toupper(__lo, __hi); }
23315# 254 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23316 char_type
23317 tolower(char_type __c) const
23318 { return this->do_tolower(__c); }
23319# 269 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23320 const char_type*
23321 tolower(char_type* __lo, const char_type* __hi) const
23322 { return this->do_tolower(__lo, __hi); }
23323# 286 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23324 char_type
23325 widen(char __c) const
23326 { return this->do_widen(__c); }
23327# 305 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23328 const char*
23329 widen(const char* __lo, const char* __hi, char_type* __to) const
23330 { return this->do_widen(__lo, __hi, __to); }
23331# 324 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23332 char
23333 narrow(char_type __c, char __dfault) const
23334 { return this->do_narrow(__c, __dfault); }
23335# 346 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23336 const char_type*
23337 narrow(const char_type* __lo, const char_type* __hi,
23338 char __dfault, char *__to) const
23339 { return this->do_narrow(__lo, __hi, __dfault, __to); }
23340
23341 protected:
23342 explicit
23343 __ctype_abstract_base(size_t __refs = 0): facet(__refs) { }
23344
23345 virtual
23346 ~__ctype_abstract_base() { }
23347# 371 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23348 virtual bool
23349 do_is(mask __m, char_type __c) const = 0;
23350# 390 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23351 virtual const char_type*
23352 do_is(const char_type* __lo, const char_type* __hi,
23353 mask* __vec) const = 0;
23354# 409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23355 virtual const char_type*
23356 do_scan_is(mask __m, const char_type* __lo,
23357 const char_type* __hi) const = 0;
23358# 428 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23359 virtual const char_type*
23360 do_scan_not(mask __m, const char_type* __lo,
23361 const char_type* __hi) const = 0;
23362# 446 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23363 virtual char_type
23364 do_toupper(char_type) const = 0;
23365# 463 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23366 virtual const char_type*
23367 do_toupper(char_type* __lo, const char_type* __hi) const = 0;
23368# 479 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23369 virtual char_type
23370 do_tolower(char_type) const = 0;
23371# 496 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23372 virtual const char_type*
23373 do_tolower(char_type* __lo, const char_type* __hi) const = 0;
23374# 515 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23375 virtual char_type
23376 do_widen(char) const = 0;
23377# 536 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23378 virtual const char*
23379 do_widen(const char* __lo, const char* __hi,
23380 char_type* __dest) const = 0;
23381# 558 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23382 virtual char
23383 do_narrow(char_type, char __dfault) const = 0;
23384# 582 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23385 virtual const char_type*
23386 do_narrow(const char_type* __lo, const char_type* __hi,
23387 char __dfault, char* __dest) const = 0;
23388 };
23389# 605 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23390 template<typename _CharT>
23391 class ctype : public __ctype_abstract_base<_CharT>
23392 {
23393 public:
23394
23395 typedef _CharT char_type;
23396 typedef typename __ctype_abstract_base<_CharT>::mask mask;
23397
23398
23399 static locale::id id;
23400
23401 explicit
23402 ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
23403
23404 protected:
23405 virtual
23406 ~ctype();
23407
23408 virtual bool
23409 do_is(mask __m, char_type __c) const;
23410
23411 virtual const char_type*
23412 do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
23413
23414 virtual const char_type*
23415 do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
23416
23417 virtual const char_type*
23418 do_scan_not(mask __m, const char_type* __lo,
23419 const char_type* __hi) const;
23420
23421 virtual char_type
23422 do_toupper(char_type __c) const;
23423
23424 virtual const char_type*
23425 do_toupper(char_type* __lo, const char_type* __hi) const;
23426
23427 virtual char_type
23428 do_tolower(char_type __c) const;
23429
23430 virtual const char_type*
23431 do_tolower(char_type* __lo, const char_type* __hi) const;
23432
23433 virtual char_type
23434 do_widen(char __c) const;
23435
23436 virtual const char*
23437 do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
23438
23439 virtual char
23440 do_narrow(char_type, char __dfault) const;
23441
23442 virtual const char_type*
23443 do_narrow(const char_type* __lo, const char_type* __hi,
23444 char __dfault, char* __dest) const;
23445 };
23446
23447 template<typename _CharT>
23448 locale::id ctype<_CharT>::id;
23449# 674 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23450 template<>
23451 class ctype<char> : public locale::facet, public ctype_base
23452 {
23453 public:
23454
23455
23456 typedef char char_type;
23457
23458 protected:
23459
23460 __c_locale _M_c_locale_ctype;
23461 bool _M_del;
23462 __to_type _M_toupper;
23463 __to_type _M_tolower;
23464 const mask* _M_table;
23465 mutable char _M_widen_ok;
23466 mutable char _M_widen[1 + static_cast<unsigned char>(-1)];
23467 mutable char _M_narrow[1 + static_cast<unsigned char>(-1)];
23468 mutable char _M_narrow_ok;
23469
23470
23471 public:
23472
23473 static locale::id id;
23474
23475 static const size_t table_size = 1 + static_cast<unsigned char>(-1);
23476# 711 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23477 explicit
23478 ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
23479# 724 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23480 explicit
23481 ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
23482 size_t __refs = 0);
23483# 737 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23484 inline bool
23485 is(mask __m, char __c) const;
23486# 752 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23487 inline const char*
23488 is(const char* __lo, const char* __hi, mask* __vec) const;
23489# 766 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23490 inline const char*
23491 scan_is(mask __m, const char* __lo, const char* __hi) const;
23492# 780 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23493 inline const char*
23494 scan_not(mask __m, const char* __lo, const char* __hi) const;
23495# 795 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23496 char_type
23497 toupper(char_type __c) const
23498 { return this->do_toupper(__c); }
23499# 812 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23500 const char_type*
23501 toupper(char_type *__lo, const char_type* __hi) const
23502 { return this->do_toupper(__lo, __hi); }
23503# 828 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23504 char_type
23505 tolower(char_type __c) const
23506 { return this->do_tolower(__c); }
23507# 845 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23508 const char_type*
23509 tolower(char_type* __lo, const char_type* __hi) const
23510 { return this->do_tolower(__lo, __hi); }
23511# 865 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23512 char_type
23513 widen(char __c) const
23514 {
23515 if (_M_widen_ok)
23516 return _M_widen[static_cast<unsigned char>(__c)];
23517 this->_M_widen_init();
23518 return this->do_widen(__c);
23519 }
23520# 892 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23521 const char*
23522 widen(const char* __lo, const char* __hi, char_type* __to) const
23523 {
23524 if (_M_widen_ok == 1)
23525 {
23526 memcpy(__to, __lo, __hi - __lo);
23527 return __hi;
23528 }
23529 if (!_M_widen_ok)
23530 _M_widen_init();
23531 return this->do_widen(__lo, __hi, __to);
23532 }
23533# 923 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23534 char
23535 narrow(char_type __c, char __dfault) const
23536 {
23537 if (_M_narrow[static_cast<unsigned char>(__c)])
23538 return _M_narrow[static_cast<unsigned char>(__c)];
23539 const char __t = do_narrow(__c, __dfault);
23540 if (__t != __dfault)
23541 _M_narrow[static_cast<unsigned char>(__c)] = __t;
23542 return __t;
23543 }
23544# 956 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23545 const char_type*
23546 narrow(const char_type* __lo, const char_type* __hi,
23547 char __dfault, char *__to) const
23548 {
23549 if (__builtin_expect(_M_narrow_ok == 1, true))
23550 {
23551 memcpy(__to, __lo, __hi - __lo);
23552 return __hi;
23553 }
23554 if (!_M_narrow_ok)
23555 _M_narrow_init();
23556 return this->do_narrow(__lo, __hi, __dfault, __to);
23557 }
23558
23559 protected:
23560
23561
23562 const mask*
23563 table() const throw()
23564 { return _M_table; }
23565
23566
23567 static const mask*
23568 classic_table() throw();
23569
23570
23571
23572
23573
23574
23575
23576 virtual
23577 ~ctype();
23578# 1003 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23579 virtual char_type
23580 do_toupper(char_type) const;
23581# 1020 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23582 virtual const char_type*
23583 do_toupper(char_type* __lo, const char_type* __hi) const;
23584# 1036 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23585 virtual char_type
23586 do_tolower(char_type) const;
23587# 1053 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23588 virtual const char_type*
23589 do_tolower(char_type* __lo, const char_type* __hi) const;
23590# 1073 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23591 virtual char_type
23592 do_widen(char __c) const
23593 { return __c; }
23594# 1096 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23595 virtual const char*
23596 do_widen(const char* __lo, const char* __hi, char_type* __dest) const
23597 {
23598 memcpy(__dest, __lo, __hi - __lo);
23599 return __hi;
23600 }
23601# 1122 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23602 virtual char
23603 do_narrow(char_type __c, char) const
23604 { return __c; }
23605# 1148 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23606 virtual const char_type*
23607 do_narrow(const char_type* __lo, const char_type* __hi,
23608 char, char* __dest) const
23609 {
23610 memcpy(__dest, __lo, __hi - __lo);
23611 return __hi;
23612 }
23613
23614 private:
23615
23616 void _M_widen_init() const
23617 {
23618 char __tmp[sizeof(_M_widen)];
23619 for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
23620 __tmp[__i] = __i;
23621 do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen);
23622
23623 _M_widen_ok = 1;
23624
23625 if (memcmp(__tmp, _M_widen, sizeof(_M_widen)))
23626 _M_widen_ok = 2;
23627 }
23628
23629
23630
23631
23632 void _M_narrow_init() const
23633 {
23634 char __tmp[sizeof(_M_narrow)];
23635 for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i)
23636 __tmp[__i] = __i;
23637 do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow);
23638
23639 _M_narrow_ok = 1;
23640 if (memcmp(__tmp, _M_narrow, sizeof(_M_narrow)))
23641 _M_narrow_ok = 2;
23642 else
23643 {
23644
23645
23646 char __c;
23647 do_narrow(__tmp, __tmp + 1, 1, &__c);
23648 if (__c == 1)
23649 _M_narrow_ok = 2;
23650 }
23651 }
23652 };
23653
23654 template<>
23655 const ctype<char>&
23656 use_facet<ctype<char> >(const locale& __loc);
23657# 1212 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23658 template<>
23659 class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
23660 {
23661 public:
23662
23663
23664 typedef wchar_t char_type;
23665 typedef wctype_t __wmask_type;
23666
23667 protected:
23668 __c_locale _M_c_locale_ctype;
23669
23670
23671 bool _M_narrow_ok;
23672 char _M_narrow[128];
23673 wint_t _M_widen[1 + static_cast<unsigned char>(-1)];
23674
23675
23676 mask _M_bit[16];
23677 __wmask_type _M_wmask[16];
23678
23679 public:
23680
23681
23682 static locale::id id;
23683# 1245 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23684 explicit
23685 ctype(size_t __refs = 0);
23686# 1256 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23687 explicit
23688 ctype(__c_locale __cloc, size_t __refs = 0);
23689
23690 protected:
23691 __wmask_type
23692 _M_convert_to_wmask(const mask __m) const;
23693
23694
23695 virtual
23696 ~ctype();
23697# 1280 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23698 virtual bool
23699 do_is(mask __m, char_type __c) const;
23700# 1299 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23701 virtual const char_type*
23702 do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
23703# 1317 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23704 virtual const char_type*
23705 do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
23706# 1335 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23707 virtual const char_type*
23708 do_scan_not(mask __m, const char_type* __lo,
23709 const char_type* __hi) const;
23710# 1352 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23711 virtual char_type
23712 do_toupper(char_type) const;
23713# 1369 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23714 virtual const char_type*
23715 do_toupper(char_type* __lo, const char_type* __hi) const;
23716# 1385 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23717 virtual char_type
23718 do_tolower(char_type) const;
23719# 1402 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23720 virtual const char_type*
23721 do_tolower(char_type* __lo, const char_type* __hi) const;
23722# 1422 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23723 virtual char_type
23724 do_widen(char) const;
23725# 1444 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23726 virtual const char*
23727 do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
23728# 1467 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23729 virtual char
23730 do_narrow(char_type, char __dfault) const;
23731# 1493 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
23732 virtual const char_type*
23733 do_narrow(const char_type* __lo, const char_type* __hi,
23734 char __dfault, char* __dest) const;
23735
23736
23737 void
23738 _M_initialize_ctype();
23739 };
23740
23741 template<>
23742 const ctype<wchar_t>&
23743 use_facet<ctype<wchar_t> >(const locale& __loc);
23744
23745
23746
23747# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/ctype_inline.h" 1 3
23748# 37 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/ctype_inline.h" 3
23749 bool
23750 ctype<char>::
23751 is(mask __m, char __c) const
23752 { return _M_table[static_cast<unsigned char>(__c)] & __m; }
23753
23754 const char*
23755 ctype<char>::
23756 is(const char* __low, const char* __high, mask* __vec) const
23757 {
23758 while (__low < __high)
23759 *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
23760 return __high;
23761 }
23762
23763 const char*
23764 ctype<char>::
23765 scan_is(mask __m, const char* __low, const char* __high) const
23766 {
23767 while (__low < __high
23768 && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
23769 ++__low;
23770 return __low;
23771 }
23772
23773 const char*
23774 ctype<char>::
23775 scan_not(mask __m, const char* __low, const char* __high) const
23776 {
23777 while (__low < __high
23778 && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
23779 ++__low;
23780 return __low;
23781 }
23782# 1509 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3
23783
23784
23785 template<typename _CharT>
23786 class ctype_byname : public ctype<_CharT>
23787 {
23788 public:
23789 typedef _CharT char_type;
23790
23791 explicit
23792 ctype_byname(const char* __s, size_t __refs = 0);
23793
23794 protected:
23795 virtual
23796 ~ctype_byname() { };
23797 };
23798
23799
23800 template<>
23801 ctype_byname<char>::ctype_byname(const char*, size_t refs);
23802
23803 template<>
23804 ctype_byname<wchar_t>::ctype_byname(const char*, size_t refs);
23805
23806
23807# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 1 3
23808# 45 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3
23809
23810# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3
23811
23812
23813 class codecvt_base
23814 {
23815 public:
23816 enum result
23817 {
23818 ok,
23819 partial,
23820 error,
23821 noconv
23822 };
23823 };
23824# 69 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3
23825 template<typename _InternT, typename _ExternT, typename _StateT>
23826 class __codecvt_abstract_base
23827 : public locale::facet, public codecvt_base
23828 {
23829 public:
23830
23831 typedef codecvt_base::result result;
23832 typedef _InternT intern_type;
23833 typedef _ExternT extern_type;
23834 typedef _StateT state_type;
23835# 117 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3
23836 result
23837 out(state_type& __state, const intern_type* __from,
23838 const intern_type* __from_end, const intern_type*& __from_next,
23839 extern_type* __to, extern_type* __to_end,
23840 extern_type*& __to_next) const
23841 {
23842 return this->do_out(__state, __from, __from_end, __from_next,
23843 __to, __to_end, __to_next);
23844 }
23845# 156 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3
23846 result
23847 unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
23848 extern_type*& __to_next) const
23849 { return this->do_unshift(__state, __to,__to_end,__to_next); }
23850# 197 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3
23851 result
23852 in(state_type& __state, const extern_type* __from,
23853 const extern_type* __from_end, const extern_type*& __from_next,
23854 intern_type* __to, intern_type* __to_end,
23855 intern_type*& __to_next) const
23856 {
23857 return this->do_in(__state, __from, __from_end, __from_next,
23858 __to, __to_end, __to_next);
23859 }
23860
23861 int
23862 encoding() const throw()
23863 { return this->do_encoding(); }
23864
23865 bool
23866 always_noconv() const throw()
23867 { return this->do_always_noconv(); }
23868
23869 int
23870 length(state_type& __state, const extern_type* __from,
23871 const extern_type* __end, size_t __max) const
23872 { return this->do_length(__state, __from, __end, __max); }
23873
23874 int
23875 max_length() const throw()
23876 { return this->do_max_length(); }
23877
23878 protected:
23879 explicit
23880 __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { }
23881
23882 virtual
23883 ~__codecvt_abstract_base() { }
23884# 238 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3
23885 virtual result
23886 do_out(state_type& __state, const intern_type* __from,
23887 const intern_type* __from_end, const intern_type*& __from_next,
23888 extern_type* __to, extern_type* __to_end,
23889 extern_type*& __to_next) const = 0;
23890
23891 virtual result
23892 do_unshift(state_type& __state, extern_type* __to,
23893 extern_type* __to_end, extern_type*& __to_next) const = 0;
23894
23895 virtual result
23896 do_in(state_type& __state, const extern_type* __from,
23897 const extern_type* __from_end, const extern_type*& __from_next,
23898 intern_type* __to, intern_type* __to_end,
23899 intern_type*& __to_next) const = 0;
23900
23901 virtual int
23902 do_encoding() const throw() = 0;
23903
23904 virtual bool
23905 do_always_noconv() const throw() = 0;
23906
23907 virtual int
23908 do_length(state_type&, const extern_type* __from,
23909 const extern_type* __end, size_t __max) const = 0;
23910
23911 virtual int
23912 do_max_length() const throw() = 0;
23913 };
23914
23915
23916
23917 template<typename _InternT, typename _ExternT, typename _StateT>
23918 class codecvt
23919 : public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
23920 {
23921 public:
23922
23923 typedef codecvt_base::result result;
23924 typedef _InternT intern_type;
23925 typedef _ExternT extern_type;
23926 typedef _StateT state_type;
23927
23928 protected:
23929 __c_locale _M_c_locale_codecvt;
23930
23931 public:
23932 static locale::id id;
23933
23934 explicit
23935 codecvt(size_t __refs = 0)
23936 : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { }
23937
23938 explicit
23939 codecvt(__c_locale __cloc, size_t __refs = 0);
23940
23941 protected:
23942 virtual
23943 ~codecvt() { }
23944
23945 virtual result
23946 do_out(state_type& __state, const intern_type* __from,
23947 const intern_type* __from_end, const intern_type*& __from_next,
23948 extern_type* __to, extern_type* __to_end,
23949 extern_type*& __to_next) const;
23950
23951 virtual result
23952 do_unshift(state_type& __state, extern_type* __to,
23953 extern_type* __to_end, extern_type*& __to_next) const;
23954
23955 virtual result
23956 do_in(state_type& __state, const extern_type* __from,
23957 const extern_type* __from_end, const extern_type*& __from_next,
23958 intern_type* __to, intern_type* __to_end,
23959 intern_type*& __to_next) const;
23960
23961 virtual int
23962 do_encoding() const throw();
23963
23964 virtual bool
23965 do_always_noconv() const throw();
23966
23967 virtual int
23968 do_length(state_type&, const extern_type* __from,
23969 const extern_type* __end, size_t __max) const;
23970
23971 virtual int
23972 do_max_length() const throw();
23973 };
23974
23975 template<typename _InternT, typename _ExternT, typename _StateT>
23976 locale::id codecvt<_InternT, _ExternT, _StateT>::id;
23977
23978
23979 template<>
23980 class codecvt<char, char, mbstate_t>
23981 : public __codecvt_abstract_base<char, char, mbstate_t>
23982 {
23983 public:
23984
23985 typedef char intern_type;
23986 typedef char extern_type;
23987 typedef mbstate_t state_type;
23988
23989 protected:
23990 __c_locale _M_c_locale_codecvt;
23991
23992 public:
23993 static locale::id id;
23994
23995 explicit
23996 codecvt(size_t __refs = 0);
23997
23998 explicit
23999 codecvt(__c_locale __cloc, size_t __refs = 0);
24000
24001 protected:
24002 virtual
24003 ~codecvt();
24004
24005 virtual result
24006 do_out(state_type& __state, const intern_type* __from,
24007 const intern_type* __from_end, const intern_type*& __from_next,
24008 extern_type* __to, extern_type* __to_end,
24009 extern_type*& __to_next) const;
24010
24011 virtual result
24012 do_unshift(state_type& __state, extern_type* __to,
24013 extern_type* __to_end, extern_type*& __to_next) const;
24014
24015 virtual result
24016 do_in(state_type& __state, const extern_type* __from,
24017 const extern_type* __from_end, const extern_type*& __from_next,
24018 intern_type* __to, intern_type* __to_end,
24019 intern_type*& __to_next) const;
24020
24021 virtual int
24022 do_encoding() const throw();
24023
24024 virtual bool
24025 do_always_noconv() const throw();
24026
24027 virtual int
24028 do_length(state_type&, const extern_type* __from,
24029 const extern_type* __end, size_t __max) const;
24030
24031 virtual int
24032 do_max_length() const throw();
24033 };
24034
24035
24036
24037 template<>
24038 class codecvt<wchar_t, char, mbstate_t>
24039 : public __codecvt_abstract_base<wchar_t, char, mbstate_t>
24040 {
24041 public:
24042
24043 typedef wchar_t intern_type;
24044 typedef char extern_type;
24045 typedef mbstate_t state_type;
24046
24047 protected:
24048 __c_locale _M_c_locale_codecvt;
24049
24050 public:
24051 static locale::id id;
24052
24053 explicit
24054 codecvt(size_t __refs = 0);
24055
24056 explicit
24057 codecvt(__c_locale __cloc, size_t __refs = 0);
24058
24059 protected:
24060 virtual
24061 ~codecvt();
24062
24063 virtual result
24064 do_out(state_type& __state, const intern_type* __from,
24065 const intern_type* __from_end, const intern_type*& __from_next,
24066 extern_type* __to, extern_type* __to_end,
24067 extern_type*& __to_next) const;
24068
24069 virtual result
24070 do_unshift(state_type& __state,
24071 extern_type* __to, extern_type* __to_end,
24072 extern_type*& __to_next) const;
24073
24074 virtual result
24075 do_in(state_type& __state,
24076 const extern_type* __from, const extern_type* __from_end,
24077 const extern_type*& __from_next,
24078 intern_type* __to, intern_type* __to_end,
24079 intern_type*& __to_next) const;
24080
24081 virtual
24082 int do_encoding() const throw();
24083
24084 virtual
24085 bool do_always_noconv() const throw();
24086
24087 virtual
24088 int do_length(state_type&, const extern_type* __from,
24089 const extern_type* __end, size_t __max) const;
24090
24091 virtual int
24092 do_max_length() const throw();
24093 };
24094
24095
24096
24097 template<typename _InternT, typename _ExternT, typename _StateT>
24098 class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT>
24099 {
24100 public:
24101 explicit
24102 codecvt_byname(const char* __s, size_t __refs = 0)
24103 : codecvt<_InternT, _ExternT, _StateT>(__refs)
24104 {
24105 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
24106 {
24107 this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
24108 this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
24109 }
24110 }
24111
24112 protected:
24113 virtual
24114 ~codecvt_byname() { }
24115 };
24116# 1534 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3
24117
24118
24119 class __num_base
24120 {
24121 public:
24122
24123
24124 enum
24125 {
24126 _S_ominus,
24127 _S_oplus,
24128 _S_ox,
24129 _S_oX,
24130 _S_odigits,
24131 _S_odigits_end = _S_odigits + 16,
24132 _S_oudigits = _S_odigits_end,
24133 _S_oudigits_end = _S_oudigits + 16,
24134 _S_oe = _S_odigits + 14,
24135 _S_oE = _S_oudigits + 14,
24136 _S_oend = _S_oudigits_end
24137 };
24138
24139
24140
24141
24142
24143
24144 static const char* _S_atoms_out;
24145
24146
24147
24148 static const char* _S_atoms_in;
24149
24150 enum
24151 {
24152 _S_iminus,
24153 _S_iplus,
24154 _S_ix,
24155 _S_iX,
24156 _S_izero,
24157 _S_ie = _S_izero + 14,
24158 _S_iE = _S_izero + 20,
24159 _S_iend = 26
24160 };
24161
24162
24163
24164 static void
24165 _S_format_float(const ios_base& __io, char* __fptr, char __mod);
24166 };
24167
24168 template<typename _CharT>
24169 struct __numpunct_cache : public locale::facet
24170 {
24171 const char* _M_grouping;
24172 size_t _M_grouping_size;
24173 bool _M_use_grouping;
24174 const _CharT* _M_truename;
24175 size_t _M_truename_size;
24176 const _CharT* _M_falsename;
24177 size_t _M_falsename_size;
24178 _CharT _M_decimal_point;
24179 _CharT _M_thousands_sep;
24180
24181
24182
24183
24184
24185 _CharT _M_atoms_out[__num_base::_S_oend];
24186
24187
24188
24189
24190
24191 _CharT _M_atoms_in[__num_base::_S_iend];
24192
24193 bool _M_allocated;
24194
24195 __numpunct_cache(size_t __refs = 0) : facet(__refs),
24196 _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false),
24197 _M_truename(__null), _M_truename_size(0), _M_falsename(__null),
24198 _M_falsename_size(0), _M_decimal_point(_CharT()),
24199 _M_thousands_sep(_CharT()), _M_allocated(false)
24200 { }
24201
24202 ~__numpunct_cache();
24203
24204 void
24205 _M_cache(const locale& __loc);
24206
24207 private:
24208 __numpunct_cache&
24209 operator=(const __numpunct_cache&);
24210
24211 explicit
24212 __numpunct_cache(const __numpunct_cache&);
24213 };
24214
24215 template<typename _CharT>
24216 __numpunct_cache<_CharT>::~__numpunct_cache()
24217 {
24218 if (_M_allocated)
24219 {
24220 delete [] _M_grouping;
24221 delete [] _M_truename;
24222 delete [] _M_falsename;
24223 }
24224 }
24225# 1656 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24226 template<typename _CharT>
24227 class numpunct : public locale::facet
24228 {
24229 public:
24230
24231
24232
24233 typedef _CharT char_type;
24234 typedef basic_string<_CharT> string_type;
24235
24236 typedef __numpunct_cache<_CharT> __cache_type;
24237
24238 protected:
24239 __cache_type* _M_data;
24240
24241 public:
24242
24243 static locale::id id;
24244
24245
24246
24247
24248
24249
24250 explicit
24251 numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null)
24252 { _M_initialize_numpunct(); }
24253# 1693 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24254 explicit
24255 numpunct(__cache_type* __cache, size_t __refs = 0)
24256 : facet(__refs), _M_data(__cache)
24257 { _M_initialize_numpunct(); }
24258# 1707 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24259 explicit
24260 numpunct(__c_locale __cloc, size_t __refs = 0)
24261 : facet(__refs), _M_data(__null)
24262 { _M_initialize_numpunct(__cloc); }
24263# 1721 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24264 char_type
24265 decimal_point() const
24266 { return this->do_decimal_point(); }
24267# 1734 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24268 char_type
24269 thousands_sep() const
24270 { return this->do_thousands_sep(); }
24271# 1765 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24272 string
24273 grouping() const
24274 { return this->do_grouping(); }
24275# 1778 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24276 string_type
24277 truename() const
24278 { return this->do_truename(); }
24279# 1791 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24280 string_type
24281 falsename() const
24282 { return this->do_falsename(); }
24283
24284 protected:
24285
24286 virtual
24287 ~numpunct();
24288# 1808 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24289 virtual char_type
24290 do_decimal_point() const
24291 { return _M_data->_M_decimal_point; }
24292# 1820 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24293 virtual char_type
24294 do_thousands_sep() const
24295 { return _M_data->_M_thousands_sep; }
24296# 1833 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24297 virtual string
24298 do_grouping() const
24299 { return _M_data->_M_grouping; }
24300# 1846 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24301 virtual string_type
24302 do_truename() const
24303 { return _M_data->_M_truename; }
24304# 1859 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24305 virtual string_type
24306 do_falsename() const
24307 { return _M_data->_M_falsename; }
24308
24309
24310 void
24311 _M_initialize_numpunct(__c_locale __cloc = __null);
24312 };
24313
24314 template<typename _CharT>
24315 locale::id numpunct<_CharT>::id;
24316
24317 template<>
24318 numpunct<char>::~numpunct();
24319
24320 template<>
24321 void
24322 numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
24323
24324
24325 template<>
24326 numpunct<wchar_t>::~numpunct();
24327
24328 template<>
24329 void
24330 numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
24331
24332
24333
24334 template<typename _CharT>
24335 class numpunct_byname : public numpunct<_CharT>
24336 {
24337 public:
24338 typedef _CharT char_type;
24339 typedef basic_string<_CharT> string_type;
24340
24341 explicit
24342 numpunct_byname(const char* __s, size_t __refs = 0)
24343 : numpunct<_CharT>(__refs)
24344 {
24345 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
24346 {
24347 __c_locale __tmp;
24348 this->_S_create_c_locale(__tmp, __s);
24349 this->_M_initialize_numpunct(__tmp);
24350 this->_S_destroy_c_locale(__tmp);
24351 }
24352 }
24353
24354 protected:
24355 virtual
24356 ~numpunct_byname() { }
24357 };
24358# 1925 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24359 template<typename _CharT, typename _InIter>
24360 class num_get : public locale::facet
24361 {
24362 public:
24363
24364
24365
24366 typedef _CharT char_type;
24367 typedef _InIter iter_type;
24368
24369
24370
24371 static locale::id id;
24372# 1946 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24373 explicit
24374 num_get(size_t __refs = 0) : facet(__refs) { }
24375# 1972 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24376 iter_type
24377 get(iter_type __in, iter_type __end, ios_base& __io,
24378 ios_base::iostate& __err, bool& __v) const
24379 { return this->do_get(__in, __end, __io, __err, __v); }
24380# 2008 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24381 iter_type
24382 get(iter_type __in, iter_type __end, ios_base& __io,
24383 ios_base::iostate& __err, long& __v) const
24384 { return this->do_get(__in, __end, __io, __err, __v); }
24385
24386 iter_type
24387 get(iter_type __in, iter_type __end, ios_base& __io,
24388 ios_base::iostate& __err, unsigned short& __v) const
24389 { return this->do_get(__in, __end, __io, __err, __v); }
24390
24391 iter_type
24392 get(iter_type __in, iter_type __end, ios_base& __io,
24393 ios_base::iostate& __err, unsigned int& __v) const
24394 { return this->do_get(__in, __end, __io, __err, __v); }
24395
24396 iter_type
24397 get(iter_type __in, iter_type __end, ios_base& __io,
24398 ios_base::iostate& __err, unsigned long& __v) const
24399 { return this->do_get(__in, __end, __io, __err, __v); }
24400
24401
24402 iter_type
24403 get(iter_type __in, iter_type __end, ios_base& __io,
24404 ios_base::iostate& __err, long long& __v) const
24405 { return this->do_get(__in, __end, __io, __err, __v); }
24406
24407 iter_type
24408 get(iter_type __in, iter_type __end, ios_base& __io,
24409 ios_base::iostate& __err, unsigned long long& __v) const
24410 { return this->do_get(__in, __end, __io, __err, __v); }
24411# 2067 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24412 iter_type
24413 get(iter_type __in, iter_type __end, ios_base& __io,
24414 ios_base::iostate& __err, float& __v) const
24415 { return this->do_get(__in, __end, __io, __err, __v); }
24416
24417 iter_type
24418 get(iter_type __in, iter_type __end, ios_base& __io,
24419 ios_base::iostate& __err, double& __v) const
24420 { return this->do_get(__in, __end, __io, __err, __v); }
24421
24422 iter_type
24423 get(iter_type __in, iter_type __end, ios_base& __io,
24424 ios_base::iostate& __err, long double& __v) const
24425 { return this->do_get(__in, __end, __io, __err, __v); }
24426# 2109 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24427 iter_type
24428 get(iter_type __in, iter_type __end, ios_base& __io,
24429 ios_base::iostate& __err, void*& __v) const
24430 { return this->do_get(__in, __end, __io, __err, __v); }
24431
24432 protected:
24433
24434 virtual ~num_get() { }
24435
24436 iter_type
24437 _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
24438 string& __xtrc) const;
24439
24440 template<typename _ValueT>
24441 iter_type
24442 _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
24443 _ValueT& __v) const;
24444# 2142 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24445 virtual iter_type
24446 do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
24447
24448
24449 virtual iter_type
24450 do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const;
24451
24452 virtual iter_type
24453 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24454 unsigned short&) const;
24455
24456 virtual iter_type
24457 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24458 unsigned int&) const;
24459
24460 virtual iter_type
24461 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24462 unsigned long&) const;
24463
24464
24465 virtual iter_type
24466 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24467 long long&) const;
24468
24469 virtual iter_type
24470 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24471 unsigned long long&) const;
24472
24473
24474 virtual iter_type
24475 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24476 float&) const;
24477
24478 virtual iter_type
24479 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24480 double&) const;
24481
24482 virtual iter_type
24483 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24484 long double&) const;
24485
24486 virtual iter_type
24487 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24488 void*&) const;
24489
24490 };
24491
24492 template<typename _CharT, typename _InIter>
24493 locale::id num_get<_CharT, _InIter>::id;
24494# 2204 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24495 template<typename _CharT, typename _OutIter>
24496 class num_put : public locale::facet
24497 {
24498 public:
24499
24500
24501
24502 typedef _CharT char_type;
24503 typedef _OutIter iter_type;
24504
24505
24506
24507 static locale::id id;
24508# 2225 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24509 explicit
24510 num_put(size_t __refs = 0) : facet(__refs) { }
24511# 2243 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24512 iter_type
24513 put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
24514 { return this->do_put(__s, __f, __fill, __v); }
24515# 2285 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24516 iter_type
24517 put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
24518 { return this->do_put(__s, __f, __fill, __v); }
24519
24520 iter_type
24521 put(iter_type __s, ios_base& __f, char_type __fill,
24522 unsigned long __v) const
24523 { return this->do_put(__s, __f, __fill, __v); }
24524
24525
24526 iter_type
24527 put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
24528 { return this->do_put(__s, __f, __fill, __v); }
24529
24530 iter_type
24531 put(iter_type __s, ios_base& __f, char_type __fill,
24532 unsigned long long __v) const
24533 { return this->do_put(__s, __f, __fill, __v); }
24534# 2348 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24535 iter_type
24536 put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
24537 { return this->do_put(__s, __f, __fill, __v); }
24538
24539 iter_type
24540 put(iter_type __s, ios_base& __f, char_type __fill,
24541 long double __v) const
24542 { return this->do_put(__s, __f, __fill, __v); }
24543# 2373 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24544 iter_type
24545 put(iter_type __s, ios_base& __f, char_type __fill,
24546 const void* __v) const
24547 { return this->do_put(__s, __f, __fill, __v); }
24548
24549 protected:
24550 template<typename _ValueT>
24551 iter_type
24552 _M_insert_float(iter_type, ios_base& __io, char_type __fill,
24553 char __mod, _ValueT __v) const;
24554
24555 void
24556 _M_group_float(const char* __grouping, size_t __grouping_size,
24557 char_type __sep, const char_type* __p, char_type* __new,
24558 char_type* __cs, int& __len) const;
24559
24560 template<typename _ValueT>
24561 iter_type
24562 _M_insert_int(iter_type, ios_base& __io, char_type __fill,
24563 _ValueT __v) const;
24564
24565 void
24566 _M_group_int(const char* __grouping, size_t __grouping_size,
24567 char_type __sep, ios_base& __io, char_type* __new,
24568 char_type* __cs, int& __len) const;
24569
24570 void
24571 _M_pad(char_type __fill, streamsize __w, ios_base& __io,
24572 char_type* __new, const char_type* __cs, int& __len) const;
24573
24574
24575 virtual
24576 ~num_put() { };
24577# 2421 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24578 virtual iter_type
24579 do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
24580
24581 virtual iter_type
24582 do_put(iter_type, ios_base&, char_type __fill, long __v) const;
24583
24584 virtual iter_type
24585 do_put(iter_type, ios_base&, char_type __fill, unsigned long) const;
24586
24587
24588 virtual iter_type
24589 do_put(iter_type, ios_base&, char_type __fill, long long __v) const;
24590
24591 virtual iter_type
24592 do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const;
24593
24594
24595 virtual iter_type
24596 do_put(iter_type, ios_base&, char_type __fill, double __v) const;
24597
24598 virtual iter_type
24599 do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
24600
24601 virtual iter_type
24602 do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
24603
24604 };
24605
24606 template <typename _CharT, typename _OutIter>
24607 locale::id num_put<_CharT, _OutIter>::id;
24608# 2465 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24609 template<typename _CharT>
24610 class collate : public locale::facet
24611 {
24612 public:
24613
24614
24615
24616 typedef _CharT char_type;
24617 typedef basic_string<_CharT> string_type;
24618
24619
24620 protected:
24621
24622
24623 __c_locale _M_c_locale_collate;
24624
24625 public:
24626
24627 static locale::id id;
24628# 2492 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24629 explicit
24630 collate(size_t __refs = 0)
24631 : facet(__refs), _M_c_locale_collate(_S_get_c_locale())
24632 { }
24633# 2506 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24634 explicit
24635 collate(__c_locale __cloc, size_t __refs = 0)
24636 : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
24637 { }
24638# 2523 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24639 int
24640 compare(const _CharT* __lo1, const _CharT* __hi1,
24641 const _CharT* __lo2, const _CharT* __hi2) const
24642 { return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
24643# 2542 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24644 string_type
24645 transform(const _CharT* __lo, const _CharT* __hi) const
24646 { return this->do_transform(__lo, __hi); }
24647# 2556 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24648 long
24649 hash(const _CharT* __lo, const _CharT* __hi) const
24650 { return this->do_hash(__lo, __hi); }
24651
24652
24653 int
24654 _M_compare(const _CharT*, const _CharT*) const;
24655
24656 size_t
24657 _M_transform(_CharT*, const _CharT*, size_t) const;
24658
24659 protected:
24660
24661 virtual
24662 ~collate()
24663 { _S_destroy_c_locale(_M_c_locale_collate); }
24664# 2585 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24665 virtual int
24666 do_compare(const _CharT* __lo1, const _CharT* __hi1,
24667 const _CharT* __lo2, const _CharT* __hi2) const;
24668# 2601 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24669 virtual string_type
24670 do_transform(const _CharT* __lo, const _CharT* __hi) const;
24671# 2614 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24672 virtual long
24673 do_hash(const _CharT* __lo, const _CharT* __hi) const;
24674 };
24675
24676 template<typename _CharT>
24677 locale::id collate<_CharT>::id;
24678
24679
24680 template<>
24681 int
24682 collate<char>::_M_compare(const char*, const char*) const;
24683
24684 template<>
24685 size_t
24686 collate<char>::_M_transform(char*, const char*, size_t) const;
24687
24688
24689 template<>
24690 int
24691 collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const;
24692
24693 template<>
24694 size_t
24695 collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const;
24696
24697
24698
24699 template<typename _CharT>
24700 class collate_byname : public collate<_CharT>
24701 {
24702 public:
24703
24704
24705 typedef _CharT char_type;
24706 typedef basic_string<_CharT> string_type;
24707
24708
24709 explicit
24710 collate_byname(const char* __s, size_t __refs = 0)
24711 : collate<_CharT>(__refs)
24712 {
24713 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
24714 {
24715 this->_S_destroy_c_locale(this->_M_c_locale_collate);
24716 this->_S_create_c_locale(this->_M_c_locale_collate, __s);
24717 }
24718 }
24719
24720 protected:
24721 virtual
24722 ~collate_byname() { }
24723 };
24724# 2674 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24725 class time_base
24726 {
24727 public:
24728 enum dateorder { no_order, dmy, mdy, ymd, ydm };
24729 };
24730
24731 template<typename _CharT>
24732 struct __timepunct_cache : public locale::facet
24733 {
24734
24735 static const _CharT* _S_timezones[14];
24736
24737 const _CharT* _M_date_format;
24738 const _CharT* _M_date_era_format;
24739 const _CharT* _M_time_format;
24740 const _CharT* _M_time_era_format;
24741 const _CharT* _M_date_time_format;
24742 const _CharT* _M_date_time_era_format;
24743 const _CharT* _M_am;
24744 const _CharT* _M_pm;
24745 const _CharT* _M_am_pm_format;
24746
24747
24748 const _CharT* _M_day1;
24749 const _CharT* _M_day2;
24750 const _CharT* _M_day3;
24751 const _CharT* _M_day4;
24752 const _CharT* _M_day5;
24753 const _CharT* _M_day6;
24754 const _CharT* _M_day7;
24755
24756
24757 const _CharT* _M_aday1;
24758 const _CharT* _M_aday2;
24759 const _CharT* _M_aday3;
24760 const _CharT* _M_aday4;
24761 const _CharT* _M_aday5;
24762 const _CharT* _M_aday6;
24763 const _CharT* _M_aday7;
24764
24765
24766 const _CharT* _M_month01;
24767 const _CharT* _M_month02;
24768 const _CharT* _M_month03;
24769 const _CharT* _M_month04;
24770 const _CharT* _M_month05;
24771 const _CharT* _M_month06;
24772 const _CharT* _M_month07;
24773 const _CharT* _M_month08;
24774 const _CharT* _M_month09;
24775 const _CharT* _M_month10;
24776 const _CharT* _M_month11;
24777 const _CharT* _M_month12;
24778
24779
24780 const _CharT* _M_amonth01;
24781 const _CharT* _M_amonth02;
24782 const _CharT* _M_amonth03;
24783 const _CharT* _M_amonth04;
24784 const _CharT* _M_amonth05;
24785 const _CharT* _M_amonth06;
24786 const _CharT* _M_amonth07;
24787 const _CharT* _M_amonth08;
24788 const _CharT* _M_amonth09;
24789 const _CharT* _M_amonth10;
24790 const _CharT* _M_amonth11;
24791 const _CharT* _M_amonth12;
24792
24793 bool _M_allocated;
24794
24795 __timepunct_cache(size_t __refs = 0) : facet(__refs),
24796 _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null),
24797 _M_time_era_format(__null), _M_date_time_format(__null),
24798 _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null),
24799 _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null),
24800 _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null),
24801 _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null),
24802 _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null),
24803 _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null),
24804 _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null),
24805 _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null),
24806 _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null),
24807 _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null),
24808 _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null),
24809 _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false)
24810 { }
24811
24812 ~__timepunct_cache();
24813
24814 void
24815 _M_cache(const locale& __loc);
24816
24817 private:
24818 __timepunct_cache&
24819 operator=(const __timepunct_cache&);
24820
24821 explicit
24822 __timepunct_cache(const __timepunct_cache&);
24823 };
24824
24825 template<typename _CharT>
24826 __timepunct_cache<_CharT>::~__timepunct_cache()
24827 {
24828 if (_M_allocated)
24829 {
24830
24831 }
24832 }
24833
24834
24835 template<>
24836 const char*
24837 __timepunct_cache<char>::_S_timezones[14];
24838
24839
24840 template<>
24841 const wchar_t*
24842 __timepunct_cache<wchar_t>::_S_timezones[14];
24843
24844
24845
24846 template<typename _CharT>
24847 const _CharT* __timepunct_cache<_CharT>::_S_timezones[14];
24848
24849 template<typename _CharT>
24850 class __timepunct : public locale::facet
24851 {
24852 public:
24853
24854 typedef _CharT __char_type;
24855 typedef basic_string<_CharT> __string_type;
24856 typedef __timepunct_cache<_CharT> __cache_type;
24857
24858 protected:
24859 __cache_type* _M_data;
24860 __c_locale _M_c_locale_timepunct;
24861 const char* _M_name_timepunct;
24862
24863 public:
24864
24865 static locale::id id;
24866
24867 explicit
24868 __timepunct(size_t __refs = 0);
24869
24870 explicit
24871 __timepunct(__cache_type* __cache, size_t __refs = 0);
24872# 2832 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
24873 explicit
24874 __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0);
24875
24876
24877
24878 void
24879 _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
24880 const tm* __tm) const;
24881
24882 void
24883 _M_date_formats(const _CharT** __date) const
24884 {
24885
24886 __date[0] = _M_data->_M_date_format;
24887 __date[1] = _M_data->_M_date_era_format;
24888 }
24889
24890 void
24891 _M_time_formats(const _CharT** __time) const
24892 {
24893
24894 __time[0] = _M_data->_M_time_format;
24895 __time[1] = _M_data->_M_time_era_format;
24896 }
24897
24898 void
24899 _M_date_time_formats(const _CharT** __dt) const
24900 {
24901
24902 __dt[0] = _M_data->_M_date_time_format;
24903 __dt[1] = _M_data->_M_date_time_era_format;
24904 }
24905
24906 void
24907 _M_am_pm_format(const _CharT* __ampm) const
24908 { __ampm = _M_data->_M_am_pm_format; }
24909
24910 void
24911 _M_am_pm(const _CharT** __ampm) const
24912 {
24913 __ampm[0] = _M_data->_M_am;
24914 __ampm[1] = _M_data->_M_pm;
24915 }
24916
24917 void
24918 _M_days(const _CharT** __days) const
24919 {
24920 __days[0] = _M_data->_M_day1;
24921 __days[1] = _M_data->_M_day2;
24922 __days[2] = _M_data->_M_day3;
24923 __days[3] = _M_data->_M_day4;
24924 __days[4] = _M_data->_M_day5;
24925 __days[5] = _M_data->_M_day6;
24926 __days[6] = _M_data->_M_day7;
24927 }
24928
24929 void
24930 _M_days_abbreviated(const _CharT** __days) const
24931 {
24932 __days[0] = _M_data->_M_aday1;
24933 __days[1] = _M_data->_M_aday2;
24934 __days[2] = _M_data->_M_aday3;
24935 __days[3] = _M_data->_M_aday4;
24936 __days[4] = _M_data->_M_aday5;
24937 __days[5] = _M_data->_M_aday6;
24938 __days[6] = _M_data->_M_aday7;
24939 }
24940
24941 void
24942 _M_months(const _CharT** __months) const
24943 {
24944 __months[0] = _M_data->_M_month01;
24945 __months[1] = _M_data->_M_month02;
24946 __months[2] = _M_data->_M_month03;
24947 __months[3] = _M_data->_M_month04;
24948 __months[4] = _M_data->_M_month05;
24949 __months[5] = _M_data->_M_month06;
24950 __months[6] = _M_data->_M_month07;
24951 __months[7] = _M_data->_M_month08;
24952 __months[8] = _M_data->_M_month09;
24953 __months[9] = _M_data->_M_month10;
24954 __months[10] = _M_data->_M_month11;
24955 __months[11] = _M_data->_M_month12;
24956 }
24957
24958 void
24959 _M_months_abbreviated(const _CharT** __months) const
24960 {
24961 __months[0] = _M_data->_M_amonth01;
24962 __months[1] = _M_data->_M_amonth02;
24963 __months[2] = _M_data->_M_amonth03;
24964 __months[3] = _M_data->_M_amonth04;
24965 __months[4] = _M_data->_M_amonth05;
24966 __months[5] = _M_data->_M_amonth06;
24967 __months[6] = _M_data->_M_amonth07;
24968 __months[7] = _M_data->_M_amonth08;
24969 __months[8] = _M_data->_M_amonth09;
24970 __months[9] = _M_data->_M_amonth10;
24971 __months[10] = _M_data->_M_amonth11;
24972 __months[11] = _M_data->_M_amonth12;
24973 }
24974
24975 protected:
24976 virtual
24977 ~__timepunct();
24978
24979
24980 void
24981 _M_initialize_timepunct(__c_locale __cloc = __null);
24982 };
24983
24984 template<typename _CharT>
24985 locale::id __timepunct<_CharT>::id;
24986
24987
24988 template<>
24989 void
24990 __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
24991
24992 template<>
24993 void
24994 __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const;
24995
24996
24997 template<>
24998 void
24999 __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
25000
25001 template<>
25002 void
25003 __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*,
25004 const tm*) const;
25005
25006
25007
25008# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/time_members.h" 1 3
25009# 37 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/time_members.h" 3
25010 template<typename _CharT>
25011 __timepunct<_CharT>::__timepunct(size_t __refs)
25012 : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null),
25013 _M_name_timepunct(_S_get_c_name())
25014 { _M_initialize_timepunct(); }
25015
25016 template<typename _CharT>
25017 __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
25018 : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(__null),
25019 _M_name_timepunct(_S_get_c_name())
25020 { _M_initialize_timepunct(); }
25021
25022 template<typename _CharT>
25023 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
25024 size_t __refs)
25025 : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null),
25026 _M_name_timepunct(__null)
25027 {
25028 const size_t __len = std::strlen(__s) + 1;
25029 char* __tmp = new char[__len];
25030 std::memcpy(__tmp, __s, __len);
25031 _M_name_timepunct = __tmp;
25032
25033 try
25034 { _M_initialize_timepunct(__cloc); }
25035 catch(...)
25036 {
25037 delete [] _M_name_timepunct;
25038 throw;
25039 }
25040 }
25041
25042 template<typename _CharT>
25043 __timepunct<_CharT>::~__timepunct()
25044 {
25045 if (_M_name_timepunct != _S_get_c_name())
25046 delete [] _M_name_timepunct;
25047 delete _M_data;
25048 _S_destroy_c_locale(_M_c_locale_timepunct);
25049 }
25050# 2968 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3
25051# 2981 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25052 template<typename _CharT, typename _InIter>
25053 class time_get : public locale::facet, public time_base
25054 {
25055 public:
25056
25057
25058
25059 typedef _CharT char_type;
25060 typedef _InIter iter_type;
25061
25062 typedef basic_string<_CharT> __string_type;
25063
25064
25065 static locale::id id;
25066# 3003 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25067 explicit
25068 time_get(size_t __refs = 0)
25069 : facet (__refs) { }
25070# 3020 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25071 dateorder
25072 date_order() const
25073 { return this->do_date_order(); }
25074# 3044 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25075 iter_type
25076 get_time(iter_type __beg, iter_type __end, ios_base& __io,
25077 ios_base::iostate& __err, tm* __tm) const
25078 { return this->do_get_time(__beg, __end, __io, __err, __tm); }
25079# 3069 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25080 iter_type
25081 get_date(iter_type __beg, iter_type __end, ios_base& __io,
25082 ios_base::iostate& __err, tm* __tm) const
25083 { return this->do_get_date(__beg, __end, __io, __err, __tm); }
25084# 3097 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25085 iter_type
25086 get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
25087 ios_base::iostate& __err, tm* __tm) const
25088 { return this->do_get_weekday(__beg, __end, __io, __err, __tm); }
25089# 3126 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25090 iter_type
25091 get_monthname(iter_type __beg, iter_type __end, ios_base& __io,
25092 ios_base::iostate& __err, tm* __tm) const
25093 { return this->do_get_monthname(__beg, __end, __io, __err, __tm); }
25094# 3152 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25095 iter_type
25096 get_year(iter_type __beg, iter_type __end, ios_base& __io,
25097 ios_base::iostate& __err, tm* __tm) const
25098 { return this->do_get_year(__beg, __end, __io, __err, __tm); }
25099
25100 protected:
25101
25102 virtual
25103 ~time_get() { }
25104# 3172 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25105 virtual dateorder
25106 do_date_order() const;
25107# 3190 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25108 virtual iter_type
25109 do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
25110 ios_base::iostate& __err, tm* __tm) const;
25111# 3209 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25112 virtual iter_type
25113 do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
25114 ios_base::iostate& __err, tm* __tm) const;
25115# 3228 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25116 virtual iter_type
25117 do_get_weekday(iter_type __beg, iter_type __end, ios_base&,
25118 ios_base::iostate& __err, tm* __tm) const;
25119# 3247 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25120 virtual iter_type
25121 do_get_monthname(iter_type __beg, iter_type __end, ios_base&,
25122 ios_base::iostate& __err, tm* __tm) const;
25123# 3266 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25124 virtual iter_type
25125 do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
25126 ios_base::iostate& __err, tm* __tm) const;
25127
25128
25129 iter_type
25130 _M_extract_num(iter_type __beg, iter_type __end, int& __member,
25131 int __min, int __max, size_t __len,
25132 ios_base& __io, ios_base::iostate& __err) const;
25133
25134
25135
25136 iter_type
25137 _M_extract_name(iter_type __beg, iter_type __end, int& __member,
25138 const _CharT** __names, size_t __indexlen,
25139 ios_base& __io, ios_base::iostate& __err) const;
25140
25141
25142 iter_type
25143 _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
25144 ios_base::iostate& __err, tm* __tm,
25145 const _CharT* __format) const;
25146 };
25147
25148 template<typename _CharT, typename _InIter>
25149 locale::id time_get<_CharT, _InIter>::id;
25150
25151
25152 template<typename _CharT, typename _InIter>
25153 class time_get_byname : public time_get<_CharT, _InIter>
25154 {
25155 public:
25156
25157 typedef _CharT char_type;
25158 typedef _InIter iter_type;
25159
25160 explicit
25161 time_get_byname(const char*, size_t __refs = 0)
25162 : time_get<_CharT, _InIter>(__refs) { }
25163
25164 protected:
25165 virtual
25166 ~time_get_byname() { }
25167 };
25168# 3322 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25169 template<typename _CharT, typename _OutIter>
25170 class time_put : public locale::facet
25171 {
25172 public:
25173
25174
25175
25176 typedef _CharT char_type;
25177 typedef _OutIter iter_type;
25178
25179
25180
25181 static locale::id id;
25182# 3343 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25183 explicit
25184 time_put(size_t __refs = 0)
25185 : facet(__refs) { }
25186# 3362 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25187 iter_type
25188 put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
25189 const _CharT* __beg, const _CharT* __end) const;
25190# 3382 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25191 iter_type
25192 put(iter_type __s, ios_base& __io, char_type __fill,
25193 const tm* __tm, char __format, char __mod = 0) const
25194 { return this->do_put(__s, __io, __fill, __tm, __format, __mod); }
25195
25196 protected:
25197
25198 virtual
25199 ~time_put()
25200 { }
25201# 3409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25202 virtual iter_type
25203 do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
25204 char __format, char __mod) const;
25205 };
25206
25207 template<typename _CharT, typename _OutIter>
25208 locale::id time_put<_CharT, _OutIter>::id;
25209
25210
25211 template<typename _CharT, typename _OutIter>
25212 class time_put_byname : public time_put<_CharT, _OutIter>
25213 {
25214 public:
25215
25216 typedef _CharT char_type;
25217 typedef _OutIter iter_type;
25218
25219 explicit
25220 time_put_byname(const char*, size_t __refs = 0)
25221 : time_put<_CharT, _OutIter>(__refs)
25222 { };
25223
25224 protected:
25225 virtual
25226 ~time_put_byname() { }
25227 };
25228# 3447 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25229 class money_base
25230 {
25231 public:
25232 enum part { none, space, symbol, sign, value };
25233 struct pattern { char field[4]; };
25234
25235 static const pattern _S_default_pattern;
25236
25237 enum
25238 {
25239 _S_minus,
25240 _S_zero,
25241 _S_end = 11
25242 };
25243
25244
25245
25246 static const char* _S_atoms;
25247
25248
25249
25250 static pattern
25251 _S_construct_pattern(char __precedes, char __space, char __posn);
25252 };
25253
25254 template<typename _CharT, bool _Intl>
25255 struct __moneypunct_cache : public locale::facet
25256 {
25257 const char* _M_grouping;
25258 size_t _M_grouping_size;
25259 bool _M_use_grouping;
25260 _CharT _M_decimal_point;
25261 _CharT _M_thousands_sep;
25262 const _CharT* _M_curr_symbol;
25263 size_t _M_curr_symbol_size;
25264 const _CharT* _M_positive_sign;
25265 size_t _M_positive_sign_size;
25266 const _CharT* _M_negative_sign;
25267 size_t _M_negative_sign_size;
25268 int _M_frac_digits;
25269 money_base::pattern _M_pos_format;
25270 money_base::pattern _M_neg_format;
25271
25272
25273
25274
25275 _CharT _M_atoms[money_base::_S_end];
25276
25277 bool _M_allocated;
25278
25279 __moneypunct_cache(size_t __refs = 0) : facet(__refs),
25280 _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false),
25281 _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()),
25282 _M_curr_symbol(__null), _M_curr_symbol_size(0),
25283 _M_positive_sign(__null), _M_positive_sign_size(0),
25284 _M_negative_sign(__null), _M_negative_sign_size(0),
25285 _M_frac_digits(0),
25286 _M_pos_format(money_base::pattern()),
25287 _M_neg_format(money_base::pattern()), _M_allocated(false)
25288 { }
25289
25290 ~__moneypunct_cache();
25291
25292 void
25293 _M_cache(const locale& __loc);
25294
25295 private:
25296 __moneypunct_cache&
25297 operator=(const __moneypunct_cache&);
25298
25299 explicit
25300 __moneypunct_cache(const __moneypunct_cache&);
25301 };
25302
25303 template<typename _CharT, bool _Intl>
25304 __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache()
25305 {
25306 if (_M_allocated)
25307 {
25308 delete [] _M_grouping;
25309 delete [] _M_curr_symbol;
25310 delete [] _M_positive_sign;
25311 delete [] _M_negative_sign;
25312 }
25313 }
25314
25315
25316
25317
25318
25319
25320
25321 template<typename _CharT, bool _Intl>
25322 class moneypunct : public locale::facet, public money_base
25323 {
25324 public:
25325
25326
25327
25328 typedef _CharT char_type;
25329 typedef basic_string<_CharT> string_type;
25330
25331 typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
25332
25333 private:
25334 __cache_type* _M_data;
25335
25336 public:
25337
25338
25339 static const bool intl = _Intl;
25340
25341 static locale::id id;
25342# 3568 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25343 explicit
25344 moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null)
25345 { _M_initialize_moneypunct(); }
25346# 3580 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25347 explicit
25348 moneypunct(__cache_type* __cache, size_t __refs = 0)
25349 : facet(__refs), _M_data(__cache)
25350 { _M_initialize_moneypunct(); }
25351# 3595 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25352 explicit
25353 moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
25354 : facet(__refs), _M_data(__null)
25355 { _M_initialize_moneypunct(__cloc, __s); }
25356# 3609 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25357 char_type
25358 decimal_point() const
25359 { return this->do_decimal_point(); }
25360# 3622 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25361 char_type
25362 thousands_sep() const
25363 { return this->do_thousands_sep(); }
25364# 3651 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25365 string
25366 grouping() const
25367 { return this->do_grouping(); }
25368# 3664 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25369 string_type
25370 curr_symbol() const
25371 { return this->do_curr_symbol(); }
25372# 3681 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25373 string_type
25374 positive_sign() const
25375 { return this->do_positive_sign(); }
25376# 3698 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25377 string_type
25378 negative_sign() const
25379 { return this->do_negative_sign(); }
25380# 3714 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25381 int
25382 frac_digits() const
25383 { return this->do_frac_digits(); }
25384# 3749 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25385 pattern
25386 pos_format() const
25387 { return this->do_pos_format(); }
25388
25389 pattern
25390 neg_format() const
25391 { return this->do_neg_format(); }
25392
25393
25394 protected:
25395
25396 virtual
25397 ~moneypunct();
25398# 3771 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25399 virtual char_type
25400 do_decimal_point() const
25401 { return _M_data->_M_decimal_point; }
25402# 3783 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25403 virtual char_type
25404 do_thousands_sep() const
25405 { return _M_data->_M_thousands_sep; }
25406# 3796 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25407 virtual string
25408 do_grouping() const
25409 { return _M_data->_M_grouping; }
25410# 3809 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25411 virtual string_type
25412 do_curr_symbol() const
25413 { return _M_data->_M_curr_symbol; }
25414# 3822 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25415 virtual string_type
25416 do_positive_sign() const
25417 { return _M_data->_M_positive_sign; }
25418# 3835 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25419 virtual string_type
25420 do_negative_sign() const
25421 { return _M_data->_M_negative_sign; }
25422# 3849 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25423 virtual int
25424 do_frac_digits() const
25425 { return _M_data->_M_frac_digits; }
25426# 3863 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25427 virtual pattern
25428 do_pos_format() const
25429 { return _M_data->_M_pos_format; }
25430# 3877 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25431 virtual pattern
25432 do_neg_format() const
25433 { return _M_data->_M_neg_format; }
25434
25435
25436 void
25437 _M_initialize_moneypunct(__c_locale __cloc = __null,
25438 const char* __name = __null);
25439 };
25440
25441 template<typename _CharT, bool _Intl>
25442 locale::id moneypunct<_CharT, _Intl>::id;
25443
25444 template<typename _CharT, bool _Intl>
25445 const bool moneypunct<_CharT, _Intl>::intl;
25446
25447 template<>
25448 moneypunct<char, true>::~moneypunct();
25449
25450 template<>
25451 moneypunct<char, false>::~moneypunct();
25452
25453 template<>
25454 void
25455 moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*);
25456
25457 template<>
25458 void
25459 moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*);
25460
25461
25462 template<>
25463 moneypunct<wchar_t, true>::~moneypunct();
25464
25465 template<>
25466 moneypunct<wchar_t, false>::~moneypunct();
25467
25468 template<>
25469 void
25470 moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
25471 const char*);
25472
25473 template<>
25474 void
25475 moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
25476 const char*);
25477
25478
25479
25480 template<typename _CharT, bool _Intl>
25481 class moneypunct_byname : public moneypunct<_CharT, _Intl>
25482 {
25483 public:
25484 typedef _CharT char_type;
25485 typedef basic_string<_CharT> string_type;
25486
25487 static const bool intl = _Intl;
25488
25489 explicit
25490 moneypunct_byname(const char* __s, size_t __refs = 0)
25491 : moneypunct<_CharT, _Intl>(__refs)
25492 {
25493 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
25494 {
25495 __c_locale __tmp;
25496 this->_S_create_c_locale(__tmp, __s);
25497 this->_M_initialize_moneypunct(__tmp);
25498 this->_S_destroy_c_locale(__tmp);
25499 }
25500 }
25501
25502 protected:
25503 virtual
25504 ~moneypunct_byname() { }
25505 };
25506
25507 template<typename _CharT, bool _Intl>
25508 const bool moneypunct_byname<_CharT, _Intl>::intl;
25509# 3968 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25510 template<typename _CharT, typename _InIter>
25511 class money_get : public locale::facet
25512 {
25513 public:
25514
25515
25516
25517 typedef _CharT char_type;
25518 typedef _InIter iter_type;
25519 typedef basic_string<_CharT> string_type;
25520
25521
25522
25523 static locale::id id;
25524# 3990 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25525 explicit
25526 money_get(size_t __refs = 0) : facet(__refs) { }
25527# 4020 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25528 iter_type
25529 get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25530 ios_base::iostate& __err, long double& __units) const
25531 { return this->do_get(__s, __end, __intl, __io, __err, __units); }
25532# 4050 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25533 iter_type
25534 get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25535 ios_base::iostate& __err, string_type& __digits) const
25536 { return this->do_get(__s, __end, __intl, __io, __err, __digits); }
25537
25538 protected:
25539
25540 virtual
25541 ~money_get() { }
25542# 4067 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25543 virtual iter_type
25544 do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25545 ios_base::iostate& __err, long double& __units) const;
25546# 4078 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25547 virtual iter_type
25548 do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25549 ios_base::iostate& __err, string_type& __digits) const;
25550
25551 template<bool _Intl>
25552 iter_type
25553 _M_extract(iter_type __s, iter_type __end, ios_base& __io,
25554 ios_base::iostate& __err, string& __digits) const;
25555 };
25556
25557 template<typename _CharT, typename _InIter>
25558 locale::id money_get<_CharT, _InIter>::id;
25559# 4103 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25560 template<typename _CharT, typename _OutIter>
25561 class money_put : public locale::facet
25562 {
25563 public:
25564
25565
25566 typedef _CharT char_type;
25567 typedef _OutIter iter_type;
25568 typedef basic_string<_CharT> string_type;
25569
25570
25571
25572 static locale::id id;
25573# 4124 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25574 explicit
25575 money_put(size_t __refs = 0) : facet(__refs) { }
25576# 4144 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25577 iter_type
25578 put(iter_type __s, bool __intl, ios_base& __io,
25579 char_type __fill, long double __units) const
25580 { return this->do_put(__s, __intl, __io, __fill, __units); }
25581# 4166 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25582 iter_type
25583 put(iter_type __s, bool __intl, ios_base& __io,
25584 char_type __fill, const string_type& __digits) const
25585 { return this->do_put(__s, __intl, __io, __fill, __digits); }
25586
25587 protected:
25588
25589 virtual
25590 ~money_put() { }
25591# 4194 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25592 virtual iter_type
25593 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
25594 long double __units) const;
25595# 4216 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25596 virtual iter_type
25597 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
25598 const string_type& __digits) const;
25599
25600 template<bool _Intl>
25601 iter_type
25602 _M_insert(iter_type __s, ios_base& __io, char_type __fill,
25603 const string_type& __digits) const;
25604 };
25605
25606 template<typename _CharT, typename _OutIter>
25607 locale::id money_put<_CharT, _OutIter>::id;
25608
25609
25610
25611
25612 struct messages_base
25613 {
25614 typedef int catalog;
25615 };
25616# 4257 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25617 template<typename _CharT>
25618 class messages : public locale::facet, public messages_base
25619 {
25620 public:
25621
25622
25623
25624 typedef _CharT char_type;
25625 typedef basic_string<_CharT> string_type;
25626
25627
25628 protected:
25629
25630
25631 __c_locale _M_c_locale_messages;
25632 const char* _M_name_messages;
25633
25634 public:
25635
25636 static locale::id id;
25637# 4285 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25638 explicit
25639 messages(size_t __refs = 0);
25640# 4299 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25641 explicit
25642 messages(__c_locale __cloc, const char* __s, size_t __refs = 0);
25643# 4312 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25644 catalog
25645 open(const basic_string<char>& __s, const locale& __loc) const
25646 { return this->do_open(__s, __loc); }
25647# 4330 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25648 catalog
25649 open(const basic_string<char>&, const locale&, const char*) const;
25650# 4348 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25651 string_type
25652 get(catalog __c, int __set, int __msgid, const string_type& __s) const
25653 { return this->do_get(__c, __set, __msgid, __s); }
25654# 4359 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25655 void
25656 close(catalog __c) const
25657 { return this->do_close(__c); }
25658
25659 protected:
25660
25661 virtual
25662 ~messages();
25663# 4379 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25664 virtual catalog
25665 do_open(const basic_string<char>&, const locale&) const;
25666# 4398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25667 virtual string_type
25668 do_get(catalog, int, int, const string_type& __dfault) const;
25669
25670
25671
25672
25673
25674
25675 virtual void
25676 do_close(catalog) const;
25677
25678
25679 char*
25680 _M_convert_to_char(const string_type& __msg) const
25681 {
25682
25683 return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
25684 }
25685
25686
25687 string_type
25688 _M_convert_from_char(char*) const
25689 {
25690# 4455 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25691 return string_type();
25692 }
25693 };
25694
25695 template<typename _CharT>
25696 locale::id messages<_CharT>::id;
25697
25698
25699 template<>
25700 string
25701 messages<char>::do_get(catalog, int, int, const string&) const;
25702
25703
25704 template<>
25705 wstring
25706 messages<wchar_t>::do_get(catalog, int, int, const wstring&) const;
25707
25708
25709
25710 template<typename _CharT>
25711 class messages_byname : public messages<_CharT>
25712 {
25713 public:
25714 typedef _CharT char_type;
25715 typedef basic_string<_CharT> string_type;
25716
25717 explicit
25718 messages_byname(const char* __s, size_t __refs = 0);
25719
25720 protected:
25721 virtual
25722 ~messages_byname()
25723 { }
25724 };
25725
25726
25727# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/messages_members.h" 1 3
25728# 37 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/i686-pc-linux-gnu/bits/messages_members.h" 3
25729 template<typename _CharT>
25730 messages<_CharT>::messages(size_t __refs)
25731 : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
25732 _M_name_messages(_S_get_c_name())
25733 { }
25734
25735 template<typename _CharT>
25736 messages<_CharT>::messages(__c_locale __cloc, const char* __s,
25737 size_t __refs)
25738 : facet(__refs), _M_c_locale_messages(__null), _M_name_messages(__null)
25739 {
25740 const size_t __len = std::strlen(__s) + 1;
25741 char* __tmp = new char[__len];
25742 std::memcpy(__tmp, __s, __len);
25743 _M_name_messages = __tmp;
25744
25745
25746 _M_c_locale_messages = _S_clone_c_locale(__cloc);
25747 }
25748
25749 template<typename _CharT>
25750 typename messages<_CharT>::catalog
25751 messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
25752 const char* __dir) const
25753 {
25754 bindtextdomain(__s.c_str(), __dir);
25755 return this->do_open(__s, __loc);
25756 }
25757
25758
25759 template<typename _CharT>
25760 messages<_CharT>::~messages()
25761 {
25762 if (_M_name_messages != _S_get_c_name())
25763 delete [] _M_name_messages;
25764 _S_destroy_c_locale(_M_c_locale_messages);
25765 }
25766
25767 template<typename _CharT>
25768 typename messages<_CharT>::catalog
25769 messages<_CharT>::do_open(const basic_string<char>& __s,
25770 const locale&) const
25771 {
25772
25773
25774 textdomain(__s.c_str());
25775 return 0;
25776 }
25777
25778 template<typename _CharT>
25779 void
25780 messages<_CharT>::do_close(catalog) const
25781 { }
25782
25783
25784 template<typename _CharT>
25785 messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
25786 : messages<_CharT>(__refs)
25787 {
25788 if (this->_M_name_messages != locale::facet::_S_get_c_name())
25789 delete [] this->_M_name_messages;
25790 char* __tmp = new char[std::strlen(__s) + 1];
25791 std::strcpy(__tmp, __s);
25792 this->_M_name_messages = __tmp;
25793
25794 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
25795 {
25796 this->_S_destroy_c_locale(this->_M_c_locale_messages);
25797 this->_S_create_c_locale(this->_M_c_locale_messages, __s);
25798 }
25799 }
25800# 4492 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3
25801# 4500 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3
25802 template<typename _CharT>
25803 inline bool
25804 isspace(_CharT __c, const locale& __loc)
25805 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
25806
25807
25808 template<typename _CharT>
25809 inline bool
25810 isprint(_CharT __c, const locale& __loc)
25811 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
25812
25813
25814 template<typename _CharT>
25815 inline bool
25816 iscntrl(_CharT __c, const locale& __loc)
25817 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
25818
25819
25820 template<typename _CharT>
25821 inline bool
25822 isupper(_CharT __c, const locale& __loc)
25823 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
25824
25825
25826 template<typename _CharT>
25827 inline bool
25828 islower(_CharT __c, const locale& __loc)
25829 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
25830
25831
25832 template<typename _CharT>
25833 inline bool
25834 isalpha(_CharT __c, const locale& __loc)
25835 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
25836
25837
25838 template<typename _CharT>
25839 inline bool
25840 isdigit(_CharT __c, const locale& __loc)
25841 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
25842
25843
25844 template<typename _CharT>
25845 inline bool
25846 ispunct(_CharT __c, const locale& __loc)
25847 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
25848
25849
25850 template<typename _CharT>
25851 inline bool
25852 isxdigit(_CharT __c, const locale& __loc)
25853 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
25854
25855
25856 template<typename _CharT>
25857 inline bool
25858 isalnum(_CharT __c, const locale& __loc)
25859 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
25860
25861
25862 template<typename _CharT>
25863 inline bool
25864 isgraph(_CharT __c, const locale& __loc)
25865 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
25866
25867
25868 template<typename _CharT>
25869 inline _CharT
25870 toupper(_CharT __c, const locale& __loc)
25871 { return use_facet<ctype<_CharT> >(__loc).toupper(__c); }
25872
25873
25874 template<typename _CharT>
25875 inline _CharT
25876 tolower(_CharT __c, const locale& __loc)
25877 { return use_facet<ctype<_CharT> >(__loc).tolower(__c); }
25878}
25879# 45 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 2 3
25880
25881namespace std
25882{
25883
25884
25885
25886
25887
25888
25889
25890 template<typename _CharT, typename _Traits>
25891 class basic_ios : public ios_base
25892 {
25893 public:
25894
25895
25896
25897
25898
25899
25900 typedef _CharT char_type;
25901 typedef typename _Traits::int_type int_type;
25902 typedef typename _Traits::pos_type pos_type;
25903 typedef typename _Traits::off_type off_type;
25904 typedef _Traits traits_type;
25905# 78 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
25906 typedef ctype<_CharT> __ctype_type;
25907 typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
25908 __num_put_type;
25909 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
25910 __num_get_type;
25911
25912
25913
25914 protected:
25915 basic_ostream<_CharT, _Traits>* _M_tie;
25916 mutable char_type _M_fill;
25917 mutable bool _M_fill_init;
25918 basic_streambuf<_CharT, _Traits>* _M_streambuf;
25919
25920
25921 const __ctype_type* _M_ctype;
25922
25923 const __num_put_type* _M_num_put;
25924
25925 const __num_get_type* _M_num_get;
25926
25927 public:
25928
25929
25930
25931
25932
25933
25934
25935 operator void*() const
25936 { return this->fail() ? 0 : const_cast<basic_ios*>(this); }
25937
25938 bool
25939 operator!() const
25940 { return this->fail(); }
25941# 122 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
25942 iostate
25943 rdstate() const
25944 { return _M_streambuf_state; }
25945# 133 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
25946 void
25947 clear(iostate __state = goodbit);
25948
25949
25950
25951
25952
25953
25954
25955 void
25956 setstate(iostate __state)
25957 { this->clear(this->rdstate() | __state); }
25958
25959
25960
25961
25962 void
25963 _M_setstate(iostate __state)
25964 {
25965
25966
25967 _M_streambuf_state |= __state;
25968 if (this->exceptions() & __state)
25969 throw;
25970 }
25971
25972
25973
25974
25975
25976
25977
25978 bool
25979 good() const
25980 { return this->rdstate() == 0; }
25981
25982
25983
25984
25985
25986
25987
25988 bool
25989 eof() const
25990 { return (this->rdstate() & eofbit) != 0; }
25991# 186 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
25992 bool
25993 fail() const
25994 { return (this->rdstate() & (badbit | failbit)) != 0; }
25995
25996
25997
25998
25999
26000
26001
26002 bool
26003 bad() const
26004 { return (this->rdstate() & badbit) != 0; }
26005# 207 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26006 iostate
26007 exceptions() const
26008 { return _M_exception; }
26009# 242 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26010 void
26011 exceptions(iostate __except)
26012 {
26013 _M_exception = __except;
26014 this->clear(_M_streambuf_state);
26015 }
26016
26017
26018
26019
26020
26021
26022
26023 explicit
26024 basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
26025 : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
26026 _M_ctype(0), _M_num_put(0), _M_num_get(0)
26027 { this->init(__sb); }
26028
26029
26030
26031
26032
26033
26034
26035 virtual
26036 ~basic_ios() { }
26037# 280 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26038 basic_ostream<_CharT, _Traits>*
26039 tie() const
26040 { return _M_tie; }
26041# 292 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26042 basic_ostream<_CharT, _Traits>*
26043 tie(basic_ostream<_CharT, _Traits>* __tiestr)
26044 {
26045 basic_ostream<_CharT, _Traits>* __old = _M_tie;
26046 _M_tie = __tiestr;
26047 return __old;
26048 }
26049
26050
26051
26052
26053
26054
26055
26056 basic_streambuf<_CharT, _Traits>*
26057 rdbuf() const
26058 { return _M_streambuf; }
26059# 332 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26060 basic_streambuf<_CharT, _Traits>*
26061 rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
26062# 346 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26063 basic_ios&
26064 copyfmt(const basic_ios& __rhs);
26065
26066
26067
26068
26069
26070
26071
26072 char_type
26073 fill() const
26074 {
26075 if (!_M_fill_init)
26076 {
26077 _M_fill = this->widen(' ');
26078 _M_fill_init = true;
26079 }
26080 return _M_fill;
26081 }
26082# 375 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26083 char_type
26084 fill(char_type __ch)
26085 {
26086 char_type __old = this->fill();
26087 _M_fill = __ch;
26088 return __old;
26089 }
26090# 395 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26091 locale
26092 imbue(const locale& __loc);
26093# 415 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26094 char
26095 narrow(char_type __c, char __dfault) const;
26096# 433 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3
26097 char_type
26098 widen(char __c) const;
26099
26100 protected:
26101
26102
26103
26104
26105
26106
26107
26108 basic_ios()
26109 : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false),
26110 _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
26111 { }
26112
26113
26114
26115
26116
26117
26118
26119 void
26120 init(basic_streambuf<_CharT, _Traits>* __sb);
26121
26122 void
26123 _M_cache_locale(const locale& __loc);
26124 };
26125}
26126
26127
26128# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 1 3
26129# 38 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 3
26130
26131# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 3
26132
26133namespace std
26134{
26135 template<typename _CharT, typename _Traits>
26136 void
26137 basic_ios<_CharT, _Traits>::clear(iostate __state)
26138 {
26139 if (this->rdbuf())
26140 _M_streambuf_state = __state;
26141 else
26142 _M_streambuf_state = __state | badbit;
26143 if (this->exceptions() & this->rdstate())
26144 __throw_ios_failure(("basic_ios::clear"));
26145 }
26146
26147 template<typename _CharT, typename _Traits>
26148 basic_streambuf<_CharT, _Traits>*
26149 basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
26150 {
26151 basic_streambuf<_CharT, _Traits>* __old = _M_streambuf;
26152 _M_streambuf = __sb;
26153 this->clear();
26154 return __old;
26155 }
26156
26157 template<typename _CharT, typename _Traits>
26158 basic_ios<_CharT, _Traits>&
26159 basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
26160 {
26161
26162
26163 if (this != &__rhs)
26164 {
26165
26166
26167
26168
26169 _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
26170 _M_local_word : new _Words[__rhs._M_word_size];
26171
26172
26173 _Callback_list* __cb = __rhs._M_callbacks;
26174 if (__cb)
26175 __cb->_M_add_reference();
26176 _M_call_callbacks(erase_event);
26177 if (_M_word != _M_local_word)
26178 {
26179 delete [] _M_word;
26180 _M_word = 0;
26181 }
26182 _M_dispose_callbacks();
26183
26184
26185 _M_callbacks = __cb;
26186 for (int __i = 0; __i < __rhs._M_word_size; ++__i)
26187 __words[__i] = __rhs._M_word[__i];
26188 _M_word = __words;
26189 _M_word_size = __rhs._M_word_size;
26190
26191 this->flags(__rhs.flags());
26192 this->width(__rhs.width());
26193 this->precision(__rhs.precision());
26194 this->tie(__rhs.tie());
26195 this->fill(__rhs.fill());
26196 _M_ios_locale = __rhs.getloc();
26197 _M_cache_locale(_M_ios_locale);
26198
26199 _M_call_callbacks(copyfmt_event);
26200
26201
26202 this->exceptions(__rhs.exceptions());
26203 }
26204 return *this;
26205 }
26206
26207 template<typename _CharT, typename _Traits>
26208 char
26209 basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
26210 { return __check_facet(_M_ctype).narrow(__c, __dfault); }
26211
26212 template<typename _CharT, typename _Traits>
26213 _CharT
26214 basic_ios<_CharT, _Traits>::widen(char __c) const
26215 { return __check_facet(_M_ctype).widen(__c); }
26216
26217
26218 template<typename _CharT, typename _Traits>
26219 locale
26220 basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
26221 {
26222 locale __old(this->getloc());
26223 ios_base::imbue(__loc);
26224 _M_cache_locale(__loc);
26225 if (this->rdbuf() != 0)
26226 this->rdbuf()->pubimbue(__loc);
26227 return __old;
26228 }
26229
26230 template<typename _CharT, typename _Traits>
26231 void
26232 basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
26233 {
26234
26235 ios_base::_M_init();
26236
26237
26238 _M_cache_locale(_M_ios_locale);
26239# 159 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 3
26240 _M_fill = _CharT();
26241 _M_fill_init = false;
26242
26243 _M_tie = 0;
26244 _M_exception = goodbit;
26245 _M_streambuf = __sb;
26246 _M_streambuf_state = __sb ? goodbit : badbit;
26247 }
26248
26249 template<typename _CharT, typename _Traits>
26250 void
26251 basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc)
26252 {
26253 if (__builtin_expect(has_facet<__ctype_type>(__loc), true))
26254 _M_ctype = &use_facet<__ctype_type>(__loc);
26255 else
26256 _M_ctype = 0;
26257
26258 if (__builtin_expect(has_facet<__num_put_type>(__loc), true))
26259 _M_num_put = &use_facet<__num_put_type>(__loc);
26260 else
26261 _M_num_put = 0;
26262
26263 if (__builtin_expect(has_facet<__num_get_type>(__loc), true))
26264 _M_num_get = &use_facet<__num_get_type>(__loc);
26265 else
26266 _M_num_get = 0;
26267 }
26268
26269
26270
26271
26272
26273 extern template class basic_ios<char>;
26274
26275
26276 extern template class basic_ios<wchar_t>;
26277
26278
26279}
26280# 465 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 2 3
26281# 53 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3
26282
26283#pragma GCC visibility pop
26284# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 2 3
26285
26286namespace std
26287{
26288# 57 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26289 template<typename _CharT, typename _Traits>
26290 class basic_ostream : virtual public basic_ios<_CharT, _Traits>
26291 {
26292 public:
26293
26294 typedef _CharT char_type;
26295 typedef typename _Traits::int_type int_type;
26296 typedef typename _Traits::pos_type pos_type;
26297 typedef typename _Traits::off_type off_type;
26298 typedef _Traits traits_type;
26299
26300
26301 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
26302 typedef basic_ios<_CharT, _Traits> __ios_type;
26303 typedef basic_ostream<_CharT, _Traits> __ostream_type;
26304 typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
26305 __num_put_type;
26306 typedef ctype<_CharT> __ctype_type;
26307
26308 template<typename _CharT2, typename _Traits2>
26309 friend basic_ostream<_CharT2, _Traits2>&
26310 operator<<(basic_ostream<_CharT2, _Traits2>&, _CharT2);
26311
26312 template<typename _Traits2>
26313 friend basic_ostream<char, _Traits2>&
26314 operator<<(basic_ostream<char, _Traits2>&, char);
26315
26316 template<typename _CharT2, typename _Traits2>
26317 friend basic_ostream<_CharT2, _Traits2>&
26318 operator<<(basic_ostream<_CharT2, _Traits2>&, const _CharT2*);
26319
26320 template<typename _Traits2>
26321 friend basic_ostream<char, _Traits2>&
26322 operator<<(basic_ostream<char, _Traits2>&, const char*);
26323
26324 template<typename _CharT2, typename _Traits2>
26325 friend basic_ostream<_CharT2, _Traits2>&
26326 operator<<(basic_ostream<_CharT2, _Traits2>&, const char*);
26327# 104 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26328 explicit
26329 basic_ostream(__streambuf_type* __sb)
26330 { this->init(__sb); }
26331
26332
26333
26334
26335
26336
26337 virtual
26338 ~basic_ostream() { }
26339
26340
26341 class sentry;
26342 friend class sentry;
26343# 130 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26344 inline __ostream_type&
26345 operator<<(__ostream_type& (*__pf)(__ostream_type&));
26346
26347 inline __ostream_type&
26348 operator<<(__ios_type& (*__pf)(__ios_type&));
26349
26350 inline __ostream_type&
26351 operator<<(ios_base& (*__pf) (ios_base&));
26352# 167 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26353 __ostream_type&
26354 operator<<(long __n);
26355
26356 __ostream_type&
26357 operator<<(unsigned long __n);
26358
26359 __ostream_type&
26360 operator<<(bool __n);
26361
26362 __ostream_type&
26363 operator<<(short __n);
26364
26365 __ostream_type&
26366 operator<<(unsigned short __n);
26367
26368 __ostream_type&
26369 operator<<(int __n);
26370
26371 __ostream_type&
26372 operator<<(unsigned int __n);
26373
26374
26375 __ostream_type&
26376 operator<<(long long __n);
26377
26378 __ostream_type&
26379 operator<<(unsigned long long __n);
26380
26381
26382 __ostream_type&
26383 operator<<(double __f);
26384
26385 __ostream_type&
26386 operator<<(float __f);
26387
26388 __ostream_type&
26389 operator<<(long double __f);
26390
26391 __ostream_type&
26392 operator<<(const void* __p);
26393# 229 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26394 __ostream_type&
26395 operator<<(__streambuf_type* __sb);
26396# 262 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26397 __ostream_type&
26398 put(char_type __c);
26399
26400
26401 void
26402 _M_write(const char_type* __s, streamsize __n)
26403 {
26404 streamsize __put = this->rdbuf()->sputn(__s, __n);
26405 if (__put != __n)
26406 this->setstate(ios_base::badbit);
26407 }
26408# 290 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26409 __ostream_type&
26410 write(const char_type* __s, streamsize __n);
26411# 303 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26412 __ostream_type&
26413 flush();
26414# 314 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26415 pos_type
26416 tellp();
26417# 325 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26418 __ostream_type&
26419 seekp(pos_type);
26420# 337 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26421 __ostream_type&
26422 seekp(off_type, ios_base::seekdir);
26423
26424 protected:
26425 explicit
26426 basic_ostream() { }
26427 };
26428# 355 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26429 template <typename _CharT, typename _Traits>
26430 class basic_ostream<_CharT, _Traits>::sentry
26431 {
26432
26433 bool _M_ok;
26434 basic_ostream<_CharT,_Traits>& _M_os;
26435
26436 public:
26437# 374 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26438 explicit
26439 sentry(basic_ostream<_CharT,_Traits>& __os);
26440# 384 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26441 ~sentry()
26442 {
26443
26444 if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception())
26445 {
26446
26447 if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
26448 _M_os.setstate(ios_base::badbit);
26449 }
26450 }
26451# 402 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26452 operator bool() const
26453 { return _M_ok; }
26454 };
26455# 423 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26456 template<typename _CharT, typename _Traits>
26457 basic_ostream<_CharT, _Traits>&
26458 operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c);
26459
26460 template<typename _CharT, typename _Traits>
26461 basic_ostream<_CharT, _Traits>&
26462 operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
26463 { return (__out << __out.widen(__c)); }
26464
26465
26466 template <class _Traits>
26467 basic_ostream<char, _Traits>&
26468 operator<<(basic_ostream<char, _Traits>& __out, char __c);
26469
26470
26471 template<class _Traits>
26472 basic_ostream<char, _Traits>&
26473 operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
26474 { return (__out << static_cast<char>(__c)); }
26475
26476 template<class _Traits>
26477 basic_ostream<char, _Traits>&
26478 operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
26479 { return (__out << static_cast<char>(__c)); }
26480# 463 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26481 template<typename _CharT, typename _Traits>
26482 basic_ostream<_CharT, _Traits>&
26483 operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s);
26484
26485 template<typename _CharT, typename _Traits>
26486 basic_ostream<_CharT, _Traits> &
26487 operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
26488
26489
26490 template<class _Traits>
26491 basic_ostream<char, _Traits>&
26492 operator<<(basic_ostream<char, _Traits>& __out, const char* __s);
26493
26494
26495 template<class _Traits>
26496 basic_ostream<char, _Traits>&
26497 operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
26498 { return (__out << reinterpret_cast<const char*>(__s)); }
26499
26500 template<class _Traits>
26501 basic_ostream<char, _Traits> &
26502 operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
26503 { return (__out << reinterpret_cast<const char*>(__s)); }
26504# 497 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3
26505 template<typename _CharT, typename _Traits>
26506 basic_ostream<_CharT, _Traits>&
26507 endl(basic_ostream<_CharT, _Traits>& __os)
26508 { return flush(__os.put(__os.widen('\n'))); }
26509
26510
26511
26512
26513
26514
26515
26516 template<typename _CharT, typename _Traits>
26517 basic_ostream<_CharT, _Traits>&
26518 ends(basic_ostream<_CharT, _Traits>& __os)
26519 { return __os.put(_CharT()); }
26520
26521
26522
26523
26524
26525
26526 template<typename _CharT, typename _Traits>
26527 basic_ostream<_CharT, _Traits>&
26528 flush(basic_ostream<_CharT, _Traits>& __os)
26529 { return __os.flush(); }
26530
26531}
26532
26533
26534# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 1 3
26535# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 3
26536
26537# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 3
26538
26539# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/locale" 1 3
26540# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/locale" 3
26541
26542# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/locale" 3
26543#pragma GCC visibility push(default)
26544
26545
26546
26547
26548# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 1 3
26549# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
26550
26551# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
26552
26553
26554# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 1 3
26555# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 3
26556#pragma GCC visibility push(default)
26557
26558extern "C++" {
26559
26560namespace __cxxabiv1
26561{
26562 class __class_type_info;
26563}
26564# 59 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 3
26565namespace std
26566{
26567
26568
26569
26570
26571
26572
26573 class type_info
26574 {
26575 public:
26576
26577
26578
26579
26580 virtual ~type_info();
26581
26582 private:
26583
26584 type_info& operator=(const type_info&);
26585 type_info(const type_info&);
26586
26587 protected:
26588 const char *__name;
26589
26590 protected:
26591 explicit type_info(const char *__n): __name(__n) { }
26592
26593 public:
26594
26595
26596
26597 const char* name() const
26598 { return __name; }
26599# 105 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 3
26600 bool before(const type_info& __arg) const
26601 { return __name < __arg.__name; }
26602 bool operator==(const type_info& __arg) const
26603 { return __name == __arg.__name; }
26604
26605 bool operator!=(const type_info& __arg) const
26606 { return !operator==(__arg); }
26607
26608
26609 public:
26610
26611 virtual bool __is_pointer_p() const;
26612
26613 virtual bool __is_function_p() const;
26614
26615
26616
26617
26618
26619
26620
26621 virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
26622 unsigned __outer) const;
26623
26624
26625 virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
26626 void **__obj_ptr) const;
26627 };
26628
26629
26630
26631
26632
26633
26634 class bad_cast : public exception
26635 {
26636 public:
26637 bad_cast() throw() { }
26638
26639
26640 virtual ~bad_cast() throw();
26641 };
26642
26643
26644 class bad_typeid : public exception
26645 {
26646 public:
26647 bad_typeid () throw() { }
26648
26649
26650 virtual ~bad_typeid() throw();
26651 };
26652}
26653
26654#pragma GCC visibility pop
26655
26656}
26657# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 2 3
26658
26659
26660namespace std
26661{
26662 template<typename _Facet>
26663 locale
26664 locale::combine(const locale& __other) const
26665 {
26666 _Impl* __tmp = new _Impl(*_M_impl, 1);
26667 try
26668 {
26669 __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
26670 }
26671 catch(...)
26672 {
26673 __tmp->_M_remove_reference();
26674 throw;
26675 }
26676 return locale(__tmp);
26677 }
26678
26679 template<typename _CharT, typename _Traits, typename _Alloc>
26680 bool
26681 locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
26682 const basic_string<_CharT, _Traits, _Alloc>& __s2) const
26683 {
26684 typedef std::collate<_CharT> __collate_type;
26685 const __collate_type& __collate = use_facet<__collate_type>(*this);
26686 return (__collate.compare(__s1.data(), __s1.data() + __s1.length(),
26687 __s2.data(), __s2.data() + __s2.length()) < 0);
26688 }
26689# 86 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
26690 template<typename _Facet>
26691 inline bool
26692 has_facet(const locale& __loc) throw()
26693 {
26694 const size_t __i = _Facet::id._M_id();
26695 const locale::facet** __facets = __loc._M_impl->_M_facets;
26696 return (__i < __loc._M_impl->_M_facets_size && __facets[__i]);
26697 }
26698# 108 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
26699 template<typename _Facet>
26700 inline const _Facet&
26701 use_facet(const locale& __loc)
26702 {
26703 const size_t __i = _Facet::id._M_id();
26704 const locale::facet** __facets = __loc._M_impl->_M_facets;
26705 if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i]))
26706 __throw_bad_cast();
26707 return static_cast<const _Facet&>(*__facets[__i]);
26708 }
26709
26710
26711
26712 template<typename _Facet>
26713 struct __use_cache
26714 {
26715 const _Facet*
26716 operator() (const locale& __loc) const;
26717 };
26718
26719
26720 template<typename _CharT>
26721 struct __use_cache<__numpunct_cache<_CharT> >
26722 {
26723 const __numpunct_cache<_CharT>*
26724 operator() (const locale& __loc) const
26725 {
26726 const size_t __i = numpunct<_CharT>::id._M_id();
26727 const locale::facet** __caches = __loc._M_impl->_M_caches;
26728 if (!__caches[__i])
26729 {
26730 __numpunct_cache<_CharT>* __tmp = __null;
26731 try
26732 {
26733 __tmp = new __numpunct_cache<_CharT>;
26734 __tmp->_M_cache(__loc);
26735 }
26736 catch(...)
26737 {
26738 delete __tmp;
26739 throw;
26740 }
26741 __loc._M_impl->_M_install_cache(__tmp, __i);
26742 }
26743 return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]);
26744 }
26745 };
26746
26747 template<typename _CharT, bool _Intl>
26748 struct __use_cache<__moneypunct_cache<_CharT, _Intl> >
26749 {
26750 const __moneypunct_cache<_CharT, _Intl>*
26751 operator() (const locale& __loc) const
26752 {
26753 const size_t __i = moneypunct<_CharT, _Intl>::id._M_id();
26754 const locale::facet** __caches = __loc._M_impl->_M_caches;
26755 if (!__caches[__i])
26756 {
26757 __moneypunct_cache<_CharT, _Intl>* __tmp = __null;
26758 try
26759 {
26760 __tmp = new __moneypunct_cache<_CharT, _Intl>;
26761 __tmp->_M_cache(__loc);
26762 }
26763 catch(...)
26764 {
26765 delete __tmp;
26766 throw;
26767 }
26768 __loc._M_impl->_M_install_cache(__tmp, __i);
26769 }
26770 return static_cast<
26771 const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]);
26772 }
26773 };
26774
26775 template<typename _CharT>
26776 void
26777 __numpunct_cache<_CharT>::_M_cache(const locale& __loc)
26778 {
26779 _M_allocated = true;
26780
26781 const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
26782
26783 _M_grouping_size = __np.grouping().size();
26784 char* __grouping = new char[_M_grouping_size];
26785 __np.grouping().copy(__grouping, _M_grouping_size);
26786 _M_grouping = __grouping;
26787 _M_use_grouping = (_M_grouping_size
26788 && static_cast<signed char>(__np.grouping()[0]) > 0);
26789
26790 _M_truename_size = __np.truename().size();
26791 _CharT* __truename = new _CharT[_M_truename_size];
26792 __np.truename().copy(__truename, _M_truename_size);
26793 _M_truename = __truename;
26794
26795 _M_falsename_size = __np.falsename().size();
26796 _CharT* __falsename = new _CharT[_M_falsename_size];
26797 __np.falsename().copy(__falsename, _M_falsename_size);
26798 _M_falsename = __falsename;
26799
26800 _M_decimal_point = __np.decimal_point();
26801 _M_thousands_sep = __np.thousands_sep();
26802
26803 const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
26804 __ct.widen(__num_base::_S_atoms_out,
26805 __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out);
26806 __ct.widen(__num_base::_S_atoms_in,
26807 __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in);
26808 }
26809
26810 template<typename _CharT, bool _Intl>
26811 void
26812 __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc)
26813 {
26814 _M_allocated = true;
26815
26816 const moneypunct<_CharT, _Intl>& __mp =
26817 use_facet<moneypunct<_CharT, _Intl> >(__loc);
26818
26819 _M_grouping_size = __mp.grouping().size();
26820 char* __grouping = new char[_M_grouping_size];
26821 __mp.grouping().copy(__grouping, _M_grouping_size);
26822 _M_grouping = __grouping;
26823 _M_use_grouping = (_M_grouping_size
26824 && static_cast<signed char>(__mp.grouping()[0]) > 0);
26825
26826 _M_decimal_point = __mp.decimal_point();
26827 _M_thousands_sep = __mp.thousands_sep();
26828 _M_frac_digits = __mp.frac_digits();
26829
26830 _M_curr_symbol_size = __mp.curr_symbol().size();
26831 _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size];
26832 __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size);
26833 _M_curr_symbol = __curr_symbol;
26834
26835 _M_positive_sign_size = __mp.positive_sign().size();
26836 _CharT* __positive_sign = new _CharT[_M_positive_sign_size];
26837 __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size);
26838 _M_positive_sign = __positive_sign;
26839
26840 _M_negative_sign_size = __mp.negative_sign().size();
26841 _CharT* __negative_sign = new _CharT[_M_negative_sign_size];
26842 __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size);
26843 _M_negative_sign = __negative_sign;
26844
26845 _M_pos_format = __mp.pos_format();
26846 _M_neg_format = __mp.neg_format();
26847
26848 const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
26849 __ct.widen(money_base::_S_atoms,
26850 money_base::_S_atoms + money_base::_S_end, _M_atoms);
26851 }
26852# 271 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
26853 static bool
26854 __verify_grouping(const char* __grouping, size_t __grouping_size,
26855 const string& __grouping_tmp);
26856
26857 template<typename _CharT, typename _InIter>
26858 _InIter
26859 num_get<_CharT, _InIter>::
26860 _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io,
26861 ios_base::iostate& __err, string& __xtrc) const
26862 {
26863 typedef char_traits<_CharT> __traits_type;
26864 typedef __numpunct_cache<_CharT> __cache_type;
26865 __use_cache<__cache_type> __uc;
26866 const locale& __loc = __io._M_getloc();
26867 const __cache_type* __lc = __uc(__loc);
26868 const _CharT* __lit = __lc->_M_atoms_in;
26869 char_type __c = char_type();
26870
26871
26872 bool __testeof = __beg == __end;
26873
26874
26875 if (!__testeof)
26876 {
26877 __c = *__beg;
26878 const bool __plus = __c == __lit[__num_base::_S_iplus];
26879 if ((__plus || __c == __lit[__num_base::_S_iminus])
26880 && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
26881 && !(__c == __lc->_M_decimal_point))
26882 {
26883 __xtrc += __plus ? '+' : '-';
26884 if (++__beg != __end)
26885 __c = *__beg;
26886 else
26887 __testeof = true;
26888 }
26889 }
26890
26891
26892 bool __found_mantissa = false;
26893 int __sep_pos = 0;
26894 while (!__testeof)
26895 {
26896 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
26897 || __c == __lc->_M_decimal_point)
26898 break;
26899 else if (__c == __lit[__num_base::_S_izero])
26900 {
26901 if (!__found_mantissa)
26902 {
26903 __xtrc += '0';
26904 __found_mantissa = true;
26905 }
26906 ++__sep_pos;
26907
26908 if (++__beg != __end)
26909 __c = *__beg;
26910 else
26911 __testeof = true;
26912 }
26913 else
26914 break;
26915 }
26916
26917
26918 bool __found_dec = false;
26919 bool __found_sci = false;
26920 string __found_grouping;
26921 if (__lc->_M_use_grouping)
26922 __found_grouping.reserve(32);
26923 const char_type* __q;
26924 const char_type* __lit_zero = __lit + __num_base::_S_izero;
26925 while (!__testeof)
26926 {
26927
26928
26929 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
26930 {
26931 if (!__found_dec && !__found_sci)
26932 {
26933
26934
26935 if (__sep_pos)
26936 {
26937 __found_grouping += static_cast<char>(__sep_pos);
26938 __sep_pos = 0;
26939 }
26940 else
26941 {
26942
26943
26944 __xtrc.clear();
26945 break;
26946 }
26947 }
26948 else
26949 break;
26950 }
26951 else if (__c == __lc->_M_decimal_point)
26952 {
26953 if (!__found_dec && !__found_sci)
26954 {
26955
26956
26957
26958 if (__found_grouping.size())
26959 __found_grouping += static_cast<char>(__sep_pos);
26960 __xtrc += '.';
26961 __found_dec = true;
26962 }
26963 else
26964 break;
26965 }
26966 else if ((__q = __traits_type::find(__lit_zero, 10, __c)))
26967 {
26968 __xtrc += __num_base::_S_atoms_in[__q - __lit];
26969 __found_mantissa = true;
26970 ++__sep_pos;
26971 }
26972 else if ((__c == __lit[__num_base::_S_ie]
26973 || __c == __lit[__num_base::_S_iE])
26974 && !__found_sci && __found_mantissa)
26975 {
26976
26977 if (__found_grouping.size() && !__found_dec)
26978 __found_grouping += static_cast<char>(__sep_pos);
26979 __xtrc += 'e';
26980 __found_sci = true;
26981
26982
26983 if (++__beg != __end)
26984 {
26985 __c = *__beg;
26986 const bool __plus = __c == __lit[__num_base::_S_iplus];
26987 if ((__plus || __c == __lit[__num_base::_S_iminus])
26988 && !(__lc->_M_use_grouping
26989 && __c == __lc->_M_thousands_sep)
26990 && !(__c == __lc->_M_decimal_point))
26991 __xtrc += __plus ? '+' : '-';
26992 else
26993 continue;
26994 }
26995 else
26996 {
26997 __testeof = true;
26998 break;
26999 }
27000 }
27001 else
27002
27003 break;
27004
27005 if (++__beg != __end)
27006 __c = *__beg;
27007 else
27008 __testeof = true;
27009 }
27010
27011
27012
27013 if (__found_grouping.size())
27014 {
27015
27016 if (!__found_dec && !__found_sci)
27017 __found_grouping += static_cast<char>(__sep_pos);
27018
27019 if (!std::__verify_grouping(__lc->_M_grouping,
27020 __lc->_M_grouping_size,
27021 __found_grouping))
27022 __err |= ios_base::failbit;
27023 }
27024
27025
27026 if (__testeof)
27027 __err |= ios_base::eofbit;
27028 return __beg;
27029 }
27030
27031 template<typename _ValueT>
27032 struct __to_unsigned_type
27033 { typedef _ValueT __type; };
27034
27035 template<>
27036 struct __to_unsigned_type<long>
27037 { typedef unsigned long __type; };
27038
27039
27040 template<>
27041 struct __to_unsigned_type<long long>
27042 { typedef unsigned long long __type; };
27043
27044
27045 template<typename _CharT, typename _InIter>
27046 template<typename _ValueT>
27047 _InIter
27048 num_get<_CharT, _InIter>::
27049 _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
27050 ios_base::iostate& __err, _ValueT& __v) const
27051 {
27052 typedef char_traits<_CharT> __traits_type;
27053 typedef typename __to_unsigned_type<_ValueT>::__type __unsigned_type;
27054 typedef __numpunct_cache<_CharT> __cache_type;
27055 __use_cache<__cache_type> __uc;
27056 const locale& __loc = __io._M_getloc();
27057 const __cache_type* __lc = __uc(__loc);
27058 const _CharT* __lit = __lc->_M_atoms_in;
27059 char_type __c = char_type();
27060
27061
27062 const ios_base::fmtflags __basefield = __io.flags()
27063 & ios_base::basefield;
27064 const bool __oct = __basefield == ios_base::oct;
27065 int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10);
27066
27067
27068 bool __testeof = __beg == __end;
27069
27070
27071 bool __negative = false;
27072 if (!__testeof)
27073 {
27074 __c = *__beg;
27075 if (numeric_limits<_ValueT>::is_signed)
27076 __negative = __c == __lit[__num_base::_S_iminus];
27077 if ((__negative || __c == __lit[__num_base::_S_iplus])
27078 && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
27079 && !(__c == __lc->_M_decimal_point))
27080 {
27081 if (++__beg != __end)
27082 __c = *__beg;
27083 else
27084 __testeof = true;
27085 }
27086 }
27087
27088
27089
27090 bool __found_zero = false;
27091 int __sep_pos = 0;
27092 while (!__testeof)
27093 {
27094 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
27095 || __c == __lc->_M_decimal_point)
27096 break;
27097 else if (__c == __lit[__num_base::_S_izero]
27098 && (!__found_zero || __base == 10))
27099 {
27100 __found_zero = true;
27101 ++__sep_pos;
27102 if (__basefield == 0)
27103 __base = 8;
27104 if (__base == 8)
27105 __sep_pos = 0;
27106 }
27107 else if (__found_zero
27108 && (__c == __lit[__num_base::_S_ix]
27109 || __c == __lit[__num_base::_S_iX]))
27110 {
27111 if (__basefield == 0)
27112 __base = 16;
27113 if (__base == 16)
27114 {
27115 __found_zero = false;
27116 __sep_pos = 0;
27117 }
27118 else
27119 break;
27120 }
27121 else
27122 break;
27123
27124 if (++__beg != __end)
27125 {
27126 __c = *__beg;
27127 if (!__found_zero)
27128 break;
27129 }
27130 else
27131 __testeof = true;
27132 }
27133
27134
27135
27136 const size_t __len = (__base == 16 ? __num_base::_S_iend
27137 - __num_base::_S_izero : __base);
27138
27139
27140 string __found_grouping;
27141 if (__lc->_M_use_grouping)
27142 __found_grouping.reserve(32);
27143 bool __testfail = false;
27144 const __unsigned_type __max = __negative ?
27145 -numeric_limits<_ValueT>::min() : numeric_limits<_ValueT>::max();
27146 const __unsigned_type __smax = __max / __base;
27147 __unsigned_type __result = 0;
27148 const char_type* __q;
27149 const char_type* __lit_zero = __lit + __num_base::_S_izero;
27150 while (!__testeof)
27151 {
27152
27153
27154 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
27155 {
27156
27157
27158 if (__sep_pos)
27159 {
27160 __found_grouping += static_cast<char>(__sep_pos);
27161 __sep_pos = 0;
27162 }
27163 else
27164 {
27165 __testfail = true;
27166 break;
27167 }
27168 }
27169 else if (__c == __lc->_M_decimal_point)
27170 break;
27171 else if ((__q = __traits_type::find(__lit_zero, __len, __c)))
27172 {
27173 int __digit = __q - __lit_zero;
27174 if (__digit > 15)
27175 __digit -= 6;
27176 if (__result > __smax)
27177 __testfail = true;
27178 else
27179 {
27180 __result *= __base;
27181 __testfail |= __result > __max - __digit;
27182 __result += __digit;
27183 ++__sep_pos;
27184 }
27185 }
27186 else
27187
27188 break;
27189
27190 if (++__beg != __end)
27191 __c = *__beg;
27192 else
27193 __testeof = true;
27194 }
27195
27196
27197
27198 if (__found_grouping.size())
27199 {
27200
27201 __found_grouping += static_cast<char>(__sep_pos);
27202
27203 if (!std::__verify_grouping(__lc->_M_grouping,
27204 __lc->_M_grouping_size,
27205 __found_grouping))
27206 __err |= ios_base::failbit;
27207 }
27208
27209 if (!__testfail && (__sep_pos || __found_zero
27210 || __found_grouping.size()))
27211 __v = __negative ? -__result : __result;
27212 else
27213 __err |= ios_base::failbit;
27214
27215 if (__testeof)
27216 __err |= ios_base::eofbit;
27217 return __beg;
27218 }
27219
27220
27221
27222 template<typename _CharT, typename _InIter>
27223 _InIter
27224 num_get<_CharT, _InIter>::
27225 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27226 ios_base::iostate& __err, bool& __v) const
27227 {
27228 if (!(__io.flags() & ios_base::boolalpha))
27229 {
27230
27231
27232
27233 long __l = -1;
27234 __beg = _M_extract_int(__beg, __end, __io, __err, __l);
27235 if (__l == 0 || __l == 1)
27236 __v = __l;
27237 else
27238 __err |= ios_base::failbit;
27239 }
27240 else
27241 {
27242
27243 typedef __numpunct_cache<_CharT> __cache_type;
27244 __use_cache<__cache_type> __uc;
27245 const locale& __loc = __io._M_getloc();
27246 const __cache_type* __lc = __uc(__loc);
27247
27248 bool __testf = true;
27249 bool __testt = true;
27250 size_t __n;
27251 bool __testeof = __beg == __end;
27252 for (__n = 0; !__testeof; ++__n)
27253 {
27254 const char_type __c = *__beg;
27255
27256 if (__testf)
27257 if (__n < __lc->_M_falsename_size)
27258 __testf = __c == __lc->_M_falsename[__n];
27259 else
27260 break;
27261
27262 if (__testt)
27263 if (__n < __lc->_M_truename_size)
27264 __testt = __c == __lc->_M_truename[__n];
27265 else
27266 break;
27267
27268 if (!__testf && !__testt)
27269 break;
27270
27271 if (++__beg == __end)
27272 __testeof = true;
27273 }
27274 if (__testf && __n == __lc->_M_falsename_size)
27275 __v = 0;
27276 else if (__testt && __n == __lc->_M_truename_size)
27277 __v = 1;
27278 else
27279 __err |= ios_base::failbit;
27280
27281 if (__testeof)
27282 __err |= ios_base::eofbit;
27283 }
27284 return __beg;
27285 }
27286
27287 template<typename _CharT, typename _InIter>
27288 _InIter
27289 num_get<_CharT, _InIter>::
27290 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27291 ios_base::iostate& __err, long& __v) const
27292 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27293
27294 template<typename _CharT, typename _InIter>
27295 _InIter
27296 num_get<_CharT, _InIter>::
27297 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27298 ios_base::iostate& __err, unsigned short& __v) const
27299 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27300
27301 template<typename _CharT, typename _InIter>
27302 _InIter
27303 num_get<_CharT, _InIter>::
27304 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27305 ios_base::iostate& __err, unsigned int& __v) const
27306 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27307
27308 template<typename _CharT, typename _InIter>
27309 _InIter
27310 num_get<_CharT, _InIter>::
27311 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27312 ios_base::iostate& __err, unsigned long& __v) const
27313 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27314
27315
27316 template<typename _CharT, typename _InIter>
27317 _InIter
27318 num_get<_CharT, _InIter>::
27319 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27320 ios_base::iostate& __err, long long& __v) const
27321 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27322
27323 template<typename _CharT, typename _InIter>
27324 _InIter
27325 num_get<_CharT, _InIter>::
27326 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27327 ios_base::iostate& __err, unsigned long long& __v) const
27328 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27329
27330
27331 template<typename _CharT, typename _InIter>
27332 _InIter
27333 num_get<_CharT, _InIter>::
27334 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27335 ios_base::iostate& __err, float& __v) const
27336 {
27337 string __xtrc;
27338 __xtrc.reserve(32);
27339 __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
27340 std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
27341 return __beg;
27342 }
27343
27344 template<typename _CharT, typename _InIter>
27345 _InIter
27346 num_get<_CharT, _InIter>::
27347 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27348 ios_base::iostate& __err, double& __v) const
27349 {
27350 string __xtrc;
27351 __xtrc.reserve(32);
27352 __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
27353 std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
27354 return __beg;
27355 }
27356
27357 template<typename _CharT, typename _InIter>
27358 _InIter
27359 num_get<_CharT, _InIter>::
27360 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27361 ios_base::iostate& __err, long double& __v) const
27362 {
27363 string __xtrc;
27364 __xtrc.reserve(32);
27365 __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
27366 std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
27367 return __beg;
27368 }
27369
27370 template<typename _CharT, typename _InIter>
27371 _InIter
27372 num_get<_CharT, _InIter>::
27373 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27374 ios_base::iostate& __err, void*& __v) const
27375 {
27376
27377 typedef ios_base::fmtflags fmtflags;
27378 const fmtflags __fmt = __io.flags();
27379 __io.flags(__fmt & ~ios_base::basefield | ios_base::hex);
27380
27381 unsigned long __ul;
27382 __beg = _M_extract_int(__beg, __end, __io, __err, __ul);
27383
27384
27385 __io.flags(__fmt);
27386
27387 if (!(__err & ios_base::failbit))
27388 __v = reinterpret_cast<void*>(__ul);
27389 return __beg;
27390 }
27391
27392
27393
27394 template<typename _CharT, typename _OutIter>
27395 void
27396 num_put<_CharT, _OutIter>::
27397 _M_pad(_CharT __fill, streamsize __w, ios_base& __io,
27398 _CharT* __new, const _CharT* __cs, int& __len) const
27399 {
27400
27401
27402 __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs,
27403 __w, __len, true);
27404 __len = static_cast<int>(__w);
27405 }
27406
27407
27408
27409
27410 template<typename _CharT>
27411 inline int
27412 __int_to_char(_CharT* __bufend, long __v, const _CharT* __lit,
27413 ios_base::fmtflags __flags)
27414 {
27415 unsigned long __ul = __v;
27416 const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
27417 if (__builtin_expect(__basefield != ios_base::oct
27418 && __basefield != ios_base::hex, true))
27419 __ul = __v < 0 ? -__v : __ul;
27420 return __int_to_char(__bufend, __ul, __lit, __flags, false);
27421 }
27422
27423 template<typename _CharT>
27424 inline int
27425 __int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit,
27426 ios_base::fmtflags __flags)
27427 { return __int_to_char(__bufend, __v, __lit, __flags, false); }
27428
27429
27430 template<typename _CharT>
27431 inline int
27432 __int_to_char(_CharT* __bufend, long long __v, const _CharT* __lit,
27433 ios_base::fmtflags __flags)
27434 {
27435 unsigned long long __ull = __v;
27436 const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
27437 if (__builtin_expect(__basefield != ios_base::oct
27438 && __basefield != ios_base::hex, true))
27439 __ull = __v < 0 ? -__v : __ull;
27440 return __int_to_char(__bufend, __ull, __lit, __flags, false);
27441 }
27442
27443 template<typename _CharT>
27444 inline int
27445 __int_to_char(_CharT* __bufend, unsigned long long __v,
27446 const _CharT* __lit, ios_base::fmtflags __flags)
27447 { return __int_to_char(__bufend, __v, __lit, __flags, false); }
27448
27449
27450
27451 template<typename _CharT, typename _ValueT>
27452 int
27453 __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
27454 ios_base::fmtflags __flags, bool)
27455 {
27456 const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
27457 _CharT* __buf = __bufend;
27458
27459 if (__builtin_expect(__basefield != ios_base::oct
27460 && __basefield != ios_base::hex, true))
27461 {
27462
27463 do
27464 {
27465 *--__buf = __lit[(__v % 10) + __num_base::_S_odigits];
27466 __v /= 10;
27467 }
27468 while (__v != 0);
27469 }
27470 else if (__basefield == ios_base::oct)
27471 {
27472
27473 do
27474 {
27475 *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits];
27476 __v >>= 3;
27477 }
27478 while (__v != 0);
27479 }
27480 else
27481 {
27482
27483 const bool __uppercase = __flags & ios_base::uppercase;
27484 const int __case_offset = __uppercase ? __num_base::_S_oudigits
27485 : __num_base::_S_odigits;
27486 do
27487 {
27488 *--__buf = __lit[(__v & 0xf) + __case_offset];
27489 __v >>= 4;
27490 }
27491 while (__v != 0);
27492 }
27493 return __bufend - __buf;
27494 }
27495
27496 template<typename _CharT, typename _OutIter>
27497 void
27498 num_put<_CharT, _OutIter>::
27499 _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep,
27500 ios_base&, _CharT* __new, _CharT* __cs, int& __len) const
27501 {
27502 _CharT* __p = std::__add_grouping(__new, __sep, __grouping,
27503 __grouping_size, __cs, __cs + __len);
27504 __len = __p - __new;
27505 }
27506
27507 template<typename _CharT, typename _OutIter>
27508 template<typename _ValueT>
27509 _OutIter
27510 num_put<_CharT, _OutIter>::
27511 _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill,
27512 _ValueT __v) const
27513 {
27514 typedef __numpunct_cache<_CharT> __cache_type;
27515 __use_cache<__cache_type> __uc;
27516 const locale& __loc = __io._M_getloc();
27517 const __cache_type* __lc = __uc(__loc);
27518 const _CharT* __lit = __lc->_M_atoms_out;
27519 const ios_base::fmtflags __flags = __io.flags();
27520
27521
27522 const int __ilen = 5 * sizeof(_ValueT);
27523 _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27524 * __ilen));
27525
27526
27527
27528 int __len = __int_to_char(__cs + __ilen, __v, __lit, __flags);
27529 __cs += __ilen - __len;
27530
27531
27532 if (__lc->_M_use_grouping)
27533 {
27534
27535
27536 _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27537 * (__len + 1)
27538 * 2));
27539 _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size,
27540 __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len);
27541 __cs = __cs2 + 2;
27542 }
27543
27544
27545 const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
27546 if (__builtin_expect(__basefield != ios_base::oct
27547 && __basefield != ios_base::hex, true))
27548 {
27549
27550 if (__v > 0)
27551 {
27552 if (__flags & ios_base::showpos
27553 && numeric_limits<_ValueT>::is_signed)
27554 *--__cs = __lit[__num_base::_S_oplus], ++__len;
27555 }
27556 else if (__v)
27557 *--__cs = __lit[__num_base::_S_ominus], ++__len;
27558 }
27559 else if (__flags & ios_base::showbase && __v)
27560 {
27561 if (__basefield == ios_base::oct)
27562 *--__cs = __lit[__num_base::_S_odigits], ++__len;
27563 else
27564 {
27565
27566 const bool __uppercase = __flags & ios_base::uppercase;
27567 *--__cs = __lit[__num_base::_S_ox + __uppercase];
27568
27569 *--__cs = __lit[__num_base::_S_odigits];
27570 __len += 2;
27571 }
27572 }
27573
27574
27575 const streamsize __w = __io.width();
27576 if (__w > static_cast<streamsize>(__len))
27577 {
27578 _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27579 * __w));
27580 _M_pad(__fill, __w, __io, __cs3, __cs, __len);
27581 __cs = __cs3;
27582 }
27583 __io.width(0);
27584
27585
27586
27587 return std::__write(__s, __cs, __len);
27588 }
27589
27590 template<typename _CharT, typename _OutIter>
27591 void
27592 num_put<_CharT, _OutIter>::
27593 _M_group_float(const char* __grouping, size_t __grouping_size,
27594 _CharT __sep, const _CharT* __p, _CharT* __new,
27595 _CharT* __cs, int& __len) const
27596 {
27597
27598
27599
27600 const int __declen = __p ? __p - __cs : __len;
27601 _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping,
27602 __grouping_size,
27603 __cs, __cs + __declen);
27604
27605
27606 int __newlen = __p2 - __new;
27607 if (__p)
27608 {
27609 char_traits<_CharT>::copy(__p2, __p, __len - __declen);
27610 __newlen += __len - __declen;
27611 }
27612 __len = __newlen;
27613 }
27614# 1043 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
27615 template<typename _CharT, typename _OutIter>
27616 template<typename _ValueT>
27617 _OutIter
27618 num_put<_CharT, _OutIter>::
27619 _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
27620 _ValueT __v) const
27621 {
27622 typedef __numpunct_cache<_CharT> __cache_type;
27623 __use_cache<__cache_type> __uc;
27624 const locale& __loc = __io._M_getloc();
27625 const __cache_type* __lc = __uc(__loc);
27626
27627
27628 streamsize __prec = __io.precision();
27629 if (__prec < static_cast<streamsize>(0))
27630 __prec = static_cast<streamsize>(6);
27631
27632 const int __max_digits = numeric_limits<_ValueT>::digits10;
27633
27634
27635 int __len;
27636
27637 char __fbuf[16];
27638
27639
27640
27641
27642 int __cs_size = __max_digits * 3;
27643 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
27644
27645 __num_base::_S_format_float(__io, __fbuf, __mod);
27646 __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v,
27647 _S_get_c_locale(), __prec);
27648
27649
27650 if (__len >= __cs_size)
27651 {
27652 __cs_size = __len + 1;
27653 __cs = static_cast<char*>(__builtin_alloca(__cs_size));
27654 __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v,
27655 _S_get_c_locale(), __prec);
27656 }
27657# 1107 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
27658 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
27659
27660 _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27661 * __len));
27662 __ctype.widen(__cs, __cs + __len, __ws);
27663
27664
27665 const _CharT __cdec = __ctype.widen('.');
27666 const _CharT __dec = __lc->_M_decimal_point;
27667 const _CharT* __p = char_traits<_CharT>::find(__ws, __len, __cdec);
27668 if (__p)
27669 __ws[__p - __ws] = __dec;
27670
27671
27672
27673
27674 if (__lc->_M_use_grouping
27675 && (__p || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9'
27676 && __cs[1] >= '0' && __cs[2] >= '0')))
27677 {
27678
27679
27680 _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27681 * __len * 2));
27682
27683 streamsize __off = 0;
27684 if (__cs[0] == '-' || __cs[0] == '+')
27685 {
27686 __off = 1;
27687 __ws2[0] = __ws[0];
27688 __len -= 1;
27689 }
27690
27691 _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size,
27692 __lc->_M_thousands_sep, __p, __ws2 + __off,
27693 __ws + __off, __len);
27694 __len += __off;
27695
27696 __ws = __ws2;
27697 }
27698
27699
27700 const streamsize __w = __io.width();
27701 if (__w > static_cast<streamsize>(__len))
27702 {
27703 _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27704 * __w));
27705 _M_pad(__fill, __w, __io, __ws3, __ws, __len);
27706 __ws = __ws3;
27707 }
27708 __io.width(0);
27709
27710
27711
27712 return std::__write(__s, __ws, __len);
27713 }
27714
27715 template<typename _CharT, typename _OutIter>
27716 _OutIter
27717 num_put<_CharT, _OutIter>::
27718 do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
27719 {
27720 const ios_base::fmtflags __flags = __io.flags();
27721 if ((__flags & ios_base::boolalpha) == 0)
27722 {
27723 const long __l = __v;
27724 __s = _M_insert_int(__s, __io, __fill, __l);
27725 }
27726 else
27727 {
27728 typedef __numpunct_cache<_CharT> __cache_type;
27729 __use_cache<__cache_type> __uc;
27730 const locale& __loc = __io._M_getloc();
27731 const __cache_type* __lc = __uc(__loc);
27732
27733 const _CharT* __name = __v ? __lc->_M_truename
27734 : __lc->_M_falsename;
27735 int __len = __v ? __lc->_M_truename_size
27736 : __lc->_M_falsename_size;
27737
27738 const streamsize __w = __io.width();
27739 if (__w > static_cast<streamsize>(__len))
27740 {
27741 _CharT* __cs
27742 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27743 * __w));
27744 _M_pad(__fill, __w, __io, __cs, __name, __len);
27745 __name = __cs;
27746 }
27747 __io.width(0);
27748 __s = std::__write(__s, __name, __len);
27749 }
27750 return __s;
27751 }
27752
27753 template<typename _CharT, typename _OutIter>
27754 _OutIter
27755 num_put<_CharT, _OutIter>::
27756 do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
27757 { return _M_insert_int(__s, __io, __fill, __v); }
27758
27759 template<typename _CharT, typename _OutIter>
27760 _OutIter
27761 num_put<_CharT, _OutIter>::
27762 do_put(iter_type __s, ios_base& __io, char_type __fill,
27763 unsigned long __v) const
27764 { return _M_insert_int(__s, __io, __fill, __v); }
27765
27766
27767 template<typename _CharT, typename _OutIter>
27768 _OutIter
27769 num_put<_CharT, _OutIter>::
27770 do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const
27771 { return _M_insert_int(__s, __io, __fill, __v); }
27772
27773 template<typename _CharT, typename _OutIter>
27774 _OutIter
27775 num_put<_CharT, _OutIter>::
27776 do_put(iter_type __s, ios_base& __io, char_type __fill,
27777 unsigned long long __v) const
27778 { return _M_insert_int(__s, __io, __fill, __v); }
27779
27780
27781 template<typename _CharT, typename _OutIter>
27782 _OutIter
27783 num_put<_CharT, _OutIter>::
27784 do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
27785 { return _M_insert_float(__s, __io, __fill, char(), __v); }
27786
27787 template<typename _CharT, typename _OutIter>
27788 _OutIter
27789 num_put<_CharT, _OutIter>::
27790 do_put(iter_type __s, ios_base& __io, char_type __fill,
27791 long double __v) const
27792 { return _M_insert_float(__s, __io, __fill, 'L', __v); }
27793
27794 template<typename _CharT, typename _OutIter>
27795 _OutIter
27796 num_put<_CharT, _OutIter>::
27797 do_put(iter_type __s, ios_base& __io, char_type __fill,
27798 const void* __v) const
27799 {
27800 const ios_base::fmtflags __flags = __io.flags();
27801 const ios_base::fmtflags __fmt = ~(ios_base::basefield
27802 | ios_base::uppercase
27803 | ios_base::internal);
27804 __io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase));
27805
27806 __s = _M_insert_int(__s, __io, __fill,
27807 reinterpret_cast<unsigned long>(__v));
27808 __io.flags(__flags);
27809 return __s;
27810 }
27811
27812 template<typename _CharT, typename _InIter>
27813 template<bool _Intl>
27814 _InIter
27815 money_get<_CharT, _InIter>::
27816 _M_extract(iter_type __beg, iter_type __end, ios_base& __io,
27817 ios_base::iostate& __err, string& __units) const
27818 {
27819 typedef char_traits<_CharT> __traits_type;
27820 typedef typename string_type::size_type size_type;
27821 typedef money_base::part part;
27822 typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
27823
27824 const locale& __loc = __io._M_getloc();
27825 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
27826
27827 __use_cache<__cache_type> __uc;
27828 const __cache_type* __lc = __uc(__loc);
27829 const char_type* __lit = __lc->_M_atoms;
27830
27831
27832 bool __negative = false;
27833
27834 size_type __sign_size = 0;
27835
27836 const bool __mandatory_sign = (__lc->_M_positive_sign_size
27837 && __lc->_M_negative_sign_size);
27838
27839 string __grouping_tmp;
27840 if (__lc->_M_use_grouping)
27841 __grouping_tmp.reserve(32);
27842
27843 int __last_pos = 0;
27844
27845 int __n = 0;
27846
27847 bool __testvalid = true;
27848
27849 bool __testdecfound = false;
27850
27851
27852 string __res;
27853 __res.reserve(32);
27854
27855 const char_type* __lit_zero = __lit + money_base::_S_zero;
27856 const money_base::pattern __p = __lc->_M_neg_format;
27857 for (int __i = 0; __i < 4 && __testvalid; ++__i)
27858 {
27859 const part __which = static_cast<part>(__p.field[__i]);
27860 switch (__which)
27861 {
27862 case money_base::symbol:
27863
27864
27865
27866
27867 if (__io.flags() & ios_base::showbase || __sign_size > 1
27868 || __i == 0
27869 || (__i == 1 && (__mandatory_sign
27870 || (static_cast<part>(__p.field[0])
27871 == money_base::sign)
27872 || (static_cast<part>(__p.field[2])
27873 == money_base::space)))
27874 || (__i == 2 && ((static_cast<part>(__p.field[3])
27875 == money_base::value)
27876 || __mandatory_sign
27877 && (static_cast<part>(__p.field[3])
27878 == money_base::sign))))
27879 {
27880 const size_type __len = __lc->_M_curr_symbol_size;
27881 size_type __j = 0;
27882 for (; __beg != __end && __j < __len
27883 && *__beg == __lc->_M_curr_symbol[__j];
27884 ++__beg, ++__j);
27885 if (__j != __len
27886 && (__j || __io.flags() & ios_base::showbase))
27887 __testvalid = false;
27888 }
27889 break;
27890 case money_base::sign:
27891
27892 if (__lc->_M_positive_sign_size && __beg != __end
27893 && *__beg == __lc->_M_positive_sign[0])
27894 {
27895 __sign_size = __lc->_M_positive_sign_size;
27896 ++__beg;
27897 }
27898 else if (__lc->_M_negative_sign_size && __beg != __end
27899 && *__beg == __lc->_M_negative_sign[0])
27900 {
27901 __negative = true;
27902 __sign_size = __lc->_M_negative_sign_size;
27903 ++__beg;
27904 }
27905 else if (__lc->_M_positive_sign_size
27906 && !__lc->_M_negative_sign_size)
27907
27908
27909 __negative = true;
27910 else if (__mandatory_sign)
27911 __testvalid = false;
27912 break;
27913 case money_base::value:
27914
27915
27916 for (; __beg != __end; ++__beg)
27917 {
27918 const char_type __c = *__beg;
27919 const char_type* __q = __traits_type::find(__lit_zero,
27920 10, __c);
27921 if (__q != 0)
27922 {
27923 __res += money_base::_S_atoms[__q - __lit];
27924 ++__n;
27925 }
27926 else if (__c == __lc->_M_decimal_point
27927 && !__testdecfound)
27928 {
27929 __last_pos = __n;
27930 __n = 0;
27931 __testdecfound = true;
27932 }
27933 else if (__lc->_M_use_grouping
27934 && __c == __lc->_M_thousands_sep
27935 && !__testdecfound)
27936 {
27937 if (__n)
27938 {
27939
27940 __grouping_tmp += static_cast<char>(__n);
27941 __n = 0;
27942 }
27943 else
27944 {
27945 __testvalid = false;
27946 break;
27947 }
27948 }
27949 else
27950 break;
27951 }
27952 if (__res.empty())
27953 __testvalid = false;
27954 break;
27955 case money_base::space:
27956
27957 if (__beg != __end && __ctype.is(ctype_base::space, *__beg))
27958 ++__beg;
27959 else
27960 __testvalid = false;
27961 case money_base::none:
27962
27963 if (__i != 3)
27964 for (; __beg != __end
27965 && __ctype.is(ctype_base::space, *__beg); ++__beg);
27966 break;
27967 }
27968 }
27969
27970
27971 if (__sign_size > 1 && __testvalid)
27972 {
27973 const char_type* __sign = __negative ? __lc->_M_negative_sign
27974 : __lc->_M_positive_sign;
27975 size_type __i = 1;
27976 for (; __beg != __end && __i < __sign_size
27977 && *__beg == __sign[__i]; ++__beg, ++__i);
27978
27979 if (__i != __sign_size)
27980 __testvalid = false;
27981 }
27982
27983 if (__testvalid)
27984 {
27985
27986 if (__res.size() > 1)
27987 {
27988 const size_type __first = __res.find_first_not_of('0');
27989 const bool __only_zeros = __first == string::npos;
27990 if (__first)
27991 __res.erase(0, __only_zeros ? __res.size() - 1 : __first);
27992 }
27993
27994
27995 if (__negative && __res[0] != '0')
27996 __res.insert(__res.begin(), '-');
27997
27998
27999 if (__grouping_tmp.size())
28000 {
28001
28002 __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos
28003 : __n);
28004 if (!std::__verify_grouping(__lc->_M_grouping,
28005 __lc->_M_grouping_size,
28006 __grouping_tmp))
28007 __err |= ios_base::failbit;
28008 }
28009
28010
28011 if (__testdecfound && __lc->_M_frac_digits > 0
28012 && __n != __lc->_M_frac_digits)
28013 __testvalid = false;
28014 }
28015
28016
28017 if (!__testvalid)
28018 __err |= ios_base::failbit;
28019 else
28020 __units.swap(__res);
28021
28022
28023 if (__beg == __end)
28024 __err |= ios_base::eofbit;
28025 return __beg;
28026 }
28027
28028 template<typename _CharT, typename _InIter>
28029 _InIter
28030 money_get<_CharT, _InIter>::
28031 do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
28032 ios_base::iostate& __err, long double& __units) const
28033 {
28034 string __str;
28035 if (__intl)
28036 __beg = _M_extract<true>(__beg, __end, __io, __err, __str);
28037 else
28038 __beg = _M_extract<false>(__beg, __end, __io, __err, __str);
28039 std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
28040 return __beg;
28041 }
28042
28043 template<typename _CharT, typename _InIter>
28044 _InIter
28045 money_get<_CharT, _InIter>::
28046 do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
28047 ios_base::iostate& __err, string_type& __units) const
28048 {
28049 typedef typename string::size_type size_type;
28050
28051 const locale& __loc = __io._M_getloc();
28052 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28053
28054 string __str;
28055 const iter_type __ret = __intl ? _M_extract<true>(__beg, __end, __io,
28056 __err, __str)
28057 : _M_extract<false>(__beg, __end, __io,
28058 __err, __str);
28059 const size_type __len = __str.size();
28060 if (__len)
28061 {
28062 _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
28063 * __len));
28064 __ctype.widen(__str.data(), __str.data() + __len, __ws);
28065 __units.assign(__ws, __len);
28066 }
28067
28068 return __ret;
28069 }
28070
28071 template<typename _CharT, typename _OutIter>
28072 template<bool _Intl>
28073 _OutIter
28074 money_put<_CharT, _OutIter>::
28075 _M_insert(iter_type __s, ios_base& __io, char_type __fill,
28076 const string_type& __digits) const
28077 {
28078 typedef typename string_type::size_type size_type;
28079 typedef money_base::part part;
28080 typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
28081
28082 const locale& __loc = __io._M_getloc();
28083 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28084
28085 __use_cache<__cache_type> __uc;
28086 const __cache_type* __lc = __uc(__loc);
28087 const char_type* __lit = __lc->_M_atoms;
28088
28089
28090
28091 const char_type* __beg = __digits.data();
28092
28093 money_base::pattern __p;
28094 const char_type* __sign;
28095 size_type __sign_size;
28096 if (!(*__beg == __lit[money_base::_S_minus]))
28097 {
28098 __p = __lc->_M_pos_format;
28099 __sign = __lc->_M_positive_sign;
28100 __sign_size = __lc->_M_positive_sign_size;
28101 }
28102 else
28103 {
28104 __p = __lc->_M_neg_format;
28105 __sign = __lc->_M_negative_sign;
28106 __sign_size = __lc->_M_negative_sign_size;
28107 if (__digits.size())
28108 ++__beg;
28109 }
28110
28111
28112 size_type __len = __ctype.scan_not(ctype_base::digit, __beg,
28113 __beg + __digits.size()) - __beg;
28114 if (__len)
28115 {
28116
28117
28118
28119 string_type __value;
28120 __value.reserve(2 * __len);
28121
28122
28123
28124 int __paddec = __len - __lc->_M_frac_digits;
28125 if (__paddec > 0)
28126 {
28127 if (__lc->_M_frac_digits < 0)
28128 __paddec = __len;
28129 if (__lc->_M_grouping_size)
28130 {
28131 _CharT* __ws =
28132 static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
28133 * 2 * __len));
28134 _CharT* __ws_end =
28135 std::__add_grouping(__ws, __lc->_M_thousands_sep,
28136 __lc->_M_grouping,
28137 __lc->_M_grouping_size,
28138 __beg, __beg + __paddec);
28139 __value.assign(__ws, __ws_end - __ws);
28140 }
28141 else
28142 __value.assign(__beg, __paddec);
28143 }
28144
28145
28146 if (__lc->_M_frac_digits > 0)
28147 {
28148 __value += __lc->_M_decimal_point;
28149 if (__paddec >= 0)
28150 __value.append(__beg + __paddec, __lc->_M_frac_digits);
28151 else
28152 {
28153
28154 __value.append(-__paddec, __lit[money_base::_S_zero]);
28155 __value.append(__beg, __len);
28156 }
28157 }
28158
28159
28160 const ios_base::fmtflags __f = __io.flags()
28161 & ios_base::adjustfield;
28162 __len = __value.size() + __sign_size;
28163 __len += ((__io.flags() & ios_base::showbase)
28164 ? __lc->_M_curr_symbol_size : 0);
28165
28166 string_type __res;
28167 __res.reserve(2 * __len);
28168
28169 const size_type __width = static_cast<size_type>(__io.width());
28170 const bool __testipad = (__f == ios_base::internal
28171 && __len < __width);
28172
28173 for (int __i = 0; __i < 4; ++__i)
28174 {
28175 const part __which = static_cast<part>(__p.field[__i]);
28176 switch (__which)
28177 {
28178 case money_base::symbol:
28179 if (__io.flags() & ios_base::showbase)
28180 __res.append(__lc->_M_curr_symbol,
28181 __lc->_M_curr_symbol_size);
28182 break;
28183 case money_base::sign:
28184
28185
28186
28187 if (__sign_size)
28188 __res += __sign[0];
28189 break;
28190 case money_base::value:
28191 __res += __value;
28192 break;
28193 case money_base::space:
28194
28195
28196
28197 if (__testipad)
28198 __res.append(__width - __len, __fill);
28199 else
28200 __res += __fill;
28201 break;
28202 case money_base::none:
28203 if (__testipad)
28204 __res.append(__width - __len, __fill);
28205 break;
28206 }
28207 }
28208
28209
28210 if (__sign_size > 1)
28211 __res.append(__sign + 1, __sign_size - 1);
28212
28213
28214 __len = __res.size();
28215 if (__width > __len)
28216 {
28217 if (__f == ios_base::left)
28218
28219 __res.append(__width - __len, __fill);
28220 else
28221
28222 __res.insert(0, __width - __len, __fill);
28223 __len = __width;
28224 }
28225
28226
28227 __s = std::__write(__s, __res.data(), __len);
28228 }
28229 __io.width(0);
28230 return __s;
28231 }
28232
28233 template<typename _CharT, typename _OutIter>
28234 _OutIter
28235 money_put<_CharT, _OutIter>::
28236 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
28237 long double __units) const
28238 {
28239 const locale __loc = __io.getloc();
28240 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28241
28242
28243 int __cs_size = 64;
28244 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
28245
28246
28247 int __len = std::__convert_from_v(__cs, __cs_size, "%.*Lf", __units,
28248 _S_get_c_locale(), 0);
28249
28250 if (__len >= __cs_size)
28251 {
28252 __cs_size = __len + 1;
28253 __cs = static_cast<char*>(__builtin_alloca(__cs_size));
28254 __len = std::__convert_from_v(__cs, __cs_size, "%.*Lf", __units,
28255 _S_get_c_locale(), 0);
28256 }
28257
28258
28259
28260
28261
28262
28263
28264 _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
28265 * __cs_size));
28266 __ctype.widen(__cs, __cs + __len, __ws);
28267 const string_type __digits(__ws, __len);
28268 return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
28269 : _M_insert<false>(__s, __io, __fill, __digits);
28270 }
28271
28272 template<typename _CharT, typename _OutIter>
28273 _OutIter
28274 money_put<_CharT, _OutIter>::
28275 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
28276 const string_type& __digits) const
28277 { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
28278 : _M_insert<false>(__s, __io, __fill, __digits); }
28279
28280
28281
28282
28283
28284 template<typename _CharT, typename _InIter>
28285 time_base::dateorder
28286 time_get<_CharT, _InIter>::do_date_order() const
28287 { return time_base::no_order; }
28288
28289
28290
28291 template<typename _CharT, typename _InIter>
28292 _InIter
28293 time_get<_CharT, _InIter>::
28294 _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
28295 ios_base::iostate& __err, tm* __tm,
28296 const _CharT* __format) const
28297 {
28298 const locale& __loc = __io._M_getloc();
28299 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28300 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28301 const size_t __len = char_traits<_CharT>::length(__format);
28302
28303 for (size_t __i = 0; __beg != __end && __i < __len && !__err; ++__i)
28304 {
28305 if (__ctype.narrow(__format[__i], 0) == '%')
28306 {
28307
28308 char __c = __ctype.narrow(__format[++__i], 0);
28309 int __mem = 0;
28310 if (__c == 'E' || __c == 'O')
28311 __c = __ctype.narrow(__format[++__i], 0);
28312 switch (__c)
28313 {
28314 const char* __cs;
28315 _CharT __wcs[10];
28316 case 'a':
28317
28318 const char_type* __days1[7];
28319 __tp._M_days_abbreviated(__days1);
28320 __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1,
28321 7, __io, __err);
28322 break;
28323 case 'A':
28324
28325 const char_type* __days2[7];
28326 __tp._M_days(__days2);
28327 __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2,
28328 7, __io, __err);
28329 break;
28330 case 'h':
28331 case 'b':
28332
28333 const char_type* __months1[12];
28334 __tp._M_months_abbreviated(__months1);
28335 __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
28336 __months1, 12, __io, __err);
28337 break;
28338 case 'B':
28339
28340 const char_type* __months2[12];
28341 __tp._M_months(__months2);
28342 __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
28343 __months2, 12, __io, __err);
28344 break;
28345 case 'c':
28346
28347 const char_type* __dt[2];
28348 __tp._M_date_time_formats(__dt);
28349 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28350 __tm, __dt[0]);
28351 break;
28352 case 'd':
28353
28354 __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2,
28355 __io, __err);
28356 break;
28357 case 'e':
28358
28359
28360 if (__ctype.is(ctype_base::space, *__beg))
28361 __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9,
28362 1, __io, __err);
28363 else
28364 __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31,
28365 2, __io, __err);
28366 break;
28367 case 'D':
28368
28369 __cs = "%m/%d/%y";
28370 __ctype.widen(__cs, __cs + 9, __wcs);
28371 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28372 __tm, __wcs);
28373 break;
28374 case 'H':
28375
28376 __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
28377 __io, __err);
28378 break;
28379 case 'I':
28380
28381 __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2,
28382 __io, __err);
28383 break;
28384 case 'm':
28385
28386 __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2,
28387 __io, __err);
28388 if (!__err)
28389 __tm->tm_mon = __mem - 1;
28390 break;
28391 case 'M':
28392
28393 __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
28394 __io, __err);
28395 break;
28396 case 'n':
28397 if (__ctype.narrow(*__beg, 0) == '\n')
28398 ++__beg;
28399 else
28400 __err |= ios_base::failbit;
28401 break;
28402 case 'R':
28403
28404 __cs = "%H:%M";
28405 __ctype.widen(__cs, __cs + 6, __wcs);
28406 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28407 __tm, __wcs);
28408 break;
28409 case 'S':
28410
28411
28412
28413 __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
28414
28415
28416
28417 __io, __err);
28418 break;
28419 case 't':
28420 if (__ctype.narrow(*__beg, 0) == '\t')
28421 ++__beg;
28422 else
28423 __err |= ios_base::failbit;
28424 break;
28425 case 'T':
28426
28427 __cs = "%H:%M:%S";
28428 __ctype.widen(__cs, __cs + 9, __wcs);
28429 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28430 __tm, __wcs);
28431 break;
28432 case 'x':
28433
28434 const char_type* __dates[2];
28435 __tp._M_date_formats(__dates);
28436 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28437 __tm, __dates[0]);
28438 break;
28439 case 'X':
28440
28441 const char_type* __times[2];
28442 __tp._M_time_formats(__times);
28443 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28444 __tm, __times[0]);
28445 break;
28446 case 'y':
28447 case 'C':
28448
28449 __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2,
28450 __io, __err);
28451 break;
28452 case 'Y':
28453
28454 __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4,
28455 __io, __err);
28456 if (!__err)
28457 __tm->tm_year = __mem - 1900;
28458 break;
28459 case 'Z':
28460
28461 if (__ctype.is(ctype_base::upper, *__beg))
28462 {
28463 int __tmp;
28464 __beg = _M_extract_name(__beg, __end, __tmp,
28465 __timepunct_cache<_CharT>::_S_timezones,
28466 14, __io, __err);
28467
28468
28469 if (__beg != __end && !__err && __tmp == 0
28470 && (*__beg == __ctype.widen('-')
28471 || *__beg == __ctype.widen('+')))
28472 {
28473 __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
28474 __io, __err);
28475 __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
28476 __io, __err);
28477 }
28478 }
28479 else
28480 __err |= ios_base::failbit;
28481 break;
28482 default:
28483
28484 __err |= ios_base::failbit;
28485 }
28486 }
28487 else
28488 {
28489
28490 if (__format[__i] == *__beg)
28491 ++__beg;
28492 else
28493 __err |= ios_base::failbit;
28494 }
28495 }
28496 return __beg;
28497 }
28498
28499 template<typename _CharT, typename _InIter>
28500 _InIter
28501 time_get<_CharT, _InIter>::
28502 _M_extract_num(iter_type __beg, iter_type __end, int& __member,
28503 int __min, int __max, size_t __len,
28504 ios_base& __io, ios_base::iostate& __err) const
28505 {
28506 const locale& __loc = __io._M_getloc();
28507 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28508
28509
28510 int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1);
28511
28512 ++__min;
28513 size_t __i = 0;
28514 int __value = 0;
28515 for (; __beg != __end && __i < __len; ++__beg, ++__i)
28516 {
28517 const char __c = __ctype.narrow(*__beg, '*');
28518 if (__c >= '0' && __c <= '9')
28519 {
28520 __value = __value * 10 + (__c - '0');
28521 const int __valuec = __value * __mult;
28522 if (__valuec > __max || __valuec + __mult < __min)
28523 break;
28524 __mult /= 10;
28525 }
28526 else
28527 break;
28528 }
28529 if (__i == __len)
28530 __member = __value;
28531 else
28532 __err |= ios_base::failbit;
28533 return __beg;
28534 }
28535
28536
28537
28538 template<typename _CharT, typename _InIter>
28539 _InIter
28540 time_get<_CharT, _InIter>::
28541 _M_extract_name(iter_type __beg, iter_type __end, int& __member,
28542 const _CharT** __names, size_t __indexlen,
28543 ios_base& __io, ios_base::iostate& __err) const
28544 {
28545 typedef char_traits<_CharT> __traits_type;
28546 const locale& __loc = __io._M_getloc();
28547 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28548
28549 int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int)
28550 * __indexlen));
28551 size_t __nmatches = 0;
28552 size_t __pos = 0;
28553 bool __testvalid = true;
28554 const char_type* __name;
28555
28556
28557
28558
28559
28560 if (__beg != __end)
28561 {
28562 const char_type __c = *__beg;
28563 for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
28564 if (__c == __names[__i1][0]
28565 || __c == __ctype.toupper(__names[__i1][0]))
28566 __matches[__nmatches++] = __i1;
28567 }
28568
28569 while (__nmatches > 1)
28570 {
28571
28572 size_t __minlen = __traits_type::length(__names[__matches[0]]);
28573 for (size_t __i2 = 1; __i2 < __nmatches; ++__i2)
28574 __minlen = std::min(__minlen,
28575 __traits_type::length(__names[__matches[__i2]]));
28576 ++__beg, ++__pos;
28577 if (__pos < __minlen && __beg != __end)
28578 for (size_t __i3 = 0; __i3 < __nmatches;)
28579 {
28580 __name = __names[__matches[__i3]];
28581 if (!(__name[__pos] == *__beg))
28582 __matches[__i3] = __matches[--__nmatches];
28583 else
28584 ++__i3;
28585 }
28586 else
28587 break;
28588 }
28589
28590 if (__nmatches == 1)
28591 {
28592
28593 ++__beg, ++__pos;
28594 __name = __names[__matches[0]];
28595 const size_t __len = __traits_type::length(__name);
28596 while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
28597 ++__beg, ++__pos;
28598
28599 if (__len == __pos)
28600 __member = __matches[0];
28601 else
28602 __testvalid = false;
28603 }
28604 else
28605 __testvalid = false;
28606 if (!__testvalid)
28607 __err |= ios_base::failbit;
28608 return __beg;
28609 }
28610
28611 template<typename _CharT, typename _InIter>
28612 _InIter
28613 time_get<_CharT, _InIter>::
28614 do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
28615 ios_base::iostate& __err, tm* __tm) const
28616 {
28617 const locale& __loc = __io._M_getloc();
28618 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28619 const char_type* __times[2];
28620 __tp._M_time_formats(__times);
28621 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28622 __tm, __times[0]);
28623 if (__beg == __end)
28624 __err |= ios_base::eofbit;
28625 return __beg;
28626 }
28627
28628 template<typename _CharT, typename _InIter>
28629 _InIter
28630 time_get<_CharT, _InIter>::
28631 do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
28632 ios_base::iostate& __err, tm* __tm) const
28633 {
28634 const locale& __loc = __io._M_getloc();
28635 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28636 const char_type* __dates[2];
28637 __tp._M_date_formats(__dates);
28638 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28639 __tm, __dates[0]);
28640 if (__beg == __end)
28641 __err |= ios_base::eofbit;
28642 return __beg;
28643 }
28644
28645 template<typename _CharT, typename _InIter>
28646 _InIter
28647 time_get<_CharT, _InIter>::
28648 do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
28649 ios_base::iostate& __err, tm* __tm) const
28650 {
28651 typedef char_traits<_CharT> __traits_type;
28652 const locale& __loc = __io._M_getloc();
28653 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28654 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28655 const char_type* __days[7];
28656 __tp._M_days_abbreviated(__days);
28657 int __tmpwday;
28658 __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7, __io, __err);
28659
28660
28661
28662
28663
28664
28665
28666 if (!__err && __beg != __end)
28667 {
28668 size_t __pos = __traits_type::length(__days[__tmpwday]);
28669 __tp._M_days(__days);
28670 const char_type* __name = __days[__tmpwday];
28671 if (__name[__pos] == *__beg)
28672 {
28673
28674 const size_t __len = __traits_type::length(__name);
28675 while (__pos < __len && __beg != __end
28676 && __name[__pos] == *__beg)
28677 ++__beg, ++__pos;
28678 if (__len != __pos)
28679 __err |= ios_base::failbit;
28680 }
28681 }
28682 if (!__err)
28683 __tm->tm_wday = __tmpwday;
28684
28685 if (__beg == __end)
28686 __err |= ios_base::eofbit;
28687 return __beg;
28688 }
28689
28690 template<typename _CharT, typename _InIter>
28691 _InIter
28692 time_get<_CharT, _InIter>::
28693 do_get_monthname(iter_type __beg, iter_type __end,
28694 ios_base& __io, ios_base::iostate& __err, tm* __tm) const
28695 {
28696 typedef char_traits<_CharT> __traits_type;
28697 const locale& __loc = __io._M_getloc();
28698 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28699 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28700 const char_type* __months[12];
28701 __tp._M_months_abbreviated(__months);
28702 int __tmpmon;
28703 __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12,
28704 __io, __err);
28705
28706
28707
28708
28709
28710
28711
28712 if (!__err && __beg != __end)
28713 {
28714 size_t __pos = __traits_type::length(__months[__tmpmon]);
28715 __tp._M_months(__months);
28716 const char_type* __name = __months[__tmpmon];
28717 if (__name[__pos] == *__beg)
28718 {
28719
28720 const size_t __len = __traits_type::length(__name);
28721 while (__pos < __len && __beg != __end
28722 && __name[__pos] == *__beg)
28723 ++__beg, ++__pos;
28724 if (__len != __pos)
28725 __err |= ios_base::failbit;
28726 }
28727 }
28728 if (!__err)
28729 __tm->tm_mon = __tmpmon;
28730
28731 if (__beg == __end)
28732 __err |= ios_base::eofbit;
28733 return __beg;
28734 }
28735
28736 template<typename _CharT, typename _InIter>
28737 _InIter
28738 time_get<_CharT, _InIter>::
28739 do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
28740 ios_base::iostate& __err, tm* __tm) const
28741 {
28742 const locale& __loc = __io._M_getloc();
28743 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28744
28745 size_t __i = 0;
28746 int __value = 0;
28747 for (; __beg != __end && __i < 4; ++__beg, ++__i)
28748 {
28749 const char __c = __ctype.narrow(*__beg, '*');
28750 if (__c >= '0' && __c <= '9')
28751 __value = __value * 10 + (__c - '0');
28752 else
28753 break;
28754 }
28755 if (__i == 2 || __i == 4)
28756 __tm->tm_year = __i == 2 ? __value : __value - 1900;
28757 else
28758 __err |= ios_base::failbit;
28759 if (__beg == __end)
28760 __err |= ios_base::eofbit;
28761 return __beg;
28762 }
28763
28764 template<typename _CharT, typename _OutIter>
28765 _OutIter
28766 time_put<_CharT, _OutIter>::
28767 put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
28768 const _CharT* __beg, const _CharT* __end) const
28769 {
28770 const locale& __loc = __io._M_getloc();
28771 ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
28772 for (; __beg != __end; ++__beg)
28773 if (__ctype.narrow(*__beg, 0) != '%')
28774 {
28775 *__s = *__beg;
28776 ++__s;
28777 }
28778 else if (++__beg != __end)
28779 {
28780 char __format;
28781 char __mod = 0;
28782 const char __c = __ctype.narrow(*__beg, 0);
28783 if (__c != 'E' && __c != 'O')
28784 __format = __c;
28785 else if (++__beg != __end)
28786 {
28787 __mod = __c;
28788 __format = __ctype.narrow(*__beg, 0);
28789 }
28790 else
28791 break;
28792 __s = this->do_put(__s, __io, __fill, __tm, __format, __mod);
28793 }
28794 else
28795 break;
28796 return __s;
28797 }
28798
28799 template<typename _CharT, typename _OutIter>
28800 _OutIter
28801 time_put<_CharT, _OutIter>::
28802 do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
28803 char __format, char __mod) const
28804 {
28805 const locale& __loc = __io._M_getloc();
28806 ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
28807 __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
28808
28809
28810
28811 const size_t __maxlen = 128;
28812 char_type* __res =
28813 static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen));
28814
28815
28816
28817
28818
28819
28820 char_type __fmt[4];
28821 __fmt[0] = __ctype.widen('%');
28822 if (!__mod)
28823 {
28824 __fmt[1] = __format;
28825 __fmt[2] = char_type();
28826 }
28827 else
28828 {
28829 __fmt[1] = __mod;
28830 __fmt[2] = __format;
28831 __fmt[3] = char_type();
28832 }
28833
28834 __tp._M_put(__res, __maxlen, __fmt, __tm);
28835
28836
28837 return std::__write(__s, __res, char_traits<char_type>::length(__res));
28838 }
28839
28840
28841 template<typename _CharT>
28842 int
28843 collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const
28844 { return 0; }
28845
28846
28847 template<typename _CharT>
28848 size_t
28849 collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const
28850 { return 0; }
28851
28852 template<typename _CharT>
28853 int
28854 collate<_CharT>::
28855 do_compare(const _CharT* __lo1, const _CharT* __hi1,
28856 const _CharT* __lo2, const _CharT* __hi2) const
28857 {
28858
28859
28860 const string_type __one(__lo1, __hi1);
28861 const string_type __two(__lo2, __hi2);
28862
28863 const _CharT* __p = __one.c_str();
28864 const _CharT* __pend = __one.data() + __one.length();
28865 const _CharT* __q = __two.c_str();
28866 const _CharT* __qend = __two.data() + __two.length();
28867
28868
28869
28870
28871 for (;;)
28872 {
28873 const int __res = _M_compare(__p, __q);
28874 if (__res)
28875 return __res;
28876
28877 __p += char_traits<_CharT>::length(__p);
28878 __q += char_traits<_CharT>::length(__q);
28879 if (__p == __pend && __q == __qend)
28880 return 0;
28881 else if (__p == __pend)
28882 return -1;
28883 else if (__q == __qend)
28884 return 1;
28885
28886 __p++;
28887 __q++;
28888 }
28889 }
28890
28891 template<typename _CharT>
28892 typename collate<_CharT>::string_type
28893 collate<_CharT>::
28894 do_transform(const _CharT* __lo, const _CharT* __hi) const
28895 {
28896
28897 string_type __str(__lo, __hi);
28898
28899 const _CharT* __p = __str.c_str();
28900 const _CharT* __pend = __str.data() + __str.length();
28901
28902 size_t __len = (__hi - __lo) * 2;
28903
28904 string_type __ret;
28905
28906
28907
28908
28909 for (;;)
28910 {
28911
28912 _CharT* __c =
28913 static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len));
28914 size_t __res = _M_transform(__c, __p, __len);
28915
28916
28917 if (__res >= __len)
28918 {
28919 __len = __res + 1;
28920 __c = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
28921 * __len));
28922 __res = _M_transform(__c, __p, __len);
28923 }
28924
28925 __ret.append(__c, __res);
28926 __p += char_traits<_CharT>::length(__p);
28927 if (__p == __pend)
28928 return __ret;
28929
28930 __p++;
28931 __ret.push_back(_CharT());
28932 }
28933 }
28934
28935 template<typename _CharT>
28936 long
28937 collate<_CharT>::
28938 do_hash(const _CharT* __lo, const _CharT* __hi) const
28939 {
28940 unsigned long __val = 0;
28941 for (; __lo < __hi; ++__lo)
28942 __val = *__lo + ((__val << 7) |
28943 (__val >> (numeric_limits<unsigned long>::digits - 7)));
28944 return static_cast<long>(__val);
28945 }
28946# 2407 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3
28947 template<typename _CharT, typename _Traits>
28948 void
28949 __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill,
28950 _CharT* __news, const _CharT* __olds,
28951 const streamsize __newlen,
28952 const streamsize __oldlen, const bool __num)
28953 {
28954 const size_t __plen = static_cast<size_t>(__newlen - __oldlen);
28955 const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
28956
28957
28958 if (__adjust == ios_base::left)
28959 {
28960 _Traits::copy(__news, const_cast<_CharT*>(__olds), __oldlen);
28961 _Traits::assign(__news + __oldlen, __plen, __fill);
28962 return;
28963 }
28964
28965 size_t __mod = 0;
28966 if (__adjust == ios_base::internal && __num)
28967 {
28968
28969
28970
28971 const locale& __loc = __io._M_getloc();
28972 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28973
28974 const bool __testsign = (__ctype.widen('-') == __olds[0]
28975 || __ctype.widen('+') == __olds[0]);
28976 const bool __testhex = (__ctype.widen('0') == __olds[0]
28977 && __oldlen > 1
28978 && (__ctype.widen('x') == __olds[1]
28979 || __ctype.widen('X') == __olds[1]));
28980 if (__testhex)
28981 {
28982 __news[0] = __olds[0];
28983 __news[1] = __olds[1];
28984 __mod = 2;
28985 __news += 2;
28986 }
28987 else if (__testsign)
28988 {
28989 __news[0] = __olds[0];
28990 __mod = 1;
28991 ++__news;
28992 }
28993
28994 }
28995 _Traits::assign(__news, __plen, __fill);
28996 _Traits::copy(__news + __plen, const_cast<_CharT*>(__olds + __mod),
28997 __oldlen - __mod);
28998 }
28999
29000 bool
29001 __verify_grouping(const char* __grouping, size_t __grouping_size,
29002 const string& __grouping_tmp)
29003 {
29004 const size_t __n = __grouping_tmp.size() - 1;
29005 const size_t __min = std::min(__n, size_t(__grouping_size - 1));
29006 size_t __i = __n;
29007 bool __test = true;
29008
29009
29010
29011
29012 for (size_t __j = 0; __j < __min && __test; --__i, ++__j)
29013 __test = __grouping_tmp[__i] == __grouping[__j];
29014 for (; __i && __test; --__i)
29015 __test = __grouping_tmp[__i] == __grouping[__min];
29016
29017
29018
29019 if (static_cast<signed char>(__grouping[__min]) > 0)
29020 __test &= __grouping_tmp[0] <= __grouping[__min];
29021 return __test;
29022 }
29023
29024 template<typename _CharT>
29025 _CharT*
29026 __add_grouping(_CharT* __s, _CharT __sep,
29027 const char* __gbeg, size_t __gsize,
29028 const _CharT* __first, const _CharT* __last)
29029 {
29030 if (__last - __first > *__gbeg
29031 && static_cast<signed char>(*__gbeg) > 0)
29032 {
29033 const bool __bump = __gsize != 1;
29034 __s = std::__add_grouping(__s, __sep, __gbeg + __bump,
29035 __gsize - __bump, __first,
29036 __last - *__gbeg);
29037 __first = __last - *__gbeg;
29038 *__s++ = __sep;
29039 }
29040 do
29041 *__s++ = *__first++;
29042 while (__first != __last);
29043 return __s;
29044 }
29045
29046
29047
29048
29049
29050 extern template class moneypunct<char, false>;
29051 extern template class moneypunct<char, true>;
29052 extern template class moneypunct_byname<char, false>;
29053 extern template class moneypunct_byname<char, true>;
29054 extern template class money_get<char>;
29055 extern template class money_put<char>;
29056 extern template class numpunct<char>;
29057 extern template class numpunct_byname<char>;
29058 extern template class num_get<char>;
29059 extern template class num_put<char>;
29060 extern template class __timepunct<char>;
29061 extern template class time_put<char>;
29062 extern template class time_put_byname<char>;
29063 extern template class time_get<char>;
29064 extern template class time_get_byname<char>;
29065 extern template class messages<char>;
29066 extern template class messages_byname<char>;
29067 extern template class ctype_byname<char>;
29068 extern template class codecvt_byname<char, char, mbstate_t>;
29069 extern template class collate<char>;
29070 extern template class collate_byname<char>;
29071
29072 extern template
29073 const codecvt<char, char, mbstate_t>&
29074 use_facet<codecvt<char, char, mbstate_t> >(const locale&);
29075
29076 extern template
29077 const collate<char>&
29078 use_facet<collate<char> >(const locale&);
29079
29080 extern template
29081 const numpunct<char>&
29082 use_facet<numpunct<char> >(const locale&);
29083
29084 extern template
29085 const num_put<char>&
29086 use_facet<num_put<char> >(const locale&);
29087
29088 extern template
29089 const num_get<char>&
29090 use_facet<num_get<char> >(const locale&);
29091
29092 extern template
29093 const moneypunct<char, true>&
29094 use_facet<moneypunct<char, true> >(const locale&);
29095
29096 extern template
29097 const moneypunct<char, false>&
29098 use_facet<moneypunct<char, false> >(const locale&);
29099
29100 extern template
29101 const money_put<char>&
29102 use_facet<money_put<char> >(const locale&);
29103
29104 extern template
29105 const money_get<char>&
29106 use_facet<money_get<char> >(const locale&);
29107
29108 extern template
29109 const __timepunct<char>&
29110 use_facet<__timepunct<char> >(const locale&);
29111
29112 extern template
29113 const time_put<char>&
29114 use_facet<time_put<char> >(const locale&);
29115
29116 extern template
29117 const time_get<char>&
29118 use_facet<time_get<char> >(const locale&);
29119
29120 extern template
29121 const messages<char>&
29122 use_facet<messages<char> >(const locale&);
29123
29124 extern template
29125 bool
29126 has_facet<ctype<char> >(const locale&);
29127
29128 extern template
29129 bool
29130 has_facet<codecvt<char, char, mbstate_t> >(const locale&);
29131
29132 extern template
29133 bool
29134 has_facet<collate<char> >(const locale&);
29135
29136 extern template
29137 bool
29138 has_facet<numpunct<char> >(const locale&);
29139
29140 extern template
29141 bool
29142 has_facet<num_put<char> >(const locale&);
29143
29144 extern template
29145 bool
29146 has_facet<num_get<char> >(const locale&);
29147
29148 extern template
29149 bool
29150 has_facet<moneypunct<char> >(const locale&);
29151
29152 extern template
29153 bool
29154 has_facet<money_put<char> >(const locale&);
29155
29156 extern template
29157 bool
29158 has_facet<money_get<char> >(const locale&);
29159
29160 extern template
29161 bool
29162 has_facet<__timepunct<char> >(const locale&);
29163
29164 extern template
29165 bool
29166 has_facet<time_put<char> >(const locale&);
29167
29168 extern template
29169 bool
29170 has_facet<time_get<char> >(const locale&);
29171
29172 extern template
29173 bool
29174 has_facet<messages<char> >(const locale&);
29175
29176
29177 extern template class moneypunct<wchar_t, false>;
29178 extern template class moneypunct<wchar_t, true>;
29179 extern template class moneypunct_byname<wchar_t, false>;
29180 extern template class moneypunct_byname<wchar_t, true>;
29181 extern template class money_get<wchar_t>;
29182 extern template class money_put<wchar_t>;
29183 extern template class numpunct<wchar_t>;
29184 extern template class numpunct_byname<wchar_t>;
29185 extern template class num_get<wchar_t>;
29186 extern template class num_put<wchar_t>;
29187 extern template class __timepunct<wchar_t>;
29188 extern template class time_put<wchar_t>;
29189 extern template class time_put_byname<wchar_t>;
29190 extern template class time_get<wchar_t>;
29191 extern template class time_get_byname<wchar_t>;
29192 extern template class messages<wchar_t>;
29193 extern template class messages_byname<wchar_t>;
29194 extern template class ctype_byname<wchar_t>;
29195 extern template class codecvt_byname<wchar_t, char, mbstate_t>;
29196 extern template class collate<wchar_t>;
29197 extern template class collate_byname<wchar_t>;
29198
29199 extern template
29200 const codecvt<wchar_t, char, mbstate_t>&
29201 use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
29202
29203 extern template
29204 const collate<wchar_t>&
29205 use_facet<collate<wchar_t> >(const locale&);
29206
29207 extern template
29208 const numpunct<wchar_t>&
29209 use_facet<numpunct<wchar_t> >(const locale&);
29210
29211 extern template
29212 const num_put<wchar_t>&
29213 use_facet<num_put<wchar_t> >(const locale&);
29214
29215 extern template
29216 const num_get<wchar_t>&
29217 use_facet<num_get<wchar_t> >(const locale&);
29218
29219 extern template
29220 const moneypunct<wchar_t, true>&
29221 use_facet<moneypunct<wchar_t, true> >(const locale&);
29222
29223 extern template
29224 const moneypunct<wchar_t, false>&
29225 use_facet<moneypunct<wchar_t, false> >(const locale&);
29226
29227 extern template
29228 const money_put<wchar_t>&
29229 use_facet<money_put<wchar_t> >(const locale&);
29230
29231 extern template
29232 const money_get<wchar_t>&
29233 use_facet<money_get<wchar_t> >(const locale&);
29234
29235 extern template
29236 const __timepunct<wchar_t>&
29237 use_facet<__timepunct<wchar_t> >(const locale&);
29238
29239 extern template
29240 const time_put<wchar_t>&
29241 use_facet<time_put<wchar_t> >(const locale&);
29242
29243 extern template
29244 const time_get<wchar_t>&
29245 use_facet<time_get<wchar_t> >(const locale&);
29246
29247 extern template
29248 const messages<wchar_t>&
29249 use_facet<messages<wchar_t> >(const locale&);
29250
29251 extern template
29252 bool
29253 has_facet<ctype<wchar_t> >(const locale&);
29254
29255 extern template
29256 bool
29257 has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
29258
29259 extern template
29260 bool
29261 has_facet<collate<wchar_t> >(const locale&);
29262
29263 extern template
29264 bool
29265 has_facet<numpunct<wchar_t> >(const locale&);
29266
29267 extern template
29268 bool
29269 has_facet<num_put<wchar_t> >(const locale&);
29270
29271 extern template
29272 bool
29273 has_facet<num_get<wchar_t> >(const locale&);
29274
29275 extern template
29276 bool
29277 has_facet<moneypunct<wchar_t> >(const locale&);
29278
29279 extern template
29280 bool
29281 has_facet<money_put<wchar_t> >(const locale&);
29282
29283 extern template
29284 bool
29285 has_facet<money_get<wchar_t> >(const locale&);
29286
29287 extern template
29288 bool
29289 has_facet<__timepunct<wchar_t> >(const locale&);
29290
29291 extern template
29292 bool
29293 has_facet<time_put<wchar_t> >(const locale&);
29294
29295 extern template
29296 bool
29297 has_facet<time_get<wchar_t> >(const locale&);
29298
29299 extern template
29300 bool
29301 has_facet<messages<wchar_t> >(const locale&);
29302
29303
29304}
29305# 49 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/locale" 2 3
29306
29307#pragma GCC visibility pop
29308# 46 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 2 3
29309
29310namespace std
29311{
29312 template<typename _CharT, typename _Traits>
29313 basic_ostream<_CharT, _Traits>::sentry::
29314 sentry(basic_ostream<_CharT, _Traits>& __os)
29315 : _M_ok(false), _M_os(__os)
29316 {
29317
29318 if (__os.tie() && __os.good())
29319 __os.tie()->flush();
29320
29321 if (__os.good())
29322 _M_ok = true;
29323 else
29324 __os.setstate(ios_base::failbit);
29325 }
29326
29327 template<typename _CharT, typename _Traits>
29328 basic_ostream<_CharT, _Traits>&
29329 basic_ostream<_CharT, _Traits>::
29330 operator<<(__ostream_type& (*__pf)(__ostream_type&))
29331 {
29332
29333
29334
29335 return __pf(*this);
29336 }
29337
29338 template<typename _CharT, typename _Traits>
29339 basic_ostream<_CharT, _Traits>&
29340 basic_ostream<_CharT, _Traits>::
29341 operator<<(__ios_type& (*__pf)(__ios_type&))
29342 {
29343
29344
29345
29346 __pf(*this);
29347 return *this;
29348 }
29349
29350 template<typename _CharT, typename _Traits>
29351 basic_ostream<_CharT, _Traits>&
29352 basic_ostream<_CharT, _Traits>::
29353 operator<<(ios_base& (*__pf)(ios_base&))
29354 {
29355
29356
29357
29358 __pf(*this);
29359 return *this;
29360 }
29361
29362 template<typename _CharT, typename _Traits>
29363 basic_ostream<_CharT, _Traits>&
29364 basic_ostream<_CharT, _Traits>::
29365 operator<<(bool __n)
29366 {
29367 sentry __cerb(*this);
29368 if (__cerb)
29369 {
29370 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29371 try
29372 {
29373 const __num_put_type& __np = __check_facet(this->_M_num_put);
29374 if (__np.put(*this, *this, this->fill(), __n).failed())
29375 __err |= ios_base::badbit;
29376 }
29377 catch(...)
29378 { this->_M_setstate(ios_base::badbit); }
29379 if (__err)
29380 this->setstate(__err);
29381 }
29382 return *this;
29383 }
29384
29385 template<typename _CharT, typename _Traits>
29386 basic_ostream<_CharT, _Traits>&
29387 basic_ostream<_CharT, _Traits>::
29388 operator<<(short __n)
29389 {
29390 sentry __cerb(*this);
29391 if (__cerb)
29392 {
29393 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29394 try
29395 {
29396
29397
29398 long __l;
29399 const ios_base::fmtflags __fmt = (this->flags()
29400 & ios_base::basefield);
29401 if (__fmt == ios_base::oct || __fmt == ios_base::hex)
29402 __l = static_cast<long>(static_cast<unsigned short>(__n));
29403 else
29404 __l = static_cast<long>(__n);
29405 const __num_put_type& __np = __check_facet(this->_M_num_put);
29406 if (__np.put(*this, *this, this->fill(), __l).failed())
29407 __err |= ios_base::badbit;
29408 }
29409 catch(...)
29410 { this->_M_setstate(ios_base::badbit); }
29411 if (__err)
29412 this->setstate(__err);
29413 }
29414 return *this;
29415 }
29416
29417 template<typename _CharT, typename _Traits>
29418 basic_ostream<_CharT, _Traits>&
29419 basic_ostream<_CharT, _Traits>::
29420 operator<<(unsigned short __n)
29421 {
29422 sentry __cerb(*this);
29423 if (__cerb)
29424 {
29425 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29426 try
29427 {
29428
29429
29430 const __num_put_type& __np = __check_facet(this->_M_num_put);
29431 if (__np.put(*this, *this, this->fill(),
29432 static_cast<unsigned long>(__n)).failed())
29433 __err |= ios_base::badbit;
29434 }
29435 catch(...)
29436 { this->_M_setstate(ios_base::badbit); }
29437 if (__err)
29438 this->setstate(__err);
29439 }
29440 return *this;
29441 }
29442
29443 template<typename _CharT, typename _Traits>
29444 basic_ostream<_CharT, _Traits>&
29445 basic_ostream<_CharT, _Traits>::
29446 operator<<(int __n)
29447 {
29448 sentry __cerb(*this);
29449 if (__cerb)
29450 {
29451 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29452 try
29453 {
29454
29455
29456 long __l;
29457 const ios_base::fmtflags __fmt = (this->flags()
29458 & ios_base::basefield);
29459 if (__fmt == ios_base::oct || __fmt == ios_base::hex)
29460 __l = static_cast<long>(static_cast<unsigned int>(__n));
29461 else
29462 __l = static_cast<long>(__n);
29463 const __num_put_type& __np = __check_facet(this->_M_num_put);
29464 if (__np.put(*this, *this, this->fill(), __l).failed())
29465 __err |= ios_base::badbit;
29466 }
29467 catch(...)
29468 { this->_M_setstate(ios_base::badbit); }
29469 if (__err)
29470 this->setstate(__err);
29471 }
29472 return *this;
29473 }
29474
29475 template<typename _CharT, typename _Traits>
29476 basic_ostream<_CharT, _Traits>&
29477 basic_ostream<_CharT, _Traits>::
29478 operator<<(unsigned int __n)
29479 {
29480 sentry __cerb(*this);
29481 if (__cerb)
29482 {
29483 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29484 try
29485 {
29486
29487
29488 const __num_put_type& __np = __check_facet(this->_M_num_put);
29489 if (__np.put(*this, *this, this->fill(),
29490 static_cast<unsigned long>(__n)).failed())
29491 __err |= ios_base::badbit;
29492 }
29493 catch(...)
29494 { this->_M_setstate(ios_base::badbit); }
29495 if (__err)
29496 this->setstate(__err);
29497 }
29498 return *this;
29499 }
29500
29501 template<typename _CharT, typename _Traits>
29502 basic_ostream<_CharT, _Traits>&
29503 basic_ostream<_CharT, _Traits>::
29504 operator<<(long __n)
29505 {
29506 sentry __cerb(*this);
29507 if (__cerb)
29508 {
29509 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29510 try
29511 {
29512 const __num_put_type& __np = __check_facet(this->_M_num_put);
29513 if (__np.put(*this, *this, this->fill(), __n).failed())
29514 __err |= ios_base::badbit;
29515 }
29516 catch(...)
29517 { this->_M_setstate(ios_base::badbit); }
29518 if (__err)
29519 this->setstate(__err);
29520 }
29521 return *this;
29522 }
29523
29524 template<typename _CharT, typename _Traits>
29525 basic_ostream<_CharT, _Traits>&
29526 basic_ostream<_CharT, _Traits>::
29527 operator<<(unsigned long __n)
29528 {
29529 sentry __cerb(*this);
29530 if (__cerb)
29531 {
29532 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29533 try
29534 {
29535 const __num_put_type& __np = __check_facet(this->_M_num_put);
29536 if (__np.put(*this, *this, this->fill(), __n).failed())
29537 __err |= ios_base::badbit;
29538 }
29539 catch(...)
29540 { this->_M_setstate(ios_base::badbit); }
29541 if (__err)
29542 this->setstate(__err);
29543 }
29544 return *this;
29545 }
29546
29547
29548 template<typename _CharT, typename _Traits>
29549 basic_ostream<_CharT, _Traits>&
29550 basic_ostream<_CharT, _Traits>::
29551 operator<<(long long __n)
29552 {
29553 sentry __cerb(*this);
29554 if (__cerb)
29555 {
29556 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29557 try
29558 {
29559 const __num_put_type& __np = __check_facet(this->_M_num_put);
29560 if (__np.put(*this, *this, this->fill(), __n).failed())
29561 __err |= ios_base::badbit;
29562 }
29563 catch(...)
29564 { this->_M_setstate(ios_base::badbit); }
29565 if (__err)
29566 this->setstate(__err);
29567 }
29568 return *this;
29569 }
29570
29571 template<typename _CharT, typename _Traits>
29572 basic_ostream<_CharT, _Traits>&
29573 basic_ostream<_CharT, _Traits>::
29574 operator<<(unsigned long long __n)
29575 {
29576 sentry __cerb(*this);
29577 if (__cerb)
29578 {
29579 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29580 try
29581 {
29582 const __num_put_type& __np = __check_facet(this->_M_num_put);
29583 if (__np.put(*this, *this, this->fill(), __n).failed())
29584 __err |= ios_base::badbit;
29585 }
29586 catch(...)
29587 { this->_M_setstate(ios_base::badbit); }
29588 if (__err)
29589 this->setstate(__err);
29590 }
29591 return *this;
29592 }
29593
29594
29595 template<typename _CharT, typename _Traits>
29596 basic_ostream<_CharT, _Traits>&
29597 basic_ostream<_CharT, _Traits>::
29598 operator<<(float __n)
29599 {
29600 sentry __cerb(*this);
29601 if (__cerb)
29602 {
29603 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29604 try
29605 {
29606
29607
29608 const __num_put_type& __np = __check_facet(this->_M_num_put);
29609 if (__np.put(*this, *this, this->fill(),
29610 static_cast<double>(__n)).failed())
29611 __err |= ios_base::badbit;
29612 }
29613 catch(...)
29614 { this->_M_setstate(ios_base::badbit); }
29615 if (__err)
29616 this->setstate(__err);
29617 }
29618 return *this;
29619 }
29620
29621 template<typename _CharT, typename _Traits>
29622 basic_ostream<_CharT, _Traits>&
29623 basic_ostream<_CharT, _Traits>::
29624 operator<<(double __n)
29625 {
29626 sentry __cerb(*this);
29627 if (__cerb)
29628 {
29629 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29630 try
29631 {
29632 const __num_put_type& __np = __check_facet(this->_M_num_put);
29633 if (__np.put(*this, *this, this->fill(), __n).failed())
29634 __err |= ios_base::badbit;
29635 }
29636 catch(...)
29637 { this->_M_setstate(ios_base::badbit); }
29638 if (__err)
29639 this->setstate(__err);
29640 }
29641 return *this;
29642 }
29643
29644 template<typename _CharT, typename _Traits>
29645 basic_ostream<_CharT, _Traits>&
29646 basic_ostream<_CharT, _Traits>::
29647 operator<<(long double __n)
29648 {
29649 sentry __cerb(*this);
29650 if (__cerb)
29651 {
29652 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29653 try
29654 {
29655 const __num_put_type& __np = __check_facet(this->_M_num_put);
29656 if (__np.put(*this, *this, this->fill(), __n).failed())
29657 __err |= ios_base::badbit;
29658 }
29659 catch(...)
29660 { this->_M_setstate(ios_base::badbit); }
29661 if (__err)
29662 this->setstate(__err);
29663 }
29664 return *this;
29665 }
29666
29667 template<typename _CharT, typename _Traits>
29668 basic_ostream<_CharT, _Traits>&
29669 basic_ostream<_CharT, _Traits>::
29670 operator<<(const void* __n)
29671 {
29672 sentry __cerb(*this);
29673 if (__cerb)
29674 {
29675 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29676 try
29677 {
29678 const __num_put_type& __np = __check_facet(this->_M_num_put);
29679 if (__np.put(*this, *this, this->fill(), __n).failed())
29680 __err |= ios_base::badbit;
29681 }
29682 catch(...)
29683 { this->_M_setstate(ios_base::badbit); }
29684 if (__err)
29685 this->setstate(__err);
29686 }
29687 return *this;
29688 }
29689
29690 template<typename _CharT, typename _Traits>
29691 basic_ostream<_CharT, _Traits>&
29692 basic_ostream<_CharT, _Traits>::
29693 operator<<(__streambuf_type* __sbin)
29694 {
29695 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29696 sentry __cerb(*this);
29697 if (__cerb && __sbin)
29698 {
29699 try
29700 {
29701 if (!__copy_streambufs(__sbin, this->rdbuf()))
29702 __err |= ios_base::failbit;
29703 }
29704 catch(...)
29705 { this->_M_setstate(ios_base::failbit); }
29706 }
29707 else if (!__sbin)
29708 __err |= ios_base::badbit;
29709 if (__err)
29710 this->setstate(__err);
29711 return *this;
29712 }
29713
29714 template<typename _CharT, typename _Traits>
29715 basic_ostream<_CharT, _Traits>&
29716 basic_ostream<_CharT, _Traits>::
29717 put(char_type __c)
29718 {
29719
29720
29721
29722
29723
29724
29725 sentry __cerb(*this);
29726 if (__cerb)
29727 {
29728 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29729 try
29730 {
29731 const int_type __put = this->rdbuf()->sputc(__c);
29732 if (traits_type::eq_int_type(__put, traits_type::eof()))
29733 __err |= ios_base::badbit;
29734 }
29735 catch (...)
29736 { this->_M_setstate(ios_base::badbit); }
29737 if (__err)
29738 this->setstate(__err);
29739 }
29740 return *this;
29741 }
29742
29743 template<typename _CharT, typename _Traits>
29744 basic_ostream<_CharT, _Traits>&
29745 basic_ostream<_CharT, _Traits>::
29746 write(const _CharT* __s, streamsize __n)
29747 {
29748
29749
29750
29751
29752
29753
29754
29755 sentry __cerb(*this);
29756 if (__cerb)
29757 {
29758 try
29759 { _M_write(__s, __n); }
29760 catch (...)
29761 { this->_M_setstate(ios_base::badbit); }
29762 }
29763 return *this;
29764 }
29765
29766 template<typename _CharT, typename _Traits>
29767 basic_ostream<_CharT, _Traits>&
29768 basic_ostream<_CharT, _Traits>::
29769 flush()
29770 {
29771
29772
29773
29774 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29775 try
29776 {
29777 if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
29778 __err |= ios_base::badbit;
29779 }
29780 catch(...)
29781 { this->_M_setstate(ios_base::badbit); }
29782 if (__err)
29783 this->setstate(__err);
29784 return *this;
29785 }
29786
29787 template<typename _CharT, typename _Traits>
29788 typename basic_ostream<_CharT, _Traits>::pos_type
29789 basic_ostream<_CharT, _Traits>::
29790 tellp()
29791 {
29792 pos_type __ret = pos_type(-1);
29793 try
29794 {
29795 if (!this->fail())
29796 __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
29797 }
29798 catch(...)
29799 { this->_M_setstate(ios_base::badbit); }
29800 return __ret;
29801 }
29802
29803 template<typename _CharT, typename _Traits>
29804 basic_ostream<_CharT, _Traits>&
29805 basic_ostream<_CharT, _Traits>::
29806 seekp(pos_type __pos)
29807 {
29808 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29809 try
29810 {
29811 if (!this->fail())
29812 {
29813
29814
29815 const pos_type __p = this->rdbuf()->pubseekpos(__pos,
29816 ios_base::out);
29817
29818
29819 if (__p == pos_type(off_type(-1)))
29820 __err |= ios_base::failbit;
29821 }
29822 }
29823 catch(...)
29824 { this->_M_setstate(ios_base::badbit); }
29825 if (__err)
29826 this->setstate(__err);
29827 return *this;
29828 }
29829
29830 template<typename _CharT, typename _Traits>
29831 basic_ostream<_CharT, _Traits>&
29832 basic_ostream<_CharT, _Traits>::
29833 seekp(off_type __off, ios_base::seekdir __dir)
29834 {
29835 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29836 try
29837 {
29838 if (!this->fail())
29839 {
29840
29841
29842 const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
29843 ios_base::out);
29844
29845
29846 if (__p == pos_type(off_type(-1)))
29847 __err |= ios_base::failbit;
29848 }
29849 }
29850 catch(...)
29851 { this->_M_setstate(ios_base::badbit); }
29852 if (__err)
29853 this->setstate(__err);
29854 return *this;
29855 }
29856
29857
29858 template<typename _CharT, typename _Traits>
29859 basic_ostream<_CharT, _Traits>&
29860 operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
29861 {
29862 typedef basic_ostream<_CharT, _Traits> __ostream_type;
29863 typename __ostream_type::sentry __cerb(__out);
29864 if (__cerb)
29865 {
29866 try
29867 {
29868 const streamsize __w = __out.width();
29869 streamsize __len = 1;
29870 _CharT* __cs = &__c;
29871 if (__w > __len)
29872 {
29873 __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
29874 * __w));
29875 __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
29876 &__c, __w, __len, false);
29877 __len = __w;
29878 }
29879 __out._M_write(__cs, __len);
29880 __out.width(0);
29881 }
29882 catch(...)
29883 { __out._M_setstate(ios_base::badbit); }
29884 }
29885 return __out;
29886 }
29887
29888
29889 template <class _Traits>
29890 basic_ostream<char, _Traits>&
29891 operator<<(basic_ostream<char, _Traits>& __out, char __c)
29892 {
29893 typedef basic_ostream<char, _Traits> __ostream_type;
29894 typename __ostream_type::sentry __cerb(__out);
29895 if (__cerb)
29896 {
29897 try
29898 {
29899 const streamsize __w = __out.width();
29900 streamsize __len = 1;
29901 char* __cs = &__c;
29902 if (__w > __len)
29903 {
29904 __cs = static_cast<char*>(__builtin_alloca(__w));
29905 __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs,
29906 &__c, __w, __len, false);
29907 __len = __w;
29908 }
29909 __out._M_write(__cs, __len);
29910 __out.width(0);
29911 }
29912 catch(...)
29913 { __out._M_setstate(ios_base::badbit); }
29914 }
29915 return __out;
29916 }
29917
29918 template<typename _CharT, typename _Traits>
29919 basic_ostream<_CharT, _Traits>&
29920 operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
29921 {
29922 typedef basic_ostream<_CharT, _Traits> __ostream_type;
29923 typename __ostream_type::sentry __cerb(__out);
29924 if (__cerb && __s)
29925 {
29926 try
29927 {
29928 const streamsize __w = __out.width();
29929 streamsize __len = static_cast<streamsize>(_Traits::length(__s));
29930 if (__w > __len)
29931 {
29932 _CharT* __cs = (static_cast<
29933 _CharT*>(__builtin_alloca(sizeof(_CharT)
29934 * __w)));
29935 __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
29936 __s, __w, __len, false);
29937 __s = __cs;
29938 __len = __w;
29939 }
29940 __out._M_write(__s, __len);
29941 __out.width(0);
29942 }
29943 catch(...)
29944 { __out._M_setstate(ios_base::badbit); }
29945 }
29946 else if (!__s)
29947 __out.setstate(ios_base::badbit);
29948 return __out;
29949 }
29950
29951 template<typename _CharT, typename _Traits>
29952 basic_ostream<_CharT, _Traits>&
29953 operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
29954 {
29955 typedef basic_ostream<_CharT, _Traits> __ostream_type;
29956
29957
29958
29959 typedef char_traits<char> __traits_type;
29960 typename __ostream_type::sentry __cerb(__out);
29961 if (__cerb && __s)
29962 {
29963 size_t __clen = __traits_type::length(__s);
29964 _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
29965 * __clen));
29966 for (size_t __i = 0; __i < __clen; ++__i)
29967 __ws[__i] = __out.widen(__s[__i]);
29968 _CharT* __str = __ws;
29969
29970 try
29971 {
29972 const streamsize __w = __out.width();
29973 streamsize __len = static_cast<streamsize>(__clen);
29974 if (__w > __len)
29975 {
29976 _CharT* __cs = (static_cast<
29977 _CharT*>(__builtin_alloca(sizeof(_CharT)
29978 * __w)));
29979 __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs,
29980 __ws, __w, __len, false);
29981 __str = __cs;
29982 __len = __w;
29983 }
29984 __out._M_write(__str, __len);
29985 __out.width(0);
29986 }
29987 catch(...)
29988 { __out._M_setstate(ios_base::badbit); }
29989 }
29990 else if (!__s)
29991 __out.setstate(ios_base::badbit);
29992 return __out;
29993 }
29994
29995
29996 template<class _Traits>
29997 basic_ostream<char, _Traits>&
29998 operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
29999 {
30000 typedef basic_ostream<char, _Traits> __ostream_type;
30001 typename __ostream_type::sentry __cerb(__out);
30002 if (__cerb && __s)
30003 {
30004 try
30005 {
30006 const streamsize __w = __out.width();
30007 streamsize __len = static_cast<streamsize>(_Traits::length(__s));
30008 if (__w > __len)
30009 {
30010 char* __cs = static_cast<char*>(__builtin_alloca(__w));
30011 __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs,
30012 __s, __w, __len, false);
30013 __s = __cs;
30014 __len = __w;
30015 }
30016 __out._M_write(__s, __len);
30017 __out.width(0);
30018 }
30019 catch(...)
30020 { __out._M_setstate(ios_base::badbit); }
30021 }
30022 else if (!__s)
30023 __out.setstate(ios_base::badbit);
30024 return __out;
30025 }
30026
30027
30028 template<typename _CharT, typename _Traits, typename _Alloc>
30029 basic_ostream<_CharT, _Traits>&
30030 operator<<(basic_ostream<_CharT, _Traits>& __out,
30031 const basic_string<_CharT, _Traits, _Alloc>& __str)
30032 {
30033 typedef basic_ostream<_CharT, _Traits> __ostream_type;
30034 typename __ostream_type::sentry __cerb(__out);
30035 if (__cerb)
30036 {
30037 const streamsize __w = __out.width();
30038 streamsize __len = static_cast<streamsize>(__str.size());
30039 const _CharT* __s = __str.data();
30040
30041
30042
30043 if (__w > __len)
30044 {
30045 _CharT* __cs = (static_cast<
30046 _CharT*>(__builtin_alloca(sizeof(_CharT) * __w)));
30047 __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s,
30048 __w, __len, false);
30049 __s = __cs;
30050 __len = __w;
30051 }
30052 __out._M_write(__s, __len);
30053 __out.width(0);
30054 }
30055 return __out;
30056 }
30057
30058
30059
30060
30061
30062 extern template class basic_ostream<char>;
30063 extern template ostream& endl(ostream&);
30064 extern template ostream& ends(ostream&);
30065 extern template ostream& flush(ostream&);
30066 extern template ostream& operator<<(ostream&, char);
30067 extern template ostream& operator<<(ostream&, unsigned char);
30068 extern template ostream& operator<<(ostream&, signed char);
30069 extern template ostream& operator<<(ostream&, const char*);
30070 extern template ostream& operator<<(ostream&, const unsigned char*);
30071 extern template ostream& operator<<(ostream&, const signed char*);
30072
30073
30074 extern template class basic_ostream<wchar_t>;
30075 extern template wostream& endl(wostream&);
30076 extern template wostream& ends(wostream&);
30077 extern template wostream& flush(wostream&);
30078 extern template wostream& operator<<(wostream&, wchar_t);
30079 extern template wostream& operator<<(wostream&, char);
30080 extern template wostream& operator<<(wostream&, const wchar_t*);
30081 extern template wostream& operator<<(wostream&, const char*);
30082
30083
30084}
30085# 527 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 2 3
30086
30087
30088#pragma GCC visibility pop
30089# 72 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iterator" 2 3
30090# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 1 3
30091# 42 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30092
30093# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30094#pragma GCC visibility push(default)
30095
30096
30097
30098
30099namespace std
30100{
30101# 58 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30102 template<typename _CharT, typename _Traits>
30103 class basic_istream : virtual public basic_ios<_CharT, _Traits>
30104 {
30105 public:
30106
30107 typedef _CharT char_type;
30108 typedef typename _Traits::int_type int_type;
30109 typedef typename _Traits::pos_type pos_type;
30110 typedef typename _Traits::off_type off_type;
30111 typedef _Traits traits_type;
30112
30113
30114 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
30115 typedef basic_ios<_CharT, _Traits> __ios_type;
30116 typedef basic_istream<_CharT, _Traits> __istream_type;
30117 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
30118 __num_get_type;
30119 typedef ctype<_CharT> __ctype_type;
30120
30121 template<typename _CharT2, typename _Traits2>
30122 friend basic_istream<_CharT2, _Traits2>&
30123 operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2&);
30124
30125 template<typename _CharT2, typename _Traits2>
30126 friend basic_istream<_CharT2, _Traits2>&
30127 operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*);
30128
30129 protected:
30130
30131
30132
30133
30134
30135
30136
30137 streamsize _M_gcount;
30138
30139 public:
30140# 104 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30141 explicit
30142 basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0))
30143 { this->init(__sb); }
30144
30145
30146
30147
30148
30149
30150 virtual
30151 ~basic_istream()
30152 { _M_gcount = streamsize(0); }
30153
30154
30155 class sentry;
30156 friend class sentry;
30157# 131 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30158 inline __istream_type&
30159 operator>>(__istream_type& (*__pf)(__istream_type&));
30160
30161 inline __istream_type&
30162 operator>>(__ios_type& (*__pf)(__ios_type&));
30163
30164 inline __istream_type&
30165 operator>>(ios_base& (*__pf)(ios_base&));
30166# 169 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30167 __istream_type&
30168 operator>>(bool& __n);
30169
30170 __istream_type&
30171 operator>>(short& __n);
30172
30173 __istream_type&
30174 operator>>(unsigned short& __n);
30175
30176 __istream_type&
30177 operator>>(int& __n);
30178
30179 __istream_type&
30180 operator>>(unsigned int& __n);
30181
30182 __istream_type&
30183 operator>>(long& __n);
30184
30185 __istream_type&
30186 operator>>(unsigned long& __n);
30187
30188
30189 __istream_type&
30190 operator>>(long long& __n);
30191
30192 __istream_type&
30193 operator>>(unsigned long long& __n);
30194
30195
30196 __istream_type&
30197 operator>>(float& __f);
30198
30199 __istream_type&
30200 operator>>(double& __f);
30201
30202 __istream_type&
30203 operator>>(long double& __f);
30204
30205 __istream_type&
30206 operator>>(void*& __p);
30207# 230 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30208 __istream_type&
30209 operator>>(__streambuf_type* __sb);
30210# 240 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30211 inline streamsize
30212 gcount() const
30213 { return _M_gcount; }
30214# 272 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30215 int_type
30216 get();
30217# 286 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30218 __istream_type&
30219 get(char_type& __c);
30220# 313 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30221 __istream_type&
30222 get(char_type* __s, streamsize __n, char_type __delim);
30223# 324 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30224 inline __istream_type&
30225 get(char_type* __s, streamsize __n)
30226 { return this->get(__s, __n, this->widen('\n')); }
30227# 347 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30228 __istream_type&
30229 get(__streambuf_type& __sb, char_type __delim);
30230# 357 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30231 inline __istream_type&
30232 get(__streambuf_type& __sb)
30233 { return this->get(__sb, this->widen('\n')); }
30234# 386 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30235 __istream_type&
30236 getline(char_type* __s, streamsize __n, char_type __delim);
30237# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30238 inline __istream_type&
30239 getline(char_type* __s, streamsize __n)
30240 { return this->getline(__s, __n, this->widen('\n')); }
30241# 421 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30242 __istream_type&
30243 ignore();
30244
30245 __istream_type&
30246 ignore(streamsize __n);
30247
30248 __istream_type&
30249 ignore(streamsize __n, int_type __delim);
30250# 438 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30251 int_type
30252 peek();
30253# 456 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30254 __istream_type&
30255 read(char_type* __s, streamsize __n);
30256# 475 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30257 streamsize
30258 readsome(char_type* __s, streamsize __n);
30259# 491 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30260 __istream_type&
30261 putback(char_type __c);
30262# 506 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30263 __istream_type&
30264 unget();
30265# 524 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30266 int
30267 sync();
30268# 538 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30269 pos_type
30270 tellg();
30271# 553 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30272 __istream_type&
30273 seekg(pos_type);
30274# 569 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30275 __istream_type&
30276 seekg(off_type, ios_base::seekdir);
30277
30278
30279 protected:
30280 explicit
30281 basic_istream(): _M_gcount(streamsize(0)) { }
30282 };
30283
30284
30285 template<>
30286 basic_istream<char>&
30287 basic_istream<char>::
30288 getline(char_type* __s, streamsize __n, char_type __delim);
30289
30290 template<>
30291 basic_istream<char>&
30292 basic_istream<char>::
30293 ignore(streamsize __n);
30294
30295 template<>
30296 basic_istream<char>&
30297 basic_istream<char>::
30298 ignore(streamsize __n, int_type __delim);
30299
30300
30301 template<>
30302 basic_istream<wchar_t>&
30303 basic_istream<wchar_t>::
30304 getline(char_type* __s, streamsize __n, char_type __delim);
30305
30306 template<>
30307 basic_istream<wchar_t>&
30308 basic_istream<wchar_t>::
30309 ignore(streamsize __n);
30310
30311 template<>
30312 basic_istream<wchar_t>&
30313 basic_istream<wchar_t>::
30314 ignore(streamsize __n, int_type __delim);
30315# 622 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30316 template<typename _CharT, typename _Traits>
30317 class basic_istream<_CharT, _Traits>::sentry
30318 {
30319 public:
30320
30321 typedef _Traits traits_type;
30322 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
30323 typedef basic_istream<_CharT, _Traits> __istream_type;
30324 typedef typename __istream_type::__ctype_type __ctype_type;
30325 typedef typename _Traits::int_type __int_type;
30326# 654 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30327 explicit
30328 sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
30329# 664 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30330 operator bool() const { return _M_ok; }
30331
30332 private:
30333 bool _M_ok;
30334 };
30335# 683 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30336 template<typename _CharT, typename _Traits>
30337 basic_istream<_CharT, _Traits>&
30338 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
30339
30340 template<class _Traits>
30341 basic_istream<char, _Traits>&
30342 operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
30343 { return (__in >> reinterpret_cast<char&>(__c)); }
30344
30345 template<class _Traits>
30346 basic_istream<char, _Traits>&
30347 operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
30348 { return (__in >> reinterpret_cast<char&>(__c)); }
30349# 724 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30350 template<typename _CharT, typename _Traits>
30351 basic_istream<_CharT, _Traits>&
30352 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
30353
30354
30355 template<>
30356 basic_istream<char>&
30357 operator>>(basic_istream<char>& __in, char* __s);
30358
30359 template<class _Traits>
30360 basic_istream<char, _Traits>&
30361 operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
30362 { return (__in >> reinterpret_cast<char*>(__s)); }
30363
30364 template<class _Traits>
30365 basic_istream<char, _Traits>&
30366 operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
30367 { return (__in >> reinterpret_cast<char*>(__s)); }
30368# 751 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30369 template<typename _CharT, typename _Traits>
30370 class basic_iostream
30371 : public basic_istream<_CharT, _Traits>,
30372 public basic_ostream<_CharT, _Traits>
30373 {
30374 public:
30375
30376
30377
30378 typedef _CharT char_type;
30379 typedef typename _Traits::int_type int_type;
30380 typedef typename _Traits::pos_type pos_type;
30381 typedef typename _Traits::off_type off_type;
30382 typedef _Traits traits_type;
30383
30384
30385 typedef basic_istream<_CharT, _Traits> __istream_type;
30386 typedef basic_ostream<_CharT, _Traits> __ostream_type;
30387
30388
30389
30390
30391
30392
30393
30394 explicit
30395 basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
30396 : __istream_type(), __ostream_type()
30397 { this->init(__sb); }
30398
30399
30400
30401
30402 virtual
30403 ~basic_iostream() { }
30404
30405 protected:
30406 explicit
30407 basic_iostream() : __istream_type(), __ostream_type()
30408 { }
30409 };
30410# 814 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3
30411 template<typename _CharT, typename _Traits>
30412 basic_istream<_CharT, _Traits>&
30413 ws(basic_istream<_CharT, _Traits>& __is);
30414}
30415
30416
30417# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 1 3
30418# 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 3
30419
30420# 44 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 3
30421
30422
30423
30424
30425namespace std
30426{
30427 template<typename _CharT, typename _Traits>
30428 basic_istream<_CharT, _Traits>::sentry::
30429 sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false)
30430 {
30431 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30432 if (__in.good())
30433 {
30434 if (__in.tie())
30435 __in.tie()->flush();
30436 if (!__noskip && (__in.flags() & ios_base::skipws))
30437 {
30438 const __int_type __eof = traits_type::eof();
30439 __streambuf_type* __sb = __in.rdbuf();
30440 __int_type __c = __sb->sgetc();
30441
30442 const __ctype_type& __ct = __check_facet(__in._M_ctype);
30443 while (!traits_type::eq_int_type(__c, __eof)
30444 && __ct.is(ctype_base::space,
30445 traits_type::to_char_type(__c)))
30446 __c = __sb->snextc();
30447
30448
30449
30450
30451 if (traits_type::eq_int_type(__c, __eof))
30452 __err |= ios_base::eofbit;
30453 }
30454 }
30455
30456 if (__in.good() && __err == ios_base::goodbit)
30457 _M_ok = true;
30458 else
30459 {
30460 __err |= ios_base::failbit;
30461 __in.setstate(__err);
30462 }
30463 }
30464
30465 template<typename _CharT, typename _Traits>
30466 basic_istream<_CharT, _Traits>&
30467 basic_istream<_CharT, _Traits>::
30468 operator>>(__istream_type& (*__pf)(__istream_type&))
30469 { return __pf(*this); }
30470
30471 template<typename _CharT, typename _Traits>
30472 basic_istream<_CharT, _Traits>&
30473 basic_istream<_CharT, _Traits>::
30474 operator>>(__ios_type& (*__pf)(__ios_type&))
30475 {
30476 __pf(*this);
30477 return *this;
30478 }
30479
30480 template<typename _CharT, typename _Traits>
30481 basic_istream<_CharT, _Traits>&
30482 basic_istream<_CharT, _Traits>::
30483 operator>>(ios_base& (*__pf)(ios_base&))
30484 {
30485 __pf(*this);
30486 return *this;
30487 }
30488
30489 template<typename _CharT, typename _Traits>
30490 basic_istream<_CharT, _Traits>&
30491 basic_istream<_CharT, _Traits>::
30492 operator>>(bool& __n)
30493 {
30494 sentry __cerb(*this, false);
30495 if (__cerb)
30496 {
30497 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30498 try
30499 {
30500 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30501 __ng.get(*this, 0, *this, __err, __n);
30502 }
30503 catch(...)
30504 { this->_M_setstate(ios_base::badbit); }
30505 if (__err)
30506 this->setstate(__err);
30507 }
30508 return *this;
30509 }
30510
30511 template<typename _CharT, typename _Traits>
30512 basic_istream<_CharT, _Traits>&
30513 basic_istream<_CharT, _Traits>::
30514 operator>>(short& __n)
30515 {
30516 sentry __cerb(*this, false);
30517 if (__cerb)
30518 {
30519 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30520 try
30521 {
30522 long __l;
30523 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30524 __ng.get(*this, 0, *this, __err, __l);
30525
30526
30527 if (!(__err & ios_base::failbit)
30528 && (numeric_limits<short>::min() <= __l
30529 && __l <= numeric_limits<short>::max()))
30530 __n = __l;
30531 else
30532 __err |= ios_base::failbit;
30533 }
30534 catch(...)
30535 { this->_M_setstate(ios_base::badbit); }
30536 if (__err)
30537 this->setstate(__err);
30538 }
30539 return *this;
30540 }
30541
30542 template<typename _CharT, typename _Traits>
30543 basic_istream<_CharT, _Traits>&
30544 basic_istream<_CharT, _Traits>::
30545 operator>>(unsigned short& __n)
30546 {
30547 sentry __cerb(*this, false);
30548 if (__cerb)
30549 {
30550 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30551 try
30552 {
30553 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30554 __ng.get(*this, 0, *this, __err, __n);
30555 }
30556 catch(...)
30557 { this->_M_setstate(ios_base::badbit); }
30558 if (__err)
30559 this->setstate(__err);
30560 }
30561 return *this;
30562 }
30563
30564 template<typename _CharT, typename _Traits>
30565 basic_istream<_CharT, _Traits>&
30566 basic_istream<_CharT, _Traits>::
30567 operator>>(int& __n)
30568 {
30569 sentry __cerb(*this, false);
30570 if (__cerb)
30571 {
30572 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30573 try
30574 {
30575 long __l;
30576 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30577 __ng.get(*this, 0, *this, __err, __l);
30578
30579
30580 if (!(__err & ios_base::failbit)
30581 && (numeric_limits<int>::min() <= __l
30582 && __l <= numeric_limits<int>::max()))
30583 __n = __l;
30584 else
30585 __err |= ios_base::failbit;
30586 }
30587 catch(...)
30588 { this->_M_setstate(ios_base::badbit); }
30589 if (__err)
30590 this->setstate(__err);
30591 }
30592 return *this;
30593 }
30594
30595 template<typename _CharT, typename _Traits>
30596 basic_istream<_CharT, _Traits>&
30597 basic_istream<_CharT, _Traits>::
30598 operator>>(unsigned int& __n)
30599 {
30600 sentry __cerb(*this, false);
30601 if (__cerb)
30602 {
30603 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30604 try
30605 {
30606 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30607 __ng.get(*this, 0, *this, __err, __n);
30608 }
30609 catch(...)
30610 { this->_M_setstate(ios_base::badbit); }
30611 if (__err)
30612 this->setstate(__err);
30613 }
30614 return *this;
30615 }
30616
30617 template<typename _CharT, typename _Traits>
30618 basic_istream<_CharT, _Traits>&
30619 basic_istream<_CharT, _Traits>::
30620 operator>>(long& __n)
30621 {
30622 sentry __cerb(*this, false);
30623 if (__cerb)
30624 {
30625 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30626 try
30627 {
30628 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30629 __ng.get(*this, 0, *this, __err, __n);
30630 }
30631 catch(...)
30632 { this->_M_setstate(ios_base::badbit); }
30633 if (__err)
30634 this->setstate(__err);
30635 }
30636 return *this;
30637 }
30638
30639 template<typename _CharT, typename _Traits>
30640 basic_istream<_CharT, _Traits>&
30641 basic_istream<_CharT, _Traits>::
30642 operator>>(unsigned long& __n)
30643 {
30644 sentry __cerb(*this, false);
30645 if (__cerb)
30646 {
30647 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30648 try
30649 {
30650 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30651 __ng.get(*this, 0, *this, __err, __n);
30652 }
30653 catch(...)
30654 { this->_M_setstate(ios_base::badbit); }
30655 if (__err)
30656 this->setstate(__err);
30657 }
30658 return *this;
30659 }
30660
30661
30662 template<typename _CharT, typename _Traits>
30663 basic_istream<_CharT, _Traits>&
30664 basic_istream<_CharT, _Traits>::
30665 operator>>(long long& __n)
30666 {
30667 sentry __cerb(*this, false);
30668 if (__cerb)
30669 {
30670 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30671 try
30672 {
30673 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30674 __ng.get(*this, 0, *this, __err, __n);
30675 }
30676 catch(...)
30677 { this->_M_setstate(ios_base::badbit); }
30678 if (__err)
30679 this->setstate(__err);
30680 }
30681 return *this;
30682 }
30683
30684 template<typename _CharT, typename _Traits>
30685 basic_istream<_CharT, _Traits>&
30686 basic_istream<_CharT, _Traits>::
30687 operator>>(unsigned long long& __n)
30688 {
30689 sentry __cerb(*this, false);
30690 if (__cerb)
30691 {
30692 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30693 try
30694 {
30695 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30696 __ng.get(*this, 0, *this, __err, __n);
30697 }
30698 catch(...)
30699 { this->_M_setstate(ios_base::badbit); }
30700 if (__err)
30701 this->setstate(__err);
30702 }
30703 return *this;
30704 }
30705
30706
30707 template<typename _CharT, typename _Traits>
30708 basic_istream<_CharT, _Traits>&
30709 basic_istream<_CharT, _Traits>::
30710 operator>>(float& __n)
30711 {
30712 sentry __cerb(*this, false);
30713 if (__cerb)
30714 {
30715 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30716 try
30717 {
30718 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30719 __ng.get(*this, 0, *this, __err, __n);
30720 }
30721 catch(...)
30722 { this->_M_setstate(ios_base::badbit); }
30723 if (__err)
30724 this->setstate(__err);
30725 }
30726 return *this;
30727 }
30728
30729 template<typename _CharT, typename _Traits>
30730 basic_istream<_CharT, _Traits>&
30731 basic_istream<_CharT, _Traits>::
30732 operator>>(double& __n)
30733 {
30734 sentry __cerb(*this, false);
30735 if (__cerb)
30736 {
30737 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30738 try
30739 {
30740 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30741 __ng.get(*this, 0, *this, __err, __n);
30742 }
30743 catch(...)
30744 { this->_M_setstate(ios_base::badbit); }
30745 if (__err)
30746 this->setstate(__err);
30747 }
30748 return *this;
30749 }
30750
30751 template<typename _CharT, typename _Traits>
30752 basic_istream<_CharT, _Traits>&
30753 basic_istream<_CharT, _Traits>::
30754 operator>>(long double& __n)
30755 {
30756 sentry __cerb(*this, false);
30757 if (__cerb)
30758 {
30759 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30760 try
30761 {
30762 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30763 __ng.get(*this, 0, *this, __err, __n);
30764 }
30765 catch(...)
30766 { this->_M_setstate(ios_base::badbit); }
30767 if (__err)
30768 this->setstate(__err);
30769 }
30770 return *this;
30771 }
30772
30773 template<typename _CharT, typename _Traits>
30774 basic_istream<_CharT, _Traits>&
30775 basic_istream<_CharT, _Traits>::
30776 operator>>(void*& __n)
30777 {
30778 sentry __cerb(*this, false);
30779 if (__cerb)
30780 {
30781 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30782 try
30783 {
30784 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30785 __ng.get(*this, 0, *this, __err, __n);
30786 }
30787 catch(...)
30788 { this->_M_setstate(ios_base::badbit); }
30789 if (__err)
30790 this->setstate(__err);
30791 }
30792 return *this;
30793 }
30794
30795 template<typename _CharT, typename _Traits>
30796 basic_istream<_CharT, _Traits>&
30797 basic_istream<_CharT, _Traits>::
30798 operator>>(__streambuf_type* __sbout)
30799 {
30800 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30801 sentry __cerb(*this, false);
30802 if (__cerb && __sbout)
30803 {
30804 try
30805 {
30806 if (!__copy_streambufs(this->rdbuf(), __sbout))
30807 __err |= ios_base::failbit;
30808 }
30809 catch(...)
30810 { this->_M_setstate(ios_base::failbit); }
30811 }
30812 else if (!__sbout)
30813 __err |= ios_base::failbit;
30814 if (__err)
30815 this->setstate(__err);
30816 return *this;
30817 }
30818
30819 template<typename _CharT, typename _Traits>
30820 typename basic_istream<_CharT, _Traits>::int_type
30821 basic_istream<_CharT, _Traits>::
30822 get(void)
30823 {
30824 const int_type __eof = traits_type::eof();
30825 int_type __c = __eof;
30826 _M_gcount = 0;
30827 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30828 sentry __cerb(*this, true);
30829 if (__cerb)
30830 {
30831 try
30832 {
30833 __c = this->rdbuf()->sbumpc();
30834
30835 if (!traits_type::eq_int_type(__c, __eof))
30836 _M_gcount = 1;
30837 else
30838 __err |= ios_base::eofbit;
30839 }
30840 catch(...)
30841 { this->_M_setstate(ios_base::badbit); }
30842 }
30843 if (!_M_gcount)
30844 __err |= ios_base::failbit;
30845 if (__err)
30846 this->setstate(__err);
30847 return __c;
30848 }
30849
30850 template<typename _CharT, typename _Traits>
30851 basic_istream<_CharT, _Traits>&
30852 basic_istream<_CharT, _Traits>::
30853 get(char_type& __c)
30854 {
30855 _M_gcount = 0;
30856 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30857 sentry __cerb(*this, true);
30858 if (__cerb)
30859 {
30860 try
30861 {
30862 const int_type __cb = this->rdbuf()->sbumpc();
30863
30864 if (!traits_type::eq_int_type(__cb, traits_type::eof()))
30865 {
30866 _M_gcount = 1;
30867 __c = traits_type::to_char_type(__cb);
30868 }
30869 else
30870 __err |= ios_base::eofbit;
30871 }
30872 catch(...)
30873 { this->_M_setstate(ios_base::badbit); }
30874 }
30875 if (!_M_gcount)
30876 __err |= ios_base::failbit;
30877 if (__err)
30878 this->setstate(__err);
30879 return *this;
30880 }
30881
30882 template<typename _CharT, typename _Traits>
30883 basic_istream<_CharT, _Traits>&
30884 basic_istream<_CharT, _Traits>::
30885 get(char_type* __s, streamsize __n, char_type __delim)
30886 {
30887 _M_gcount = 0;
30888 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30889 sentry __cerb(*this, true);
30890 if (__cerb)
30891 {
30892 try
30893 {
30894 const int_type __idelim = traits_type::to_int_type(__delim);
30895 const int_type __eof = traits_type::eof();
30896 __streambuf_type* __sb = this->rdbuf();
30897 int_type __c = __sb->sgetc();
30898
30899 while (_M_gcount + 1 < __n
30900 && !traits_type::eq_int_type(__c, __eof)
30901 && !traits_type::eq_int_type(__c, __idelim))
30902 {
30903 *__s++ = traits_type::to_char_type(__c);
30904 ++_M_gcount;
30905 __c = __sb->snextc();
30906 }
30907 if (traits_type::eq_int_type(__c, __eof))
30908 __err |= ios_base::eofbit;
30909 }
30910 catch(...)
30911 { this->_M_setstate(ios_base::badbit); }
30912 }
30913
30914
30915 if (__n > 0)
30916 *__s = char_type();
30917 if (!_M_gcount)
30918 __err |= ios_base::failbit;
30919 if (__err)
30920 this->setstate(__err);
30921 return *this;
30922 }
30923
30924 template<typename _CharT, typename _Traits>
30925 basic_istream<_CharT, _Traits>&
30926 basic_istream<_CharT, _Traits>::
30927 get(__streambuf_type& __sb, char_type __delim)
30928 {
30929 _M_gcount = 0;
30930 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30931 sentry __cerb(*this, true);
30932 if (__cerb)
30933 {
30934 try
30935 {
30936 const int_type __idelim = traits_type::to_int_type(__delim);
30937 const int_type __eof = traits_type::eof();
30938 __streambuf_type* __this_sb = this->rdbuf();
30939 int_type __c = __this_sb->sgetc();
30940 char_type __c2 = traits_type::to_char_type(__c);
30941
30942 while (!traits_type::eq_int_type(__c, __eof)
30943 && !traits_type::eq_int_type(__c, __idelim)
30944 && !traits_type::eq_int_type(__sb.sputc(__c2), __eof))
30945 {
30946 ++_M_gcount;
30947 __c = __this_sb->snextc();
30948 __c2 = traits_type::to_char_type(__c);
30949 }
30950 if (traits_type::eq_int_type(__c, __eof))
30951 __err |= ios_base::eofbit;
30952 }
30953 catch(...)
30954 { this->_M_setstate(ios_base::badbit); }
30955 }
30956 if (!_M_gcount)
30957 __err |= ios_base::failbit;
30958 if (__err)
30959 this->setstate(__err);
30960 return *this;
30961 }
30962
30963 template<typename _CharT, typename _Traits>
30964 basic_istream<_CharT, _Traits>&
30965 basic_istream<_CharT, _Traits>::
30966 getline(char_type* __s, streamsize __n, char_type __delim)
30967 {
30968 _M_gcount = 0;
30969 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30970 sentry __cerb(*this, true);
30971 if (__cerb)
30972 {
30973 try
30974 {
30975 const int_type __idelim = traits_type::to_int_type(__delim);
30976 const int_type __eof = traits_type::eof();
30977 __streambuf_type* __sb = this->rdbuf();
30978 int_type __c = __sb->sgetc();
30979
30980 while (_M_gcount + 1 < __n
30981 && !traits_type::eq_int_type(__c, __eof)
30982 && !traits_type::eq_int_type(__c, __idelim))
30983 {
30984 *__s++ = traits_type::to_char_type(__c);
30985 __c = __sb->snextc();
30986 ++_M_gcount;
30987 }
30988 if (traits_type::eq_int_type(__c, __eof))
30989 __err |= ios_base::eofbit;
30990 else
30991 {
30992 if (traits_type::eq_int_type(__c, __idelim))
30993 {
30994 __sb->sbumpc();
30995 ++_M_gcount;
30996 }
30997 else
30998 __err |= ios_base::failbit;
30999 }
31000 }
31001 catch(...)
31002 { this->_M_setstate(ios_base::badbit); }
31003 }
31004
31005
31006 if (__n > 0)
31007 *__s = char_type();
31008 if (!_M_gcount)
31009 __err |= ios_base::failbit;
31010 if (__err)
31011 this->setstate(__err);
31012 return *this;
31013 }
31014
31015
31016
31017
31018 template<typename _CharT, typename _Traits>
31019 basic_istream<_CharT, _Traits>&
31020 basic_istream<_CharT, _Traits>::
31021 ignore(void)
31022 {
31023 _M_gcount = 0;
31024 sentry __cerb(*this, true);
31025 if (__cerb)
31026 {
31027 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31028 try
31029 {
31030 const int_type __eof = traits_type::eof();
31031 __streambuf_type* __sb = this->rdbuf();
31032
31033 if (traits_type::eq_int_type(__sb->sbumpc(), __eof))
31034 __err |= ios_base::eofbit;
31035 else
31036 _M_gcount = 1;
31037 }
31038 catch(...)
31039 { this->_M_setstate(ios_base::badbit); }
31040 if (__err)
31041 this->setstate(__err);
31042 }
31043 return *this;
31044 }
31045
31046 template<typename _CharT, typename _Traits>
31047 basic_istream<_CharT, _Traits>&
31048 basic_istream<_CharT, _Traits>::
31049 ignore(streamsize __n)
31050 {
31051 _M_gcount = 0;
31052 sentry __cerb(*this, true);
31053 if (__cerb && __n > 0)
31054 {
31055 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31056 try
31057 {
31058 const int_type __eof = traits_type::eof();
31059 __streambuf_type* __sb = this->rdbuf();
31060 int_type __c = __sb->sgetc();
31061# 692 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 3
31062 bool __large_ignore = false;
31063 while (true)
31064 {
31065 while (_M_gcount < __n
31066 && !traits_type::eq_int_type(__c, __eof))
31067 {
31068 ++_M_gcount;
31069 __c = __sb->snextc();
31070 }
31071 if (__n == numeric_limits<streamsize>::max()
31072 && !traits_type::eq_int_type(__c, __eof))
31073 {
31074 _M_gcount = numeric_limits<streamsize>::min();
31075 __large_ignore = true;
31076 }
31077 else
31078 break;
31079 }
31080
31081 if (__large_ignore)
31082 _M_gcount = numeric_limits<streamsize>::max();
31083
31084 if (traits_type::eq_int_type(__c, __eof))
31085 __err |= ios_base::eofbit;
31086 }
31087 catch(...)
31088 { this->_M_setstate(ios_base::badbit); }
31089 if (__err)
31090 this->setstate(__err);
31091 }
31092 return *this;
31093 }
31094
31095 template<typename _CharT, typename _Traits>
31096 basic_istream<_CharT, _Traits>&
31097 basic_istream<_CharT, _Traits>::
31098 ignore(streamsize __n, int_type __delim)
31099 {
31100 _M_gcount = 0;
31101 sentry __cerb(*this, true);
31102 if (__cerb && __n > 0)
31103 {
31104 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31105 try
31106 {
31107 const int_type __eof = traits_type::eof();
31108 __streambuf_type* __sb = this->rdbuf();
31109 int_type __c = __sb->sgetc();
31110
31111
31112 bool __large_ignore = false;
31113 while (true)
31114 {
31115 while (_M_gcount < __n
31116 && !traits_type::eq_int_type(__c, __eof)
31117 && !traits_type::eq_int_type(__c, __delim))
31118 {
31119 ++_M_gcount;
31120 __c = __sb->snextc();
31121 }
31122 if (__n == numeric_limits<streamsize>::max()
31123 && !traits_type::eq_int_type(__c, __eof)
31124 && !traits_type::eq_int_type(__c, __delim))
31125 {
31126 _M_gcount = numeric_limits<streamsize>::min();
31127 __large_ignore = true;
31128 }
31129 else
31130 break;
31131 }
31132
31133 if (__large_ignore)
31134 _M_gcount = numeric_limits<streamsize>::max();
31135
31136 if (traits_type::eq_int_type(__c, __eof))
31137 __err |= ios_base::eofbit;
31138 else if (traits_type::eq_int_type(__c, __delim))
31139 {
31140 if (_M_gcount < numeric_limits<streamsize>::max())
31141 ++_M_gcount;
31142 __sb->sbumpc();
31143 }
31144 }
31145 catch(...)
31146 { this->_M_setstate(ios_base::badbit); }
31147 if (__err)
31148 this->setstate(__err);
31149 }
31150 return *this;
31151 }
31152
31153 template<typename _CharT, typename _Traits>
31154 typename basic_istream<_CharT, _Traits>::int_type
31155 basic_istream<_CharT, _Traits>::
31156 peek(void)
31157 {
31158 int_type __c = traits_type::eof();
31159 _M_gcount = 0;
31160 sentry __cerb(*this, true);
31161 if (__cerb)
31162 {
31163 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31164 try
31165 {
31166 __c = this->rdbuf()->sgetc();
31167 if (traits_type::eq_int_type(__c, traits_type::eof()))
31168 __err |= ios_base::eofbit;
31169 }
31170 catch(...)
31171 { this->_M_setstate(ios_base::badbit); }
31172 if (__err)
31173 this->setstate(__err);
31174 }
31175 return __c;
31176 }
31177
31178 template<typename _CharT, typename _Traits>
31179 basic_istream<_CharT, _Traits>&
31180 basic_istream<_CharT, _Traits>::
31181 read(char_type* __s, streamsize __n)
31182 {
31183 _M_gcount = 0;
31184 sentry __cerb(*this, true);
31185 if (__cerb)
31186 {
31187 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31188 try
31189 {
31190 _M_gcount = this->rdbuf()->sgetn(__s, __n);
31191 if (_M_gcount != __n)
31192 __err |= (ios_base::eofbit | ios_base::failbit);
31193 }
31194 catch(...)
31195 { this->_M_setstate(ios_base::badbit); }
31196 if (__err)
31197 this->setstate(__err);
31198 }
31199 return *this;
31200 }
31201
31202 template<typename _CharT, typename _Traits>
31203 streamsize
31204 basic_istream<_CharT, _Traits>::
31205 readsome(char_type* __s, streamsize __n)
31206 {
31207 _M_gcount = 0;
31208 sentry __cerb(*this, true);
31209 if (__cerb)
31210 {
31211 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31212 try
31213 {
31214
31215 const streamsize __num = this->rdbuf()->in_avail();
31216 if (__num > 0)
31217 _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
31218 else if (__num == -1)
31219 __err |= ios_base::eofbit;
31220 }
31221 catch(...)
31222 { this->_M_setstate(ios_base::badbit); }
31223 if (__err)
31224 this->setstate(__err);
31225 }
31226 return _M_gcount;
31227 }
31228
31229 template<typename _CharT, typename _Traits>
31230 basic_istream<_CharT, _Traits>&
31231 basic_istream<_CharT, _Traits>::
31232 putback(char_type __c)
31233 {
31234
31235
31236 _M_gcount = 0;
31237 sentry __cerb(*this, true);
31238 if (__cerb)
31239 {
31240 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31241 try
31242 {
31243 const int_type __eof = traits_type::eof();
31244 __streambuf_type* __sb = this->rdbuf();
31245 if (!__sb
31246 || traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
31247 __err |= ios_base::badbit;
31248 }
31249 catch(...)
31250 { this->_M_setstate(ios_base::badbit); }
31251 if (__err)
31252 this->setstate(__err);
31253 }
31254 return *this;
31255 }
31256
31257 template<typename _CharT, typename _Traits>
31258 basic_istream<_CharT, _Traits>&
31259 basic_istream<_CharT, _Traits>::
31260 unget(void)
31261 {
31262
31263
31264 _M_gcount = 0;
31265 sentry __cerb(*this, true);
31266 if (__cerb)
31267 {
31268 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31269 try
31270 {
31271 const int_type __eof = traits_type::eof();
31272 __streambuf_type* __sb = this->rdbuf();
31273 if (!__sb
31274 || traits_type::eq_int_type(__sb->sungetc(), __eof))
31275 __err |= ios_base::badbit;
31276 }
31277 catch(...)
31278 { this->_M_setstate(ios_base::badbit); }
31279 if (__err)
31280 this->setstate(__err);
31281 }
31282 return *this;
31283 }
31284
31285 template<typename _CharT, typename _Traits>
31286 int
31287 basic_istream<_CharT, _Traits>::
31288 sync(void)
31289 {
31290
31291
31292 int __ret = -1;
31293 sentry __cerb(*this, true);
31294 if (__cerb)
31295 {
31296 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31297 try
31298 {
31299 __streambuf_type* __sb = this->rdbuf();
31300 if (__sb)
31301 {
31302 if (__sb->pubsync() == -1)
31303 __err |= ios_base::badbit;
31304 else
31305 __ret = 0;
31306 }
31307 }
31308 catch(...)
31309 { this->_M_setstate(ios_base::badbit); }
31310 if (__err)
31311 this->setstate(__err);
31312 }
31313 return __ret;
31314 }
31315
31316 template<typename _CharT, typename _Traits>
31317 typename basic_istream<_CharT, _Traits>::pos_type
31318 basic_istream<_CharT, _Traits>::
31319 tellg(void)
31320 {
31321
31322
31323 pos_type __ret = pos_type(-1);
31324 try
31325 {
31326 if (!this->fail())
31327 __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
31328 }
31329 catch(...)
31330 { this->_M_setstate(ios_base::badbit); }
31331 return __ret;
31332 }
31333
31334 template<typename _CharT, typename _Traits>
31335 basic_istream<_CharT, _Traits>&
31336 basic_istream<_CharT, _Traits>::
31337 seekg(pos_type __pos)
31338 {
31339
31340
31341 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31342 try
31343 {
31344 if (!this->fail())
31345 {
31346
31347 const pos_type __p = this->rdbuf()->pubseekpos(__pos,
31348 ios_base::in);
31349
31350
31351 if (__p == pos_type(off_type(-1)))
31352 __err |= ios_base::failbit;
31353 }
31354 }
31355 catch(...)
31356 { this->_M_setstate(ios_base::badbit); }
31357 if (__err)
31358 this->setstate(__err);
31359 return *this;
31360 }
31361
31362 template<typename _CharT, typename _Traits>
31363 basic_istream<_CharT, _Traits>&
31364 basic_istream<_CharT, _Traits>::
31365 seekg(off_type __off, ios_base::seekdir __dir)
31366 {
31367
31368
31369 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31370 try
31371 {
31372 if (!this->fail())
31373 {
31374
31375 const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
31376 ios_base::in);
31377
31378
31379 if (__p == pos_type(off_type(-1)))
31380 __err |= ios_base::failbit;
31381 }
31382 }
31383 catch(...)
31384 { this->_M_setstate(ios_base::badbit); }
31385 if (__err)
31386 this->setstate(__err);
31387 return *this;
31388 }
31389
31390
31391 template<typename _CharT, typename _Traits>
31392 basic_istream<_CharT, _Traits>&
31393 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
31394 {
31395 typedef basic_istream<_CharT, _Traits> __istream_type;
31396 typedef typename __istream_type::int_type __int_type;
31397
31398 typename __istream_type::sentry __cerb(__in, false);
31399 if (__cerb)
31400 {
31401 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31402 try
31403 {
31404 const __int_type __cb = __in.rdbuf()->sbumpc();
31405 if (!_Traits::eq_int_type(__cb, _Traits::eof()))
31406 __c = _Traits::to_char_type(__cb);
31407 else
31408 __err |= (ios_base::eofbit | ios_base::failbit);
31409 }
31410 catch(...)
31411 { __in._M_setstate(ios_base::badbit); }
31412 if (__err)
31413 __in.setstate(__err);
31414 }
31415 return __in;
31416 }
31417
31418 template<typename _CharT, typename _Traits>
31419 basic_istream<_CharT, _Traits>&
31420 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
31421 {
31422 typedef basic_istream<_CharT, _Traits> __istream_type;
31423 typedef typename __istream_type::__streambuf_type __streambuf_type;
31424 typedef typename _Traits::int_type int_type;
31425 typedef _CharT char_type;
31426 typedef ctype<_CharT> __ctype_type;
31427
31428 streamsize __extracted = 0;
31429 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31430 typename __istream_type::sentry __cerb(__in, false);
31431 if (__cerb)
31432 {
31433 try
31434 {
31435
31436 streamsize __num = __in.width();
31437 if (__num <= 0)
31438 __num = numeric_limits<streamsize>::max();
31439
31440 const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
31441
31442 const int_type __eof = _Traits::eof();
31443 __streambuf_type* __sb = __in.rdbuf();
31444 int_type __c = __sb->sgetc();
31445
31446 while (__extracted < __num - 1
31447 && !_Traits::eq_int_type(__c, __eof)
31448 && !__ct.is(ctype_base::space,
31449 _Traits::to_char_type(__c)))
31450 {
31451 *__s++ = _Traits::to_char_type(__c);
31452 ++__extracted;
31453 __c = __sb->snextc();
31454 }
31455 if (_Traits::eq_int_type(__c, __eof))
31456 __err |= ios_base::eofbit;
31457
31458
31459
31460 *__s = char_type();
31461 __in.width(0);
31462 }
31463 catch(...)
31464 { __in._M_setstate(ios_base::badbit); }
31465 }
31466 if (!__extracted)
31467 __err |= ios_base::failbit;
31468 if (__err)
31469 __in.setstate(__err);
31470 return __in;
31471 }
31472
31473
31474 template<typename _CharT, typename _Traits>
31475 basic_istream<_CharT,_Traits>&
31476 ws(basic_istream<_CharT,_Traits>& __in)
31477 {
31478 typedef basic_istream<_CharT, _Traits> __istream_type;
31479 typedef typename __istream_type::__streambuf_type __streambuf_type;
31480 typedef typename __istream_type::__ctype_type __ctype_type;
31481 typedef typename __istream_type::int_type __int_type;
31482
31483 const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
31484 const __int_type __eof = _Traits::eof();
31485 __streambuf_type* __sb = __in.rdbuf();
31486 __int_type __c = __sb->sgetc();
31487
31488 while (!_Traits::eq_int_type(__c, __eof)
31489 && __ct.is(ctype_base::space, _Traits::to_char_type(__c)))
31490 __c = __sb->snextc();
31491
31492 if (_Traits::eq_int_type(__c, __eof))
31493 __in.setstate(ios_base::eofbit);
31494 return __in;
31495 }
31496
31497
31498 template<typename _CharT, typename _Traits, typename _Alloc>
31499 basic_istream<_CharT, _Traits>&
31500 operator>>(basic_istream<_CharT, _Traits>& __in,
31501 basic_string<_CharT, _Traits, _Alloc>& __str)
31502 {
31503 typedef basic_istream<_CharT, _Traits> __istream_type;
31504 typedef typename __istream_type::int_type __int_type;
31505 typedef typename __istream_type::__streambuf_type __streambuf_type;
31506 typedef typename __istream_type::__ctype_type __ctype_type;
31507 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
31508 typedef typename __string_type::size_type __size_type;
31509
31510 __size_type __extracted = 0;
31511 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31512 typename __istream_type::sentry __cerb(__in, false);
31513 if (__cerb)
31514 {
31515 try
31516 {
31517
31518 __str.erase();
31519 _CharT __buf[128];
31520 __size_type __len = 0;
31521 const streamsize __w = __in.width();
31522 const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
31523 : __str.max_size();
31524 const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
31525 const __int_type __eof = _Traits::eof();
31526 __streambuf_type* __sb = __in.rdbuf();
31527 __int_type __c = __sb->sgetc();
31528
31529 while (__extracted < __n
31530 && !_Traits::eq_int_type(__c, __eof)
31531 && !__ct.is(ctype_base::space, _Traits::to_char_type(__c)))
31532 {
31533 if (__len == sizeof(__buf) / sizeof(_CharT))
31534 {
31535 __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
31536 __len = 0;
31537 }
31538 __buf[__len++] = _Traits::to_char_type(__c);
31539 ++__extracted;
31540 __c = __sb->snextc();
31541 }
31542 __str.append(__buf, __len);
31543
31544 if (_Traits::eq_int_type(__c, __eof))
31545 __err |= ios_base::eofbit;
31546 __in.width(0);
31547 }
31548 catch(...)
31549 {
31550
31551
31552
31553 __in._M_setstate(ios_base::badbit);
31554 }
31555 }
31556
31557 if (!__extracted)
31558 __err |= ios_base::failbit;
31559 if (__err)
31560 __in.setstate(__err);
31561 return __in;
31562 }
31563
31564 template<typename _CharT, typename _Traits, typename _Alloc>
31565 basic_istream<_CharT, _Traits>&
31566 getline(basic_istream<_CharT, _Traits>& __in,
31567 basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
31568 {
31569 typedef basic_istream<_CharT, _Traits> __istream_type;
31570 typedef typename __istream_type::int_type __int_type;
31571 typedef typename __istream_type::__streambuf_type __streambuf_type;
31572 typedef typename __istream_type::__ctype_type __ctype_type;
31573 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
31574 typedef typename __string_type::size_type __size_type;
31575
31576 __size_type __extracted = 0;
31577 const __size_type __n = __str.max_size();
31578 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31579 typename __istream_type::sentry __cerb(__in, true);
31580 if (__cerb)
31581 {
31582 try
31583 {
31584 __str.erase();
31585 const __int_type __idelim = _Traits::to_int_type(__delim);
31586 const __int_type __eof = _Traits::eof();
31587 __streambuf_type* __sb = __in.rdbuf();
31588 __int_type __c = __sb->sgetc();
31589
31590 while (__extracted < __n
31591 && !_Traits::eq_int_type(__c, __eof)
31592 && !_Traits::eq_int_type(__c, __idelim))
31593 {
31594 __str += _Traits::to_char_type(__c);
31595 ++__extracted;
31596 __c = __sb->snextc();
31597 }
31598
31599 if (_Traits::eq_int_type(__c, __eof))
31600 __err |= ios_base::eofbit;
31601 else if (_Traits::eq_int_type(__c, __idelim))
31602 {
31603 ++__extracted;
31604 __sb->sbumpc();
31605 }
31606 else
31607 __err |= ios_base::failbit;
31608 }
31609 catch(...)
31610 {
31611
31612
31613
31614 __in._M_setstate(ios_base::badbit);
31615 }
31616 }
31617 if (!__extracted)
31618 __err |= ios_base::failbit;
31619 if (__err)
31620 __in.setstate(__err);
31621 return __in;
31622 }
31623
31624 template<class _CharT, class _Traits, class _Alloc>
31625 inline basic_istream<_CharT,_Traits>&
31626 getline(basic_istream<_CharT, _Traits>& __in,
31627 basic_string<_CharT,_Traits,_Alloc>& __str)
31628 { return getline(__in, __str, __in.widen('\n')); }
31629
31630
31631
31632
31633
31634 extern template class basic_istream<char>;
31635 extern template istream& ws(istream&);
31636 extern template istream& operator>>(istream&, char&);
31637 extern template istream& operator>>(istream&, char*);
31638 extern template istream& operator>>(istream&, unsigned char&);
31639 extern template istream& operator>>(istream&, signed char&);
31640 extern template istream& operator>>(istream&, unsigned char*);
31641 extern template istream& operator>>(istream&, signed char*);
31642
31643 extern template class basic_iostream<char>;
31644
31645
31646 extern template class basic_istream<wchar_t>;
31647 extern template wistream& ws(wistream&);
31648 extern template wistream& operator>>(wistream&, wchar_t&);
31649 extern template wistream& operator>>(wistream&, wchar_t*);
31650
31651 extern template class basic_iostream<wchar_t>;
31652
31653
31654}
31655# 821 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/istream" 2 3
31656
31657
31658#pragma GCC visibility pop
31659# 73 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iterator" 2 3
31660# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stream_iterator.h" 1 3
31661# 38 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stream_iterator.h" 3
31662
31663# 39 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stream_iterator.h" 3
31664
31665
31666
31667namespace std
31668{
31669
31670 template<typename _Tp, typename _CharT = char,
31671 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
31672 class istream_iterator
31673 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
31674 {
31675 public:
31676 typedef _CharT char_type;
31677 typedef _Traits traits_type;
31678 typedef basic_istream<_CharT, _Traits> istream_type;
31679
31680 private:
31681 istream_type* _M_stream;
31682 _Tp _M_value;
31683 bool _M_ok;
31684
31685 public:
31686
31687 istream_iterator()
31688 : _M_stream(0), _M_value(), _M_ok(false) {}
31689
31690
31691 istream_iterator(istream_type& __s)
31692 : _M_stream(&__s)
31693 { _M_read(); }
31694
31695 istream_iterator(const istream_iterator& __obj)
31696 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
31697 _M_ok(__obj._M_ok)
31698 { }
31699
31700 const _Tp&
31701 operator*() const
31702 {
31703 ;
31704
31705
31706 return _M_value;
31707 }
31708
31709 const _Tp*
31710 operator->() const { return &(operator*()); }
31711
31712 istream_iterator&
31713 operator++()
31714 {
31715 ;
31716
31717
31718 _M_read();
31719 return *this;
31720 }
31721
31722 istream_iterator
31723 operator++(int)
31724 {
31725 ;
31726
31727
31728 istream_iterator __tmp = *this;
31729 _M_read();
31730 return __tmp;
31731 }
31732
31733 bool
31734 _M_equal(const istream_iterator& __x) const
31735 { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
31736
31737 private:
31738 void
31739 _M_read()
31740 {
31741 _M_ok = (_M_stream && *_M_stream) ? true : false;
31742 if (_M_ok)
31743 {
31744 *_M_stream >> _M_value;
31745 _M_ok = *_M_stream ? true : false;
31746 }
31747 }
31748 };
31749
31750
31751 template<typename _Tp, typename _CharT, typename _Traits, typename _Dist>
31752 inline bool
31753 operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
31754 const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
31755 { return __x._M_equal(__y); }
31756
31757
31758 template <class _Tp, class _CharT, class _Traits, class _Dist>
31759 inline bool
31760 operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
31761 const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
31762 { return !__x._M_equal(__y); }
31763# 150 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stream_iterator.h" 3
31764 template<typename _Tp, typename _CharT = char,
31765 typename _Traits = char_traits<_CharT> >
31766 class ostream_iterator
31767 : public iterator<output_iterator_tag, void, void, void, void>
31768 {
31769 public:
31770
31771
31772 typedef _CharT char_type;
31773 typedef _Traits traits_type;
31774 typedef basic_ostream<_CharT, _Traits> ostream_type;
31775
31776
31777 private:
31778 ostream_type* _M_stream;
31779 const _CharT* _M_string;
31780
31781 public:
31782
31783 ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
31784# 181 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stream_iterator.h" 3
31785 ostream_iterator(ostream_type& __s, const _CharT* __c)
31786 : _M_stream(&__s), _M_string(__c) { }
31787
31788
31789 ostream_iterator(const ostream_iterator& __obj)
31790 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
31791
31792
31793
31794 ostream_iterator&
31795 operator=(const _Tp& __value)
31796 {
31797 ;
31798
31799
31800 *_M_stream << __value;
31801 if (_M_string) *_M_stream << _M_string;
31802 return *this;
31803 }
31804
31805 ostream_iterator&
31806 operator*()
31807 { return *this; }
31808
31809 ostream_iterator&
31810 operator++()
31811 { return *this; }
31812
31813 ostream_iterator&
31814 operator++(int)
31815 { return *this; }
31816 };
31817}
31818# 74 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/iterator" 2 3
31819
31820
31821#pragma GCC visibility pop
31822# 69 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hashtable.h" 2 3
31823
31824
31825# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hash_fun.h" 1 3
31826# 66 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hash_fun.h" 3
31827namespace __gnu_cxx
31828{
31829 using std::size_t;
31830
31831 template<class _Key>
31832 struct hash { };
31833
31834 inline size_t
31835 __stl_hash_string(const char* __s)
31836 {
31837 unsigned long __h = 0;
31838 for ( ; *__s; ++__s)
31839 __h = 5 * __h + *__s;
31840 return size_t(__h);
31841 }
31842
31843 template<>
31844 struct hash<char*>
31845 {
31846 size_t
31847 operator()(const char* __s) const
31848 { return __stl_hash_string(__s); }
31849 };
31850
31851 template<>
31852 struct hash<const char*>
31853 {
31854 size_t
31855 operator()(const char* __s) const
31856 { return __stl_hash_string(__s); }
31857 };
31858
31859 template<>
31860 struct hash<char>
31861 {
31862 size_t
31863 operator()(char __x) const
31864 { return __x; }
31865 };
31866
31867 template<>
31868 struct hash<unsigned char>
31869 {
31870 size_t
31871 operator()(unsigned char __x) const
31872 { return __x; }
31873 };
31874
31875 template<>
31876 struct hash<signed char>
31877 {
31878 size_t
31879 operator()(unsigned char __x) const
31880 { return __x; }
31881 };
31882
31883 template<>
31884 struct hash<short>
31885 {
31886 size_t
31887 operator()(short __x) const
31888 { return __x; }
31889 };
31890
31891 template<>
31892 struct hash<unsigned short>
31893 {
31894 size_t
31895 operator()(unsigned short __x) const
31896 { return __x; }
31897 };
31898
31899 template<>
31900 struct hash<int>
31901 {
31902 size_t
31903 operator()(int __x) const
31904 { return __x; }
31905 };
31906
31907 template<>
31908 struct hash<unsigned int>
31909 {
31910 size_t
31911 operator()(unsigned int __x) const
31912 { return __x; }
31913 };
31914
31915 template<>
31916 struct hash<long>
31917 {
31918 size_t
31919 operator()(long __x) const
31920 { return __x; }
31921 };
31922
31923 template<>
31924 struct hash<unsigned long>
31925 {
31926 size_t
31927 operator()(unsigned long __x) const
31928 { return __x; }
31929 };
31930}
31931# 72 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hashtable.h" 2 3
31932
31933namespace __gnu_cxx
31934{
31935 using std::size_t;
31936 using std::ptrdiff_t;
31937 using std::forward_iterator_tag;
31938 using std::input_iterator_tag;
31939 using std::_Construct;
31940 using std::_Destroy;
31941 using std::distance;
31942 using std::vector;
31943 using std::pair;
31944 using std::__iterator_category;
31945
31946 template <class _Val>
31947 struct _Hashtable_node
31948 {
31949 _Hashtable_node* _M_next;
31950 _Val _M_val;
31951 };
31952
31953 template <class _Val, class _Key, class _HashFcn, class _ExtractKey,
31954 class _EqualKey, class _Alloc = std::allocator<_Val> >
31955 class hashtable;
31956
31957 template <class _Val, class _Key, class _HashFcn,
31958 class _ExtractKey, class _EqualKey, class _Alloc>
31959 struct _Hashtable_iterator;
31960
31961 template <class _Val, class _Key, class _HashFcn,
31962 class _ExtractKey, class _EqualKey, class _Alloc>
31963 struct _Hashtable_const_iterator;
31964
31965 template <class _Val, class _Key, class _HashFcn,
31966 class _ExtractKey, class _EqualKey, class _Alloc>
31967 struct _Hashtable_iterator
31968 {
31969 typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
31970 _Hashtable;
31971 typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
31972 _ExtractKey, _EqualKey, _Alloc>
31973 iterator;
31974 typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
31975 _ExtractKey, _EqualKey, _Alloc>
31976 const_iterator;
31977 typedef _Hashtable_node<_Val> _Node;
31978 typedef forward_iterator_tag iterator_category;
31979 typedef _Val value_type;
31980 typedef ptrdiff_t difference_type;
31981 typedef size_t size_type;
31982 typedef _Val& reference;
31983 typedef _Val* pointer;
31984
31985 _Node* _M_cur;
31986 _Hashtable* _M_ht;
31987
31988 _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
31989 : _M_cur(__n), _M_ht(__tab) {}
31990
31991 _Hashtable_iterator() {}
31992
31993 reference
31994 operator*() const
31995 { return _M_cur->_M_val; }
31996
31997 pointer
31998 operator->() const
31999 { return &(operator*()); }
32000
32001 iterator&
32002 operator++();
32003
32004 iterator
32005 operator++(int);
32006
32007 bool
32008 operator==(const iterator& __it) const
32009 { return _M_cur == __it._M_cur; }
32010
32011 bool
32012 operator!=(const iterator& __it) const
32013 { return _M_cur != __it._M_cur; }
32014 };
32015
32016 template <class _Val, class _Key, class _HashFcn,
32017 class _ExtractKey, class _EqualKey, class _Alloc>
32018 struct _Hashtable_const_iterator
32019 {
32020 typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
32021 _Hashtable;
32022 typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
32023 _ExtractKey,_EqualKey,_Alloc>
32024 iterator;
32025 typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
32026 _ExtractKey, _EqualKey, _Alloc>
32027 const_iterator;
32028 typedef _Hashtable_node<_Val> _Node;
32029
32030 typedef forward_iterator_tag iterator_category;
32031 typedef _Val value_type;
32032 typedef ptrdiff_t difference_type;
32033 typedef size_t size_type;
32034 typedef const _Val& reference;
32035 typedef const _Val* pointer;
32036
32037 const _Node* _M_cur;
32038 const _Hashtable* _M_ht;
32039
32040 _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
32041 : _M_cur(__n), _M_ht(__tab) {}
32042
32043 _Hashtable_const_iterator() {}
32044
32045 _Hashtable_const_iterator(const iterator& __it)
32046 : _M_cur(__it._M_cur), _M_ht(__it._M_ht) {}
32047
32048 reference
32049 operator*() const
32050 { return _M_cur->_M_val; }
32051
32052 pointer
32053 operator->() const
32054 { return &(operator*()); }
32055
32056 const_iterator&
32057 operator++();
32058
32059 const_iterator
32060 operator++(int);
32061
32062 bool
32063 operator==(const const_iterator& __it) const
32064 { return _M_cur == __it._M_cur; }
32065
32066 bool
32067 operator!=(const const_iterator& __it) const
32068 { return _M_cur != __it._M_cur; }
32069 };
32070
32071
32072 enum { _S_num_primes = 28 };
32073
32074 static const unsigned long __stl_prime_list[_S_num_primes] =
32075 {
32076 53ul, 97ul, 193ul, 389ul, 769ul,
32077 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
32078 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
32079 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
32080 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
32081 1610612741ul, 3221225473ul, 4294967291ul
32082 };
32083
32084 inline unsigned long
32085 __stl_next_prime(unsigned long __n)
32086 {
32087 const unsigned long* __first = __stl_prime_list;
32088 const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
32089 const unsigned long* pos = std::lower_bound(__first, __last, __n);
32090 return pos == __last ? *(__last - 1) : *pos;
32091 }
32092
32093
32094
32095 template <class _Val, class _Key, class _HF, class _Ex,
32096 class _Eq, class _All>
32097 class hashtable;
32098
32099 template <class _Val, class _Key, class _HF, class _Ex,
32100 class _Eq, class _All>
32101 bool
32102 operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
32103 const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2);
32104# 254 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hashtable.h" 3
32105 template <class _Val, class _Key, class _HashFcn,
32106 class _ExtractKey, class _EqualKey, class _Alloc>
32107 class hashtable
32108 {
32109 public:
32110 typedef _Key key_type;
32111 typedef _Val value_type;
32112 typedef _HashFcn hasher;
32113 typedef _EqualKey key_equal;
32114
32115 typedef size_t size_type;
32116 typedef ptrdiff_t difference_type;
32117 typedef value_type* pointer;
32118 typedef const value_type* const_pointer;
32119 typedef value_type& reference;
32120 typedef const value_type& const_reference;
32121
32122 hasher
32123 hash_funct() const
32124 { return _M_hash; }
32125
32126 key_equal
32127 key_eq() const
32128 { return _M_equals; }
32129
32130 private:
32131 typedef _Hashtable_node<_Val> _Node;
32132
32133 public:
32134 typedef typename _Alloc::template rebind<value_type>::other allocator_type;
32135 allocator_type
32136 get_allocator() const
32137 { return _M_node_allocator; }
32138
32139 private:
32140 typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
32141 typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
32142 typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
32143
32144 _Node_Alloc _M_node_allocator;
32145
32146 _Node*
32147 _M_get_node()
32148 { return _M_node_allocator.allocate(1); }
32149
32150 void
32151 _M_put_node(_Node* __p)
32152 { _M_node_allocator.deallocate(__p, 1); }
32153
32154 private:
32155 hasher _M_hash;
32156 key_equal _M_equals;
32157 _ExtractKey _M_get_key;
32158 _Vector_type _M_buckets;
32159 size_type _M_num_elements;
32160
32161 public:
32162 typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey,
32163 _EqualKey, _Alloc>
32164 iterator;
32165 typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
32166 _EqualKey, _Alloc>
32167 const_iterator;
32168
32169 friend struct
32170 _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>;
32171
32172 friend struct
32173 _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
32174 _EqualKey, _Alloc>;
32175
32176 public:
32177 hashtable(size_type __n, const _HashFcn& __hf,
32178 const _EqualKey& __eql, const _ExtractKey& __ext,
32179 const allocator_type& __a = allocator_type())
32180 : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
32181 _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0)
32182 { _M_initialize_buckets(__n); }
32183
32184 hashtable(size_type __n, const _HashFcn& __hf,
32185 const _EqualKey& __eql,
32186 const allocator_type& __a = allocator_type())
32187 : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
32188 _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0)
32189 { _M_initialize_buckets(__n); }
32190
32191 hashtable(const hashtable& __ht)
32192 : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash),
32193 _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key),
32194 _M_buckets(__ht.get_allocator()), _M_num_elements(0)
32195 { _M_copy_from(__ht); }
32196
32197 hashtable&
32198 operator= (const hashtable& __ht)
32199 {
32200 if (&__ht != this)
32201 {
32202 clear();
32203 _M_hash = __ht._M_hash;
32204 _M_equals = __ht._M_equals;
32205 _M_get_key = __ht._M_get_key;
32206 _M_copy_from(__ht);
32207 }
32208 return *this;
32209 }
32210
32211 ~hashtable()
32212 { clear(); }
32213
32214 size_type
32215 size() const
32216 { return _M_num_elements; }
32217
32218 size_type
32219 max_size() const
32220 { return size_type(-1); }
32221
32222 bool
32223 empty() const
32224 { return size() == 0; }
32225
32226 void
32227 swap(hashtable& __ht)
32228 {
32229 std::swap(_M_hash, __ht._M_hash);
32230 std::swap(_M_equals, __ht._M_equals);
32231 std::swap(_M_get_key, __ht._M_get_key);
32232 _M_buckets.swap(__ht._M_buckets);
32233 std::swap(_M_num_elements, __ht._M_num_elements);
32234 }
32235
32236 iterator
32237 begin()
32238 {
32239 for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
32240 if (_M_buckets[__n])
32241 return iterator(_M_buckets[__n], this);
32242 return end();
32243 }
32244
32245 iterator
32246 end()
32247 { return iterator(0, this); }
32248
32249 const_iterator
32250 begin() const
32251 {
32252 for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
32253 if (_M_buckets[__n])
32254 return const_iterator(_M_buckets[__n], this);
32255 return end();
32256 }
32257
32258 const_iterator
32259 end() const
32260 { return const_iterator(0, this); }
32261
32262 template <class _Vl, class _Ky, class _HF, class _Ex, class _Eq,
32263 class _Al>
32264 friend bool
32265 operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
32266 const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
32267
32268 public:
32269 size_type
32270 bucket_count() const
32271 { return _M_buckets.size(); }
32272
32273 size_type
32274 max_bucket_count() const
32275 { return __stl_prime_list[(int)_S_num_primes - 1]; }
32276
32277 size_type
32278 elems_in_bucket(size_type __bucket) const
32279 {
32280 size_type __result = 0;
32281 for (_Node* __cur = _M_buckets[__bucket]; __cur; __cur = __cur->_M_next)
32282 __result += 1;
32283 return __result;
32284 }
32285
32286 pair<iterator, bool>
32287 insert_unique(const value_type& __obj)
32288 {
32289 resize(_M_num_elements + 1);
32290 return insert_unique_noresize(__obj);
32291 }
32292
32293 iterator
32294 insert_equal(const value_type& __obj)
32295 {
32296 resize(_M_num_elements + 1);
32297 return insert_equal_noresize(__obj);
32298 }
32299
32300 pair<iterator, bool>
32301 insert_unique_noresize(const value_type& __obj);
32302
32303 iterator
32304 insert_equal_noresize(const value_type& __obj);
32305
32306 template <class _InputIterator>
32307 void
32308 insert_unique(_InputIterator __f, _InputIterator __l)
32309 { insert_unique(__f, __l, __iterator_category(__f)); }
32310
32311 template <class _InputIterator>
32312 void
32313 insert_equal(_InputIterator __f, _InputIterator __l)
32314 { insert_equal(__f, __l, __iterator_category(__f)); }
32315
32316 template <class _InputIterator>
32317 void
32318 insert_unique(_InputIterator __f, _InputIterator __l,
32319 input_iterator_tag)
32320 {
32321 for ( ; __f != __l; ++__f)
32322 insert_unique(*__f);
32323 }
32324
32325 template <class _InputIterator>
32326 void
32327 insert_equal(_InputIterator __f, _InputIterator __l,
32328 input_iterator_tag)
32329 {
32330 for ( ; __f != __l; ++__f)
32331 insert_equal(*__f);
32332 }
32333
32334 template <class _ForwardIterator>
32335 void
32336 insert_unique(_ForwardIterator __f, _ForwardIterator __l,
32337 forward_iterator_tag)
32338 {
32339 size_type __n = distance(__f, __l);
32340 resize(_M_num_elements + __n);
32341 for ( ; __n > 0; --__n, ++__f)
32342 insert_unique_noresize(*__f);
32343 }
32344
32345 template <class _ForwardIterator>
32346 void
32347 insert_equal(_ForwardIterator __f, _ForwardIterator __l,
32348 forward_iterator_tag)
32349 {
32350 size_type __n = distance(__f, __l);
32351 resize(_M_num_elements + __n);
32352 for ( ; __n > 0; --__n, ++__f)
32353 insert_equal_noresize(*__f);
32354 }
32355
32356 reference
32357 find_or_insert(const value_type& __obj);
32358
32359 iterator
32360 find(const key_type& __key)
32361 {
32362 size_type __n = _M_bkt_num_key(__key);
32363 _Node* __first;
32364 for (__first = _M_buckets[__n];
32365 __first && !_M_equals(_M_get_key(__first->_M_val), __key);
32366 __first = __first->_M_next)
32367 {}
32368 return iterator(__first, this);
32369 }
32370
32371 const_iterator
32372 find(const key_type& __key) const
32373 {
32374 size_type __n = _M_bkt_num_key(__key);
32375 const _Node* __first;
32376 for (__first = _M_buckets[__n];
32377 __first && !_M_equals(_M_get_key(__first->_M_val), __key);
32378 __first = __first->_M_next)
32379 {}
32380 return const_iterator(__first, this);
32381 }
32382
32383 size_type
32384 count(const key_type& __key) const
32385 {
32386 const size_type __n = _M_bkt_num_key(__key);
32387 size_type __result = 0;
32388
32389 for (const _Node* __cur = _M_buckets[__n]; __cur;
32390 __cur = __cur->_M_next)
32391 if (_M_equals(_M_get_key(__cur->_M_val), __key))
32392 ++__result;
32393 return __result;
32394 }
32395
32396 pair<iterator, iterator>
32397 equal_range(const key_type& __key);
32398
32399 pair<const_iterator, const_iterator>
32400 equal_range(const key_type& __key) const;
32401
32402 size_type
32403 erase(const key_type& __key);
32404
32405 void
32406 erase(const iterator& __it);
32407
32408 void
32409 erase(iterator __first, iterator __last);
32410
32411 void
32412 erase(const const_iterator& __it);
32413
32414 void
32415 erase(const_iterator __first, const_iterator __last);
32416
32417 void
32418 resize(size_type __num_elements_hint);
32419
32420 void
32421 clear();
32422
32423 private:
32424 size_type
32425 _M_next_size(size_type __n) const
32426 { return __stl_next_prime(__n); }
32427
32428 void
32429 _M_initialize_buckets(size_type __n)
32430 {
32431 const size_type __n_buckets = _M_next_size(__n);
32432 _M_buckets.reserve(__n_buckets);
32433 _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
32434 _M_num_elements = 0;
32435 }
32436
32437 size_type
32438 _M_bkt_num_key(const key_type& __key) const
32439 { return _M_bkt_num_key(__key, _M_buckets.size()); }
32440
32441 size_type
32442 _M_bkt_num(const value_type& __obj) const
32443 { return _M_bkt_num_key(_M_get_key(__obj)); }
32444
32445 size_type
32446 _M_bkt_num_key(const key_type& __key, size_t __n) const
32447 { return _M_hash(__key) % __n; }
32448
32449 size_type
32450 _M_bkt_num(const value_type& __obj, size_t __n) const
32451 { return _M_bkt_num_key(_M_get_key(__obj), __n); }
32452
32453 _Node*
32454 _M_new_node(const value_type& __obj)
32455 {
32456 _Node* __n = _M_get_node();
32457 __n->_M_next = 0;
32458 try
32459 {
32460 this->get_allocator().construct(&__n->_M_val, __obj);
32461 return __n;
32462 }
32463 catch(...)
32464 {
32465 _M_put_node(__n);
32466 throw;
32467 }
32468 }
32469
32470 void
32471 _M_delete_node(_Node* __n)
32472 {
32473 this->get_allocator().destroy(&__n->_M_val);
32474 _M_put_node(__n);
32475 }
32476
32477 void
32478 _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
32479
32480 void
32481 _M_erase_bucket(const size_type __n, _Node* __last);
32482
32483 void
32484 _M_copy_from(const hashtable& __ht);
32485 };
32486
32487 template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
32488 class _All>
32489 _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
32490 _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
32491 operator++()
32492 {
32493 const _Node* __old = _M_cur;
32494 _M_cur = _M_cur->_M_next;
32495 if (!_M_cur)
32496 {
32497 size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
32498 while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
32499 _M_cur = _M_ht->_M_buckets[__bucket];
32500 }
32501 return *this;
32502 }
32503
32504 template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
32505 class _All>
32506 inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
32507 _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
32508 operator++(int)
32509 {
32510 iterator __tmp = *this;
32511 ++*this;
32512 return __tmp;
32513 }
32514
32515 template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
32516 class _All>
32517 _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
32518 _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
32519 operator++()
32520 {
32521 const _Node* __old = _M_cur;
32522 _M_cur = _M_cur->_M_next;
32523 if (!_M_cur)
32524 {
32525 size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
32526 while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
32527 _M_cur = _M_ht->_M_buckets[__bucket];
32528 }
32529 return *this;
32530 }
32531
32532 template <class _Val, class _Key, class _HF, class _ExK, class _EqK,
32533 class _All>
32534 inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
32535 _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
32536 operator++(int)
32537 {
32538 const_iterator __tmp = *this;
32539 ++*this;
32540 return __tmp;
32541 }
32542
32543 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32544 bool
32545 operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
32546 const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
32547 {
32548 typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
32549
32550 if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
32551 return false;
32552
32553 for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
32554 {
32555 _Node* __cur1 = __ht1._M_buckets[__n];
32556 _Node* __cur2 = __ht2._M_buckets[__n];
32557
32558 for (; __cur1 && __cur2;
32559 __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
32560 {}
32561 if (__cur1 || __cur2)
32562 return false;
32563
32564 for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
32565 __cur1 = __cur1->_M_next)
32566 {
32567 bool _found__cur1 = false;
32568 for (_Node* __cur2 = __ht2._M_buckets[__n];
32569 __cur2; __cur2 = __cur2->_M_next)
32570 {
32571 if (__cur1->_M_val == __cur2->_M_val)
32572 {
32573 _found__cur1 = true;
32574 break;
32575 }
32576 }
32577 if (!_found__cur1)
32578 return false;
32579 }
32580 }
32581 return true;
32582 }
32583
32584 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32585 inline bool
32586 operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
32587 const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
32588 { return !(__ht1 == __ht2); }
32589
32590 template <class _Val, class _Key, class _HF, class _Extract, class _EqKey,
32591 class _All>
32592 inline void
32593 swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
32594 hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2)
32595 { __ht1.swap(__ht2); }
32596
32597 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32598 pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator, bool>
32599 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32600 insert_unique_noresize(const value_type& __obj)
32601 {
32602 const size_type __n = _M_bkt_num(__obj);
32603 _Node* __first = _M_buckets[__n];
32604
32605 for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
32606 if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
32607 return pair<iterator, bool>(iterator(__cur, this), false);
32608
32609 _Node* __tmp = _M_new_node(__obj);
32610 __tmp->_M_next = __first;
32611 _M_buckets[__n] = __tmp;
32612 ++_M_num_elements;
32613 return pair<iterator, bool>(iterator(__tmp, this), true);
32614 }
32615
32616 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32617 typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator
32618 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32619 insert_equal_noresize(const value_type& __obj)
32620 {
32621 const size_type __n = _M_bkt_num(__obj);
32622 _Node* __first = _M_buckets[__n];
32623
32624 for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
32625 if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
32626 {
32627 _Node* __tmp = _M_new_node(__obj);
32628 __tmp->_M_next = __cur->_M_next;
32629 __cur->_M_next = __tmp;
32630 ++_M_num_elements;
32631 return iterator(__tmp, this);
32632 }
32633
32634 _Node* __tmp = _M_new_node(__obj);
32635 __tmp->_M_next = __first;
32636 _M_buckets[__n] = __tmp;
32637 ++_M_num_elements;
32638 return iterator(__tmp, this);
32639 }
32640
32641 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32642 typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference
32643 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32644 find_or_insert(const value_type& __obj)
32645 {
32646 resize(_M_num_elements + 1);
32647
32648 size_type __n = _M_bkt_num(__obj);
32649 _Node* __first = _M_buckets[__n];
32650
32651 for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
32652 if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
32653 return __cur->_M_val;
32654
32655 _Node* __tmp = _M_new_node(__obj);
32656 __tmp->_M_next = __first;
32657 _M_buckets[__n] = __tmp;
32658 ++_M_num_elements;
32659 return __tmp->_M_val;
32660 }
32661
32662 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32663 pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator,
32664 typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator>
32665 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32666 equal_range(const key_type& __key)
32667 {
32668 typedef pair<iterator, iterator> _Pii;
32669 const size_type __n = _M_bkt_num_key(__key);
32670
32671 for (_Node* __first = _M_buckets[__n]; __first;
32672 __first = __first->_M_next)
32673 if (_M_equals(_M_get_key(__first->_M_val), __key))
32674 {
32675 for (_Node* __cur = __first->_M_next; __cur;
32676 __cur = __cur->_M_next)
32677 if (!_M_equals(_M_get_key(__cur->_M_val), __key))
32678 return _Pii(iterator(__first, this), iterator(__cur, this));
32679 for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
32680 if (_M_buckets[__m])
32681 return _Pii(iterator(__first, this),
32682 iterator(_M_buckets[__m], this));
32683 return _Pii(iterator(__first, this), end());
32684 }
32685 return _Pii(end(), end());
32686 }
32687
32688 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32689 pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator,
32690 typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator>
32691 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32692 equal_range(const key_type& __key) const
32693 {
32694 typedef pair<const_iterator, const_iterator> _Pii;
32695 const size_type __n = _M_bkt_num_key(__key);
32696
32697 for (const _Node* __first = _M_buckets[__n]; __first;
32698 __first = __first->_M_next)
32699 {
32700 if (_M_equals(_M_get_key(__first->_M_val), __key))
32701 {
32702 for (const _Node* __cur = __first->_M_next; __cur;
32703 __cur = __cur->_M_next)
32704 if (!_M_equals(_M_get_key(__cur->_M_val), __key))
32705 return _Pii(const_iterator(__first, this),
32706 const_iterator(__cur, this));
32707 for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
32708 if (_M_buckets[__m])
32709 return _Pii(const_iterator(__first, this),
32710 const_iterator(_M_buckets[__m], this));
32711 return _Pii(const_iterator(__first, this), end());
32712 }
32713 }
32714 return _Pii(end(), end());
32715 }
32716
32717 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32718 typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type
32719 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32720 erase(const key_type& __key)
32721 {
32722 const size_type __n = _M_bkt_num_key(__key);
32723 _Node* __first = _M_buckets[__n];
32724 size_type __erased = 0;
32725
32726 if (__first)
32727 {
32728 _Node* __cur = __first;
32729 _Node* __next = __cur->_M_next;
32730 while (__next)
32731 {
32732 if (_M_equals(_M_get_key(__next->_M_val), __key))
32733 {
32734 __cur->_M_next = __next->_M_next;
32735 _M_delete_node(__next);
32736 __next = __cur->_M_next;
32737 ++__erased;
32738 --_M_num_elements;
32739 }
32740 else
32741 {
32742 __cur = __next;
32743 __next = __cur->_M_next;
32744 }
32745 }
32746 if (_M_equals(_M_get_key(__first->_M_val), __key))
32747 {
32748 _M_buckets[__n] = __first->_M_next;
32749 _M_delete_node(__first);
32750 ++__erased;
32751 --_M_num_elements;
32752 }
32753 }
32754 return __erased;
32755 }
32756
32757 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32758 void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32759 erase(const iterator& __it)
32760 {
32761 _Node* __p = __it._M_cur;
32762 if (__p)
32763 {
32764 const size_type __n = _M_bkt_num(__p->_M_val);
32765 _Node* __cur = _M_buckets[__n];
32766
32767 if (__cur == __p)
32768 {
32769 _M_buckets[__n] = __cur->_M_next;
32770 _M_delete_node(__cur);
32771 --_M_num_elements;
32772 }
32773 else
32774 {
32775 _Node* __next = __cur->_M_next;
32776 while (__next)
32777 {
32778 if (__next == __p)
32779 {
32780 __cur->_M_next = __next->_M_next;
32781 _M_delete_node(__next);
32782 --_M_num_elements;
32783 break;
32784 }
32785 else
32786 {
32787 __cur = __next;
32788 __next = __cur->_M_next;
32789 }
32790 }
32791 }
32792 }
32793 }
32794
32795 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32796 void
32797 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32798 erase(iterator __first, iterator __last)
32799 {
32800 size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val)
32801 : _M_buckets.size();
32802
32803 size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val)
32804 : _M_buckets.size();
32805
32806 if (__first._M_cur == __last._M_cur)
32807 return;
32808 else if (__f_bucket == __l_bucket)
32809 _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
32810 else
32811 {
32812 _M_erase_bucket(__f_bucket, __first._M_cur, 0);
32813 for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
32814 _M_erase_bucket(__n, 0);
32815 if (__l_bucket != _M_buckets.size())
32816 _M_erase_bucket(__l_bucket, __last._M_cur);
32817 }
32818 }
32819
32820 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32821 inline void
32822 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32823 erase(const_iterator __first, const_iterator __last)
32824 {
32825 erase(iterator(const_cast<_Node*>(__first._M_cur),
32826 const_cast<hashtable*>(__first._M_ht)),
32827 iterator(const_cast<_Node*>(__last._M_cur),
32828 const_cast<hashtable*>(__last._M_ht)));
32829 }
32830
32831 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32832 inline void
32833 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32834 erase(const const_iterator& __it)
32835 { erase(iterator(const_cast<_Node*>(__it._M_cur),
32836 const_cast<hashtable*>(__it._M_ht))); }
32837
32838 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32839 void
32840 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32841 resize(size_type __num_elements_hint)
32842 {
32843 const size_type __old_n = _M_buckets.size();
32844 if (__num_elements_hint > __old_n)
32845 {
32846 const size_type __n = _M_next_size(__num_elements_hint);
32847 if (__n > __old_n)
32848 {
32849 _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
32850 try
32851 {
32852 for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
32853 {
32854 _Node* __first = _M_buckets[__bucket];
32855 while (__first)
32856 {
32857 size_type __new_bucket = _M_bkt_num(__first->_M_val,
32858 __n);
32859 _M_buckets[__bucket] = __first->_M_next;
32860 __first->_M_next = __tmp[__new_bucket];
32861 __tmp[__new_bucket] = __first;
32862 __first = _M_buckets[__bucket];
32863 }
32864 }
32865 _M_buckets.swap(__tmp);
32866 }
32867 catch(...)
32868 {
32869 for (size_type __bucket = 0; __bucket < __tmp.size();
32870 ++__bucket)
32871 {
32872 while (__tmp[__bucket])
32873 {
32874 _Node* __next = __tmp[__bucket]->_M_next;
32875 _M_delete_node(__tmp[__bucket]);
32876 __tmp[__bucket] = __next;
32877 }
32878 }
32879 throw;
32880 }
32881 }
32882 }
32883 }
32884
32885 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32886 void
32887 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32888 _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
32889 {
32890 _Node* __cur = _M_buckets[__n];
32891 if (__cur == __first)
32892 _M_erase_bucket(__n, __last);
32893 else
32894 {
32895 _Node* __next;
32896 for (__next = __cur->_M_next;
32897 __next != __first;
32898 __cur = __next, __next = __cur->_M_next)
32899 ;
32900 while (__next != __last)
32901 {
32902 __cur->_M_next = __next->_M_next;
32903 _M_delete_node(__next);
32904 __next = __cur->_M_next;
32905 --_M_num_elements;
32906 }
32907 }
32908 }
32909
32910 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32911 void
32912 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32913 _M_erase_bucket(const size_type __n, _Node* __last)
32914 {
32915 _Node* __cur = _M_buckets[__n];
32916 while (__cur != __last)
32917 {
32918 _Node* __next = __cur->_M_next;
32919 _M_delete_node(__cur);
32920 __cur = __next;
32921 _M_buckets[__n] = __cur;
32922 --_M_num_elements;
32923 }
32924 }
32925
32926 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32927 void
32928 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32929 clear()
32930 {
32931 for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
32932 {
32933 _Node* __cur = _M_buckets[__i];
32934 while (__cur != 0)
32935 {
32936 _Node* __next = __cur->_M_next;
32937 _M_delete_node(__cur);
32938 __cur = __next;
32939 }
32940 _M_buckets[__i] = 0;
32941 }
32942 _M_num_elements = 0;
32943 }
32944
32945 template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
32946 void
32947 hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
32948 _M_copy_from(const hashtable& __ht)
32949 {
32950 _M_buckets.clear();
32951 _M_buckets.reserve(__ht._M_buckets.size());
32952 _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
32953 try
32954 {
32955 for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
32956 const _Node* __cur = __ht._M_buckets[__i];
32957 if (__cur)
32958 {
32959 _Node* __local_copy = _M_new_node(__cur->_M_val);
32960 _M_buckets[__i] = __local_copy;
32961
32962 for (_Node* __next = __cur->_M_next;
32963 __next;
32964 __cur = __next, __next = __cur->_M_next)
32965 {
32966 __local_copy->_M_next = _M_new_node(__next->_M_val);
32967 __local_copy = __local_copy->_M_next;
32968 }
32969 }
32970 }
32971 _M_num_elements = __ht._M_num_elements;
32972 }
32973 catch(...)
32974 {
32975 clear();
32976 throw;
32977 }
32978 }
32979}
32980# 67 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/ext/hash_map" 2 3
32981
32982
32983namespace __gnu_cxx
32984{
32985 using std::equal_to;
32986 using std::allocator;
32987 using std::pair;
32988 using std::_Select1st;
32989
32990
32991
32992 template<class _Key, class _Tp, class _HashFcn = hash<_Key>,
32993 class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
32994 class hash_map;
32995
32996 template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
32997 inline bool
32998 operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
32999 const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
33000
33001
33002
33003
33004
33005
33006 template <class _Key, class _Tp, class _HashFcn, class _EqualKey,
33007 class _Alloc>
33008 class hash_map
33009 {
33010 private:
33011 typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFcn,
33012 _Select1st<pair<const _Key, _Tp> >,
33013 _EqualKey, _Alloc> _Ht;
33014
33015 _Ht _M_ht;
33016
33017 public:
33018 typedef typename _Ht::key_type key_type;
33019 typedef _Tp data_type;
33020 typedef _Tp mapped_type;
33021 typedef typename _Ht::value_type value_type;
33022 typedef typename _Ht::hasher hasher;
33023 typedef typename _Ht::key_equal key_equal;
33024
33025 typedef typename _Ht::size_type size_type;
33026 typedef typename _Ht::difference_type difference_type;
33027 typedef typename _Ht::pointer pointer;
33028 typedef typename _Ht::const_pointer const_pointer;
33029 typedef typename _Ht::reference reference;
33030 typedef typename _Ht::const_reference const_reference;
33031
33032 typedef typename _Ht::iterator iterator;
33033 typedef typename _Ht::const_iterator const_iterator;
33034
33035 typedef typename _Ht::allocator_type allocator_type;
33036
33037 hasher
33038 hash_funct() const
33039 { return _M_ht.hash_funct(); }
33040
33041 key_equal
33042 key_eq() const
33043 { return _M_ht.key_eq(); }
33044
33045 allocator_type
33046 get_allocator() const
33047 { return _M_ht.get_allocator(); }
33048
33049 public:
33050 hash_map()
33051 : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
33052
33053 explicit
33054 hash_map(size_type __n)
33055 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
33056
33057 hash_map(size_type __n, const hasher& __hf)
33058 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
33059
33060 hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
33061 const allocator_type& __a = allocator_type())
33062 : _M_ht(__n, __hf, __eql, __a) {}
33063
33064 template <class _InputIterator>
33065 hash_map(_InputIterator __f, _InputIterator __l)
33066 : _M_ht(100, hasher(), key_equal(), allocator_type())
33067 { _M_ht.insert_unique(__f, __l); }
33068
33069 template <class _InputIterator>
33070 hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
33071 : _M_ht(__n, hasher(), key_equal(), allocator_type())
33072 { _M_ht.insert_unique(__f, __l); }
33073
33074 template <class _InputIterator>
33075 hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
33076 const hasher& __hf)
33077 : _M_ht(__n, __hf, key_equal(), allocator_type())
33078 { _M_ht.insert_unique(__f, __l); }
33079
33080 template <class _InputIterator>
33081 hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
33082 const hasher& __hf, const key_equal& __eql,
33083 const allocator_type& __a = allocator_type())
33084 : _M_ht(__n, __hf, __eql, __a)
33085 { _M_ht.insert_unique(__f, __l); }
33086
33087 public:
33088 size_type
33089 size() const
33090 { return _M_ht.size(); }
33091
33092 size_type
33093 max_size() const
33094 { return _M_ht.max_size(); }
33095
33096 bool
33097 empty() const
33098 { return _M_ht.empty(); }
33099
33100 void
33101 swap(hash_map& __hs)
33102 { _M_ht.swap(__hs._M_ht); }
33103
33104 template <class _K1, class _T1, class _HF, class _EqK, class _Al>
33105 friend bool
33106 operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
33107 const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
33108
33109 iterator
33110 begin()
33111 { return _M_ht.begin(); }
33112
33113 iterator
33114 end()
33115 { return _M_ht.end(); }
33116
33117 const_iterator
33118 begin() const
33119 { return _M_ht.begin(); }
33120
33121 const_iterator
33122 end() const
33123 { return _M_ht.end(); }
33124
33125 public:
33126 pair<iterator, bool>
33127 insert(const value_type& __obj)
33128 { return _M_ht.insert_unique(__obj); }
33129
33130 template <class _InputIterator>
33131 void
33132 insert(_InputIterator __f, _InputIterator __l)
33133 { _M_ht.insert_unique(__f, __l); }
33134
33135 pair<iterator, bool>
33136 insert_noresize(const value_type& __obj)
33137 { return _M_ht.insert_unique_noresize(__obj); }
33138
33139 iterator
33140 find(const key_type& __key)
33141 { return _M_ht.find(__key); }
33142
33143 const_iterator
33144 find(const key_type& __key) const
33145 { return _M_ht.find(__key); }
33146
33147 _Tp&
33148 operator[](const key_type& __key)
33149 { return _M_ht.find_or_insert(value_type(__key, _Tp())).second; }
33150
33151 size_type
33152 count(const key_type& __key) const
33153 { return _M_ht.count(__key); }
33154
33155 pair<iterator, iterator>
33156 equal_range(const key_type& __key)
33157 { return _M_ht.equal_range(__key); }
33158
33159 pair<const_iterator, const_iterator>
33160 equal_range(const key_type& __key) const
33161 { return _M_ht.equal_range(__key); }
33162
33163 size_type
33164 erase(const key_type& __key)
33165 {return _M_ht.erase(__key); }
33166
33167 void
33168 erase(iterator __it)
33169 { _M_ht.erase(__it); }
33170
33171 void
33172 erase(iterator __f, iterator __l)
33173 { _M_ht.erase(__f, __l); }
33174
33175 void
33176 clear()
33177 { _M_ht.clear(); }
33178
33179 void
33180 resize(size_type __hint)
33181 { _M_ht.resize(__hint); }
33182
33183 size_type
33184 bucket_count() const
33185 { return _M_ht.bucket_count(); }
33186
33187 size_type
33188 max_bucket_count() const
33189 { return _M_ht.max_bucket_count(); }
33190
33191 size_type
33192 elems_in_bucket(size_type __n) const
33193 { return _M_ht.elems_in_bucket(__n); }
33194 };
33195
33196 template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
33197 inline bool
33198 operator==(const hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm1,
33199 const hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm2)
33200 { return __hm1._M_ht == __hm2._M_ht; }
33201
33202 template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
33203 inline bool
33204 operator!=(const hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm1,
33205 const hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm2)
33206 { return !(__hm1 == __hm2); }
33207
33208 template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
33209 inline void
33210 swap(hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm1,
33211 hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm2)
33212 { __hm1.swap(__hm2); }
33213
33214
33215
33216 template <class _Key, class _Tp,
33217 class _HashFcn = hash<_Key>,
33218 class _EqualKey = equal_to<_Key>,
33219 class _Alloc = allocator<_Tp> >
33220 class hash_multimap;
33221
33222 template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
33223 inline bool
33224 operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
33225 const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2);
33226
33227
33228
33229
33230
33231
33232 template <class _Key, class _Tp, class _HashFcn, class _EqualKey,
33233 class _Alloc>
33234 class hash_multimap
33235 {
33236
33237
33238
33239
33240
33241
33242 private:
33243 typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFcn,
33244 _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
33245 _Ht;
33246
33247 _Ht _M_ht;
33248
33249 public:
33250 typedef typename _Ht::key_type key_type;
33251 typedef _Tp data_type;
33252 typedef _Tp mapped_type;
33253 typedef typename _Ht::value_type value_type;
33254 typedef typename _Ht::hasher hasher;
33255 typedef typename _Ht::key_equal key_equal;
33256
33257 typedef typename _Ht::size_type size_type;
33258 typedef typename _Ht::difference_type difference_type;
33259 typedef typename _Ht::pointer pointer;
33260 typedef typename _Ht::const_pointer const_pointer;
33261 typedef typename _Ht::reference reference;
33262 typedef typename _Ht::const_reference const_reference;
33263
33264 typedef typename _Ht::iterator iterator;
33265 typedef typename _Ht::const_iterator const_iterator;
33266
33267 typedef typename _Ht::allocator_type allocator_type;
33268
33269 hasher
33270 hash_funct() const
33271 { return _M_ht.hash_funct(); }
33272
33273 key_equal
33274 key_eq() const
33275 { return _M_ht.key_eq(); }
33276
33277 allocator_type
33278 get_allocator() const
33279 { return _M_ht.get_allocator(); }
33280
33281 public:
33282 hash_multimap()
33283 : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
33284
33285 explicit
33286 hash_multimap(size_type __n)
33287 : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
33288
33289 hash_multimap(size_type __n, const hasher& __hf)
33290 : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
33291
33292 hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
33293 const allocator_type& __a = allocator_type())
33294 : _M_ht(__n, __hf, __eql, __a) {}
33295
33296 template <class _InputIterator>
33297 hash_multimap(_InputIterator __f, _InputIterator __l)
33298 : _M_ht(100, hasher(), key_equal(), allocator_type())
33299 { _M_ht.insert_equal(__f, __l); }
33300
33301 template <class _InputIterator>
33302 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
33303 : _M_ht(__n, hasher(), key_equal(), allocator_type())
33304 { _M_ht.insert_equal(__f, __l); }
33305
33306 template <class _InputIterator>
33307 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
33308 const hasher& __hf)
33309 : _M_ht(__n, __hf, key_equal(), allocator_type())
33310 { _M_ht.insert_equal(__f, __l); }
33311
33312 template <class _InputIterator>
33313 hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
33314 const hasher& __hf, const key_equal& __eql,
33315 const allocator_type& __a = allocator_type())
33316 : _M_ht(__n, __hf, __eql, __a)
33317 { _M_ht.insert_equal(__f, __l); }
33318
33319 public:
33320 size_type
33321 size() const
33322 { return _M_ht.size(); }
33323
33324 size_type
33325 max_size() const
33326 { return _M_ht.max_size(); }
33327
33328 bool
33329 empty() const
33330 { return _M_ht.empty(); }
33331
33332 void
33333 swap(hash_multimap& __hs)
33334 { _M_ht.swap(__hs._M_ht); }
33335
33336 template <class _K1, class _T1, class _HF, class _EqK, class _Al>
33337 friend bool
33338 operator==(const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
33339 const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
33340
33341 iterator
33342 begin()
33343 { return _M_ht.begin(); }
33344
33345 iterator
33346 end()
33347 { return _M_ht.end(); }
33348
33349 const_iterator
33350 begin() const
33351 { return _M_ht.begin(); }
33352
33353 const_iterator
33354 end() const
33355 { return _M_ht.end(); }
33356
33357public:
33358 iterator
33359 insert(const value_type& __obj)
33360 { return _M_ht.insert_equal(__obj); }
33361
33362 template <class _InputIterator>
33363 void
33364 insert(_InputIterator __f, _InputIterator __l)
33365 { _M_ht.insert_equal(__f,__l); }
33366
33367 iterator
33368 insert_noresize(const value_type& __obj)
33369 { return _M_ht.insert_equal_noresize(__obj); }
33370
33371 iterator
33372 find(const key_type& __key)
33373 { return _M_ht.find(__key); }
33374
33375 const_iterator
33376 find(const key_type& __key) const
33377 { return _M_ht.find(__key); }
33378
33379 size_type
33380 count(const key_type& __key) const
33381 { return _M_ht.count(__key); }
33382
33383 pair<iterator, iterator>
33384 equal_range(const key_type& __key)
33385 { return _M_ht.equal_range(__key); }
33386
33387 pair<const_iterator, const_iterator>
33388 equal_range(const key_type& __key) const
33389 { return _M_ht.equal_range(__key); }
33390
33391 size_type
33392 erase(const key_type& __key)
33393 { return _M_ht.erase(__key); }
33394
33395 void
33396 erase(iterator __it)
33397 { _M_ht.erase(__it); }
33398
33399 void
33400 erase(iterator __f, iterator __l)
33401 { _M_ht.erase(__f, __l); }
33402
33403 void
33404 clear()
33405 { _M_ht.clear(); }
33406
33407 public:
33408 void
33409 resize(size_type __hint)
33410 { _M_ht.resize(__hint); }
33411
33412 size_type
33413 bucket_count() const
33414 { return _M_ht.bucket_count(); }
33415
33416 size_type
33417 max_bucket_count() const
33418 { return _M_ht.max_bucket_count(); }
33419
33420 size_type
33421 elems_in_bucket(size_type __n) const
33422 { return _M_ht.elems_in_bucket(__n); }
33423};
33424
33425 template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
33426 inline bool
33427 operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
33428 const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
33429 { return __hm1._M_ht == __hm2._M_ht; }
33430
33431 template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
33432 inline bool
33433 operator!=(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
33434 const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
33435 { return !(__hm1 == __hm2); }
33436
33437 template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
33438 inline void
33439 swap(hash_multimap<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm1,
33440 hash_multimap<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>& __hm2)
33441 { __hm1.swap(__hm2); }
33442
33443}
33444
33445namespace std
33446{
33447
33448
33449
33450 template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
33451 class insert_iterator<__gnu_cxx::hash_map<_Key, _Tp, _HashFn,
33452 _EqKey, _Alloc> >
33453 {
33454 protected:
33455 typedef __gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>
33456 _Container;
33457 _Container* container;
33458
33459 public:
33460 typedef _Container container_type;
33461 typedef output_iterator_tag iterator_category;
33462 typedef void value_type;
33463 typedef void difference_type;
33464 typedef void pointer;
33465 typedef void reference;
33466
33467 insert_iterator(_Container& __x)
33468 : container(&__x) {}
33469
33470 insert_iterator(_Container& __x, typename _Container::iterator)
33471 : container(&__x) {}
33472
33473 insert_iterator<_Container>&
33474 operator=(const typename _Container::value_type& __value)
33475 {
33476 container->insert(__value);
33477 return *this;
33478 }
33479
33480 insert_iterator<_Container>&
33481 operator*()
33482 { return *this; }
33483
33484 insert_iterator<_Container>&
33485 operator++() { return *this; }
33486
33487 insert_iterator<_Container>&
33488 operator++(int)
33489 { return *this; }
33490 };
33491
33492 template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
33493 class insert_iterator<__gnu_cxx::hash_multimap<_Key, _Tp, _HashFn,
33494 _EqKey, _Alloc> >
33495 {
33496 protected:
33497 typedef __gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc>
33498 _Container;
33499 _Container* container;
33500 typename _Container::iterator iter;
33501
33502 public:
33503 typedef _Container container_type;
33504 typedef output_iterator_tag iterator_category;
33505 typedef void value_type;
33506 typedef void difference_type;
33507 typedef void pointer;
33508 typedef void reference;
33509
33510 insert_iterator(_Container& __x)
33511 : container(&__x) {}
33512
33513 insert_iterator(_Container& __x, typename _Container::iterator)
33514 : container(&__x) {}
33515
33516 insert_iterator<_Container>&
33517 operator=(const typename _Container::value_type& __value)
33518 {
33519 container->insert(__value);
33520 return *this;
33521 }
33522
33523 insert_iterator<_Container>&
33524 operator*()
33525 { return *this; }
33526
33527 insert_iterator<_Container>&
33528 operator++()
33529 { return *this; }
33530
33531 insert_iterator<_Container>&
33532 operator++(int)
33533 { return *this; }
33534 };
33535}
33536
33537
33538
33539
33540
33541#pragma GCC visibility pop
33542# 26 "../ast/identifier.h" 2
33543
33544namespace jl { namespace ast {
33545
33546
33547typedef unsigned int ident;
33548
33549
33550
33551
33552const ident kInvalidIdent = 0;
33553# 47 "../ast/identifier.h"
33554class IdentifierManager
33555{
33556 struct hashComp
33557 {
33558 bool operator() ( const char* aS1, const char* aS2 ) const
33559 {
33560 return strcmp( aS1, aS2 ) == 0;
33561 }
33562 };
33563
33564 private:
33565 typedef __gnu_cxx::hash<const char*> hashFunc;
33566 typedef __gnu_cxx::hash_map<const char*, ident, hashFunc, hashComp> identMap;
33567
33568 typedef std::vector<std::string> nameVector;
33569
33570 identMap m_map;
33571 nameVector m_names;
33572
33573 private:
33574 IdentifierManager();
33575 ~IdentifierManager();
33576
33577 public:
33578
33579
33580
33581
33582
33583 ident Insert( const char* aIdentifier );
33584
33585
33586
33587
33588
33589 ident Lookup( const char* aIdentifier ) const;
33590
33591
33592
33593
33594
33595 const char* GetIdentName( ident aIdent ) const;
33596
33597
33598 bool IsValid( ident aIdent ) const;
33599
33600 bool IsIdentifier( const char* aIdentifier ) const;
33601
33602 public:
33603
33604 static IdentifierManager& GetInstance();
33605};
33606
33607}; };
33608# 20 "jasmin.h" 2
33609# 1 "../ast/types.h" 1
33610# 21 "../ast/types.h"
33611namespace jl { namespace ast {
33612
33613enum TypeId
33614{
33615 TypeIdInvalid,
33616 TypeIdVoid,
33617
33618 TypeIdBool,
33619 TypeIdInteger,
33620 TypeIdDouble,
33621 TypeIdString,
33622
33623 TypeIdFunction
33624};
33625
33626
33627
33628struct invalid_type_tag {};
33629struct function_type_tag {};
33630
33631template< TypeId TId > struct TypeId2Type
33632{
33633 typedef invalid_type_tag Type;
33634};
33635template< typename T > struct Type2TypeId
33636{
33637 static TypeId GetTypeId() { return TypeIdInvalid; }
33638};
33639
33640
33641
33642
33643
33644template<> struct TypeId2Type<TypeIdVoid> { typedef void Type; }; template<> struct Type2TypeId<void> { static TypeId GetTypeId() { return TypeIdVoid; } };;
33645template<> struct TypeId2Type<TypeIdInteger> { typedef int Type; }; template<> struct Type2TypeId<int> { static TypeId GetTypeId() { return TypeIdInteger; } };;
33646template<> struct TypeId2Type<TypeIdDouble> { typedef double Type; }; template<> struct Type2TypeId<double> { static TypeId GetTypeId() { return TypeIdDouble; } };;
33647template<> struct TypeId2Type<TypeIdString> { typedef char* Type; }; template<> struct Type2TypeId<char*> { static TypeId GetTypeId() { return TypeIdString; } };;
33648template<> struct TypeId2Type<TypeIdBool> { typedef bool Type; }; template<> struct Type2TypeId<bool> { static TypeId GetTypeId() { return TypeIdBool; } };;
33649
33650template<> struct TypeId2Type<TypeIdFunction> { typedef function_type_tag Type; }; template<> struct Type2TypeId<function_type_tag> { static TypeId GetTypeId() { return TypeIdFunction; } };;
33651
33652
33653
33654}; };
33655# 21 "jasmin.h" 2
33656
33657# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/list" 1 3
33658# 63 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/list" 3
33659
33660# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/list" 3
33661#pragma GCC visibility push(default)
33662
33663
33664
33665
33666
33667
33668# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 1 3
33669# 66 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
33670namespace std
33671{
33672
33673
33674
33675
33676
33677
33678 struct _List_node_base
33679 {
33680 _List_node_base* _M_next;
33681 _List_node_base* _M_prev;
33682
33683 static void
33684 swap(_List_node_base& __x, _List_node_base& __y);
33685
33686 void
33687 transfer(_List_node_base * const __first,
33688 _List_node_base * const __last);
33689
33690 void
33691 reverse();
33692
33693 void
33694 hook(_List_node_base * const __position);
33695
33696 void
33697 unhook();
33698 };
33699
33700
33701 template<typename _Tp>
33702 struct _List_node : public _List_node_base
33703 {
33704 _Tp _M_data;
33705 };
33706# 110 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
33707 template<typename _Tp>
33708 struct _List_iterator
33709 {
33710 typedef _List_iterator<_Tp> _Self;
33711 typedef _List_node<_Tp> _Node;
33712
33713 typedef ptrdiff_t difference_type;
33714 typedef std::bidirectional_iterator_tag iterator_category;
33715 typedef _Tp value_type;
33716 typedef _Tp* pointer;
33717 typedef _Tp& reference;
33718
33719 _List_iterator()
33720 : _M_node() { }
33721
33722 explicit
33723 _List_iterator(_List_node_base* __x)
33724 : _M_node(__x) { }
33725
33726
33727 reference
33728 operator*() const
33729 { return static_cast<_Node*>(_M_node)->_M_data; }
33730
33731 pointer
33732 operator->() const
33733 { return &static_cast<_Node*>(_M_node)->_M_data; }
33734
33735 _Self&
33736 operator++()
33737 {
33738 _M_node = _M_node->_M_next;
33739 return *this;
33740 }
33741
33742 _Self
33743 operator++(int)
33744 {
33745 _Self __tmp = *this;
33746 _M_node = _M_node->_M_next;
33747 return __tmp;
33748 }
33749
33750 _Self&
33751 operator--()
33752 {
33753 _M_node = _M_node->_M_prev;
33754 return *this;
33755 }
33756
33757 _Self
33758 operator--(int)
33759 {
33760 _Self __tmp = *this;
33761 _M_node = _M_node->_M_prev;
33762 return __tmp;
33763 }
33764
33765 bool
33766 operator==(const _Self& __x) const
33767 { return _M_node == __x._M_node; }
33768
33769 bool
33770 operator!=(const _Self& __x) const
33771 { return _M_node != __x._M_node; }
33772
33773
33774 _List_node_base* _M_node;
33775 };
33776# 187 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
33777 template<typename _Tp>
33778 struct _List_const_iterator
33779 {
33780 typedef _List_const_iterator<_Tp> _Self;
33781 typedef const _List_node<_Tp> _Node;
33782 typedef _List_iterator<_Tp> iterator;
33783
33784 typedef ptrdiff_t difference_type;
33785 typedef std::bidirectional_iterator_tag iterator_category;
33786 typedef _Tp value_type;
33787 typedef const _Tp* pointer;
33788 typedef const _Tp& reference;
33789
33790 _List_const_iterator()
33791 : _M_node() { }
33792
33793 explicit
33794 _List_const_iterator(const _List_node_base* __x)
33795 : _M_node(__x) { }
33796
33797 _List_const_iterator(const iterator& __x)
33798 : _M_node(__x._M_node) { }
33799
33800
33801
33802 reference
33803 operator*() const
33804 { return static_cast<_Node*>(_M_node)->_M_data; }
33805
33806 pointer
33807 operator->() const
33808 { return &static_cast<_Node*>(_M_node)->_M_data; }
33809
33810 _Self&
33811 operator++()
33812 {
33813 _M_node = _M_node->_M_next;
33814 return *this;
33815 }
33816
33817 _Self
33818 operator++(int)
33819 {
33820 _Self __tmp = *this;
33821 _M_node = _M_node->_M_next;
33822 return __tmp;
33823 }
33824
33825 _Self&
33826 operator--()
33827 {
33828 _M_node = _M_node->_M_prev;
33829 return *this;
33830 }
33831
33832 _Self
33833 operator--(int)
33834 {
33835 _Self __tmp = *this;
33836 _M_node = _M_node->_M_prev;
33837 return __tmp;
33838 }
33839
33840 bool
33841 operator==(const _Self& __x) const
33842 { return _M_node == __x._M_node; }
33843
33844 bool
33845 operator!=(const _Self& __x) const
33846 { return _M_node != __x._M_node; }
33847
33848
33849 const _List_node_base* _M_node;
33850 };
33851
33852 template<typename _Val>
33853 inline bool
33854 operator==(const _List_iterator<_Val>& __x,
33855 const _List_const_iterator<_Val>& __y)
33856 { return __x._M_node == __y._M_node; }
33857
33858 template<typename _Val>
33859 inline bool
33860 operator!=(const _List_iterator<_Val>& __x,
33861 const _List_const_iterator<_Val>& __y)
33862 { return __x._M_node != __y._M_node; }
33863
33864
33865
33866
33867
33868
33869
33870 template<typename _Tp, typename _Alloc>
33871 class _List_base
33872 {
33873 protected:
33874# 297 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
33875 typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
33876 _Node_alloc_type;
33877
33878 typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
33879
33880 struct _List_impl
33881 : public _Node_alloc_type
33882 {
33883 _List_node_base _M_node;
33884
33885 _List_impl(const _Node_alloc_type& __a)
33886 : _Node_alloc_type(__a), _M_node()
33887 { }
33888 };
33889
33890 _List_impl _M_impl;
33891
33892 _List_node<_Tp>*
33893 _M_get_node()
33894 { return _M_impl._Node_alloc_type::allocate(1); }
33895
33896 void
33897 _M_put_node(_List_node<_Tp>* __p)
33898 { _M_impl._Node_alloc_type::deallocate(__p, 1); }
33899
33900 public:
33901 typedef _Alloc allocator_type;
33902
33903 _Tp_alloc_type
33904 _M_get_Tp_allocator() const
33905 { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
33906
33907 allocator_type
33908 get_allocator() const
33909 { return _M_get_Tp_allocator(); }
33910
33911 _List_base(const allocator_type& __a)
33912 : _M_impl(__a)
33913 { _M_init(); }
33914
33915
33916 ~_List_base()
33917 { _M_clear(); }
33918
33919 void
33920 _M_clear();
33921
33922 void
33923 _M_init()
33924 {
33925 this->_M_impl._M_node._M_next = &this->_M_impl._M_node;
33926 this->_M_impl._M_node._M_prev = &this->_M_impl._M_node;
33927 }
33928 };
33929# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
33930 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
33931 class list : protected _List_base<_Tp, _Alloc>
33932 {
33933
33934 typedef typename _Alloc::value_type _Alloc_value_type;
33935
33936
33937
33938 typedef _List_base<_Tp, _Alloc> _Base;
33939 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
33940
33941 public:
33942 typedef _Tp value_type;
33943 typedef typename _Tp_alloc_type::pointer pointer;
33944 typedef typename _Tp_alloc_type::const_pointer const_pointer;
33945 typedef typename _Tp_alloc_type::reference reference;
33946 typedef typename _Tp_alloc_type::const_reference const_reference;
33947 typedef _List_iterator<_Tp> iterator;
33948 typedef _List_const_iterator<_Tp> const_iterator;
33949 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
33950 typedef std::reverse_iterator<iterator> reverse_iterator;
33951 typedef size_t size_type;
33952 typedef ptrdiff_t difference_type;
33953 typedef _Alloc allocator_type;
33954
33955 protected:
33956
33957
33958 typedef _List_node<_Tp> _Node;
33959
33960
33961
33962
33963
33964
33965
33966 using _Base::_M_impl;
33967 using _Base::_M_put_node;
33968 using _Base::_M_get_node;
33969 using _Base::_M_get_Tp_allocator;
33970# 445 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
33971 _Node*
33972 _M_create_node(const value_type& __x)
33973 {
33974 _Node* __p = this->_M_get_node();
33975 try
33976 {
33977 _M_get_Tp_allocator().construct(&__p->_M_data, __x);
33978 }
33979 catch(...)
33980 {
33981 _M_put_node(__p);
33982 throw;
33983 }
33984 return __p;
33985 }
33986
33987 public:
33988
33989
33990
33991
33992
33993 explicit
33994 list(const allocator_type& __a = allocator_type())
33995 : _Base(__a) { }
33996# 478 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
33997 explicit
33998 list(size_type __n, const value_type& __value = value_type(),
33999 const allocator_type& __a = allocator_type())
34000 : _Base(__a)
34001 { this->insert(begin(), __n, __value); }
34002# 491 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34003 list(const list& __x)
34004 : _Base(__x.get_allocator())
34005 { this->insert(begin(), __x.begin(), __x.end()); }
34006# 509 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34007 template<typename _InputIterator>
34008 list(_InputIterator __first, _InputIterator __last,
34009 const allocator_type& __a = allocator_type())
34010 : _Base(__a)
34011 { this->insert(begin(), __first, __last); }
34012# 530 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34013 list&
34014 operator=(const list& __x);
34015# 543 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34016 void
34017 assign(size_type __n, const value_type& __val)
34018 { _M_fill_assign(__n, __val); }
34019# 559 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34020 template<typename _InputIterator>
34021 void
34022 assign(_InputIterator __first, _InputIterator __last)
34023 {
34024
34025 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
34026 _M_assign_dispatch(__first, __last, _Integral());
34027 }
34028
34029
34030 allocator_type
34031 get_allocator() const
34032 { return _Base::get_allocator(); }
34033
34034
34035
34036
34037
34038
34039 iterator
34040 begin()
34041 { return iterator(this->_M_impl._M_node._M_next); }
34042
34043
34044
34045
34046
34047
34048 const_iterator
34049 begin() const
34050 { return const_iterator(this->_M_impl._M_node._M_next); }
34051
34052
34053
34054
34055
34056
34057 iterator
34058 end()
34059 { return iterator(&this->_M_impl._M_node); }
34060
34061
34062
34063
34064
34065
34066 const_iterator
34067 end() const
34068 { return const_iterator(&this->_M_impl._M_node); }
34069
34070
34071
34072
34073
34074
34075 reverse_iterator
34076 rbegin()
34077 { return reverse_iterator(end()); }
34078
34079
34080
34081
34082
34083
34084 const_reverse_iterator
34085 rbegin() const
34086 { return const_reverse_iterator(end()); }
34087
34088
34089
34090
34091
34092
34093 reverse_iterator
34094 rend()
34095 { return reverse_iterator(begin()); }
34096
34097
34098
34099
34100
34101
34102 const_reverse_iterator
34103 rend() const
34104 { return const_reverse_iterator(begin()); }
34105
34106
34107
34108
34109
34110
34111 bool
34112 empty() const
34113 { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
34114
34115
34116 size_type
34117 size() const
34118 { return std::distance(begin(), end()); }
34119
34120
34121 size_type
34122 max_size() const
34123 { return size_type(-1); }
34124# 674 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34125 void
34126 resize(size_type __new_size, value_type __x = value_type());
34127
34128
34129
34130
34131
34132
34133 reference
34134 front()
34135 { return *begin(); }
34136
34137
34138
34139
34140
34141 const_reference
34142 front() const
34143 { return *begin(); }
34144
34145
34146
34147
34148
34149 reference
34150 back()
34151 {
34152 iterator __tmp = end();
34153 --__tmp;
34154 return *__tmp;
34155 }
34156
34157
34158
34159
34160
34161 const_reference
34162 back() const
34163 {
34164 const_iterator __tmp = end();
34165 --__tmp;
34166 return *__tmp;
34167 }
34168# 729 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34169 void
34170 push_front(const value_type& __x)
34171 { this->_M_insert(begin(), __x); }
34172# 745 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34173 void
34174 pop_front()
34175 { this->_M_erase(begin()); }
34176# 759 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34177 void
34178 push_back(const value_type& __x)
34179 { this->_M_insert(end(), __x); }
34180# 774 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34181 void
34182 pop_back()
34183 { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
34184# 789 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34185 iterator
34186 insert(iterator __position, const value_type& __x);
34187# 805 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34188 void
34189 insert(iterator __position, size_type __n, const value_type& __x)
34190 { _M_fill_insert(__position, __n, __x); }
34191# 823 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34192 template<typename _InputIterator>
34193 void
34194 insert(iterator __position, _InputIterator __first,
34195 _InputIterator __last)
34196 {
34197
34198 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
34199 _M_insert_dispatch(__position, __first, __last, _Integral());
34200 }
34201# 848 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34202 iterator
34203 erase(iterator __position);
34204# 870 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34205 iterator
34206 erase(iterator __first, iterator __last)
34207 {
34208 while (__first != __last)
34209 __first = erase(__first);
34210 return __last;
34211 }
34212# 887 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34213 void
34214 swap(list& __x)
34215 { _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); }
34216
34217
34218
34219
34220
34221
34222
34223 void
34224 clear()
34225 {
34226 _Base::_M_clear();
34227 _Base::_M_init();
34228 }
34229# 914 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34230 void
34231 splice(iterator __position, list& __x)
34232 {
34233 if (!__x.empty())
34234 this->_M_transfer(__position, __x.begin(), __x.end());
34235 }
34236# 930 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34237 void
34238 splice(iterator __position, list&, iterator __i)
34239 {
34240 iterator __j = __i;
34241 ++__j;
34242 if (__position == __i || __position == __j)
34243 return;
34244 this->_M_transfer(__position, __i, __j);
34245 }
34246# 952 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34247 void
34248 splice(iterator __position, list&, iterator __first, iterator __last)
34249 {
34250 if (__first != __last)
34251 this->_M_transfer(__position, __first, __last);
34252 }
34253# 970 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34254 void
34255 remove(const _Tp& __value);
34256# 984 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34257 template<typename _Predicate>
34258 void
34259 remove_if(_Predicate);
34260# 998 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34261 void
34262 unique();
34263# 1013 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34264 template<typename _BinaryPredicate>
34265 void
34266 unique(_BinaryPredicate);
34267# 1026 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34268 void
34269 merge(list& __x);
34270# 1041 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34271 template<typename _StrictWeakOrdering>
34272 void
34273 merge(list&, _StrictWeakOrdering);
34274
34275
34276
34277
34278
34279
34280 void
34281 reverse()
34282 { this->_M_impl._M_node.reverse(); }
34283
34284
34285
34286
34287
34288
34289
34290 void
34291 sort();
34292
34293
34294
34295
34296
34297
34298
34299 template<typename _StrictWeakOrdering>
34300 void
34301 sort(_StrictWeakOrdering);
34302
34303 protected:
34304
34305
34306
34307 template<typename _Integer>
34308 void
34309 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
34310 {
34311 _M_fill_assign(static_cast<size_type>(__n),
34312 static_cast<value_type>(__val));
34313 }
34314
34315
34316 template<typename _InputIterator>
34317 void
34318 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
34319 __false_type);
34320
34321
34322
34323 void
34324 _M_fill_assign(size_type __n, const value_type& __val);
34325
34326
34327
34328
34329
34330 template<typename _Integer>
34331 void
34332 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
34333 __true_type)
34334 {
34335 _M_fill_insert(__pos, static_cast<size_type>(__n),
34336 static_cast<value_type>(__x));
34337 }
34338
34339
34340 template<typename _InputIterator>
34341 void
34342 _M_insert_dispatch(iterator __pos,
34343 _InputIterator __first, _InputIterator __last,
34344 __false_type)
34345 {
34346 for (; __first != __last; ++__first)
34347 _M_insert(__pos, *__first);
34348 }
34349
34350
34351
34352 void
34353 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
34354 {
34355 for (; __n > 0; --__n)
34356 _M_insert(__pos, __x);
34357 }
34358
34359
34360
34361 void
34362 _M_transfer(iterator __position, iterator __first, iterator __last)
34363 { __position._M_node->transfer(__first._M_node, __last._M_node); }
34364
34365
34366 void
34367 _M_insert(iterator __position, const value_type& __x)
34368 {
34369 _Node* __tmp = _M_create_node(__x);
34370 __tmp->hook(__position._M_node);
34371 }
34372
34373
34374 void
34375 _M_erase(iterator __position)
34376 {
34377 __position._M_node->unhook();
34378 _Node* __n = static_cast<_Node*>(__position._M_node);
34379 _M_get_Tp_allocator().destroy(&__n->_M_data);
34380 _M_put_node(__n);
34381 }
34382 };
34383# 1164 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34384 template<typename _Tp, typename _Alloc>
34385 inline bool
34386 operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
34387 {
34388 typedef typename list<_Tp, _Alloc>::const_iterator const_iterator;
34389 const_iterator __end1 = __x.end();
34390 const_iterator __end2 = __y.end();
34391
34392 const_iterator __i1 = __x.begin();
34393 const_iterator __i2 = __y.begin();
34394 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
34395 {
34396 ++__i1;
34397 ++__i2;
34398 }
34399 return __i1 == __end1 && __i2 == __end2;
34400 }
34401# 1193 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_list.h" 3
34402 template<typename _Tp, typename _Alloc>
34403 inline bool
34404 operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
34405 { return std::lexicographical_compare(__x.begin(), __x.end(),
34406 __y.begin(), __y.end()); }
34407
34408
34409 template<typename _Tp, typename _Alloc>
34410 inline bool
34411 operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
34412 { return !(__x == __y); }
34413
34414
34415 template<typename _Tp, typename _Alloc>
34416 inline bool
34417 operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
34418 { return __y < __x; }
34419
34420
34421 template<typename _Tp, typename _Alloc>
34422 inline bool
34423 operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
34424 { return !(__y < __x); }
34425
34426
34427 template<typename _Tp, typename _Alloc>
34428 inline bool
34429 operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
34430 { return !(__x < __y); }
34431
34432
34433 template<typename _Tp, typename _Alloc>
34434 inline void
34435 swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
34436 { __x.swap(__y); }
34437}
34438# 72 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/list" 2 3
34439
34440
34441# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/list.tcc" 1 3
34442# 64 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/list.tcc" 3
34443namespace std
34444{
34445 template<typename _Tp, typename _Alloc>
34446 void
34447 _List_base<_Tp, _Alloc>::
34448 _M_clear()
34449 {
34450 typedef _List_node<_Tp> _Node;
34451 _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next);
34452 while (__cur != &this->_M_impl._M_node)
34453 {
34454 _Node* __tmp = __cur;
34455 __cur = static_cast<_Node*>(__cur->_M_next);
34456 _M_get_Tp_allocator().destroy(&__tmp->_M_data);
34457 _M_put_node(__tmp);
34458 }
34459 }
34460
34461 template<typename _Tp, typename _Alloc>
34462 typename list<_Tp, _Alloc>::iterator
34463 list<_Tp, _Alloc>::
34464 insert(iterator __position, const value_type& __x)
34465 {
34466 _Node* __tmp = _M_create_node(__x);
34467 __tmp->hook(__position._M_node);
34468 return iterator(__tmp);
34469 }
34470
34471 template<typename _Tp, typename _Alloc>
34472 typename list<_Tp, _Alloc>::iterator
34473 list<_Tp, _Alloc>::
34474 erase(iterator __position)
34475 {
34476 iterator __ret = iterator(__position._M_node->_M_next);
34477 _M_erase(__position);
34478 return __ret;
34479 }
34480
34481 template<typename _Tp, typename _Alloc>
34482 void
34483 list<_Tp, _Alloc>::
34484 resize(size_type __new_size, value_type __x)
34485 {
34486 iterator __i = begin();
34487 size_type __len = 0;
34488 for (; __i != end() && __len < __new_size; ++__i, ++__len)
34489 ;
34490 if (__len == __new_size)
34491 erase(__i, end());
34492 else
34493 insert(end(), __new_size - __len, __x);
34494 }
34495
34496 template<typename _Tp, typename _Alloc>
34497 list<_Tp, _Alloc>&
34498 list<_Tp, _Alloc>::
34499 operator=(const list& __x)
34500 {
34501 if (this != &__x)
34502 {
34503 iterator __first1 = begin();
34504 iterator __last1 = end();
34505 const_iterator __first2 = __x.begin();
34506 const_iterator __last2 = __x.end();
34507 for (; __first1 != __last1 && __first2 != __last2;
34508 ++__first1, ++__first2)
34509 *__first1 = *__first2;
34510 if (__first2 == __last2)
34511 erase(__first1, __last1);
34512 else
34513 insert(__last1, __first2, __last2);
34514 }
34515 return *this;
34516 }
34517
34518 template<typename _Tp, typename _Alloc>
34519 void
34520 list<_Tp, _Alloc>::
34521 _M_fill_assign(size_type __n, const value_type& __val)
34522 {
34523 iterator __i = begin();
34524 for (; __i != end() && __n > 0; ++__i, --__n)
34525 *__i = __val;
34526 if (__n > 0)
34527 insert(end(), __n, __val);
34528 else
34529 erase(__i, end());
34530 }
34531
34532 template<typename _Tp, typename _Alloc>
34533 template <typename _InputIterator>
34534 void
34535 list<_Tp, _Alloc>::
34536 _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
34537 __false_type)
34538 {
34539 iterator __first1 = begin();
34540 iterator __last1 = end();
34541 for (; __first1 != __last1 && __first2 != __last2;
34542 ++__first1, ++__first2)
34543 *__first1 = *__first2;
34544 if (__first2 == __last2)
34545 erase(__first1, __last1);
34546 else
34547 insert(__last1, __first2, __last2);
34548 }
34549
34550 template<typename _Tp, typename _Alloc>
34551 void
34552 list<_Tp, _Alloc>::
34553 remove(const value_type& __value)
34554 {
34555 iterator __first = begin();
34556 iterator __last = end();
34557 while (__first != __last)
34558 {
34559 iterator __next = __first;
34560 ++__next;
34561 if (*__first == __value)
34562 _M_erase(__first);
34563 __first = __next;
34564 }
34565 }
34566
34567 template<typename _Tp, typename _Alloc>
34568 void
34569 list<_Tp, _Alloc>::
34570 unique()
34571 {
34572 iterator __first = begin();
34573 iterator __last = end();
34574 if (__first == __last)
34575 return;
34576 iterator __next = __first;
34577 while (++__next != __last)
34578 {
34579 if (*__first == *__next)
34580 _M_erase(__next);
34581 else
34582 __first = __next;
34583 __next = __first;
34584 }
34585 }
34586
34587 template<typename _Tp, typename _Alloc>
34588 void
34589 list<_Tp, _Alloc>::
34590 merge(list& __x)
34591 {
34592
34593
34594 if (this != &__x)
34595 {
34596 iterator __first1 = begin();
34597 iterator __last1 = end();
34598 iterator __first2 = __x.begin();
34599 iterator __last2 = __x.end();
34600 while (__first1 != __last1 && __first2 != __last2)
34601 if (*__first2 < *__first1)
34602 {
34603 iterator __next = __first2;
34604 _M_transfer(__first1, __first2, ++__next);
34605 __first2 = __next;
34606 }
34607 else
34608 ++__first1;
34609 if (__first2 != __last2)
34610 _M_transfer(__last1, __first2, __last2);
34611 }
34612 }
34613
34614 template<typename _Tp, typename _Alloc>
34615 void
34616 list<_Tp, _Alloc>::
34617 sort()
34618 {
34619
34620 if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
34621 && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
34622 {
34623 list __carry;
34624 list __tmp[64];
34625 list * __fill = &__tmp[0];
34626 list * __counter;
34627
34628 do
34629 {
34630 __carry.splice(__carry.begin(), *this, begin());
34631
34632 for(__counter = &__tmp[0];
34633 __counter != __fill && !__counter->empty();
34634 ++__counter)
34635 {
34636 __counter->merge(__carry);
34637 __carry.swap(*__counter);
34638 }
34639 __carry.swap(*__counter);
34640 if (__counter == __fill)
34641 ++__fill;
34642 }
34643 while ( !empty() );
34644
34645 for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
34646 __counter->merge(*(__counter - 1));
34647 swap( *(__fill - 1) );
34648 }
34649 }
34650
34651 template<typename _Tp, typename _Alloc>
34652 template <typename _Predicate>
34653 void
34654 list<_Tp, _Alloc>::
34655 remove_if(_Predicate __pred)
34656 {
34657 iterator __first = begin();
34658 iterator __last = end();
34659 while (__first != __last)
34660 {
34661 iterator __next = __first;
34662 ++__next;
34663 if (__pred(*__first))
34664 _M_erase(__first);
34665 __first = __next;
34666 }
34667 }
34668
34669 template<typename _Tp, typename _Alloc>
34670 template <typename _BinaryPredicate>
34671 void
34672 list<_Tp, _Alloc>::
34673 unique(_BinaryPredicate __binary_pred)
34674 {
34675 iterator __first = begin();
34676 iterator __last = end();
34677 if (__first == __last)
34678 return;
34679 iterator __next = __first;
34680 while (++__next != __last)
34681 {
34682 if (__binary_pred(*__first, *__next))
34683 _M_erase(__next);
34684 else
34685 __first = __next;
34686 __next = __first;
34687 }
34688 }
34689
34690 template<typename _Tp, typename _Alloc>
34691 template <typename _StrictWeakOrdering>
34692 void
34693 list<_Tp, _Alloc>::
34694 merge(list& __x, _StrictWeakOrdering __comp)
34695 {
34696
34697
34698 if (this != &__x)
34699 {
34700 iterator __first1 = begin();
34701 iterator __last1 = end();
34702 iterator __first2 = __x.begin();
34703 iterator __last2 = __x.end();
34704 while (__first1 != __last1 && __first2 != __last2)
34705 if (__comp(*__first2, *__first1))
34706 {
34707 iterator __next = __first2;
34708 _M_transfer(__first1, __first2, ++__next);
34709 __first2 = __next;
34710 }
34711 else
34712 ++__first1;
34713 if (__first2 != __last2)
34714 _M_transfer(__last1, __first2, __last2);
34715 }
34716 }
34717
34718 template<typename _Tp, typename _Alloc>
34719 template <typename _StrictWeakOrdering>
34720 void
34721 list<_Tp, _Alloc>::
34722 sort(_StrictWeakOrdering __comp)
34723 {
34724
34725 if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
34726 && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
34727 {
34728 list __carry;
34729 list __tmp[64];
34730 list * __fill = &__tmp[0];
34731 list * __counter;
34732
34733 do
34734 {
34735 __carry.splice(__carry.begin(), *this, begin());
34736
34737 for(__counter = &__tmp[0];
34738 __counter != __fill && !__counter->empty();
34739 ++__counter)
34740 {
34741 __counter->merge(__carry, __comp);
34742 __carry.swap(*__counter);
34743 }
34744 __carry.swap(*__counter);
34745 if (__counter == __fill)
34746 ++__fill;
34747 }
34748 while ( !empty() );
34749
34750 for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
34751 __counter->merge(*(__counter - 1), __comp);
34752 swap(*(__fill - 1));
34753 }
34754 }
34755}
34756# 75 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/list" 2 3
34757
34758
34759
34760
34761
34762
34763#pragma GCC visibility pop
34764# 23 "jasmin.h" 2
34765
34766
34767namespace jl { namespace jvm {;
34768
34769char *QuoteString(char *s);
34770# 36 "jasmin.h"
34771class Instruction;
34772typedef std::list<Instruction*> instList;
34773
34774typedef instList::iterator Label;
34775
34776enum opcode
34777{
34778
34779 jvm_ret,
34780 jvm_aload,
34781 jvm_astore,
34782 jvm_dload,
34783 jvm_dstore,
34784 jvm_fload,
34785 jvm_fstore,
34786 jvm_iload,
34787 jvm_istore,
34788 jvm_lload,
34789 jvm_lstore,
34790
34791 jvm_bipush,
34792 jvm_sipush,
34793
34794 jvm_iinc,
34795
34796 jvm_goto,
34797 jvm_goto_w,
34798 jvm_if_acmpeq,
34799 jvm_if_acmpne,
34800 jvm_if_icmpeq,
34801 jvm_if_icmpge,
34802 jvm_if_icmpgt,
34803 jvm_if_icmple,
34804 jvm_if_icmplt,
34805 jvm_if_icmpne,
34806 jvm_ifeq,
34807 jvm_ifge,
34808 jvm_ifgt,
34809 jvm_ifle,
34810 jvm_iflt,
34811 jvm_ifne,
34812 jvm_ifnonnull,
34813 jvm_ifnull,
34814 jvm_jsr,
34815 jvm_jsr_w,
34816
34817 jvm_anewarray,
34818 jvm_checkcast,
34819 jvm_instanceof,
34820 jvm_new,
34821
34822 jvm_invokenonvirtual,
34823 jvm_invokestatic,
34824 jvm_invokevirtual,
34825 jvm_invokeinterface,
34826
34827 jvm_getfield,
34828 jvm_getstatic,
34829 jvm_putfield,
34830 jvm_putstatic,
34831
34832 jvm_newarray,
34833 jvm_multianewarray,
34834
34835 jvm_ldc,
34836 jvm_ldc_w,
34837 jvm_ldc2_w,
34838
34839 jvm_lookupswitch,
34840
34841 jvm_tableswitch,
34842
34843
34844 jvm_aaload,
34845 jvm_aastore,
34846 jvm_aconst_null,
34847 jvm_aload_0,
34848 jvm_aload_1,
34849 jvm_aload_2,
34850 jvm_aload_3,
34851 jvm_areturn,
34852 jvm_arraylength,
34853 jvm_astore_0,
34854 jvm_astore_1,
34855 jvm_astore_2,
34856 jvm_astore_3,
34857 jvm_athrow,
34858 jvm_baload,
34859 jvm_bastore,
34860 jvm_breakpoint,
34861 jvm_caload,
34862 jvm_castore,
34863 jvm_d2f,
34864 jvm_d2i,
34865 jvm_d2l,
34866 jvm_dadd,
34867 jvm_daload,
34868 jvm_dastore,
34869 jvm_dcmpg,
34870 jvm_dcmpl,
34871 jvm_dconst_0,
34872 jvm_dconst_1,
34873 jvm_ddiv,
34874 jvm_dload_0,
34875 jvm_dload_1,
34876 jvm_dload_2,
34877 jvm_dload_3,
34878 jvm_dmul,
34879 jvm_dneg,
34880 jvm_drem,
34881 jvm_dreturn,
34882 jvm_dstore_0,
34883 jvm_dstore_1,
34884 jvm_dstore_2,
34885 jvm_dstore_3,
34886 jvm_dsub,
34887 jvm_dup,
34888 jvm_dup2,
34889 jvm_dup2_x1,
34890 jvm_dup2_x2,
34891 jvm_dup_x1,
34892 jvm_dup_x2,
34893 jvm_f2d,
34894 jvm_f2i,
34895 jvm_f2l,
34896 jvm_fadd,
34897 jvm_faload,
34898 jvm_fastore,
34899 jvm_fcmpg,
34900 jvm_fcmpl,
34901 jvm_fconst_0,
34902 jvm_fconst_1,
34903 jvm_fconst_2,
34904 jvm_fdiv,
34905 jvm_fload_0,
34906 jvm_fload_1,
34907 jvm_fload_2,
34908 jvm_fload_3,
34909 jvm_fmul,
34910 jvm_fneg,
34911 jvm_frem,
34912 jvm_freturn,
34913 jvm_fstore_0,
34914 jvm_fstore_1,
34915 jvm_fstore_2,
34916 jvm_fstore_3,
34917 jvm_fsub,
34918 jvm_i2d,
34919 jvm_i2f,
34920 jvm_i2l,
34921 jvm_iadd,
34922 jvm_iaload,
34923 jvm_iand,
34924 jvm_iastore,
34925 jvm_iconst_0,
34926 jvm_iconst_1,
34927 jvm_iconst_2,
34928 jvm_iconst_3,
34929 jvm_iconst_4,
34930 jvm_iconst_5,
34931 jvm_iconst_m1,
34932 jvm_idiv,
34933 jvm_iload_0,
34934 jvm_iload_1,
34935 jvm_iload_2,
34936 jvm_iload_3,
34937 jvm_imul,
34938 jvm_ineg,
34939 jvm_int2byte,
34940 jvm_int2char,
34941 jvm_int2short,
34942 jvm_ior,
34943 jvm_irem,
34944 jvm_ireturn,
34945 jvm_ishl,
34946 jvm_ishr,
34947 jvm_istore_0,
34948 jvm_istore_1,
34949 jvm_istore_2,
34950 jvm_istore_3,
34951 jvm_isub,
34952 jvm_iushr,
34953 jvm_ixor,
34954 jvm_l2d,
34955 jvm_l2f,
34956 jvm_l2i,
34957 jvm_ladd,
34958 jvm_laload,
34959 jvm_land,
34960 jvm_lastore,
34961 jvm_lcmp,
34962 jvm_lconst_0,
34963 jvm_lconst_1,
34964 jvm_ldiv,
34965 jvm_lload_0,
34966 jvm_lload_1,
34967 jvm_lload_2,
34968 jvm_lload_3,
34969 jvm_lmul,
34970 jvm_lneg,
34971 jvm_lor,
34972 jvm_lrem,
34973 jvm_lreturn,
34974 jvm_lshl,
34975 jvm_lshr,
34976 jvm_lstore_0,
34977 jvm_lstore_1,
34978 jvm_lstore_2,
34979 jvm_lstore_3,
34980 jvm_lsub,
34981 jvm_lushr,
34982 jvm_lxor,
34983 jvm_monitorenter,
34984 jvm_monitorexit,
34985 jvm_nop,
34986 jvm_pop,
34987 jvm_pop2,
34988 jvm_return,
34989 jvm_saload,
34990 jvm_sastore,
34991 jvm_swap
34992};
34993
34994
34995
34996class Instruction
34997{
34998private:
34999 int m_source_line;
35000public:
35001 int GetSourceLine();
35002 virtual const char *GetInstruction() = 0;
35003 virtual const int GetStackChange() = 0;
35004protected:
35005 Instruction(int aSourceLine) : m_source_line (aSourceLine) {}
35006};
35007
35008template <opcode OP> class JVMInst : public Instruction
35009{
35010public:
35011 JVMInst(int aSourceLine) : Instruction(aSourceLine) {};
35012 ~JVMInst() {};
35013public:
35014 virtual const char *GetInstruction() {return "INVALID";}
35015 opcode GetOpcode() {return OP;}
35016 virtual const int GetStackChange() {return 0;}
35017};
35018
35019class FieldArg
35020{
35021private:
35022 char *m_field;
35023 char *m_descriptor;
35024public:
35025 FieldArg(char *aField, char *aDescriptor)
35026 {
35027 int l1 = strlen(aField), l2 = strlen(aDescriptor);
35028 m_field = new char[l1 + l2 + 2];
35029 memcpy(m_field,aField,l1);
35030 m_field[l1] = ' ';
35031 m_descriptor = m_field+l1+1;
35032 memcpy(m_descriptor, aDescriptor, l2+1);
35033 }
35034 ~FieldArg()
35035 {
35036 if (m_field)
35037 {
35038 delete []m_field;
35039 m_field = m_descriptor = __null;
35040 }
35041 }
35042
35043 const char *GetString() {return m_field;}
35044 int GetValueSize()
35045 {
35046 switch (*m_descriptor)
35047 {
35048 case 'D':
35049 case 'J':
35050 return 2;
35051 default:
35052 return 1;
35053 }
35054 }
35055};
35056
35057class IincArg
35058{
35059private:
35060 char *m_string;
35061 int m_var;
35062 int m_ammount;
35063public:
35064 IincArg(int aVar, int aAmmount) : m_var(aVar), m_ammount(aAmmount),m_string(__null) {}
35065 ~IincArg() { if (m_string) delete []m_string; m_string = 0;}
35066 const char *GetString()
35067 {
35068 if (m_string) return m_string;
35069 m_string = new char[m_var/10+1 +((m_ammount >= 0) ? m_ammount/10 +1 : m_ammount / 10 + 2) +1 ];
35070 sprintf(m_string, "%d %d", m_var, m_ammount);
35071 return m_string;
35072 }
35073};
35074
35075class LabelArg
35076{
35077private:
35078 Label m_label;
35079public:
35080 const char *GetString() {return "-- NOT IMPLEMENTED --";};
35081};
35082
35083class StringArg
35084{
35085private:
35086 char *m_string;
35087public:
35088 StringArg(StringArg &s) { m_string = strdup(s.m_string);}
35089 StringArg(char *aString) { m_string = strdup(aString);}
35090 ~StringArg() {free(m_string);m_string = __null;}
35091 const char *GetString() {return m_string;};
35092};
35093
35094typedef StringArg ClassArg;
35095typedef StringArg ArrayTypeArg;
35096
35097class MethodSpecArg
35098{
35099private:
35100 char *m_class;
35101 char *m_method;
35102 char *m_descriptor;
35103public:
35104 MethodSpecArg(char *aClass, char *aMethod, char*aDescriptor)
35105 {
35106 int l1 = strlen(aClass);
35107 int l2 = strlen(aMethod);
35108 int l3 = strlen(aDescriptor);
35109
35110 m_class = new char[l1+l2+l3+2];
35111 memcpy(m_class,aClass,l1);
35112 m_method = m_class+l1;
35113 *m_method++='/';
35114 memcpy(m_method,aMethod,l3);
35115 m_descriptor = m_method + l3;
35116 memcpy(m_descriptor, aDescriptor,l3+1);
35117 }
35118 MethodSpecArg(MethodSpecArg &m)
35119 {
35120 m_class = new char[strlen(m.m_class)];
35121 strcpy(m_class,m.m_class);
35122 m_method = m_class + (m.m_method - m.m_class);
35123 m_descriptor = m_class + (m.m_descriptor - m.m_class);
35124 }
35125 ~MethodSpecArg()
35126 {
35127 delete []m_class;
35128 }
35129 const char *GetString() {return m_class;};
35130 unsigned int ArgStackSize();
35131};
35132
35133
35134class InterfaceArg
35135{
35136private:
35137 MethodSpecArg m_method;
35138 unsigned int m_num_args;
35139 char *m_string;
35140public:
35141 InterfaceArg(MethodSpecArg a) : m_method(a), m_string(__null) {m_num_args = a.ArgStackSize();}
35142 ~InterfaceArg() {if (m_string) delete m_string; m_string = __null;}
35143
35144 const char *GetString() {
35145 if (m_string) return m_string;
35146 m_string = new char[strlen(m_method.GetString()) + m_num_args/10 + 2];
35147 sprintf(m_string, "%s %d", m_method.GetString(), m_num_args);
35148 return m_string;
35149 }
35150
35151 unsigned int ArgStackSize()
35152 {
35153 return m_num_args;
35154 }
35155};
35156
35157class MultiANewArrayArg
35158{
35159private:
35160 char *m_descriptor;
35161 unsigned int m_num_dim;
35162 char *m_string;
35163public:
35164 MultiANewArrayArg(char *aDesc, unsigned int aNum) : m_num_dim(aNum), m_string(__null) {m_descriptor = strdup(aDesc); }
35165 ~MultiANewArrayArg() {if (m_string) delete m_string; m_string = __null; if (m_descriptor) free( m_descriptor ); m_descriptor = __null;}
35166
35167 const char *GetString() {
35168 if (m_string) return m_string;
35169 m_string = new char[strlen(m_descriptor) + m_num_dim/10 + 2];
35170 sprintf(m_string, "%s %d", m_descriptor, m_num_dim);
35171 return m_string;
35172 }
35173
35174 unsigned int ArgStackSize()
35175 {
35176 return m_num_dim;
35177 }
35178};
35179
35180class TConstantArg
35181{
35182public:
35183 TConstantArg() {}
35184 ~TConstantArg() {}
35185public:
35186 virtual const char *GetString() = 0;
35187 virtual jl::ast::TypeId GetConstantType() const = 0;
35188};
35189
35190template <typename T> class ConstantArgT : public TConstantArg
35191{
35192private:
35193 T m_value;
35194 char *m_string;
35195public:
35196 ConstantArgT(T aValue) : m_value(aValue), m_string(__null) {}
35197 ~ConstantArgT() {}
35198 virtual jl::ast::TypeId GetConstantType() const
35199 {
35200 return jl::ast::Type2TypeId<T>::GetTypeId();
35201 }
35202
35203 const T& GetConstant() const
35204 {
35205 return m_value;
35206 }
35207 virtual const char *GetString();
35208};
35209
35210
35211class LookupSwitchArg
35212{
35213public:
35214 typedef __gnu_cxx::hash<int> hashFunc;
35215 struct hashComp
35216 {
35217 bool operator() ( int aI1, int aI2 ) const
35218 {
35219 return ( aI1 == aI2 );
35220 }
35221 };
35222 typedef __gnu_cxx::hash_map<int, Label, hashFunc, hashComp> LabelMap;
35223private:
35224 LabelMap m_map;
35225 Label m_default;
35226public:
35227 LookupSwitchArg(LabelMap aMap, Label aDefault) : m_map(aMap), m_default(aDefault) {}
35228 ~LookupSwitchArg() {}
35229
35230 char *GetString() {return "-- NOT IMPLEMENTED --";}
35231};
35232
35233class TableSwitchArg
35234{
35235public:
35236 typedef std::list<Label> LabelList;
35237private:
35238 int m_low;
35239 LabelList m_labels;
35240 Label m_default;
35241public:
35242 TableSwitchArg(int aLow, LabelList aList, Label aDefault) : m_low(aLow), m_default(aDefault), m_labels(aList) {}
35243 ~TableSwitchArg() {}
35244
35245 char *GetString() {return "-- NOT IMPLEMENTED --";}
35246};
35247
35248
35249class ConstantArg
35250{
35251private:
35252 TConstantArg *m_arg;
35253public:
35254 ConstantArg(int aT) {m_arg = new ConstantArgT<int>(aT);};
35255 ConstantArg(bool aT) {m_arg = new ConstantArgT<bool>(aT);};
35256 ConstantArg(double aT) {m_arg = new ConstantArgT<double>(aT);};
35257 ConstantArg(char* aT) {m_arg = new ConstantArgT<char*>(aT);};
35258 ~ConstantArg() {delete m_arg;}
35259 const char *GetString() {return m_arg->GetString();}
35260};
35261# 576 "jasmin.h"
35262template<> class JVMInst<jvm_ret> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ret")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "ret", m_arg); return m_instruction; } virtual const int GetStackChange() { return 0; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35263template<> class JVMInst<jvm_aload> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("aload")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "aload", m_arg); return m_instruction; } virtual const int GetStackChange() { return +1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35264template<> class JVMInst<jvm_astore> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("astore")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "astore", m_arg); return m_instruction; } virtual const int GetStackChange() { return -1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35265template<> class JVMInst<jvm_dload> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("dload")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "dload", m_arg); return m_instruction; } virtual const int GetStackChange() { return +2; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35266template<> class JVMInst<jvm_dstore> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("dstore")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "dstore", m_arg); return m_instruction; } virtual const int GetStackChange() { return -2; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35267template<> class JVMInst<jvm_fload> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("fload")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "fload", m_arg); return m_instruction; } virtual const int GetStackChange() { return +1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35268template<> class JVMInst<jvm_fstore> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("fstore")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "fstore", m_arg); return m_instruction; } virtual const int GetStackChange() { return -1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35269template<> class JVMInst<jvm_iload> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("iload")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "iload", m_arg); return m_instruction; } virtual const int GetStackChange() { return +1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35270template<> class JVMInst<jvm_istore> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("istore")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "istore", m_arg); return m_instruction; } virtual const int GetStackChange() { return -1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35271template<> class JVMInst<jvm_lload> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("lload")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "lload", m_arg); return m_instruction; } virtual const int GetStackChange() { return +2; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35272template<> class JVMInst<jvm_lstore> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("lstore")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "lstore", m_arg); return m_instruction; } virtual const int GetStackChange() { return -2; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35273
35274
35275template<> class JVMInst<jvm_bipush> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("bipush")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "bipush", m_arg); return m_instruction; } virtual const int GetStackChange() { return +1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35276template<> class JVMInst<jvm_sipush> : public Instruction { private: int m_arg; char *m_instruction; public: JVMInst(int aSourceLine, int aArg) : Instruction(aSourceLine), m_arg(aArg), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("sipush")+(m_arg >= 0 ? m_arg/10 +1 : -m_arg/10 +2) +2]; sprintf(m_instruction, "%s %d", "sipush", m_arg); return m_instruction; } virtual const int GetStackChange() { return +1; } int GetArg() {return m_arg;} void SetArg(int aArg) {m_arg = aArg; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35277
35278template<> class JVMInst<jvm_iinc> : public Instruction { private: IincArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, IincArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("iinc")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "iinc", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return 0; } IincArg GetArgs() {return m_args;} void SetArgs(IincArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35279
35280template<> class JVMInst<jvm_goto> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("goto")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "goto", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return 0; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35281template<> class JVMInst<jvm_goto_w> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("goto_w")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "goto_w", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return 0; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35282template<> class JVMInst<jvm_if_acmpeq> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_acmpeq")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_acmpeq", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35283template<> class JVMInst<jvm_if_acmpne> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_acmpne")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_acmpne", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35284template<> class JVMInst<jvm_if_icmpeq> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_icmpeq")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_icmpeq", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35285template<> class JVMInst<jvm_if_icmpge> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_icmpge")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_icmpge", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35286template<> class JVMInst<jvm_if_icmpgt> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_icmpgt")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_icmpgt", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35287template<> class JVMInst<jvm_if_icmple> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_icmple")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_icmple", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35288template<> class JVMInst<jvm_if_icmplt> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_icmplt")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_icmplt", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35289template<> class JVMInst<jvm_if_icmpne> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("if_icmpne")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "if_icmpne", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -2; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35290template<> class JVMInst<jvm_ifeq> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ifeq")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ifeq", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35291template<> class JVMInst<jvm_ifge> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ifge")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ifge", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35292template<> class JVMInst<jvm_ifgt> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ifgt")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ifgt", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35293template<> class JVMInst<jvm_ifle> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ifle")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ifle", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35294template<> class JVMInst<jvm_iflt> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("iflt")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "iflt", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35295template<> class JVMInst<jvm_ifne> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ifne")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ifne", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35296template<> class JVMInst<jvm_ifnonnull> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ifnonnull")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ifnonnull", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35297template<> class JVMInst<jvm_ifnull> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ifnull")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ifnull", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35298template<> class JVMInst<jvm_jsr> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("jsr")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "jsr", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return +1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35299template<> class JVMInst<jvm_jsr_w> : public Instruction { private: LabelArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LabelArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("jsr_w")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "jsr_w", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return +1; } LabelArg GetArgs() {return m_args;} void SetArgs(LabelArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35300
35301template<> class JVMInst<jvm_anewarray> : public Instruction { private: ClassArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ClassArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("anewarray")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "anewarray", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return 0; } ClassArg GetArgs() {return m_args;} void SetArgs(ClassArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35302template<> class JVMInst<jvm_checkcast> : public Instruction { private: ClassArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ClassArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("checkcast")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "checkcast", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return 0; } ClassArg GetArgs() {return m_args;} void SetArgs(ClassArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35303template<> class JVMInst<jvm_instanceof> : public Instruction { private: ClassArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ClassArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("instanceof")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "instanceof", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return 0; } ClassArg GetArgs() {return m_args;} void SetArgs(ClassArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35304template<> class JVMInst<jvm_new> : public Instruction { private: ClassArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ClassArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("new")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "new", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return +1; } ClassArg GetArgs() {return m_args;} void SetArgs(ClassArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35305
35306template<> class JVMInst<jvm_invokenonvirtual> : public Instruction { private: MethodSpecArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, MethodSpecArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("invokenonvirtual")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "invokenonvirtual", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return (-1-m_args.ArgStackSize()); } MethodSpecArg GetArgs() {return m_args;} void SetArgs(MethodSpecArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35307template<> class JVMInst<jvm_invokestatic> : public Instruction { private: MethodSpecArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, MethodSpecArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("invokestatic")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "invokestatic", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return (-m_args.ArgStackSize()); } MethodSpecArg GetArgs() {return m_args;} void SetArgs(MethodSpecArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35308template<> class JVMInst<jvm_invokevirtual> : public Instruction { private: MethodSpecArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, MethodSpecArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("invokevirtual")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "invokevirtual", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return (-1-m_args.ArgStackSize()); } MethodSpecArg GetArgs() {return m_args;} void SetArgs(MethodSpecArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35309
35310template<> class JVMInst<jvm_invokeinterface> : public Instruction { private: InterfaceArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, InterfaceArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("invokeinterface")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "invokeinterface", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return (-1-m_args.ArgStackSize()); } InterfaceArg GetArgs() {return m_args;} void SetArgs(InterfaceArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35311
35312template<> class JVMInst<jvm_getfield> : public Instruction { private: FieldArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, FieldArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("getfield")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "getfield", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return (-1+m_args.GetValueSize()); } FieldArg GetArgs() {return m_args;} void SetArgs(FieldArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35313template<> class JVMInst<jvm_getstatic> : public Instruction { private: FieldArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, FieldArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("getstatic")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "getstatic", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return m_args.GetValueSize(); } FieldArg GetArgs() {return m_args;} void SetArgs(FieldArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35314template<> class JVMInst<jvm_putfield> : public Instruction { private: FieldArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, FieldArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("putfield")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "putfield", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return (-1-m_args.GetValueSize()); } FieldArg GetArgs() {return m_args;} void SetArgs(FieldArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35315template<> class JVMInst<jvm_putstatic> : public Instruction { private: FieldArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, FieldArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("putstatic")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "putstatic", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -m_args.GetValueSize(); } FieldArg GetArgs() {return m_args;} void SetArgs(FieldArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35316
35317template<> class JVMInst<jvm_newarray> : public Instruction { private: ArrayTypeArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ArrayTypeArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("newarray")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "newarray", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return 0; } ArrayTypeArg GetArgs() {return m_args;} void SetArgs(ArrayTypeArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35318
35319template<> class JVMInst<jvm_multianewarray> : public Instruction { private: MultiANewArrayArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, MultiANewArrayArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("multianewarray")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "multianewarray", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -m_args.ArgStackSize(); } MultiANewArrayArg GetArgs() {return m_args;} void SetArgs(MultiANewArrayArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35320
35321template<> class JVMInst<jvm_ldc> : public Instruction { private: ConstantArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ConstantArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ldc")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ldc", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return +1; } ConstantArg GetArgs() {return m_args;} void SetArgs(ConstantArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35322template<> class JVMInst<jvm_ldc_w> : public Instruction { private: ConstantArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ConstantArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ldc_w")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ldc_w", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return +1; } ConstantArg GetArgs() {return m_args;} void SetArgs(ConstantArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35323template<> class JVMInst<jvm_ldc2_w> : public Instruction { private: ConstantArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, ConstantArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("ldc2_w")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "ldc2_w", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return +2; } ConstantArg GetArgs() {return m_args;} void SetArgs(ConstantArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35324
35325template<> class JVMInst<jvm_lookupswitch> : public Instruction { private: LookupSwitchArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, LookupSwitchArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("lookupswitch")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "lookupswitch", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } LookupSwitchArg GetArgs() {return m_args;} void SetArgs(LookupSwitchArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35326template<> class JVMInst<jvm_tableswitch> : public Instruction { private: TableSwitchArg m_args; char *m_instruction; public: JVMInst(int aSourceLine, TableSwitchArg aArgs) : Instruction(aSourceLine), m_args(aArgs), m_instruction(__null) {} ~JVMInst() {if (m_instruction) delete [] m_instruction; m_instruction = 0; } virtual const char *GetInstruction() { if (m_instruction) { return m_instruction; } m_instruction = new char[strlen("tableswitch")+strlen(m_args.GetString())+2]; sprintf(m_instruction, "%s %s", "tableswitch", m_args.GetString()); return m_instruction; } virtual const int GetStackChange() { return -1; } TableSwitchArg GetArgs() {return m_args;} void SetArgs(TableSwitchArg aArgs) {m_args = aArgs; if (m_instruction) delete [] m_instruction; m_instruction = 0; } };
35327
35328template<> class JVMInst<jvm_aaload> { virtual const char *GetInstruction() {return "aaload";} virtual const int GetStackChange() {return -1;} };
35329template<> class JVMInst<jvm_aastore> { virtual const char *GetInstruction() {return "aastore";} virtual const int GetStackChange() {return -3;} };
35330template<> class JVMInst<jvm_aconst_null> { virtual const char *GetInstruction() {return "aconst_null";} virtual const int GetStackChange() {return +1;} };
35331template<> class JVMInst<jvm_aload_0> { virtual const char *GetInstruction() {return "aload_0";} virtual const int GetStackChange() {return +1;} };
35332template<> class JVMInst<jvm_aload_1> { virtual const char *GetInstruction() {return "aload_1";} virtual const int GetStackChange() {return +1;} };
35333template<> class JVMInst<jvm_aload_2> { virtual const char *GetInstruction() {return "aload_2";} virtual const int GetStackChange() {return +1;} };
35334template<> class JVMInst<jvm_aload_3> { virtual const char *GetInstruction() {return "aload_3";} virtual const int GetStackChange() {return +1;} };
35335template<> class JVMInst<jvm_areturn> { virtual const char *GetInstruction() {return "areturn";} virtual const int GetStackChange() {return -1;} };
35336template<> class JVMInst<jvm_arraylength> { virtual const char *GetInstruction() {return "arraylength";} virtual const int GetStackChange() {return 0;} };
35337template<> class JVMInst<jvm_astore_0> { virtual const char *GetInstruction() {return "astore_0";} virtual const int GetStackChange() {return -1;} };
35338template<> class JVMInst<jvm_astore_1> { virtual const char *GetInstruction() {return "astore_1";} virtual const int GetStackChange() {return -1;} };
35339template<> class JVMInst<jvm_astore_2> { virtual const char *GetInstruction() {return "astore_2";} virtual const int GetStackChange() {return -1;} };
35340template<> class JVMInst<jvm_astore_3> { virtual const char *GetInstruction() {return "astore_3";} virtual const int GetStackChange() {return -1;} };
35341template<> class JVMInst<jvm_athrow> { virtual const char *GetInstruction() {return "athrow";} virtual const int GetStackChange() {return 0;} };
35342template<> class JVMInst<jvm_baload> { virtual const char *GetInstruction() {return "baload";} virtual const int GetStackChange() {return -1;} };
35343template<> class JVMInst<jvm_bastore> { virtual const char *GetInstruction() {return "bastore";} virtual const int GetStackChange() {return -3;} };
35344template<> class JVMInst<jvm_breakpoint> { virtual const char *GetInstruction() {return "breakpoint";} virtual const int GetStackChange() {return 0;} };
35345template<> class JVMInst<jvm_caload> { virtual const char *GetInstruction() {return "caload";} virtual const int GetStackChange() {return -1;} };
35346template<> class JVMInst<jvm_castore> { virtual const char *GetInstruction() {return "castore";} virtual const int GetStackChange() {return -3;} };
35347template<> class JVMInst<jvm_d2f> { virtual const char *GetInstruction() {return "d2f";} virtual const int GetStackChange() {return -1;} };
35348template<> class JVMInst<jvm_d2i> { virtual const char *GetInstruction() {return "d2i";} virtual const int GetStackChange() {return -1;} };
35349template<> class JVMInst<jvm_d2l> { virtual const char *GetInstruction() {return "d2l";} virtual const int GetStackChange() {return 0;} };
35350template<> class JVMInst<jvm_dadd> { virtual const char *GetInstruction() {return "dadd";} virtual const int GetStackChange() {return -2;} };
35351template<> class JVMInst<jvm_daload> { virtual const char *GetInstruction() {return "daload";} virtual const int GetStackChange() {return 0;} };
35352template<> class JVMInst<jvm_dastore> { virtual const char *GetInstruction() {return "dastore";} virtual const int GetStackChange() {return -4;} };
35353template<> class JVMInst<jvm_dcmpg> { virtual const char *GetInstruction() {return "dcmpg";} virtual const int GetStackChange() {return -3;} };
35354template<> class JVMInst<jvm_dcmpl> { virtual const char *GetInstruction() {return "dcmpl";} virtual const int GetStackChange() {return -3;} };
35355template<> class JVMInst<jvm_dconst_0> { virtual const char *GetInstruction() {return "dconst_0";} virtual const int GetStackChange() {return +2;} };
35356template<> class JVMInst<jvm_dconst_1> { virtual const char *GetInstruction() {return "dconst_1";} virtual const int GetStackChange() {return +2;} };
35357template<> class JVMInst<jvm_ddiv> { virtual const char *GetInstruction() {return "ddiv";} virtual const int GetStackChange() {return -2;} };
35358template<> class JVMInst<jvm_dload_0> { virtual const char *GetInstruction() {return "dload_0";} virtual const int GetStackChange() {return +2;} };
35359template<> class JVMInst<jvm_dload_1> { virtual const char *GetInstruction() {return "dload_1";} virtual const int GetStackChange() {return +2;} };
35360template<> class JVMInst<jvm_dload_2> { virtual const char *GetInstruction() {return "dload_2";} virtual const int GetStackChange() {return +2;} };
35361template<> class JVMInst<jvm_dload_3> { virtual const char *GetInstruction() {return "dload_3";} virtual const int GetStackChange() {return +2;} };
35362template<> class JVMInst<jvm_dmul> { virtual const char *GetInstruction() {return "dmul";} virtual const int GetStackChange() {return -2;} };
35363template<> class JVMInst<jvm_dneg> { virtual const char *GetInstruction() {return "dneg";} virtual const int GetStackChange() {return 0;} };
35364template<> class JVMInst<jvm_drem> { virtual const char *GetInstruction() {return "drem";} virtual const int GetStackChange() {return -2;} };
35365template<> class JVMInst<jvm_dreturn> { virtual const char *GetInstruction() {return "dreturn";} virtual const int GetStackChange() {return -2;} };
35366template<> class JVMInst<jvm_dstore_0> { virtual const char *GetInstruction() {return "dstore_0";} virtual const int GetStackChange() {return -2;} };
35367template<> class JVMInst<jvm_dstore_1> { virtual const char *GetInstruction() {return "dstore_1";} virtual const int GetStackChange() {return -2;} };
35368template<> class JVMInst<jvm_dstore_2> { virtual const char *GetInstruction() {return "dstore_2";} virtual const int GetStackChange() {return -2;} };
35369template<> class JVMInst<jvm_dstore_3> { virtual const char *GetInstruction() {return "dstore_3";} virtual const int GetStackChange() {return -2;} };
35370template<> class JVMInst<jvm_dsub> { virtual const char *GetInstruction() {return "dsub";} virtual const int GetStackChange() {return -2;} };
35371template<> class JVMInst<jvm_dup> { virtual const char *GetInstruction() {return "dup";} virtual const int GetStackChange() {return +1;} };
35372template<> class JVMInst<jvm_dup2> { virtual const char *GetInstruction() {return "dup2";} virtual const int GetStackChange() {return +2;} };
35373template<> class JVMInst<jvm_dup2_x1> { virtual const char *GetInstruction() {return "dup2_x1";} virtual const int GetStackChange() {return +2;} };
35374template<> class JVMInst<jvm_dup2_x2> { virtual const char *GetInstruction() {return "dup2_x2";} virtual const int GetStackChange() {return +2;} };
35375template<> class JVMInst<jvm_dup_x1> { virtual const char *GetInstruction() {return "dup_x1";} virtual const int GetStackChange() {return +1;} };
35376template<> class JVMInst<jvm_dup_x2> { virtual const char *GetInstruction() {return "dup_x2";} virtual const int GetStackChange() {return +1;} };
35377template<> class JVMInst<jvm_f2d> { virtual const char *GetInstruction() {return "f2d";} virtual const int GetStackChange() {return +1;} };
35378template<> class JVMInst<jvm_f2i> { virtual const char *GetInstruction() {return "f2i";} virtual const int GetStackChange() {return 0;} };
35379template<> class JVMInst<jvm_f2l> { virtual const char *GetInstruction() {return "f2l";} virtual const int GetStackChange() {return +1;} };
35380template<> class JVMInst<jvm_fadd> { virtual const char *GetInstruction() {return "fadd";} virtual const int GetStackChange() {return -1;} };
35381template<> class JVMInst<jvm_faload> { virtual const char *GetInstruction() {return "faload";} virtual const int GetStackChange() {return -1;} };
35382template<> class JVMInst<jvm_fastore> { virtual const char *GetInstruction() {return "fastore";} virtual const int GetStackChange() {return -3;} };
35383template<> class JVMInst<jvm_fcmpg> { virtual const char *GetInstruction() {return "fcmpg";} virtual const int GetStackChange() {return -1;} };
35384template<> class JVMInst<jvm_fcmpl> { virtual const char *GetInstruction() {return "fcmpl";} virtual const int GetStackChange() {return -1;} };
35385template<> class JVMInst<jvm_fconst_0> { virtual const char *GetInstruction() {return "fconst_0";} virtual const int GetStackChange() {return +1;} };
35386template<> class JVMInst<jvm_fconst_1> { virtual const char *GetInstruction() {return "fconst_1";} virtual const int GetStackChange() {return +1;} };
35387template<> class JVMInst<jvm_fconst_2> { virtual const char *GetInstruction() {return "fconst_2";} virtual const int GetStackChange() {return +1;} };
35388template<> class JVMInst<jvm_fdiv> { virtual const char *GetInstruction() {return "fdiv";} virtual const int GetStackChange() {return -1;} };
35389template<> class JVMInst<jvm_fload_0> { virtual const char *GetInstruction() {return "fload_0";} virtual const int GetStackChange() {return +1;} };
35390template<> class JVMInst<jvm_fload_1> { virtual const char *GetInstruction() {return "fload_1";} virtual const int GetStackChange() {return +1;} };
35391template<> class JVMInst<jvm_fload_2> { virtual const char *GetInstruction() {return "fload_2";} virtual const int GetStackChange() {return +1;} };
35392template<> class JVMInst<jvm_fload_3> { virtual const char *GetInstruction() {return "fload_3";} virtual const int GetStackChange() {return +1;} };
35393template<> class JVMInst<jvm_fmul> { virtual const char *GetInstruction() {return "fmul";} virtual const int GetStackChange() {return -1;} };
35394template<> class JVMInst<jvm_fneg> { virtual const char *GetInstruction() {return "fneg";} virtual const int GetStackChange() {return 0;} };
35395template<> class JVMInst<jvm_frem> { virtual const char *GetInstruction() {return "frem";} virtual const int GetStackChange() {return -1;} };
35396template<> class JVMInst<jvm_freturn> { virtual const char *GetInstruction() {return "freturn";} virtual const int GetStackChange() {return -1;} };
35397template<> class JVMInst<jvm_fstore_0> { virtual const char *GetInstruction() {return "fstore_0";} virtual const int GetStackChange() {return -1;} };
35398template<> class JVMInst<jvm_fstore_1> { virtual const char *GetInstruction() {return "fstore_1";} virtual const int GetStackChange() {return -1;} };
35399template<> class JVMInst<jvm_fstore_2> { virtual const char *GetInstruction() {return "fstore_2";} virtual const int GetStackChange() {return -1;} };
35400template<> class JVMInst<jvm_fstore_3> { virtual const char *GetInstruction() {return "fstore_3";} virtual const int GetStackChange() {return -1;} };
35401template<> class JVMInst<jvm_fsub> { virtual const char *GetInstruction() {return "fsub";} virtual const int GetStackChange() {return -1;} };
35402template<> class JVMInst<jvm_i2d> { virtual const char *GetInstruction() {return "i2d";} virtual const int GetStackChange() {return +1;} };
35403template<> class JVMInst<jvm_i2f> { virtual const char *GetInstruction() {return "i2f";} virtual const int GetStackChange() {return 0;} };
35404template<> class JVMInst<jvm_i2l> { virtual const char *GetInstruction() {return "i2l";} virtual const int GetStackChange() {return +1;} };
35405template<> class JVMInst<jvm_iadd> { virtual const char *GetInstruction() {return "iadd";} virtual const int GetStackChange() {return -1;} };
35406template<> class JVMInst<jvm_iaload> { virtual const char *GetInstruction() {return "iaload";} virtual const int GetStackChange() {return -1;} };
35407template<> class JVMInst<jvm_iand> { virtual const char *GetInstruction() {return "iand";} virtual const int GetStackChange() {return -1;} };
35408template<> class JVMInst<jvm_iastore> { virtual const char *GetInstruction() {return "iastore";} virtual const int GetStackChange() {return -3;} };
35409template<> class JVMInst<jvm_iconst_0> { virtual const char *GetInstruction() {return "iconst_0";} virtual const int GetStackChange() {return +1;} };
35410template<> class JVMInst<jvm_iconst_1> { virtual const char *GetInstruction() {return "iconst_1";} virtual const int GetStackChange() {return +1;} };
35411template<> class JVMInst<jvm_iconst_2> { virtual const char *GetInstruction() {return "iconst_2";} virtual const int GetStackChange() {return +1;} };
35412template<> class JVMInst<jvm_iconst_3> { virtual const char *GetInstruction() {return "iconst_3";} virtual const int GetStackChange() {return +1;} };
35413template<> class JVMInst<jvm_iconst_4> { virtual const char *GetInstruction() {return "iconst_4";} virtual const int GetStackChange() {return +1;} };
35414template<> class JVMInst<jvm_iconst_5> { virtual const char *GetInstruction() {return "iconst_5";} virtual const int GetStackChange() {return +1;} };
35415template<> class JVMInst<jvm_iconst_m1> { virtual const char *GetInstruction() {return "iconst_m1";} virtual const int GetStackChange() {return +1;} };
35416template<> class JVMInst<jvm_idiv> { virtual const char *GetInstruction() {return "idiv";} virtual const int GetStackChange() {return -1;} };
35417template<> class JVMInst<jvm_iload_0> { virtual const char *GetInstruction() {return "iload_0";} virtual const int GetStackChange() {return +1;} };
35418template<> class JVMInst<jvm_iload_1> { virtual const char *GetInstruction() {return "iload_1";} virtual const int GetStackChange() {return +1;} };
35419template<> class JVMInst<jvm_iload_2> { virtual const char *GetInstruction() {return "iload_2";} virtual const int GetStackChange() {return +1;} };
35420template<> class JVMInst<jvm_iload_3> { virtual const char *GetInstruction() {return "iload_3";} virtual const int GetStackChange() {return +1;} };
35421template<> class JVMInst<jvm_imul> { virtual const char *GetInstruction() {return "imul";} virtual const int GetStackChange() {return -1;} };
35422template<> class JVMInst<jvm_ineg> { virtual const char *GetInstruction() {return "ineg";} virtual const int GetStackChange() {return 0;} };
35423template<> class JVMInst<jvm_int2byte> { virtual const char *GetInstruction() {return "int2byte";} virtual const int GetStackChange() {return 0;} };
35424template<> class JVMInst<jvm_int2char> { virtual const char *GetInstruction() {return "int2char";} virtual const int GetStackChange() {return 0;} };
35425template<> class JVMInst<jvm_int2short> { virtual const char *GetInstruction() {return "int2short";} virtual const int GetStackChange() {return 0;} };
35426template<> class JVMInst<jvm_ior> { virtual const char *GetInstruction() {return "ior";} virtual const int GetStackChange() {return -1;} };
35427template<> class JVMInst<jvm_irem> { virtual const char *GetInstruction() {return "irem";} virtual const int GetStackChange() {return -1;} };
35428template<> class JVMInst<jvm_ireturn> { virtual const char *GetInstruction() {return "ireturn";} virtual const int GetStackChange() {return -1;} };
35429template<> class JVMInst<jvm_ishl> { virtual const char *GetInstruction() {return "ishl";} virtual const int GetStackChange() {return -1;} };
35430template<> class JVMInst<jvm_ishr> { virtual const char *GetInstruction() {return "ishr";} virtual const int GetStackChange() {return -1;} };
35431template<> class JVMInst<jvm_istore_0> { virtual const char *GetInstruction() {return "istore_0";} virtual const int GetStackChange() {return -1;} };
35432template<> class JVMInst<jvm_istore_1> { virtual const char *GetInstruction() {return "istore_1";} virtual const int GetStackChange() {return -1;} };
35433template<> class JVMInst<jvm_istore_2> { virtual const char *GetInstruction() {return "istore_2";} virtual const int GetStackChange() {return -1;} };
35434template<> class JVMInst<jvm_istore_3> { virtual const char *GetInstruction() {return "istore_3";} virtual const int GetStackChange() {return -1;} };
35435template<> class JVMInst<jvm_isub> { virtual const char *GetInstruction() {return "isub";} virtual const int GetStackChange() {return -1;} };
35436template<> class JVMInst<jvm_iushr> { virtual const char *GetInstruction() {return "iushr";} virtual const int GetStackChange() {return -1;} };
35437template<> class JVMInst<jvm_ixor> { virtual const char *GetInstruction() {return "ixor";} virtual const int GetStackChange() {return -1;} };
35438template<> class JVMInst<jvm_l2d> { virtual const char *GetInstruction() {return "l2d";} virtual const int GetStackChange() {return 0;} };
35439template<> class JVMInst<jvm_l2f> { virtual const char *GetInstruction() {return "l2f";} virtual const int GetStackChange() {return -1;} };
35440template<> class JVMInst<jvm_l2i> { virtual const char *GetInstruction() {return "l2i";} virtual const int GetStackChange() {return -1;} };
35441template<> class JVMInst<jvm_ladd> { virtual const char *GetInstruction() {return "ladd";} virtual const int GetStackChange() {return -2;} };
35442template<> class JVMInst<jvm_laload> { virtual const char *GetInstruction() {return "laload";} virtual const int GetStackChange() {return 0;} };
35443template<> class JVMInst<jvm_land> { virtual const char *GetInstruction() {return "land";} virtual const int GetStackChange() {return -2;} };
35444template<> class JVMInst<jvm_lastore> { virtual const char *GetInstruction() {return "lastore";} virtual const int GetStackChange() {return -4;} };
35445template<> class JVMInst<jvm_lcmp> { virtual const char *GetInstruction() {return "lcmp";} virtual const int GetStackChange() {return -3;} };
35446template<> class JVMInst<jvm_lconst_0> { virtual const char *GetInstruction() {return "lconst_0";} virtual const int GetStackChange() {return +2;} };
35447template<> class JVMInst<jvm_lconst_1> { virtual const char *GetInstruction() {return "lconst_1";} virtual const int GetStackChange() {return +2;} };
35448template<> class JVMInst<jvm_ldiv> { virtual const char *GetInstruction() {return "ldiv";} virtual const int GetStackChange() {return -2;} };
35449template<> class JVMInst<jvm_lload_0> { virtual const char *GetInstruction() {return "lload_0";} virtual const int GetStackChange() {return +2;} };
35450template<> class JVMInst<jvm_lload_1> { virtual const char *GetInstruction() {return "lload_1";} virtual const int GetStackChange() {return +2;} };
35451template<> class JVMInst<jvm_lload_2> { virtual const char *GetInstruction() {return "lload_2";} virtual const int GetStackChange() {return +2;} };
35452template<> class JVMInst<jvm_lload_3> { virtual const char *GetInstruction() {return "lload_3";} virtual const int GetStackChange() {return +2;} };
35453template<> class JVMInst<jvm_lmul> { virtual const char *GetInstruction() {return "lmul";} virtual const int GetStackChange() {return -2;} };
35454template<> class JVMInst<jvm_lneg> { virtual const char *GetInstruction() {return "lneg";} virtual const int GetStackChange() {return 0;} };
35455template<> class JVMInst<jvm_lor> { virtual const char *GetInstruction() {return "lor";} virtual const int GetStackChange() {return -2;} };
35456template<> class JVMInst<jvm_lrem> { virtual const char *GetInstruction() {return "lrem";} virtual const int GetStackChange() {return -2;} };
35457template<> class JVMInst<jvm_lreturn> { virtual const char *GetInstruction() {return "lreturn";} virtual const int GetStackChange() {return -2;} };
35458template<> class JVMInst<jvm_lshl> { virtual const char *GetInstruction() {return "lshl";} virtual const int GetStackChange() {return -1;} };
35459template<> class JVMInst<jvm_lshr> { virtual const char *GetInstruction() {return "lshr";} virtual const int GetStackChange() {return -1;} };
35460template<> class JVMInst<jvm_lstore_0> { virtual const char *GetInstruction() {return "lstore_0";} virtual const int GetStackChange() {return -2;} };
35461template<> class JVMInst<jvm_lstore_1> { virtual const char *GetInstruction() {return "lstore_1";} virtual const int GetStackChange() {return -2;} };
35462template<> class JVMInst<jvm_lstore_2> { virtual const char *GetInstruction() {return "lstore_2";} virtual const int GetStackChange() {return -2;} };
35463template<> class JVMInst<jvm_lstore_3> { virtual const char *GetInstruction() {return "lstore_3";} virtual const int GetStackChange() {return -2;} };
35464template<> class JVMInst<jvm_lsub> { virtual const char *GetInstruction() {return "lsub";} virtual const int GetStackChange() {return -2;} };
35465template<> class JVMInst<jvm_lushr> { virtual const char *GetInstruction() {return "lushr";} virtual const int GetStackChange() {return -1;} };
35466template<> class JVMInst<jvm_lxor> { virtual const char *GetInstruction() {return "lxor";} virtual const int GetStackChange() {return -2;} };
35467template<> class JVMInst<jvm_monitorenter> { virtual const char *GetInstruction() {return "monitorenter";} virtual const int GetStackChange() {return -1;} };
35468template<> class JVMInst<jvm_monitorexit> { virtual const char *GetInstruction() {return "monitorexit";} virtual const int GetStackChange() {return -1;} };
35469template<> class JVMInst<jvm_nop> { virtual const char *GetInstruction() {return "nop";} virtual const int GetStackChange() {return 0;} };
35470template<> class JVMInst<jvm_pop> { virtual const char *GetInstruction() {return "pop";} virtual const int GetStackChange() {return -1;} };
35471template<> class JVMInst<jvm_pop2> { virtual const char *GetInstruction() {return "pop2";} virtual const int GetStackChange() {return -2;} };
35472template<> class JVMInst<jvm_return> { virtual const char *GetInstruction() {return "return";} virtual const int GetStackChange() {return 0;} };
35473template<> class JVMInst<jvm_saload> { virtual const char *GetInstruction() {return "saload";} virtual const int GetStackChange() {return -1;} };
35474template<> class JVMInst<jvm_sastore> { virtual const char *GetInstruction() {return "sastore";} virtual const int GetStackChange() {return -3;} };
35475template<> class JVMInst<jvm_swap> { virtual const char *GetInstruction() {return "swap";} virtual const int GetStackChange() {return 0;} };
35476# 798 "jasmin.h"
35477class Jasmin
35478{
35479public:
35480 Jasmin() : m_idents(jl::ast::IdentifierManager::GetInstance()) {};
35481 ~Jasmin();
35482private:
35483 typedef __gnu_cxx::hash<jl::ast::ident> hashFunc;
35484 struct hashComp
35485 {
35486 bool operator() (jl::ast::ident aI1, jl::ast::ident aI2 ) const
35487 {
35488 return ( aI1 == aI2 );
35489 }
35490 };
35491 class Function
35492 {
35493 public:
35494 Function(const char *aName) : m_name(aName), m_max_stack_size(0), m_current_stack_size(0), m_num_locals(0) {}
35495 ~Function();
35496 private:
35497 const char *m_name;
35498 int m_max_stack_size;
35499 int m_current_stack_size;
35500 int m_num_locals;
35501 instList m_instructions;
35502 public:
35503 void Add(Instruction* aInst);
35504 void Add(instList aInstructions);
35505 };
35506 typedef __gnu_cxx::hash_map<jl::ast::ident, Function*, hashFunc, hashComp> funcMap;
35507private:
35508 jl::ast::IdentifierManager& m_idents;
35509 funcMap m_functions;
35510 Function *m_add_to;
35511public:
35512
35513 void AddToFunc(jl::ast::ident aIdent, Instruction* aInst);
35514
35515 void AddToFunc(jl::ast::ident aIdent, instList aInstructions);
35516
35517
35518 void AddToFunc(Instruction* aInst);
35519
35520
35521 void AddToFunc(instList aInstructions);
35522
35523 void AddToFunc(jl::ast::ident aIdent);
35524};
35525
35526
35527}; };
35528# 2 "jasmin.cpp" 2
35529
35530namespace jl { namespace jvm {;
35531
35532char *QuoteString(char * s)
35533{
35534 char *c = s, *r, *rc;
35535 int len = 0;
35536 do
35537 {
35538 len++;
35539 switch(*c)
35540 {
35541 case '\\':
35542 case '"':
35543 case '\n':
35544 case '\t':
35545 len++;
35546 break;
35547 }
35548 } while (*c++);
35549 rc = r = new char[len+2];
35550 c = s;
35551 *rc++='"';
35552 do
35553 {
35554 switch (*c)
35555 {
35556 case '\\':
35557 *rc++='\\';
35558 *rc++='\\';
35559 break;
35560 case '\n':
35561 *rc++='\\';
35562 *rc++='n';
35563 break;
35564 case '\t':
35565 *rc++='\\';
35566 *rc++='t';
35567 break;
35568 case '"':
35569 *rc++='\\';
35570 default:
35571 *rc++=*c;
35572 }
35573 } while(*c++);
35574 *rc++='"';
35575 return r;
35576}
35577
35578
35579template <> const char *ConstantArgT<int>::GetString()
35580{
35581 if (m_string) return m_string;
35582 m_string = new char[(m_value >= 0) ? m_value/10 +2 : -m_value/10 +3];
35583 sprintf(m_string, "%d", m_value);
35584}
35585
35586template <> const char *ConstantArgT<double>::GetString()
35587{
35588 if (m_string) return m_string;
35589 m_string = new char[32];
35590 m_string[snprintf(m_string, 32, "%g", m_value)] = 0;
35591 return m_string;
35592}
35593
35594template <> const char *ConstantArgT<bool>::GetString()
35595{
35596 return (m_value) ? "1" : "0";
35597}
35598
35599template <> ConstantArgT<char*>::ConstantArgT(char *aValue) : m_string(__null)
35600{
35601 m_value = strdup(aValue);
35602}
35603
35604template <> ConstantArgT<char*>::~ConstantArgT()
35605{
35606 free(m_value);
35607}
35608template <> const char *ConstantArgT<char*>::GetString()
35609{
35610 if (m_string) return m_string;
35611 return m_string = QuoteString(m_value);
35612}
35613
35614
35615unsigned int MethodSpecArg::ArgStackSize()
35616{
35617 char *c = m_descriptor;
35618 unsigned int s = 0;
35619 while (*c)
35620 {
35621 bool start = false;
35622 bool stop = false;
35623 bool in_class = false;
35624 bool in_array = false;
35625 switch (*c++)
35626 {
35627 case ';':
35628 ((void) (start && in_class || ::jl::DoAssertFault( "start && in_class", 0, "jasmin.cpp", 101 )));
35629 in_class = false;
35630 in_array = false;
35631 break;
35632 case '(':
35633 ((void) (!start && !stop && !in_class || ::jl::DoAssertFault( "!start && !stop && !in_class", 0, "jasmin.cpp", 106 )));
35634 start = true;
35635 break;
35636 case ')':
35637 ((void) (start && !stop && !in_class || ::jl::DoAssertFault( "start && !stop && !in_class", 0, "jasmin.cpp", 110 )));
35638 stop = true;
35639 break;
35640 case 'L':
35641 ((void) (start || ::jl::DoAssertFault( "start", 0, "jasmin.cpp", 114 )));
35642 if (!in_class)
35643 {
35644 if (!stop)
35645 {
35646 s++;
35647 }
35648 in_class = true;
35649 break;
35650 }
35651 case 'D':
35652 case 'J':
35653 ((void) (start || ::jl::DoAssertFault( "start", 0, "jasmin.cpp", 126 )));
35654 if (!in_class)
35655 {
35656 if (!stop && !in_array)
35657 {
35658 s+=2;
35659 }
35660 in_array = false;
35661 break;
35662 }
35663 case 'B':
35664 case 'C':
35665 case 'I':
35666 case 'F':
35667 case 'Z':
35668 case 'S':
35669 ((void) (start || ::jl::DoAssertFault( "start", 0, "jasmin.cpp", 142 )));
35670 if (!in_class)
35671 {
35672 if (!stop && !in_array)
35673 {
35674 s++;
35675 }
35676 in_array = false;
35677 break;
35678 }
35679 case '[':
35680 ((void) (start || ::jl::DoAssertFault( "start", 0, "jasmin.cpp", 153 )));
35681 if (!in_class)
35682 {
35683 if (!stop && !in_array)
35684 {
35685 s++;
35686 in_array = true;
35687 }
35688 break;
35689 }
35690 default:
35691 ((void) (in_class || ::jl::DoAssertFault( "in_class", 0, "jasmin.cpp", 164 )));
35692 }
35693 }
35694 return s;
35695}
35696
35697
35698void Jasmin::Function::Add(Instruction* aInst)
35699{
35700 m_current_stack_size += aInst->GetStackChange();
35701 if (m_max_stack_size < m_current_stack_size)
35702 {
35703 m_max_stack_size = m_current_stack_size;
35704 }
35705
35706 m_instructions.push_back(aInst);
35707}
35708void Jasmin::Function::Add(instList aInstructions)
35709{
35710 for (instList::iterator it = aInstructions.begin();
35711 it != aInstructions.end(); it++)
35712 {
35713 m_current_stack_size += (*it)->GetStackChange();
35714 if (m_max_stack_size < m_current_stack_size)
35715 {
35716 m_max_stack_size = m_current_stack_size;
35717 }
35718 }
35719 m_instructions.splice(m_instructions.end(),aInstructions);
35720}
35721
35722
35723Jasmin::~Jasmin()
35724{
35725}
35726
35727void Jasmin::AddToFunc(jl::ast::ident aIdent, Instruction* aInst)
35728{
35729 AddToFunc(aIdent);
35730 AddToFunc(aInst);
35731}
35732void Jasmin::AddToFunc(jl::ast::ident aIdent, instList aInstructions)
35733{
35734 AddToFunc(aIdent);
35735 AddToFunc(aInstructions);
35736}
35737void Jasmin::AddToFunc(Instruction* aInst)
35738{
35739 m_add_to->Add(aInst);
35740}
35741void Jasmin::AddToFunc(instList aInstructions)
35742{
35743 m_add_to->Add(aInstructions);
35744}
35745void Jasmin::AddToFunc(jl::ast::ident aIdent)
35746{
35747 funcMap::iterator it = m_functions.find(aIdent);
35748 if (it == m_functions.end())
35749 {
35750 m_functions[aIdent] = new Function(m_idents.GetIdentName(aIdent));
35751 m_add_to = m_functions[aIdent];
35752 return;
35753 }
35754 m_add_to = (*it).second;
35755}
35756
35757}; };;