initial import
[ICEs.git] / 224611 / bug224611.ii
1 namespace std __attribute__ ((__visibility__ ("default"))) {
2 }
3 typedef long int ptrdiff_t;
4 typedef long unsigned int size_t;
5 namespace std __attribute__ ((__visibility__ ("default"))) {
6 using ::ptrdiff_t;
7 using ::size_t;
8 }
9 extern "C" {
10 typedef unsigned char __u_char;
11 typedef unsigned short int __u_short;
12 typedef unsigned int __u_int;
13 typedef unsigned long int __u_long;
14 typedef signed char __int8_t;
15 typedef unsigned char __uint8_t;
16 typedef signed short int __int16_t;
17 typedef unsigned short int __uint16_t;
18 typedef signed int __int32_t;
19 typedef unsigned int __uint32_t;
20 typedef signed long int __int64_t;
21 typedef unsigned long int __uint64_t;
22 typedef long int __quad_t;
23 typedef unsigned long int __u_quad_t;
24 typedef unsigned long int __dev_t;
25 typedef unsigned int __uid_t;
26 typedef unsigned int __gid_t;
27 typedef unsigned long int __ino_t;
28 typedef unsigned long int __ino64_t;
29 typedef unsigned int __mode_t;
30 typedef unsigned long int __nlink_t;
31 typedef long int __off_t;
32 typedef long int __off64_t;
33 typedef int __pid_t;
34 typedef struct { int __val[2]; } __fsid_t;
35 typedef long int __clock_t;
36 typedef unsigned long int __rlim_t;
37 typedef unsigned long int __rlim64_t;
38 typedef unsigned int __id_t;
39 typedef long int __time_t;
40 typedef unsigned int __useconds_t;
41 typedef long int __suseconds_t;
42 typedef int __daddr_t;
43 typedef long int __swblk_t;
44 typedef int __key_t;
45 typedef int __clockid_t;
46 typedef void * __timer_t;
47 typedef long int __blksize_t;
48 typedef long int __blkcnt_t;
49 typedef long int __blkcnt64_t;
50 typedef unsigned long int __fsblkcnt_t;
51 typedef unsigned long int __fsblkcnt64_t;
52 typedef unsigned long int __fsfilcnt_t;
53 typedef unsigned long int __fsfilcnt64_t;
54 typedef long int __ssize_t;
55 typedef __off64_t __loff_t;
56 typedef __quad_t *__qaddr_t;
57 typedef char *__caddr_t;
58 typedef long int __intptr_t;
59 typedef unsigned int __socklen_t;
60 struct _IO_FILE;
61 typedef struct _IO_FILE FILE;
62 typedef struct _IO_FILE __FILE;
63 typedef struct
64 {
65 int __count;
66 union
67 {
68 unsigned int __wch;
69 char __wchb[4];
70 } __value;
71 } __mbstate_t;
72 typedef struct
73 {
74 __off_t __pos;
75 __mbstate_t __state;
76 } _G_fpos_t;
77 typedef struct
78 {
79 __off64_t __pos;
80 __mbstate_t __state;
81 } _G_fpos64_t;
82 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
83 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
84 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
85 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
86 typedef __builtin_va_list __gnuc_va_list;
87 struct _IO_jump_t; struct _IO_FILE;
88 typedef void _IO_lock_t;
89 struct _IO_marker {
90 struct _IO_marker *_next;
91 struct _IO_FILE *_sbuf;
92 int _pos;
93 };
94 enum __codecvt_result
95 {
96 __codecvt_ok,
97 __codecvt_partial,
98 __codecvt_error,
99 __codecvt_noconv
100 };
101 struct _IO_FILE {
102 int _flags;
103 char* _IO_read_ptr;
104 char* _IO_read_end;
105 char* _IO_read_base;
106 char* _IO_write_base;
107 char* _IO_write_ptr;
108 char* _IO_write_end;
109 char* _IO_buf_base;
110 char* _IO_buf_end;
111 char *_IO_save_base;
112 char *_IO_backup_base;
113 char *_IO_save_end;
114 struct _IO_marker *_markers;
115 struct _IO_FILE *_chain;
116 int _fileno;
117 int _flags2;
118 __off_t _old_offset;
119 unsigned short _cur_column;
120 signed char _vtable_offset;
121 char _shortbuf[1];
122 _IO_lock_t *_lock;
123 __off64_t _offset;
124 void *__pad1;
125 void *__pad2;
126 void *__pad3;
127 void *__pad4;
128 size_t __pad5;
129 int _mode;
130 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
131 };
132 struct _IO_FILE_plus;
133 extern struct _IO_FILE_plus _IO_2_1_stdin_;
134 extern struct _IO_FILE_plus _IO_2_1_stdout_;
135 extern struct _IO_FILE_plus _IO_2_1_stderr_;
136 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
137 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
138 size_t __n);
139 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
140 typedef int __io_close_fn (void *__cookie);
141 typedef __io_read_fn cookie_read_function_t;
142 typedef __io_write_fn cookie_write_function_t;
143 typedef __io_seek_fn cookie_seek_function_t;
144 typedef __io_close_fn cookie_close_function_t;
145 typedef struct
146 {
147 __io_read_fn *read;
148 __io_write_fn *write;
149 __io_seek_fn *seek;
150 __io_close_fn *close;
151 } _IO_cookie_io_functions_t;
152 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
153 struct _IO_cookie_file;
154 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
155 void *__cookie, _IO_cookie_io_functions_t __fns);
156 extern "C" {
157 extern int __underflow (_IO_FILE *);
158 extern int __uflow (_IO_FILE *);
159 extern int __overflow (_IO_FILE *, int);
160 extern int _IO_getc (_IO_FILE *__fp);
161 extern int _IO_putc (int __c, _IO_FILE *__fp);
162 extern int _IO_feof (_IO_FILE *__fp) throw ();
163 extern int _IO_ferror (_IO_FILE *__fp) throw ();
164 extern int _IO_peekc_locked (_IO_FILE *__fp);
165 extern void _IO_flockfile (_IO_FILE *) throw ();
166 extern void _IO_funlockfile (_IO_FILE *) throw ();
167 extern int _IO_ftrylockfile (_IO_FILE *) throw ();
168 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
169 __gnuc_va_list, int *__restrict);
170 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
171 __gnuc_va_list);
172 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
173 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
174 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
175 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
176 extern void _IO_free_backup_area (_IO_FILE *) throw ();
177 }
178 typedef __gnuc_va_list va_list;
179 typedef _G_fpos_t fpos_t;
180 typedef _G_fpos64_t fpos64_t;
181 extern struct _IO_FILE *stdin;
182 extern struct _IO_FILE *stdout;
183 extern struct _IO_FILE *stderr;
184 extern int remove (__const char *__filename) throw ();
185 extern int rename (__const char *__old, __const char *__new) throw ();
186 extern int renameat (int __oldfd, __const char *__old, int __newfd,
187 __const char *__new) throw ();
188 extern FILE *tmpfile (void) ;
189 extern FILE *tmpfile64 (void) ;
190 extern char *tmpnam (char *__s) throw () ;
191 extern char *tmpnam_r (char *__s) throw () ;
192 extern char *tempnam (__const char *__dir, __const char *__pfx)
193 throw () __attribute__ ((__malloc__)) ;
194 extern int fclose (FILE *__stream);
195 extern int fflush (FILE *__stream);
196 extern int fflush_unlocked (FILE *__stream);
197 extern int fcloseall (void);
198 extern FILE *fopen (__const char *__restrict __filename,
199 __const char *__restrict __modes) ;
200 extern FILE *freopen (__const char *__restrict __filename,
201 __const char *__restrict __modes,
202 FILE *__restrict __stream) ;
203 extern FILE *fopen64 (__const char *__restrict __filename,
204 __const char *__restrict __modes) ;
205 extern FILE *freopen64 (__const char *__restrict __filename,
206 __const char *__restrict __modes,
207 FILE *__restrict __stream) ;
208 extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
209 extern FILE *fopencookie (void *__restrict __magic_cookie,
210 __const char *__restrict __modes,
211 _IO_cookie_io_functions_t __io_funcs) throw () ;
212 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
213 throw () ;
214 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
215 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
216 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
217 int __modes, size_t __n) throw ();
218 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
219 size_t __size) throw ();
220 extern void setlinebuf (FILE *__stream) throw ();
221 extern int fprintf (FILE *__restrict __stream,
222 __const char *__restrict __format, ...);
223 extern int printf (__const char *__restrict __format, ...);
224 extern int sprintf (char *__restrict __s,
225 __const char *__restrict __format, ...) throw ();
226 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
227 __gnuc_va_list __arg);
228 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
229 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
230 __gnuc_va_list __arg) throw ();
231 extern int snprintf (char *__restrict __s, size_t __maxlen,
232 __const char *__restrict __format, ...)
233 throw () __attribute__ ((__format__ (__printf__, 3, 4)));
234 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
235 __const char *__restrict __format, __gnuc_va_list __arg)
236 throw () __attribute__ ((__format__ (__printf__, 3, 0)));
237 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
238 __gnuc_va_list __arg)
239 throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
240 extern int __asprintf (char **__restrict __ptr,
241 __const char *__restrict __fmt, ...)
242 throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
243 extern int asprintf (char **__restrict __ptr,
244 __const char *__restrict __fmt, ...)
245 throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
246 extern int vdprintf (int __fd, __const char *__restrict __fmt,
247 __gnuc_va_list __arg)
248 __attribute__ ((__format__ (__printf__, 2, 0)));
249 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
250 __attribute__ ((__format__ (__printf__, 2, 3)));
251 extern int fscanf (FILE *__restrict __stream,
252 __const char *__restrict __format, ...) ;
253 extern int scanf (__const char *__restrict __format, ...) ;
254 extern int sscanf (__const char *__restrict __s,
255 __const char *__restrict __format, ...) throw ();
256 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
257 __gnuc_va_list __arg)
258 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
259 extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
260 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
261 extern int vsscanf (__const char *__restrict __s,
262 __const char *__restrict __format, __gnuc_va_list __arg)
263 throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
264 extern int fgetc (FILE *__stream);
265 extern int getc (FILE *__stream);
266 extern int getchar (void);
267 extern int getc_unlocked (FILE *__stream);
268 extern int getchar_unlocked (void);
269 extern int fgetc_unlocked (FILE *__stream);
270 extern int fputc (int __c, FILE *__stream);
271 extern int putc (int __c, FILE *__stream);
272 extern int putchar (int __c);
273 extern int fputc_unlocked (int __c, FILE *__stream);
274 extern int putc_unlocked (int __c, FILE *__stream);
275 extern int putchar_unlocked (int __c);
276 extern int getw (FILE *__stream);
277 extern int putw (int __w, FILE *__stream);
278 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
279 ;
280 extern char *gets (char *__s) ;
281 extern char *fgets_unlocked (char *__restrict __s, int __n,
282 FILE *__restrict __stream) ;
283 extern __ssize_t __getdelim (char **__restrict __lineptr,
284 size_t *__restrict __n, int __delimiter,
285 FILE *__restrict __stream) ;
286 extern __ssize_t getdelim (char **__restrict __lineptr,
287 size_t *__restrict __n, int __delimiter,
288 FILE *__restrict __stream) ;
289 extern __ssize_t getline (char **__restrict __lineptr,
290 size_t *__restrict __n,
291 FILE *__restrict __stream) ;
292 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
293 extern int puts (__const char *__s);
294 extern int ungetc (int __c, FILE *__stream);
295 extern size_t fread (void *__restrict __ptr, size_t __size,
296 size_t __n, FILE *__restrict __stream) ;
297 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
298 size_t __n, FILE *__restrict __s) ;
299 extern int fputs_unlocked (__const char *__restrict __s,
300 FILE *__restrict __stream);
301 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
302 size_t __n, FILE *__restrict __stream) ;
303 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
304 size_t __n, FILE *__restrict __stream) ;
305 extern int fseek (FILE *__stream, long int __off, int __whence);
306 extern long int ftell (FILE *__stream) ;
307 extern void rewind (FILE *__stream);
308 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
309 extern __off_t ftello (FILE *__stream) ;
310 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
311 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
312 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
313 extern __off64_t ftello64 (FILE *__stream) ;
314 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
315 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
316 extern void clearerr (FILE *__stream) throw ();
317 extern int feof (FILE *__stream) throw () ;
318 extern int ferror (FILE *__stream) throw () ;
319 extern void clearerr_unlocked (FILE *__stream) throw ();
320 extern int feof_unlocked (FILE *__stream) throw () ;
321 extern int ferror_unlocked (FILE *__stream) throw () ;
322 extern void perror (__const char *__s);
323 extern int sys_nerr;
324 extern __const char *__const sys_errlist[];
325 extern int _sys_nerr;
326 extern __const char *__const _sys_errlist[];
327 extern int fileno (FILE *__stream) throw () ;
328 extern int fileno_unlocked (FILE *__stream) throw () ;
329 extern FILE *popen (__const char *__command, __const char *__modes) ;
330 extern int pclose (FILE *__stream);
331 extern char *ctermid (char *__s) throw ();
332 extern char *cuserid (char *__s);
333 struct obstack;
334 extern int obstack_printf (struct obstack *__restrict __obstack,
335 __const char *__restrict __format, ...)
336 throw () __attribute__ ((__format__ (__printf__, 2, 3)));
337 extern int obstack_vprintf (struct obstack *__restrict __obstack,
338 __const char *__restrict __format,
339 __gnuc_va_list __args)
340 throw () __attribute__ ((__format__ (__printf__, 2, 0)));
341 extern void flockfile (FILE *__stream) throw ();
342 extern int ftrylockfile (FILE *__stream) throw () ;
343 extern void funlockfile (FILE *__stream) throw ();
344 extern __inline __attribute__ ((__gnu_inline__)) int
345 vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
346 {
347 return vfprintf (stdout, __fmt, __arg);
348 }
349 extern __inline __attribute__ ((__gnu_inline__)) int
350 getchar (void)
351 {
352 return _IO_getc (stdin);
353 }
354 extern __inline __attribute__ ((__gnu_inline__)) int
355 fgetc_unlocked (FILE *__fp)
356 {
357 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
358 }
359 extern __inline __attribute__ ((__gnu_inline__)) int
360 getc_unlocked (FILE *__fp)
361 {
362 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
363 }
364 extern __inline __attribute__ ((__gnu_inline__)) int
365 getchar_unlocked (void)
366 {
367 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
368 }
369 extern __inline __attribute__ ((__gnu_inline__)) int
370 putchar (int __c)
371 {
372 return _IO_putc (__c, stdout);
373 }
374 extern __inline __attribute__ ((__gnu_inline__)) int
375 fputc_unlocked (int __c, FILE *__stream)
376 {
377 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
378 }
379 extern __inline __attribute__ ((__gnu_inline__)) int
380 putc_unlocked (int __c, FILE *__stream)
381 {
382 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
383 }
384 extern __inline __attribute__ ((__gnu_inline__)) int
385 putchar_unlocked (int __c)
386 {
387 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
388 }
389 extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
390 getline (char **__lineptr, size_t *__n, FILE *__stream)
391 {
392 return __getdelim (__lineptr, __n, '\n', __stream);
393 }
394 extern __inline __attribute__ ((__gnu_inline__)) int
395 feof_unlocked (FILE *__stream) throw ()
396 {
397 return (((__stream)->_flags & 0x10) != 0);
398 }
399 extern __inline __attribute__ ((__gnu_inline__)) int
400 ferror_unlocked (FILE *__stream) throw ()
401 {
402 return (((__stream)->_flags & 0x20) != 0);
403 }
404 }
405 namespace std __attribute__ ((__visibility__ ("default"))) {
406 using ::FILE;
407 using ::fpos_t;
408 using ::clearerr;
409 using ::fclose;
410 using ::feof;
411 using ::ferror;
412 using ::fflush;
413 using ::fgetc;
414 using ::fgetpos;
415 using ::fgets;
416 using ::fopen;
417 using ::fprintf;
418 using ::fputc;
419 using ::fputs;
420 using ::fread;
421 using ::freopen;
422 using ::fscanf;
423 using ::fseek;
424 using ::fsetpos;
425 using ::ftell;
426 using ::fwrite;
427 using ::getc;
428 using ::getchar;
429 using ::gets;
430 using ::perror;
431 using ::printf;
432 using ::putc;
433 using ::putchar;
434 using ::puts;
435 using ::remove;
436 using ::rename;
437 using ::rewind;
438 using ::scanf;
439 using ::setbuf;
440 using ::setvbuf;
441 using ::sprintf;
442 using ::sscanf;
443 using ::tmpfile;
444 using ::tmpnam;
445 using ::ungetc;
446 using ::vfprintf;
447 using ::vprintf;
448 using ::vsprintf;
449 }
450 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
451 using ::snprintf;
452 using ::vfscanf;
453 using ::vscanf;
454 using ::vsnprintf;
455 using ::vsscanf;
456 }
457 namespace std __attribute__ ((__visibility__ ("default"))) {
458 using ::__gnu_cxx::snprintf;
459 using ::__gnu_cxx::vfscanf;
460 using ::__gnu_cxx::vscanf;
461 using ::__gnu_cxx::vsnprintf;
462 using ::__gnu_cxx::vsscanf;
463 }
464 extern "C" {
465 union wait
466 {
467 int w_status;
468 struct
469 {
470 unsigned int __w_termsig:7;
471 unsigned int __w_coredump:1;
472 unsigned int __w_retcode:8;
473 unsigned int:16;
474 } __wait_terminated;
475 struct
476 {
477 unsigned int __w_stopval:8;
478 unsigned int __w_stopsig:8;
479 unsigned int:16;
480 } __wait_stopped;
481 };
482 typedef struct
483 {
484 int quot;
485 int rem;
486 } div_t;
487 typedef struct
488 {
489 long int quot;
490 long int rem;
491 } ldiv_t;
492 __extension__ typedef struct
493 {
494 long long int quot;
495 long long int rem;
496 } lldiv_t;
497 extern size_t __ctype_get_mb_cur_max (void) throw () ;
498 extern double atof (__const char *__nptr)
499 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
500 extern int atoi (__const char *__nptr)
501 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
502 extern long int atol (__const char *__nptr)
503 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
504 __extension__ extern long long int atoll (__const char *__nptr)
505 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
506 extern double strtod (__const char *__restrict __nptr,
507 char **__restrict __endptr)
508 throw () __attribute__ ((__nonnull__ (1))) ;
509 extern float strtof (__const char *__restrict __nptr,
510 char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
511 extern long double strtold (__const char *__restrict __nptr,
512 char **__restrict __endptr)
513 throw () __attribute__ ((__nonnull__ (1))) ;
514 extern long int strtol (__const char *__restrict __nptr,
515 char **__restrict __endptr, int __base)
516 throw () __attribute__ ((__nonnull__ (1))) ;
517 extern unsigned long int strtoul (__const char *__restrict __nptr,
518 char **__restrict __endptr, int __base)
519 throw () __attribute__ ((__nonnull__ (1))) ;
520 __extension__
521 extern long long int strtoq (__const char *__restrict __nptr,
522 char **__restrict __endptr, int __base)
523 throw () __attribute__ ((__nonnull__ (1))) ;
524 __extension__
525 extern unsigned long long int strtouq (__const char *__restrict __nptr,
526 char **__restrict __endptr, int __base)
527 throw () __attribute__ ((__nonnull__ (1))) ;
528 __extension__
529 extern long long int strtoll (__const char *__restrict __nptr,
530 char **__restrict __endptr, int __base)
531 throw () __attribute__ ((__nonnull__ (1))) ;
532 __extension__
533 extern unsigned long long int strtoull (__const char *__restrict __nptr,
534 char **__restrict __endptr, int __base)
535 throw () __attribute__ ((__nonnull__ (1))) ;
536 typedef struct __locale_struct
537 {
538 struct locale_data *__locales[13];
539 const unsigned short int *__ctype_b;
540 const int *__ctype_tolower;
541 const int *__ctype_toupper;
542 const char *__names[13];
543 } *__locale_t;
544 extern long int strtol_l (__const char *__restrict __nptr,
545 char **__restrict __endptr, int __base,
546 __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
547 extern unsigned long int strtoul_l (__const char *__restrict __nptr,
548 char **__restrict __endptr,
549 int __base, __locale_t __loc)
550 throw () __attribute__ ((__nonnull__ (1, 4))) ;
551 __extension__
552 extern long long int strtoll_l (__const char *__restrict __nptr,
553 char **__restrict __endptr, int __base,
554 __locale_t __loc)
555 throw () __attribute__ ((__nonnull__ (1, 4))) ;
556 __extension__
557 extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
558 char **__restrict __endptr,
559 int __base, __locale_t __loc)
560 throw () __attribute__ ((__nonnull__ (1, 4))) ;
561 extern double strtod_l (__const char *__restrict __nptr,
562 char **__restrict __endptr, __locale_t __loc)
563 throw () __attribute__ ((__nonnull__ (1, 3))) ;
564 extern float strtof_l (__const char *__restrict __nptr,
565 char **__restrict __endptr, __locale_t __loc)
566 throw () __attribute__ ((__nonnull__ (1, 3))) ;
567 extern long double strtold_l (__const char *__restrict __nptr,
568 char **__restrict __endptr,
569 __locale_t __loc)
570 throw () __attribute__ ((__nonnull__ (1, 3))) ;
571 extern __inline __attribute__ ((__gnu_inline__)) double
572 atof (__const char *__nptr) throw ()
573 {
574 return strtod (__nptr, (char **) __null);
575 }
576 extern __inline __attribute__ ((__gnu_inline__)) int
577 atoi (__const char *__nptr) throw ()
578 {
579 return (int) strtol (__nptr, (char **) __null, 10);
580 }
581 extern __inline __attribute__ ((__gnu_inline__)) long int
582 atol (__const char *__nptr) throw ()
583 {
584 return strtol (__nptr, (char **) __null, 10);
585 }
586 __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
587 atoll (__const char *__nptr) throw ()
588 {
589 return strtoll (__nptr, (char **) __null, 10);
590 }
591 extern char *l64a (long int __n) throw () ;
592 extern long int a64l (__const char *__s)
593 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
594 extern "C" {
595 typedef __u_char u_char;
596 typedef __u_short u_short;
597 typedef __u_int u_int;
598 typedef __u_long u_long;
599 typedef __quad_t quad_t;
600 typedef __u_quad_t u_quad_t;
601 typedef __fsid_t fsid_t;
602 typedef __loff_t loff_t;
603 typedef __ino_t ino_t;
604 typedef __ino64_t ino64_t;
605 typedef __dev_t dev_t;
606 typedef __gid_t gid_t;
607 typedef __mode_t mode_t;
608 typedef __nlink_t nlink_t;
609 typedef __uid_t uid_t;
610 typedef __off_t off_t;
611 typedef __off64_t off64_t;
612 typedef __pid_t pid_t;
613 typedef __id_t id_t;
614 typedef __ssize_t ssize_t;
615 typedef __daddr_t daddr_t;
616 typedef __caddr_t caddr_t;
617 typedef __key_t key_t;
618 typedef __clock_t clock_t;
619 typedef __time_t time_t;
620 typedef __clockid_t clockid_t;
621 typedef __timer_t timer_t;
622 typedef __useconds_t useconds_t;
623 typedef __suseconds_t suseconds_t;
624 typedef unsigned long int ulong;
625 typedef unsigned short int ushort;
626 typedef unsigned int uint;
627 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
628 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
629 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
630 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
631 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
632 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
633 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
634 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
635 typedef int register_t __attribute__ ((__mode__ (__word__)));
636 typedef int __sig_atomic_t;
637 typedef struct
638 {
639 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
640 } __sigset_t;
641 typedef __sigset_t sigset_t;
642 struct timespec
643 {
644 __time_t tv_sec;
645 long int tv_nsec;
646 };
647 struct timeval
648 {
649 __time_t tv_sec;
650 __suseconds_t tv_usec;
651 };
652 typedef long int __fd_mask;
653 typedef struct
654 {
655 __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
656 } fd_set;
657 typedef __fd_mask fd_mask;
658 extern "C" {
659 extern int select (int __nfds, fd_set *__restrict __readfds,
660 fd_set *__restrict __writefds,
661 fd_set *__restrict __exceptfds,
662 struct timeval *__restrict __timeout);
663 extern int pselect (int __nfds, fd_set *__restrict __readfds,
664 fd_set *__restrict __writefds,
665 fd_set *__restrict __exceptfds,
666 const struct timespec *__restrict __timeout,
667 const __sigset_t *__restrict __sigmask);
668 }
669 __extension__
670 extern unsigned int gnu_dev_major (unsigned long long int __dev)
671 throw ();
672 __extension__
673 extern unsigned int gnu_dev_minor (unsigned long long int __dev)
674 throw ();
675 __extension__
676 extern unsigned long long int gnu_dev_makedev (unsigned int __major,
677 unsigned int __minor)
678 throw ();
679 __extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
680 gnu_dev_major (unsigned long long int __dev) throw ()
681 {
682 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
683 }
684 __extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
685 gnu_dev_minor (unsigned long long int __dev) throw ()
686 {
687 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
688 }
689 __extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int
690 gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
691 {
692 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
693 | (((unsigned long long int) (__minor & ~0xff)) << 12)
694 | (((unsigned long long int) (__major & ~0xfff)) << 32));
695 }
696 typedef __blksize_t blksize_t;
697 typedef __blkcnt_t blkcnt_t;
698 typedef __fsblkcnt_t fsblkcnt_t;
699 typedef __fsfilcnt_t fsfilcnt_t;
700 typedef __blkcnt64_t blkcnt64_t;
701 typedef __fsblkcnt64_t fsblkcnt64_t;
702 typedef __fsfilcnt64_t fsfilcnt64_t;
703 typedef unsigned long int pthread_t;
704 typedef union
705 {
706 char __size[56];
707 long int __align;
708 } pthread_attr_t;
709 typedef struct __pthread_internal_list
710 {
711 struct __pthread_internal_list *__prev;
712 struct __pthread_internal_list *__next;
713 } __pthread_list_t;
714 typedef union
715 {
716 struct __pthread_mutex_s
717 {
718 int __lock;
719 unsigned int __count;
720 int __owner;
721 unsigned int __nusers;
722 int __kind;
723 int __spins;
724 __pthread_list_t __list;
725 } __data;
726 char __size[40];
727 long int __align;
728 } pthread_mutex_t;
729 typedef union
730 {
731 char __size[4];
732 int __align;
733 } pthread_mutexattr_t;
734 typedef union
735 {
736 struct
737 {
738 int __lock;
739 unsigned int __futex;
740 __extension__ unsigned long long int __total_seq;
741 __extension__ unsigned long long int __wakeup_seq;
742 __extension__ unsigned long long int __woken_seq;
743 void *__mutex;
744 unsigned int __nwaiters;
745 unsigned int __broadcast_seq;
746 } __data;
747 char __size[48];
748 __extension__ long long int __align;
749 } pthread_cond_t;
750 typedef union
751 {
752 char __size[4];
753 int __align;
754 } pthread_condattr_t;
755 typedef unsigned int pthread_key_t;
756 typedef int pthread_once_t;
757 typedef union
758 {
759 struct
760 {
761 int __lock;
762 unsigned int __nr_readers;
763 unsigned int __readers_wakeup;
764 unsigned int __writer_wakeup;
765 unsigned int __nr_readers_queued;
766 unsigned int __nr_writers_queued;
767 int __writer;
768 int __shared;
769 unsigned long int __pad1;
770 unsigned long int __pad2;
771 unsigned int __flags;
772 } __data;
773 char __size[56];
774 long int __align;
775 } pthread_rwlock_t;
776 typedef union
777 {
778 char __size[8];
779 long int __align;
780 } pthread_rwlockattr_t;
781 typedef volatile int pthread_spinlock_t;
782 typedef union
783 {
784 char __size[32];
785 long int __align;
786 } pthread_barrier_t;
787 typedef union
788 {
789 char __size[4];
790 int __align;
791 } pthread_barrierattr_t;
792 }
793 extern long int random (void) throw ();
794 extern void srandom (unsigned int __seed) throw ();
795 extern char *initstate (unsigned int __seed, char *__statebuf,
796 size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
797 extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
798 struct random_data
799 {
800 int32_t *fptr;
801 int32_t *rptr;
802 int32_t *state;
803 int rand_type;
804 int rand_deg;
805 int rand_sep;
806 int32_t *end_ptr;
807 };
808 extern int random_r (struct random_data *__restrict __buf,
809 int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
810 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
811 throw () __attribute__ ((__nonnull__ (2)));
812 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
813 size_t __statelen,
814 struct random_data *__restrict __buf)
815 throw () __attribute__ ((__nonnull__ (2, 4)));
816 extern int setstate_r (char *__restrict __statebuf,
817 struct random_data *__restrict __buf)
818 throw () __attribute__ ((__nonnull__ (1, 2)));
819 extern int rand (void) throw ();
820 extern void srand (unsigned int __seed) throw ();
821 extern int rand_r (unsigned int *__seed) throw ();
822 extern double drand48 (void) throw ();
823 extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
824 extern long int lrand48 (void) throw ();
825 extern long int nrand48 (unsigned short int __xsubi[3])
826 throw () __attribute__ ((__nonnull__ (1)));
827 extern long int mrand48 (void) throw ();
828 extern long int jrand48 (unsigned short int __xsubi[3])
829 throw () __attribute__ ((__nonnull__ (1)));
830 extern void srand48 (long int __seedval) throw ();
831 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
832 throw () __attribute__ ((__nonnull__ (1)));
833 extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
834 struct drand48_data
835 {
836 unsigned short int __x[3];
837 unsigned short int __old_x[3];
838 unsigned short int __c;
839 unsigned short int __init;
840 unsigned long long int __a;
841 };
842 extern int drand48_r (struct drand48_data *__restrict __buffer,
843 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
844 extern int erand48_r (unsigned short int __xsubi[3],
845 struct drand48_data *__restrict __buffer,
846 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
847 extern int lrand48_r (struct drand48_data *__restrict __buffer,
848 long int *__restrict __result)
849 throw () __attribute__ ((__nonnull__ (1, 2)));
850 extern int nrand48_r (unsigned short int __xsubi[3],
851 struct drand48_data *__restrict __buffer,
852 long int *__restrict __result)
853 throw () __attribute__ ((__nonnull__ (1, 2)));
854 extern int mrand48_r (struct drand48_data *__restrict __buffer,
855 long int *__restrict __result)
856 throw () __attribute__ ((__nonnull__ (1, 2)));
857 extern int jrand48_r (unsigned short int __xsubi[3],
858 struct drand48_data *__restrict __buffer,
859 long int *__restrict __result)
860 throw () __attribute__ ((__nonnull__ (1, 2)));
861 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
862 throw () __attribute__ ((__nonnull__ (2)));
863 extern int seed48_r (unsigned short int __seed16v[3],
864 struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
865 extern int lcong48_r (unsigned short int __param[7],
866 struct drand48_data *__buffer)
867 throw () __attribute__ ((__nonnull__ (1, 2)));
868 extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
869 extern void *calloc (size_t __nmemb, size_t __size)
870 throw () __attribute__ ((__malloc__)) ;
871 extern void *realloc (void *__ptr, size_t __size)
872 throw () __attribute__ ((__warn_unused_result__));
873 extern void free (void *__ptr) throw ();
874 extern void cfree (void *__ptr) throw ();
875 extern "C" {
876 extern void *alloca (size_t __size) throw ();
877 }
878 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
879 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
880 throw () __attribute__ ((__nonnull__ (1))) ;
881 extern void abort (void) throw () __attribute__ ((__noreturn__));
882 extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
883 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
884 throw () __attribute__ ((__nonnull__ (1)));
885 extern void exit (int __status) throw () __attribute__ ((__noreturn__));
886 extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
887 extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
888 extern char *__secure_getenv (__const char *__name)
889 throw () __attribute__ ((__nonnull__ (1))) ;
890 extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
891 extern int setenv (__const char *__name, __const char *__value, int __replace)
892 throw () __attribute__ ((__nonnull__ (2)));
893 extern int unsetenv (__const char *__name) throw ();
894 extern int clearenv (void) throw ();
895 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
896 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
897 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
898 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
899 extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
900 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
901 extern int system (__const char *__command) ;
902 extern char *canonicalize_file_name (__const char *__name)
903 throw () __attribute__ ((__nonnull__ (1))) ;
904 extern char *realpath (__const char *__restrict __name,
905 char *__restrict __resolved) throw () ;
906 typedef int (*__compar_fn_t) (__const void *, __const void *);
907 typedef __compar_fn_t comparison_fn_t;
908 extern void *bsearch (__const void *__key, __const void *__base,
909 size_t __nmemb, size_t __size, __compar_fn_t __compar)
910 __attribute__ ((__nonnull__ (1, 2, 5))) ;
911 extern void qsort (void *__base, size_t __nmemb, size_t __size,
912 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
913 extern int abs (int __x) throw () __attribute__ ((__const__)) ;
914 extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
915 __extension__ extern long long int llabs (long long int __x)
916 throw () __attribute__ ((__const__)) ;
917 extern div_t div (int __numer, int __denom)
918 throw () __attribute__ ((__const__)) ;
919 extern ldiv_t ldiv (long int __numer, long int __denom)
920 throw () __attribute__ ((__const__)) ;
921 __extension__ extern lldiv_t lldiv (long long int __numer,
922 long long int __denom)
923 throw () __attribute__ ((__const__)) ;
924 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
925 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
926 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
927 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
928 extern char *gcvt (double __value, int __ndigit, char *__buf)
929 throw () __attribute__ ((__nonnull__ (3))) ;
930 extern char *qecvt (long double __value, int __ndigit,
931 int *__restrict __decpt, int *__restrict __sign)
932 throw () __attribute__ ((__nonnull__ (3, 4))) ;
933 extern char *qfcvt (long double __value, int __ndigit,
934 int *__restrict __decpt, int *__restrict __sign)
935 throw () __attribute__ ((__nonnull__ (3, 4))) ;
936 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
937 throw () __attribute__ ((__nonnull__ (3))) ;
938 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
939 int *__restrict __sign, char *__restrict __buf,
940 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
941 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
942 int *__restrict __sign, char *__restrict __buf,
943 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
944 extern int qecvt_r (long double __value, int __ndigit,
945 int *__restrict __decpt, int *__restrict __sign,
946 char *__restrict __buf, size_t __len)
947 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
948 extern int qfcvt_r (long double __value, int __ndigit,
949 int *__restrict __decpt, int *__restrict __sign,
950 char *__restrict __buf, size_t __len)
951 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
952 extern int mblen (__const char *__s, size_t __n) throw () ;
953 extern int mbtowc (wchar_t *__restrict __pwc,
954 __const char *__restrict __s, size_t __n) throw () ;
955 extern int wctomb (char *__s, wchar_t __wchar) throw () ;
956 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
957 __const char *__restrict __s, size_t __n) throw ();
958 extern size_t wcstombs (char *__restrict __s,
959 __const wchar_t *__restrict __pwcs, size_t __n)
960 throw ();
961 extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
962 extern int getsubopt (char **__restrict __optionp,
963 char *__const *__restrict __tokens,
964 char **__restrict __valuep)
965 throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
966 extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
967 extern int posix_openpt (int __oflag) ;
968 extern int grantpt (int __fd) throw ();
969 extern int unlockpt (int __fd) throw ();
970 extern char *ptsname (int __fd) throw () ;
971 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
972 throw () __attribute__ ((__nonnull__ (2)));
973 extern int getpt (void);
974 extern int getloadavg (double __loadavg[], int __nelem)
975 throw () __attribute__ ((__nonnull__ (1)));
976 }
977 namespace std __attribute__ ((__visibility__ ("default"))) {
978 using ::div_t;
979 using ::ldiv_t;
980 using ::abort;
981 using ::abs;
982 using ::atexit;
983 using ::atof;
984 using ::atoi;
985 using ::atol;
986 using ::bsearch;
987 using ::calloc;
988 using ::div;
989 using ::exit;
990 using ::free;
991 using ::getenv;
992 using ::labs;
993 using ::ldiv;
994 using ::malloc;
995 using ::mblen;
996 using ::mbstowcs;
997 using ::mbtowc;
998 using ::qsort;
999 using ::rand;
1000 using ::realloc;
1001 using ::srand;
1002 using ::strtod;
1003 using ::strtol;
1004 using ::strtoul;
1005 using ::system;
1006 using ::wcstombs;
1007 using ::wctomb;
1008 inline long
1009 abs(long __i) { return labs(__i); }
1010 inline ldiv_t
1011 div(long __i, long __j) { return ldiv(__i, __j); }
1012 }
1013 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
1014 using ::lldiv_t;
1015 using ::_Exit;
1016 inline long long
1017 abs(long long __x) { return __x >= 0 ? __x : -__x; }
1018 using ::llabs;
1019 inline lldiv_t
1020 div(long long __n, long long __d)
1021 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
1022 using ::lldiv;
1023 using ::atoll;
1024 using ::strtoll;
1025 using ::strtoull;
1026 using ::strtof;
1027 using ::strtold;
1028 }
1029 namespace std __attribute__ ((__visibility__ ("default"))) {
1030 using ::__gnu_cxx::lldiv_t;
1031 using ::__gnu_cxx::_Exit;
1032 using ::__gnu_cxx::abs;
1033 using ::__gnu_cxx::llabs;
1034 using ::__gnu_cxx::div;
1035 using ::__gnu_cxx::lldiv;
1036 using ::__gnu_cxx::atoll;
1037 using ::__gnu_cxx::strtof;
1038 using ::__gnu_cxx::strtoll;
1039 using ::__gnu_cxx::strtoull;
1040 using ::__gnu_cxx::strtold;
1041 }
1042 namespace std __attribute__ ((__visibility__ ("default"))) {
1043 using ::va_list;
1044 }
1045 extern "C" {
1046 extern void *memcpy (void *__restrict __dest,
1047 __const void *__restrict __src, size_t __n)
1048 throw () __attribute__ ((__nonnull__ (1, 2)));
1049 extern void *memmove (void *__dest, __const void *__src, size_t __n)
1050 throw () __attribute__ ((__nonnull__ (1, 2)));
1051 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
1052 int __c, size_t __n)
1053 throw () __attribute__ ((__nonnull__ (1, 2)));
1054 extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1055 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
1056 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1057 extern void *memchr (__const void *__s, int __c, size_t __n)
1058 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1059 extern void *rawmemchr (__const void *__s, int __c)
1060 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1061 extern void *memrchr (__const void *__s, int __c, size_t __n)
1062 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1063 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
1064 throw () __attribute__ ((__nonnull__ (1, 2)));
1065 extern char *strncpy (char *__restrict __dest,
1066 __const char *__restrict __src, size_t __n)
1067 throw () __attribute__ ((__nonnull__ (1, 2)));
1068 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
1069 throw () __attribute__ ((__nonnull__ (1, 2)));
1070 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
1071 size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
1072 extern int strcmp (__const char *__s1, __const char *__s2)
1073 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1074 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
1075 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1076 extern int strcoll (__const char *__s1, __const char *__s2)
1077 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1078 extern size_t strxfrm (char *__restrict __dest,
1079 __const char *__restrict __src, size_t __n)
1080 throw () __attribute__ ((__nonnull__ (2)));
1081 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
1082 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1083 extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
1084 __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
1085 extern char *strdup (__const char *__s)
1086 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1087 extern char *strndup (__const char *__string, size_t __n)
1088 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1089 extern char *strchr (__const char *__s, int __c)
1090 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1091 extern char *strrchr (__const char *__s, int __c)
1092 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1093 extern char *strchrnul (__const char *__s, int __c)
1094 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1095 extern size_t strcspn (__const char *__s, __const char *__reject)
1096 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1097 extern size_t strspn (__const char *__s, __const char *__accept)
1098 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1099 extern char *strpbrk (__const char *__s, __const char *__accept)
1100 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1101 extern char *strstr (__const char *__haystack, __const char *__needle)
1102 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1103 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
1104 throw () __attribute__ ((__nonnull__ (2)));
1105 extern char *__strtok_r (char *__restrict __s,
1106 __const char *__restrict __delim,
1107 char **__restrict __save_ptr)
1108 throw () __attribute__ ((__nonnull__ (2, 3)));
1109 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
1110 char **__restrict __save_ptr)
1111 throw () __attribute__ ((__nonnull__ (2, 3)));
1112 extern char *strcasestr (__const char *__haystack, __const char *__needle)
1113 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1114 extern void *memmem (__const void *__haystack, size_t __haystacklen,
1115 __const void *__needle, size_t __needlelen)
1116 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
1117 extern void *__mempcpy (void *__restrict __dest,
1118 __const void *__restrict __src, size_t __n)
1119 throw () __attribute__ ((__nonnull__ (1, 2)));
1120 extern void *mempcpy (void *__restrict __dest,
1121 __const void *__restrict __src, size_t __n)
1122 throw () __attribute__ ((__nonnull__ (1, 2)));
1123 extern size_t strlen (__const char *__s)
1124 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1125 extern size_t strnlen (__const char *__string, size_t __maxlen)
1126 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1127 extern char *strerror (int __errnum) throw ();
1128 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
1129 throw () __attribute__ ((__nonnull__ (2)));
1130 extern char *strerror_l (int __errnum, __locale_t __l) throw ();
1131 extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1132 extern void bcopy (__const void *__src, void *__dest, size_t __n)
1133 throw () __attribute__ ((__nonnull__ (1, 2)));
1134 extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1135 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
1136 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1137 extern char *index (__const char *__s, int __c)
1138 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1139 extern char *rindex (__const char *__s, int __c)
1140 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1141 extern int ffs (int __i) throw () __attribute__ ((__const__));
1142 extern int ffsl (long int __l) throw () __attribute__ ((__const__));
1143 __extension__ extern int ffsll (long long int __ll)
1144 throw () __attribute__ ((__const__));
1145 extern int strcasecmp (__const char *__s1, __const char *__s2)
1146 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1147 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
1148 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1149 extern int strcasecmp_l (__const char *__s1, __const char *__s2,
1150 __locale_t __loc)
1151 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1152 extern int strncasecmp_l (__const char *__s1, __const char *__s2,
1153 size_t __n, __locale_t __loc)
1154 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
1155 extern char *strsep (char **__restrict __stringp,
1156 __const char *__restrict __delim)
1157 throw () __attribute__ ((__nonnull__ (1, 2)));
1158 extern int strverscmp (__const char *__s1, __const char *__s2)
1159 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1160 extern char *strsignal (int __sig) throw ();
1161 extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
1162 throw () __attribute__ ((__nonnull__ (1, 2)));
1163 extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
1164 throw () __attribute__ ((__nonnull__ (1, 2)));
1165 extern char *__stpncpy (char *__restrict __dest,
1166 __const char *__restrict __src, size_t __n)
1167 throw () __attribute__ ((__nonnull__ (1, 2)));
1168 extern char *stpncpy (char *__restrict __dest,
1169 __const char *__restrict __src, size_t __n)
1170 throw () __attribute__ ((__nonnull__ (1, 2)));
1171 extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
1172 extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1173 extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1)));
1174 }
1175 namespace std __attribute__ ((__visibility__ ("default"))) {
1176 using ::memchr;
1177 using ::memcmp;
1178 using ::memcpy;
1179 using ::memmove;
1180 using ::memset;
1181 using ::strcat;
1182 using ::strcmp;
1183 using ::strcoll;
1184 using ::strcpy;
1185 using ::strcspn;
1186 using ::strerror;
1187 using ::strlen;
1188 using ::strncat;
1189 using ::strncmp;
1190 using ::strncpy;
1191 using ::strspn;
1192 using ::strtok;
1193 using ::strxfrm;
1194 inline void*
1195 memchr(void* __p, int __c, size_t __n)
1196 { return memchr(const_cast<const void*>(__p), __c, __n); }
1197 using ::strchr;
1198 inline char*
1199 strchr(char* __s1, int __n)
1200 { return __builtin_strchr(const_cast<const char*>(__s1), __n); }
1201 using ::strpbrk;
1202 inline char*
1203 strpbrk(char* __s1, const char* __s2)
1204 { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
1205 using ::strrchr;
1206 inline char*
1207 strrchr(char* __s1, int __n)
1208 { return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
1209 using ::strstr;
1210 inline char*
1211 strstr(char* __s1, const char* __s2)
1212 { return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
1213 }
1214 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
1215 template<typename _Iterator, typename _Container>
1216 class __normal_iterator;
1217 }
1218 namespace std __attribute__ ((__visibility__ ("default"))) {
1219 struct __true_type { };
1220 struct __false_type { };
1221 template<bool>
1222 struct __truth_type
1223 { typedef __false_type __type; };
1224 template<>
1225 struct __truth_type<true>
1226 { typedef __true_type __type; };
1227 template<class _Sp, class _Tp>
1228 struct __traitor
1229 {
1230 enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
1231 typedef typename __truth_type<__value>::__type __type;
1232 };
1233 template<typename, typename>
1234 struct __are_same
1235 {
1236 enum { __value = 0 };
1237 typedef __false_type __type;
1238 };
1239 template<typename _Tp>
1240 struct __are_same<_Tp, _Tp>
1241 {
1242 enum { __value = 1 };
1243 typedef __true_type __type;
1244 };
1245 template<typename _Tp>
1246 struct __is_void
1247 {
1248 enum { __value = 0 };
1249 typedef __false_type __type;
1250 };
1251 template<>
1252 struct __is_void<void>
1253 {
1254 enum { __value = 1 };
1255 typedef __true_type __type;
1256 };
1257 template<typename _Tp>
1258 struct __is_integer
1259 {
1260 enum { __value = 0 };
1261 typedef __false_type __type;
1262 };
1263 template<>
1264 struct __is_integer<bool>
1265 {
1266 enum { __value = 1 };
1267 typedef __true_type __type;
1268 };
1269 template<>
1270 struct __is_integer<char>
1271 {
1272 enum { __value = 1 };
1273 typedef __true_type __type;
1274 };
1275 template<>
1276 struct __is_integer<signed char>
1277 {
1278 enum { __value = 1 };
1279 typedef __true_type __type;
1280 };
1281 template<>
1282 struct __is_integer<unsigned char>
1283 {
1284 enum { __value = 1 };
1285 typedef __true_type __type;
1286 };
1287 template<>
1288 struct __is_integer<wchar_t>
1289 {
1290 enum { __value = 1 };
1291 typedef __true_type __type;
1292 };
1293 template<>
1294 struct __is_integer<short>
1295 {
1296 enum { __value = 1 };
1297 typedef __true_type __type;
1298 };
1299 template<>
1300 struct __is_integer<unsigned short>
1301 {
1302 enum { __value = 1 };
1303 typedef __true_type __type;
1304 };
1305 template<>
1306 struct __is_integer<int>
1307 {
1308 enum { __value = 1 };
1309 typedef __true_type __type;
1310 };
1311 template<>
1312 struct __is_integer<unsigned int>
1313 {
1314 enum { __value = 1 };
1315 typedef __true_type __type;
1316 };
1317 template<>
1318 struct __is_integer<long>
1319 {
1320 enum { __value = 1 };
1321 typedef __true_type __type;
1322 };
1323 template<>
1324 struct __is_integer<unsigned long>
1325 {
1326 enum { __value = 1 };
1327 typedef __true_type __type;
1328 };
1329 template<>
1330 struct __is_integer<long long>
1331 {
1332 enum { __value = 1 };
1333 typedef __true_type __type;
1334 };
1335 template<>
1336 struct __is_integer<unsigned long long>
1337 {
1338 enum { __value = 1 };
1339 typedef __true_type __type;
1340 };
1341 template<typename _Tp>
1342 struct __is_floating
1343 {
1344 enum { __value = 0 };
1345 typedef __false_type __type;
1346 };
1347 template<>
1348 struct __is_floating<float>
1349 {
1350 enum { __value = 1 };
1351 typedef __true_type __type;
1352 };
1353 template<>
1354 struct __is_floating<double>
1355 {
1356 enum { __value = 1 };
1357 typedef __true_type __type;
1358 };
1359 template<>
1360 struct __is_floating<long double>
1361 {
1362 enum { __value = 1 };
1363 typedef __true_type __type;
1364 };
1365 template<typename _Tp>
1366 struct __is_pointer
1367 {
1368 enum { __value = 0 };
1369 typedef __false_type __type;
1370 };
1371 template<typename _Tp>
1372 struct __is_pointer<_Tp*>
1373 {
1374 enum { __value = 1 };
1375 typedef __true_type __type;
1376 };
1377 template<typename _Tp>
1378 struct __is_normal_iterator
1379 {
1380 enum { __value = 0 };
1381 typedef __false_type __type;
1382 };
1383 template<typename _Iterator, typename _Container>
1384 struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
1385 _Container> >
1386 {
1387 enum { __value = 1 };
1388 typedef __true_type __type;
1389 };
1390 template<typename _Tp>
1391 struct __is_arithmetic
1392 : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
1393 { };
1394 template<typename _Tp>
1395 struct __is_fundamental
1396 : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
1397 { };
1398 template<typename _Tp>
1399 struct __is_scalar
1400 : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
1401 { };
1402 template<typename _Tp>
1403 struct __is_char
1404 {
1405 enum { __value = 0 };
1406 typedef __false_type __type;
1407 };
1408 template<>
1409 struct __is_char<char>
1410 {
1411 enum { __value = 1 };
1412 typedef __true_type __type;
1413 };
1414 template<>
1415 struct __is_char<wchar_t>
1416 {
1417 enum { __value = 1 };
1418 typedef __true_type __type;
1419 };
1420 template<typename _Tp>
1421 struct __is_byte
1422 {
1423 enum { __value = 0 };
1424 typedef __false_type __type;
1425 };
1426 template<>
1427 struct __is_byte<char>
1428 {
1429 enum { __value = 1 };
1430 typedef __true_type __type;
1431 };
1432 template<>
1433 struct __is_byte<signed char>
1434 {
1435 enum { __value = 1 };
1436 typedef __true_type __type;
1437 };
1438 template<>
1439 struct __is_byte<unsigned char>
1440 {
1441 enum { __value = 1 };
1442 typedef __true_type __type;
1443 };
1444 template<typename _Tp>
1445 struct __is_move_iterator
1446 {
1447 enum { __value = 0 };
1448 typedef __false_type __type;
1449 };
1450 }
1451 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
1452 template<bool, typename>
1453 struct __enable_if
1454 { };
1455 template<typename _Tp>
1456 struct __enable_if<true, _Tp>
1457 { typedef _Tp __type; };
1458 template<bool _Cond, typename _Iftrue, typename _Iffalse>
1459 struct __conditional_type
1460 { typedef _Iftrue __type; };
1461 template<typename _Iftrue, typename _Iffalse>
1462 struct __conditional_type<false, _Iftrue, _Iffalse>
1463 { typedef _Iffalse __type; };
1464 template<typename _Tp>
1465 struct __add_unsigned
1466 {
1467 private:
1468 typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
1469 public:
1470 typedef typename __if_type::__type __type;
1471 };
1472 template<>
1473 struct __add_unsigned<char>
1474 { typedef unsigned char __type; };
1475 template<>
1476 struct __add_unsigned<signed char>
1477 { typedef unsigned char __type; };
1478 template<>
1479 struct __add_unsigned<short>
1480 { typedef unsigned short __type; };
1481 template<>
1482 struct __add_unsigned<int>
1483 { typedef unsigned int __type; };
1484 template<>
1485 struct __add_unsigned<long>
1486 { typedef unsigned long __type; };
1487 template<>
1488 struct __add_unsigned<long long>
1489 { typedef unsigned long long __type; };
1490 template<>
1491 struct __add_unsigned<bool>;
1492 template<>
1493 struct __add_unsigned<wchar_t>;
1494 template<typename _Tp>
1495 struct __remove_unsigned
1496 {
1497 private:
1498 typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
1499 public:
1500 typedef typename __if_type::__type __type;
1501 };
1502 template<>
1503 struct __remove_unsigned<char>
1504 { typedef signed char __type; };
1505 template<>
1506 struct __remove_unsigned<unsigned char>
1507 { typedef signed char __type; };
1508 template<>
1509 struct __remove_unsigned<unsigned short>
1510 { typedef short __type; };
1511 template<>
1512 struct __remove_unsigned<unsigned int>
1513 { typedef int __type; };
1514 template<>
1515 struct __remove_unsigned<unsigned long>
1516 { typedef long __type; };
1517 template<>
1518 struct __remove_unsigned<unsigned long long>
1519 { typedef long long __type; };
1520 template<>
1521 struct __remove_unsigned<bool>;
1522 template<>
1523 struct __remove_unsigned<wchar_t>;
1524 template<typename _Type>
1525 inline bool
1526 __is_null_pointer(_Type* __ptr)
1527 { return __ptr == 0; }
1528 template<typename _Type>
1529 inline bool
1530 __is_null_pointer(_Type)
1531 { return false; }
1532 template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
1533 struct __promote
1534 { typedef double __type; };
1535 template<typename _Tp>
1536 struct __promote<_Tp, false>
1537 { typedef _Tp __type; };
1538 template<typename _Tp, typename _Up>
1539 struct __promote_2
1540 {
1541 private:
1542 typedef typename __promote<_Tp>::__type __type1;
1543 typedef typename __promote<_Up>::__type __type2;
1544 public:
1545 typedef __typeof__(__type1() + __type2()) __type;
1546 };
1547 template<typename _Tp, typename _Up, typename _Vp>
1548 struct __promote_3
1549 {
1550 private:
1551 typedef typename __promote<_Tp>::__type __type1;
1552 typedef typename __promote<_Up>::__type __type2;
1553 typedef typename __promote<_Vp>::__type __type3;
1554 public:
1555 typedef __typeof__(__type1() + __type2() + __type3()) __type;
1556 };
1557 template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
1558 struct __promote_4
1559 {
1560 private:
1561 typedef typename __promote<_Tp>::__type __type1;
1562 typedef typename __promote<_Up>::__type __type2;
1563 typedef typename __promote<_Vp>::__type __type3;
1564 typedef typename __promote<_Wp>::__type __type4;
1565 public:
1566 typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
1567 };
1568 }
1569 extern "C" {
1570 typedef float float_t;
1571 typedef double double_t;
1572 extern double acos (double __x) throw (); extern double __acos (double __x) throw ();
1573 extern double asin (double __x) throw (); extern double __asin (double __x) throw ();
1574 extern double atan (double __x) throw (); extern double __atan (double __x) throw ();
1575 extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw ();
1576 extern double cos (double __x) throw (); extern double __cos (double __x) throw ();
1577 extern double sin (double __x) throw (); extern double __sin (double __x) throw ();
1578 extern double tan (double __x) throw (); extern double __tan (double __x) throw ();
1579 extern double cosh (double __x) throw (); extern double __cosh (double __x) throw ();
1580 extern double sinh (double __x) throw (); extern double __sinh (double __x) throw ();
1581 extern double tanh (double __x) throw (); extern double __tanh (double __x) throw ();
1582 extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw ();
1583 extern double acosh (double __x) throw (); extern double __acosh (double __x) throw ();
1584 extern double asinh (double __x) throw (); extern double __asinh (double __x) throw ();
1585 extern double atanh (double __x) throw (); extern double __atanh (double __x) throw ();
1586 extern double exp (double __x) throw (); extern double __exp (double __x) throw ();
1587 extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw ();
1588 extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw ();
1589 extern double log (double __x) throw (); extern double __log (double __x) throw ();
1590 extern double log10 (double __x) throw (); extern double __log10 (double __x) throw ();
1591 extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw ();
1592 extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw ();
1593 extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw ();
1594 extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw ();
1595 extern double log1p (double __x) throw (); extern double __log1p (double __x) throw ();
1596 extern double logb (double __x) throw (); extern double __logb (double __x) throw ();
1597 extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw ();
1598 extern double log2 (double __x) throw (); extern double __log2 (double __x) throw ();
1599 extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw ();
1600 extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw ();
1601 extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw ();
1602 extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw ();
1603 extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__));
1604 extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__));
1605 extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__));
1606 extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw ();
1607 extern int __isinf (double __value) throw () __attribute__ ((__const__));
1608 extern int __finite (double __value) throw () __attribute__ ((__const__));
1609 extern int isinf (double __value) throw () __attribute__ ((__const__));
1610 extern int finite (double __value) throw () __attribute__ ((__const__));
1611 extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw ();
1612 extern double significand (double __x) throw (); extern double __significand (double __x) throw ();
1613 extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__));
1614 extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__));
1615 extern int __isnan (double __value) throw () __attribute__ ((__const__));
1616 extern int isnan (double __value) throw () __attribute__ ((__const__));
1617 extern double j0 (double) throw (); extern double __j0 (double) throw ();
1618 extern double j1 (double) throw (); extern double __j1 (double) throw ();
1619 extern double jn (int, double) throw (); extern double __jn (int, double) throw ();
1620 extern double y0 (double) throw (); extern double __y0 (double) throw ();
1621 extern double y1 (double) throw (); extern double __y1 (double) throw ();
1622 extern double yn (int, double) throw (); extern double __yn (int, double) throw ();
1623 extern double erf (double) throw (); extern double __erf (double) throw ();
1624 extern double erfc (double) throw (); extern double __erfc (double) throw ();
1625 extern double lgamma (double) throw (); extern double __lgamma (double) throw ();
1626 extern double tgamma (double) throw (); extern double __tgamma (double) throw ();
1627 extern double gamma (double) throw (); extern double __gamma (double) throw ();
1628 extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw ();
1629 extern double rint (double __x) throw (); extern double __rint (double __x) throw ();
1630 extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__));
1631 extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__));
1632 extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw ();
1633 extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw ();
1634 extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw ();
1635 extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw ();
1636 extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw ();
1637 extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__));
1638 extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__));
1639 extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw ();
1640 extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw ();
1641 extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw ();
1642 extern long int lround (double __x) throw (); extern long int __lround (double __x) throw ();
1643 extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw ();
1644 extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw ();
1645 extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw ();
1646 extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();
1647 extern int __fpclassify (double __value) throw ()
1648 __attribute__ ((__const__));
1649 extern int __signbit (double __value) throw ()
1650 __attribute__ ((__const__));
1651 extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw ();
1652 extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw ();
1653 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw ();
1654 extern float asinf (float __x) throw (); extern float __asinf (float __x) throw ();
1655 extern float atanf (float __x) throw (); extern float __atanf (float __x) throw ();
1656 extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw ();
1657 extern float cosf (float __x) throw (); extern float __cosf (float __x) throw ();
1658 extern float sinf (float __x) throw (); extern float __sinf (float __x) throw ();
1659 extern float tanf (float __x) throw (); extern float __tanf (float __x) throw ();
1660 extern float coshf (float __x) throw (); extern float __coshf (float __x) throw ();
1661 extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw ();
1662 extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw ();
1663 extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw ();
1664 extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw ();
1665 extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw ();
1666 extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw ();
1667 extern float expf (float __x) throw (); extern float __expf (float __x) throw ();
1668 extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw ();
1669 extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw ();
1670 extern float logf (float __x) throw (); extern float __logf (float __x) throw ();
1671 extern float log10f (float __x) throw (); extern float __log10f (float __x) throw ();
1672 extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw ();
1673 extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw ();
1674 extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw ();
1675 extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw ();
1676 extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw ();
1677 extern float logbf (float __x) throw (); extern float __logbf (float __x) throw ();
1678 extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw ();
1679 extern float log2f (float __x) throw (); extern float __log2f (float __x) throw ();
1680 extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw ();
1681 extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw ();
1682 extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw ();
1683 extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw ();
1684 extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__));
1685 extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__));
1686 extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__));
1687 extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw ();
1688 extern int __isinff (float __value) throw () __attribute__ ((__const__));
1689 extern int __finitef (float __value) throw () __attribute__ ((__const__));
1690 extern int isinff (float __value) throw () __attribute__ ((__const__));
1691 extern int finitef (float __value) throw () __attribute__ ((__const__));
1692 extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw ();
1693 extern float significandf (float __x) throw (); extern float __significandf (float __x) throw ();
1694 extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__));
1695 extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__));
1696 extern int __isnanf (float __value) throw () __attribute__ ((__const__));
1697 extern int isnanf (float __value) throw () __attribute__ ((__const__));
1698 extern float j0f (float) throw (); extern float __j0f (float) throw ();
1699 extern float j1f (float) throw (); extern float __j1f (float) throw ();
1700 extern float jnf (int, float) throw (); extern float __jnf (int, float) throw ();
1701 extern float y0f (float) throw (); extern float __y0f (float) throw ();
1702 extern float y1f (float) throw (); extern float __y1f (float) throw ();
1703 extern float ynf (int, float) throw (); extern float __ynf (int, float) throw ();
1704 extern float erff (float) throw (); extern float __erff (float) throw ();
1705 extern float erfcf (float) throw (); extern float __erfcf (float) throw ();
1706 extern float lgammaf (float) throw (); extern float __lgammaf (float) throw ();
1707 extern float tgammaf (float) throw (); extern float __tgammaf (float) throw ();
1708 extern float gammaf (float) throw (); extern float __gammaf (float) throw ();
1709 extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw ();
1710 extern float rintf (float __x) throw (); extern float __rintf (float __x) throw ();
1711 extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__));
1712 extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__));
1713 extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw ();
1714 extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw ();
1715 extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw ();
1716 extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw ();
1717 extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw ();
1718 extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__));
1719 extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__));
1720 extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw ();
1721 extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw ();
1722 extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw ();
1723 extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw ();
1724 extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw ();
1725 extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw ();
1726 extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw ();
1727 extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();
1728 extern int __fpclassifyf (float __value) throw ()
1729 __attribute__ ((__const__));
1730 extern int __signbitf (float __value) throw ()
1731 __attribute__ ((__const__));
1732 extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw ();
1733 extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw ();
1734 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw ();
1735 extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw ();
1736 extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw ();
1737 extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw ();
1738 extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw ();
1739 extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw ();
1740 extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw ();
1741 extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw ();
1742 extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw ();
1743 extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw ();
1744 extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw ();
1745 extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw ();
1746 extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw ();
1747 extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw ();
1748 extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw ();
1749 extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw ();
1750 extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw ();
1751 extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw ();
1752 extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw ();
1753 extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw ();
1754 extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw ();
1755 extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw ();
1756 extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw ();
1757 extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw ();
1758 extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw ();
1759 extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw ();
1760 extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw ();
1761 extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw ();
1762 extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw ();
1763 extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw ();
1764 extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw ();
1765 extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__));
1766 extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__));
1767 extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__));
1768 extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw ();
1769 extern int __isinfl (long double __value) throw () __attribute__ ((__const__));
1770 extern int __finitel (long double __value) throw () __attribute__ ((__const__));
1771 extern int isinfl (long double __value) throw () __attribute__ ((__const__));
1772 extern int finitel (long double __value) throw () __attribute__ ((__const__));
1773 extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw ();
1774 extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw ();
1775 extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__));
1776 extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__));
1777 extern int __isnanl (long double __value) throw () __attribute__ ((__const__));
1778 extern int isnanl (long double __value) throw () __attribute__ ((__const__));
1779 extern long double j0l (long double) throw (); extern long double __j0l (long double) throw ();
1780 extern long double j1l (long double) throw (); extern long double __j1l (long double) throw ();
1781 extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw ();
1782 extern long double y0l (long double) throw (); extern long double __y0l (long double) throw ();
1783 extern long double y1l (long double) throw (); extern long double __y1l (long double) throw ();
1784 extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw ();
1785 extern long double erfl (long double) throw (); extern long double __erfl (long double) throw ();
1786 extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw ();
1787 extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw ();
1788 extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw ();
1789 extern long double gammal (long double) throw (); extern long double __gammal (long double) throw ();
1790 extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw ();
1791 extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw ();
1792 extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__));
1793 extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__));
1794 extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw ();
1795 extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw ();
1796 extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw ();
1797 extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw ();
1798 extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw ();
1799 extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__));
1800 extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__));
1801 extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw ();
1802 extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw ();
1803 extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw ();
1804 extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw ();
1805 extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw ();
1806 extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw ();
1807 extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw ();
1808 extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();
1809 extern int __fpclassifyl (long double __value) throw ()
1810 __attribute__ ((__const__));
1811 extern int __signbitl (long double __value) throw ()
1812 __attribute__ ((__const__));
1813 extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw ();
1814 extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw ();
1815 extern int signgam;
1816 enum
1817 {
1818 FP_NAN,
1819 FP_INFINITE,
1820 FP_ZERO,
1821 FP_SUBNORMAL,
1822 FP_NORMAL
1823 };
1824 typedef enum
1825 {
1826 _IEEE_ = -1,
1827 _SVID_,
1828 _XOPEN_,
1829 _POSIX_,
1830 _ISOC_
1831 } _LIB_VERSION_TYPE;
1832 extern _LIB_VERSION_TYPE _LIB_VERSION;
1833 struct __exception
1834 {
1835 int type;
1836 char *name;
1837 double arg1;
1838 double arg2;
1839 double retval;
1840 };
1841 extern int matherr (struct __exception *__exc) throw ();
1842 extern __inline __attribute__ ((__gnu_inline__)) int
1843 __signbitf (float __x) throw ()
1844 {
1845 __extension__ union { float __f; int __i; } __u = { __f: __x };
1846 return __u.__i < 0;
1847 }
1848 extern __inline __attribute__ ((__gnu_inline__)) int
1849 __signbit (double __x) throw ()
1850 {
1851 __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
1852 return __u.__i[1] < 0;
1853 }
1854 extern __inline __attribute__ ((__gnu_inline__)) int
1855 __signbitl (long double __x) throw ()
1856 {
1857 __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
1858 return (__u.__i[2] & 0x8000) != 0;
1859 }
1860 }
1861 namespace std __attribute__ ((__visibility__ ("default"))) {
1862 template<typename _Tp>
1863 _Tp __cmath_power(_Tp, unsigned int);
1864 template<typename _Tp>
1865 inline _Tp
1866 __pow_helper(_Tp __x, int __n)
1867 {
1868 return __n < 0
1869 ? _Tp(1)/__cmath_power(__x, -__n)
1870 : __cmath_power(__x, __n);
1871 }
1872 inline double
1873 abs(double __x)
1874 { return __builtin_fabs(__x); }
1875 inline float
1876 abs(float __x)
1877 { return __builtin_fabsf(__x); }
1878 inline long double
1879 abs(long double __x)
1880 { return __builtin_fabsl(__x); }
1881 using ::acos;
1882 inline float
1883 acos(float __x)
1884 { return __builtin_acosf(__x); }
1885 inline long double
1886 acos(long double __x)
1887 { return __builtin_acosl(__x); }
1888 template<typename _Tp>
1889 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1890 double>::__type
1891 acos(_Tp __x)
1892 { return __builtin_acos(__x); }
1893 using ::asin;
1894 inline float
1895 asin(float __x)
1896 { return __builtin_asinf(__x); }
1897 inline long double
1898 asin(long double __x)
1899 { return __builtin_asinl(__x); }
1900 template<typename _Tp>
1901 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1902 double>::__type
1903 asin(_Tp __x)
1904 { return __builtin_asin(__x); }
1905 using ::atan;
1906 inline float
1907 atan(float __x)
1908 { return __builtin_atanf(__x); }
1909 inline long double
1910 atan(long double __x)
1911 { return __builtin_atanl(__x); }
1912 template<typename _Tp>
1913 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1914 double>::__type
1915 atan(_Tp __x)
1916 { return __builtin_atan(__x); }
1917 using ::atan2;
1918 inline float
1919 atan2(float __y, float __x)
1920 { return __builtin_atan2f(__y, __x); }
1921 inline long double
1922 atan2(long double __y, long double __x)
1923 { return __builtin_atan2l(__y, __x); }
1924 template<typename _Tp, typename _Up>
1925 inline
1926 typename __gnu_cxx::__promote_2<
1927 typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
1928 && __is_arithmetic<_Up>::__value,
1929 _Tp>::__type, _Up>::__type
1930 atan2(_Tp __y, _Up __x)
1931 {
1932 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
1933 return atan2(__type(__y), __type(__x));
1934 }
1935 using ::ceil;
1936 inline float
1937 ceil(float __x)
1938 { return __builtin_ceilf(__x); }
1939 inline long double
1940 ceil(long double __x)
1941 { return __builtin_ceill(__x); }
1942 template<typename _Tp>
1943 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1944 double>::__type
1945 ceil(_Tp __x)
1946 { return __builtin_ceil(__x); }
1947 using ::cos;
1948 inline float
1949 cos(float __x)
1950 { return __builtin_cosf(__x); }
1951 inline long double
1952 cos(long double __x)
1953 { return __builtin_cosl(__x); }
1954 template<typename _Tp>
1955 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1956 double>::__type
1957 cos(_Tp __x)
1958 { return __builtin_cos(__x); }
1959 using ::cosh;
1960 inline float
1961 cosh(float __x)
1962 { return __builtin_coshf(__x); }
1963 inline long double
1964 cosh(long double __x)
1965 { return __builtin_coshl(__x); }
1966 template<typename _Tp>
1967 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1968 double>::__type
1969 cosh(_Tp __x)
1970 { return __builtin_cosh(__x); }
1971 using ::exp;
1972 inline float
1973 exp(float __x)
1974 { return __builtin_expf(__x); }
1975 inline long double
1976 exp(long double __x)
1977 { return __builtin_expl(__x); }
1978 template<typename _Tp>
1979 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1980 double>::__type
1981 exp(_Tp __x)
1982 { return __builtin_exp(__x); }
1983 using ::fabs;
1984 inline float
1985 fabs(float __x)
1986 { return __builtin_fabsf(__x); }
1987 inline long double
1988 fabs(long double __x)
1989 { return __builtin_fabsl(__x); }
1990 template<typename _Tp>
1991 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
1992 double>::__type
1993 fabs(_Tp __x)
1994 { return __builtin_fabs(__x); }
1995 using ::floor;
1996 inline float
1997 floor(float __x)
1998 { return __builtin_floorf(__x); }
1999 inline long double
2000 floor(long double __x)
2001 { return __builtin_floorl(__x); }
2002 template<typename _Tp>
2003 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2004 double>::__type
2005 floor(_Tp __x)
2006 { return __builtin_floor(__x); }
2007 using ::fmod;
2008 inline float
2009 fmod(float __x, float __y)
2010 { return __builtin_fmodf(__x, __y); }
2011 inline long double
2012 fmod(long double __x, long double __y)
2013 { return __builtin_fmodl(__x, __y); }
2014 using ::frexp;
2015 inline float
2016 frexp(float __x, int* __exp)
2017 { return __builtin_frexpf(__x, __exp); }
2018 inline long double
2019 frexp(long double __x, int* __exp)
2020 { return __builtin_frexpl(__x, __exp); }
2021 template<typename _Tp>
2022 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2023 double>::__type
2024 frexp(_Tp __x, int* __exp)
2025 { return __builtin_frexp(__x, __exp); }
2026 using ::ldexp;
2027 inline float
2028 ldexp(float __x, int __exp)
2029 { return __builtin_ldexpf(__x, __exp); }
2030 inline long double
2031 ldexp(long double __x, int __exp)
2032 { return __builtin_ldexpl(__x, __exp); }
2033 template<typename _Tp>
2034 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2035 double>::__type
2036 ldexp(_Tp __x, int __exp)
2037 { return __builtin_ldexp(__x, __exp); }
2038 using ::log;
2039 inline float
2040 log(float __x)
2041 { return __builtin_logf(__x); }
2042 inline long double
2043 log(long double __x)
2044 { return __builtin_logl(__x); }
2045 template<typename _Tp>
2046 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2047 double>::__type
2048 log(_Tp __x)
2049 { return __builtin_log(__x); }
2050 using ::log10;
2051 inline float
2052 log10(float __x)
2053 { return __builtin_log10f(__x); }
2054 inline long double
2055 log10(long double __x)
2056 { return __builtin_log10l(__x); }
2057 template<typename _Tp>
2058 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2059 double>::__type
2060 log10(_Tp __x)
2061 { return __builtin_log10(__x); }
2062 using ::modf;
2063 inline float
2064 modf(float __x, float* __iptr)
2065 { return __builtin_modff(__x, __iptr); }
2066 inline long double
2067 modf(long double __x, long double* __iptr)
2068 { return __builtin_modfl(__x, __iptr); }
2069 using ::pow;
2070 inline float
2071 pow(float __x, float __y)
2072 { return __builtin_powf(__x, __y); }
2073 inline long double
2074 pow(long double __x, long double __y)
2075 { return __builtin_powl(__x, __y); }
2076 inline double
2077 pow(double __x, int __i)
2078 { return __builtin_powi(__x, __i); }
2079 inline float
2080 pow(float __x, int __n)
2081 { return __builtin_powif(__x, __n); }
2082 inline long double
2083 pow(long double __x, int __n)
2084 { return __builtin_powil(__x, __n); }
2085 template<typename _Tp, typename _Up>
2086 inline
2087 typename __gnu_cxx::__promote_2<
2088 typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
2089 && __is_arithmetic<_Up>::__value,
2090 _Tp>::__type, _Up>::__type
2091 pow(_Tp __x, _Up __y)
2092 {
2093 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
2094 return pow(__type(__x), __type(__y));
2095 }
2096 using ::sin;
2097 inline float
2098 sin(float __x)
2099 { return __builtin_sinf(__x); }
2100 inline long double
2101 sin(long double __x)
2102 { return __builtin_sinl(__x); }
2103 template<typename _Tp>
2104 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2105 double>::__type
2106 sin(_Tp __x)
2107 { return __builtin_sin(__x); }
2108 using ::sinh;
2109 inline float
2110 sinh(float __x)
2111 { return __builtin_sinhf(__x); }
2112 inline long double
2113 sinh(long double __x)
2114 { return __builtin_sinhl(__x); }
2115 template<typename _Tp>
2116 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2117 double>::__type
2118 sinh(_Tp __x)
2119 { return __builtin_sinh(__x); }
2120 using ::sqrt;
2121 inline float
2122 sqrt(float __x)
2123 { return __builtin_sqrtf(__x); }
2124 inline long double
2125 sqrt(long double __x)
2126 { return __builtin_sqrtl(__x); }
2127 template<typename _Tp>
2128 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2129 double>::__type
2130 sqrt(_Tp __x)
2131 { return __builtin_sqrt(__x); }
2132 using ::tan;
2133 inline float
2134 tan(float __x)
2135 { return __builtin_tanf(__x); }
2136 inline long double
2137 tan(long double __x)
2138 { return __builtin_tanl(__x); }
2139 template<typename _Tp>
2140 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2141 double>::__type
2142 tan(_Tp __x)
2143 { return __builtin_tan(__x); }
2144 using ::tanh;
2145 inline float
2146 tanh(float __x)
2147 { return __builtin_tanhf(__x); }
2148 inline long double
2149 tanh(long double __x)
2150 { return __builtin_tanhl(__x); }
2151 template<typename _Tp>
2152 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
2153 double>::__type
2154 tanh(_Tp __x)
2155 { return __builtin_tanh(__x); }
2156 }
2157 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
2158 template<typename _Tp>
2159 inline int
2160 __capture_fpclassify(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __fpclassifyf (__f) : sizeof (__f) == sizeof (double) ? __fpclassify (__f) : __fpclassifyl (__f)); }
2161 }
2162 namespace std __attribute__ ((__visibility__ ("default"))) {
2163 template<typename _Tp>
2164 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2165 int>::__type
2166 fpclassify(_Tp __f)
2167 {
2168 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2169 return ::__gnu_cxx::__capture_fpclassify(__type(__f));
2170 }
2171 template<typename _Tp>
2172 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2173 int>::__type
2174 isfinite(_Tp __f)
2175 {
2176 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2177 return __builtin_isfinite(__type(__f));
2178 }
2179 template<typename _Tp>
2180 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2181 int>::__type
2182 isinf(_Tp __f)
2183 {
2184 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2185 return __builtin_isinf(__type(__f));
2186 }
2187 template<typename _Tp>
2188 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2189 int>::__type
2190 isnan(_Tp __f)
2191 {
2192 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2193 return __builtin_isnan(__type(__f));
2194 }
2195 template<typename _Tp>
2196 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2197 int>::__type
2198 isnormal(_Tp __f)
2199 {
2200 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2201 return __builtin_isnormal(__type(__f));
2202 }
2203 template<typename _Tp>
2204 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2205 int>::__type
2206 signbit(_Tp __f)
2207 {
2208 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2209 return __builtin_signbit(__type(__f));
2210 }
2211 template<typename _Tp>
2212 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2213 int>::__type
2214 isgreater(_Tp __f1, _Tp __f2)
2215 {
2216 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2217 return __builtin_isgreater(__type(__f1), __type(__f2));
2218 }
2219 template<typename _Tp>
2220 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2221 int>::__type
2222 isgreaterequal(_Tp __f1, _Tp __f2)
2223 {
2224 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2225 return __builtin_isgreaterequal(__type(__f1), __type(__f2));
2226 }
2227 template<typename _Tp>
2228 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2229 int>::__type
2230 isless(_Tp __f1, _Tp __f2)
2231 {
2232 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2233 return __builtin_isless(__type(__f1), __type(__f2));
2234 }
2235 template<typename _Tp>
2236 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2237 int>::__type
2238 islessequal(_Tp __f1, _Tp __f2)
2239 {
2240 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2241 return __builtin_islessequal(__type(__f1), __type(__f2));
2242 }
2243 template<typename _Tp>
2244 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2245 int>::__type
2246 islessgreater(_Tp __f1, _Tp __f2)
2247 {
2248 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2249 return __builtin_islessgreater(__type(__f1), __type(__f2));
2250 }
2251 template<typename _Tp>
2252 inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
2253 int>::__type
2254 isunordered(_Tp __f1, _Tp __f2)
2255 {
2256 typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
2257 return __builtin_isunordered(__type(__f1), __type(__f2));
2258 }
2259 }
2260 namespace std __attribute__ ((__visibility__ ("default"))) {
2261 template<typename _Tp>
2262 inline _Tp
2263 __cmath_power(_Tp __x, unsigned int __n)
2264 {
2265 _Tp __y = __n % 2 ? __x : _Tp(1);
2266 while (__n >>= 1)
2267 {
2268 __x = __x * __x;
2269 if (__n % 2)
2270 __y = __y * __x;
2271 }
2272 return __y;
2273 }
2274 }
2275 extern "C" {
2276 struct tm
2277 {
2278 int tm_sec;
2279 int tm_min;
2280 int tm_hour;
2281 int tm_mday;
2282 int tm_mon;
2283 int tm_year;
2284 int tm_wday;
2285 int tm_yday;
2286 int tm_isdst;
2287 long int tm_gmtoff;
2288 __const char *tm_zone;
2289 };
2290 struct itimerspec
2291 {
2292 struct timespec it_interval;
2293 struct timespec it_value;
2294 };
2295 struct sigevent;
2296 extern clock_t clock (void) throw ();
2297 extern time_t time (time_t *__timer) throw ();
2298 extern double difftime (time_t __time1, time_t __time0)
2299 throw () __attribute__ ((__const__));
2300 extern time_t mktime (struct tm *__tp) throw ();
2301 extern size_t strftime (char *__restrict __s, size_t __maxsize,
2302 __const char *__restrict __format,
2303 __const struct tm *__restrict __tp) throw ();
2304 extern char *strptime (__const char *__restrict __s,
2305 __const char *__restrict __fmt, struct tm *__tp)
2306 throw ();
2307 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
2308 __const char *__restrict __format,
2309 __const struct tm *__restrict __tp,
2310 __locale_t __loc) throw ();
2311 extern char *strptime_l (__const char *__restrict __s,
2312 __const char *__restrict __fmt, struct tm *__tp,
2313 __locale_t __loc) throw ();
2314 extern struct tm *gmtime (__const time_t *__timer) throw ();
2315 extern struct tm *localtime (__const time_t *__timer) throw ();
2316 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
2317 struct tm *__restrict __tp) throw ();
2318 extern struct tm *localtime_r (__const time_t *__restrict __timer,
2319 struct tm *__restrict __tp) throw ();
2320 extern char *asctime (__const struct tm *__tp) throw ();
2321 extern char *ctime (__const time_t *__timer) throw ();
2322 extern char *asctime_r (__const struct tm *__restrict __tp,
2323 char *__restrict __buf) throw ();
2324 extern char *ctime_r (__const time_t *__restrict __timer,
2325 char *__restrict __buf) throw ();
2326 extern char *__tzname[2];
2327 extern int __daylight;
2328 extern long int __timezone;
2329 extern char *tzname[2];
2330 extern void tzset (void) throw ();
2331 extern int daylight;
2332 extern long int timezone;
2333 extern int stime (__const time_t *__when) throw ();
2334 extern time_t timegm (struct tm *__tp) throw ();
2335 extern time_t timelocal (struct tm *__tp) throw ();
2336 extern int dysize (int __year) throw () __attribute__ ((__const__));
2337 extern int nanosleep (__const struct timespec *__requested_time,
2338 struct timespec *__remaining);
2339 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
2340 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
2341 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
2342 throw ();
2343 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
2344 __const struct timespec *__req,
2345 struct timespec *__rem);
2346 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
2347 extern int timer_create (clockid_t __clock_id,
2348 struct sigevent *__restrict __evp,
2349 timer_t *__restrict __timerid) throw ();
2350 extern int timer_delete (timer_t __timerid) throw ();
2351 extern int timer_settime (timer_t __timerid, int __flags,
2352 __const struct itimerspec *__restrict __value,
2353 struct itimerspec *__restrict __ovalue) throw ();
2354 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
2355 throw ();
2356 extern int timer_getoverrun (timer_t __timerid) throw ();
2357 extern int getdate_err;
2358 extern struct tm *getdate (__const char *__string);
2359 extern int getdate_r (__const char *__restrict __string,
2360 struct tm *__restrict __resbufp);
2361 }
2362 namespace std __attribute__ ((__visibility__ ("default"))) {
2363 using ::clock_t;
2364 using ::time_t;
2365 using ::tm;
2366 using ::clock;
2367 using ::difftime;
2368 using ::mktime;
2369 using ::time;
2370 using ::asctime;
2371 using ::ctime;
2372 using ::gmtime;
2373 using ::localtime;
2374 using ::strftime;
2375 }
2376 extern "C" {
2377 struct timezone
2378 {
2379 int tz_minuteswest;
2380 int tz_dsttime;
2381 };
2382 typedef struct timezone *__restrict __timezone_ptr_t;
2383 extern int gettimeofday (struct timeval *__restrict __tv,
2384 __timezone_ptr_t __tz) throw () __attribute__ ((__nonnull__ (1)));
2385 extern int settimeofday (__const struct timeval *__tv,
2386 __const struct timezone *__tz)
2387 throw () __attribute__ ((__nonnull__ (1)));
2388 extern int adjtime (__const struct timeval *__delta,
2389 struct timeval *__olddelta) throw ();
2390 enum __itimer_which
2391 {
2392 ITIMER_REAL = 0,
2393 ITIMER_VIRTUAL = 1,
2394 ITIMER_PROF = 2
2395 };
2396 struct itimerval
2397 {
2398 struct timeval it_interval;
2399 struct timeval it_value;
2400 };
2401 typedef int __itimer_which_t;
2402 extern int getitimer (__itimer_which_t __which,
2403 struct itimerval *__value) throw ();
2404 extern int setitimer (__itimer_which_t __which,
2405 __const struct itimerval *__restrict __new,
2406 struct itimerval *__restrict __old) throw ();
2407 extern int utimes (__const char *__file, __const struct timeval __tvp[2])
2408 throw () __attribute__ ((__nonnull__ (1)));
2409 extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
2410 throw () __attribute__ ((__nonnull__ (1)));
2411 extern int futimes (int __fd, __const struct timeval __tvp[2]) throw ();
2412 extern int futimesat (int __fd, __const char *__file,
2413 __const struct timeval __tvp[2]) throw ();
2414 }
2415 extern "C" {
2416 typedef __intptr_t intptr_t;
2417 typedef __socklen_t socklen_t;
2418 extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1)));
2419 extern int euidaccess (__const char *__name, int __type)
2420 throw () __attribute__ ((__nonnull__ (1)));
2421 extern int eaccess (__const char *__name, int __type)
2422 throw () __attribute__ ((__nonnull__ (1)));
2423 extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
2424 throw () __attribute__ ((__nonnull__ (2))) ;
2425 extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw ();
2426 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
2427 throw ();
2428 extern int close (int __fd);
2429 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
2430 extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
2431 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
2432 __off_t __offset) ;
2433 extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
2434 __off_t __offset) ;
2435 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
2436 __off64_t __offset) ;
2437 extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
2438 __off64_t __offset) ;
2439 extern int pipe (int __pipedes[2]) throw () ;
2440 extern unsigned int alarm (unsigned int __seconds) throw ();
2441 extern unsigned int sleep (unsigned int __seconds);
2442 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
2443 throw ();
2444 extern int usleep (__useconds_t __useconds);
2445 extern int pause (void);
2446 extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
2447 throw () __attribute__ ((__nonnull__ (1))) ;
2448 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ;
2449 extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
2450 throw () __attribute__ ((__nonnull__ (1))) ;
2451 extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
2452 __gid_t __group, int __flag)
2453 throw () __attribute__ ((__nonnull__ (2))) ;
2454 extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
2455 extern int fchdir (int __fd) throw () ;
2456 extern char *getcwd (char *__buf, size_t __size) throw () ;
2457 extern char *get_current_dir_name (void) throw ();
2458 extern char *getwd (char *__buf)
2459 throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
2460 extern int dup (int __fd) throw () ;
2461 extern int dup2 (int __fd, int __fd2) throw ();
2462 extern char **__environ;
2463 extern char **environ;
2464 extern int execve (__const char *__path, char *__const __argv[],
2465 char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1)));
2466 extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
2467 throw ();
2468 extern int execv (__const char *__path, char *__const __argv[])
2469 throw () __attribute__ ((__nonnull__ (1)));
2470 extern int execle (__const char *__path, __const char *__arg, ...)
2471 throw () __attribute__ ((__nonnull__ (1)));
2472 extern int execl (__const char *__path, __const char *__arg, ...)
2473 throw () __attribute__ ((__nonnull__ (1)));
2474 extern int execvp (__const char *__file, char *__const __argv[])
2475 throw () __attribute__ ((__nonnull__ (1)));
2476 extern int execlp (__const char *__file, __const char *__arg, ...)
2477 throw () __attribute__ ((__nonnull__ (1)));
2478 extern int nice (int __inc) throw () ;
2479 extern void _exit (int __status) __attribute__ ((__noreturn__));
2480 enum
2481 {
2482 _PC_LINK_MAX,
2483 _PC_MAX_CANON,
2484 _PC_MAX_INPUT,
2485 _PC_NAME_MAX,
2486 _PC_PATH_MAX,
2487 _PC_PIPE_BUF,
2488 _PC_CHOWN_RESTRICTED,
2489 _PC_NO_TRUNC,
2490 _PC_VDISABLE,
2491 _PC_SYNC_IO,
2492 _PC_ASYNC_IO,
2493 _PC_PRIO_IO,
2494 _PC_SOCK_MAXBUF,
2495 _PC_FILESIZEBITS,
2496 _PC_REC_INCR_XFER_SIZE,
2497 _PC_REC_MAX_XFER_SIZE,
2498 _PC_REC_MIN_XFER_SIZE,
2499 _PC_REC_XFER_ALIGN,
2500 _PC_ALLOC_SIZE_MIN,
2501 _PC_SYMLINK_MAX,
2502 _PC_2_SYMLINKS
2503 };
2504 enum
2505 {
2506 _SC_ARG_MAX,
2507 _SC_CHILD_MAX,
2508 _SC_CLK_TCK,
2509 _SC_NGROUPS_MAX,
2510 _SC_OPEN_MAX,
2511 _SC_STREAM_MAX,
2512 _SC_TZNAME_MAX,
2513 _SC_JOB_CONTROL,
2514 _SC_SAVED_IDS,
2515 _SC_REALTIME_SIGNALS,
2516 _SC_PRIORITY_SCHEDULING,
2517 _SC_TIMERS,
2518 _SC_ASYNCHRONOUS_IO,
2519 _SC_PRIORITIZED_IO,
2520 _SC_SYNCHRONIZED_IO,
2521 _SC_FSYNC,
2522 _SC_MAPPED_FILES,
2523 _SC_MEMLOCK,
2524 _SC_MEMLOCK_RANGE,
2525 _SC_MEMORY_PROTECTION,
2526 _SC_MESSAGE_PASSING,
2527 _SC_SEMAPHORES,
2528 _SC_SHARED_MEMORY_OBJECTS,
2529 _SC_AIO_LISTIO_MAX,
2530 _SC_AIO_MAX,
2531 _SC_AIO_PRIO_DELTA_MAX,
2532 _SC_DELAYTIMER_MAX,
2533 _SC_MQ_OPEN_MAX,
2534 _SC_MQ_PRIO_MAX,
2535 _SC_VERSION,
2536 _SC_PAGESIZE,
2537 _SC_RTSIG_MAX,
2538 _SC_SEM_NSEMS_MAX,
2539 _SC_SEM_VALUE_MAX,
2540 _SC_SIGQUEUE_MAX,
2541 _SC_TIMER_MAX,
2542 _SC_BC_BASE_MAX,
2543 _SC_BC_DIM_MAX,
2544 _SC_BC_SCALE_MAX,
2545 _SC_BC_STRING_MAX,
2546 _SC_COLL_WEIGHTS_MAX,
2547 _SC_EQUIV_CLASS_MAX,
2548 _SC_EXPR_NEST_MAX,
2549 _SC_LINE_MAX,
2550 _SC_RE_DUP_MAX,
2551 _SC_CHARCLASS_NAME_MAX,
2552 _SC_2_VERSION,
2553 _SC_2_C_BIND,
2554 _SC_2_C_DEV,
2555 _SC_2_FORT_DEV,
2556 _SC_2_FORT_RUN,
2557 _SC_2_SW_DEV,
2558 _SC_2_LOCALEDEF,
2559 _SC_PII,
2560 _SC_PII_XTI,
2561 _SC_PII_SOCKET,
2562 _SC_PII_INTERNET,
2563 _SC_PII_OSI,
2564 _SC_POLL,
2565 _SC_SELECT,
2566 _SC_UIO_MAXIOV,
2567 _SC_IOV_MAX = _SC_UIO_MAXIOV,
2568 _SC_PII_INTERNET_STREAM,
2569 _SC_PII_INTERNET_DGRAM,
2570 _SC_PII_OSI_COTS,
2571 _SC_PII_OSI_CLTS,
2572 _SC_PII_OSI_M,
2573 _SC_T_IOV_MAX,
2574 _SC_THREADS,
2575 _SC_THREAD_SAFE_FUNCTIONS,
2576 _SC_GETGR_R_SIZE_MAX,
2577 _SC_GETPW_R_SIZE_MAX,
2578 _SC_LOGIN_NAME_MAX,
2579 _SC_TTY_NAME_MAX,
2580 _SC_THREAD_DESTRUCTOR_ITERATIONS,
2581 _SC_THREAD_KEYS_MAX,
2582 _SC_THREAD_STACK_MIN,
2583 _SC_THREAD_THREADS_MAX,
2584 _SC_THREAD_ATTR_STACKADDR,
2585 _SC_THREAD_ATTR_STACKSIZE,
2586 _SC_THREAD_PRIORITY_SCHEDULING,
2587 _SC_THREAD_PRIO_INHERIT,
2588 _SC_THREAD_PRIO_PROTECT,
2589 _SC_THREAD_PROCESS_SHARED,
2590 _SC_NPROCESSORS_CONF,
2591 _SC_NPROCESSORS_ONLN,
2592 _SC_PHYS_PAGES,
2593 _SC_AVPHYS_PAGES,
2594 _SC_ATEXIT_MAX,
2595 _SC_PASS_MAX,
2596 _SC_XOPEN_VERSION,
2597 _SC_XOPEN_XCU_VERSION,
2598 _SC_XOPEN_UNIX,
2599 _SC_XOPEN_CRYPT,
2600 _SC_XOPEN_ENH_I18N,
2601 _SC_XOPEN_SHM,
2602 _SC_2_CHAR_TERM,
2603 _SC_2_C_VERSION,
2604 _SC_2_UPE,
2605 _SC_XOPEN_XPG2,
2606 _SC_XOPEN_XPG3,
2607 _SC_XOPEN_XPG4,
2608 _SC_CHAR_BIT,
2609 _SC_CHAR_MAX,
2610 _SC_CHAR_MIN,
2611 _SC_INT_MAX,
2612 _SC_INT_MIN,
2613 _SC_LONG_BIT,
2614 _SC_WORD_BIT,
2615 _SC_MB_LEN_MAX,
2616 _SC_NZERO,
2617 _SC_SSIZE_MAX,
2618 _SC_SCHAR_MAX,
2619 _SC_SCHAR_MIN,
2620 _SC_SHRT_MAX,
2621 _SC_SHRT_MIN,
2622 _SC_UCHAR_MAX,
2623 _SC_UINT_MAX,
2624 _SC_ULONG_MAX,
2625 _SC_USHRT_MAX,
2626 _SC_NL_ARGMAX,
2627 _SC_NL_LANGMAX,
2628 _SC_NL_MSGMAX,
2629 _SC_NL_NMAX,
2630 _SC_NL_SETMAX,
2631 _SC_NL_TEXTMAX,
2632 _SC_XBS5_ILP32_OFF32,
2633 _SC_XBS5_ILP32_OFFBIG,
2634 _SC_XBS5_LP64_OFF64,
2635 _SC_XBS5_LPBIG_OFFBIG,
2636 _SC_XOPEN_LEGACY,
2637 _SC_XOPEN_REALTIME,
2638 _SC_XOPEN_REALTIME_THREADS,
2639 _SC_ADVISORY_INFO,
2640 _SC_BARRIERS,
2641 _SC_BASE,
2642 _SC_C_LANG_SUPPORT,
2643 _SC_C_LANG_SUPPORT_R,
2644 _SC_CLOCK_SELECTION,
2645 _SC_CPUTIME,
2646 _SC_THREAD_CPUTIME,
2647 _SC_DEVICE_IO,
2648 _SC_DEVICE_SPECIFIC,
2649 _SC_DEVICE_SPECIFIC_R,
2650 _SC_FD_MGMT,
2651 _SC_FIFO,
2652 _SC_PIPE,
2653 _SC_FILE_ATTRIBUTES,
2654 _SC_FILE_LOCKING,
2655 _SC_FILE_SYSTEM,
2656 _SC_MONOTONIC_CLOCK,
2657 _SC_MULTI_PROCESS,
2658 _SC_SINGLE_PROCESS,
2659 _SC_NETWORKING,
2660 _SC_READER_WRITER_LOCKS,
2661 _SC_SPIN_LOCKS,
2662 _SC_REGEXP,
2663 _SC_REGEX_VERSION,
2664 _SC_SHELL,
2665 _SC_SIGNALS,
2666 _SC_SPAWN,
2667 _SC_SPORADIC_SERVER,
2668 _SC_THREAD_SPORADIC_SERVER,
2669 _SC_SYSTEM_DATABASE,
2670 _SC_SYSTEM_DATABASE_R,
2671 _SC_TIMEOUTS,
2672 _SC_TYPED_MEMORY_OBJECTS,
2673 _SC_USER_GROUPS,
2674 _SC_USER_GROUPS_R,
2675 _SC_2_PBS,
2676 _SC_2_PBS_ACCOUNTING,
2677 _SC_2_PBS_LOCATE,
2678 _SC_2_PBS_MESSAGE,
2679 _SC_2_PBS_TRACK,
2680 _SC_SYMLOOP_MAX,
2681 _SC_STREAMS,
2682 _SC_2_PBS_CHECKPOINT,
2683 _SC_V6_ILP32_OFF32,
2684 _SC_V6_ILP32_OFFBIG,
2685 _SC_V6_LP64_OFF64,
2686 _SC_V6_LPBIG_OFFBIG,
2687 _SC_HOST_NAME_MAX,
2688 _SC_TRACE,
2689 _SC_TRACE_EVENT_FILTER,
2690 _SC_TRACE_INHERIT,
2691 _SC_TRACE_LOG,
2692 _SC_LEVEL1_ICACHE_SIZE,
2693 _SC_LEVEL1_ICACHE_ASSOC,
2694 _SC_LEVEL1_ICACHE_LINESIZE,
2695 _SC_LEVEL1_DCACHE_SIZE,
2696 _SC_LEVEL1_DCACHE_ASSOC,
2697 _SC_LEVEL1_DCACHE_LINESIZE,
2698 _SC_LEVEL2_CACHE_SIZE,
2699 _SC_LEVEL2_CACHE_ASSOC,
2700 _SC_LEVEL2_CACHE_LINESIZE,
2701 _SC_LEVEL3_CACHE_SIZE,
2702 _SC_LEVEL3_CACHE_ASSOC,
2703 _SC_LEVEL3_CACHE_LINESIZE,
2704 _SC_LEVEL4_CACHE_SIZE,
2705 _SC_LEVEL4_CACHE_ASSOC,
2706 _SC_LEVEL4_CACHE_LINESIZE,
2707 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
2708 _SC_RAW_SOCKETS
2709 };
2710 enum
2711 {
2712 _CS_PATH,
2713 _CS_V6_WIDTH_RESTRICTED_ENVS,
2714 _CS_GNU_LIBC_VERSION,
2715 _CS_GNU_LIBPTHREAD_VERSION,
2716 _CS_LFS_CFLAGS = 1000,
2717 _CS_LFS_LDFLAGS,
2718 _CS_LFS_LIBS,
2719 _CS_LFS_LINTFLAGS,
2720 _CS_LFS64_CFLAGS,
2721 _CS_LFS64_LDFLAGS,
2722 _CS_LFS64_LIBS,
2723 _CS_LFS64_LINTFLAGS,
2724 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
2725 _CS_XBS5_ILP32_OFF32_LDFLAGS,
2726 _CS_XBS5_ILP32_OFF32_LIBS,
2727 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
2728 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
2729 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
2730 _CS_XBS5_ILP32_OFFBIG_LIBS,
2731 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
2732 _CS_XBS5_LP64_OFF64_CFLAGS,
2733 _CS_XBS5_LP64_OFF64_LDFLAGS,
2734 _CS_XBS5_LP64_OFF64_LIBS,
2735 _CS_XBS5_LP64_OFF64_LINTFLAGS,
2736 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
2737 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
2738 _CS_XBS5_LPBIG_OFFBIG_LIBS,
2739 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
2740 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
2741 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
2742 _CS_POSIX_V6_ILP32_OFF32_LIBS,
2743 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
2744 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
2745 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
2746 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
2747 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
2748 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
2749 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
2750 _CS_POSIX_V6_LP64_OFF64_LIBS,
2751 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
2752 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
2753 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
2754 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
2755 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
2756 };
2757 extern long int pathconf (__const char *__path, int __name)
2758 throw () __attribute__ ((__nonnull__ (1)));
2759 extern long int fpathconf (int __fd, int __name) throw ();
2760 extern long int sysconf (int __name) throw ();
2761 extern size_t confstr (int __name, char *__buf, size_t __len) throw ();
2762 extern __pid_t getpid (void) throw ();
2763 extern __pid_t getppid (void) throw ();
2764 extern __pid_t getpgrp (void) throw ();
2765 extern __pid_t __getpgid (__pid_t __pid) throw ();
2766 extern __pid_t getpgid (__pid_t __pid) throw ();
2767 extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();
2768 extern int setpgrp (void) throw ();
2769 extern __pid_t setsid (void) throw ();
2770 extern __pid_t getsid (__pid_t __pid) throw ();
2771 extern __uid_t getuid (void) throw ();
2772 extern __uid_t geteuid (void) throw ();
2773 extern __gid_t getgid (void) throw ();
2774 extern __gid_t getegid (void) throw ();
2775 extern int getgroups (int __size, __gid_t __list[]) throw () ;
2776 extern int group_member (__gid_t __gid) throw ();
2777 extern int setuid (__uid_t __uid) throw ();
2778 extern int setreuid (__uid_t __ruid, __uid_t __euid) throw ();
2779 extern int seteuid (__uid_t __uid) throw ();
2780 extern int setgid (__gid_t __gid) throw ();
2781 extern int setregid (__gid_t __rgid, __gid_t __egid) throw ();
2782 extern int setegid (__gid_t __gid) throw ();
2783 extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
2784 throw ();
2785 extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
2786 throw ();
2787 extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
2788 throw ();
2789 extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
2790 throw ();
2791 extern __pid_t fork (void) throw ();
2792 extern __pid_t vfork (void) throw ();
2793 extern char *ttyname (int __fd) throw ();
2794 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
2795 throw () __attribute__ ((__nonnull__ (2))) ;
2796 extern int isatty (int __fd) throw ();
2797 extern int ttyslot (void) throw ();
2798 extern int link (__const char *__from, __const char *__to)
2799 throw () __attribute__ ((__nonnull__ (1, 2))) ;
2800 extern int linkat (int __fromfd, __const char *__from, int __tofd,
2801 __const char *__to, int __flags)
2802 throw () __attribute__ ((__nonnull__ (2, 4))) ;
2803 extern int symlink (__const char *__from, __const char *__to)
2804 throw () __attribute__ ((__nonnull__ (1, 2))) ;
2805 extern ssize_t readlink (__const char *__restrict __path,
2806 char *__restrict __buf, size_t __len)
2807 throw () __attribute__ ((__nonnull__ (1, 2))) ;
2808 extern int symlinkat (__const char *__from, int __tofd,
2809 __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ;
2810 extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
2811 char *__restrict __buf, size_t __len)
2812 throw () __attribute__ ((__nonnull__ (2, 3))) ;
2813 extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
2814 extern int unlinkat (int __fd, __const char *__name, int __flag)
2815 throw () __attribute__ ((__nonnull__ (2)));
2816 extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1)));
2817 extern __pid_t tcgetpgrp (int __fd) throw ();
2818 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw ();
2819 extern char *getlogin (void);
2820 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
2821 extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
2822 extern "C" {
2823 extern char *optarg;
2824 extern int optind;
2825 extern int opterr;
2826 extern int optopt;
2827 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
2828 throw ();
2829 }
2830 extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1)));
2831 extern int sethostname (__const char *__name, size_t __len)
2832 throw () __attribute__ ((__nonnull__ (1))) ;
2833 extern int sethostid (long int __id) throw () ;
2834 extern int getdomainname (char *__name, size_t __len)
2835 throw () __attribute__ ((__nonnull__ (1))) ;
2836 extern int setdomainname (__const char *__name, size_t __len)
2837 throw () __attribute__ ((__nonnull__ (1))) ;
2838 extern int vhangup (void) throw ();
2839 extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ;
2840 extern int profil (unsigned short int *__sample_buffer, size_t __size,
2841 size_t __offset, unsigned int __scale)
2842 throw () __attribute__ ((__nonnull__ (1)));
2843 extern int acct (__const char *__name) throw ();
2844 extern char *getusershell (void) throw ();
2845 extern void endusershell (void) throw ();
2846 extern void setusershell (void) throw ();
2847 extern int daemon (int __nochdir, int __noclose) throw () ;
2848 extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
2849 extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
2850 extern int fsync (int __fd);
2851 extern long int gethostid (void);
2852 extern void sync (void) throw ();
2853 extern int getpagesize (void) throw () __attribute__ ((__const__));
2854 extern int getdtablesize (void) throw ();
2855 extern int truncate (__const char *__file, __off_t __length)
2856 throw () __attribute__ ((__nonnull__ (1))) ;
2857 extern int truncate64 (__const char *__file, __off64_t __length)
2858 throw () __attribute__ ((__nonnull__ (1))) ;
2859 extern int ftruncate (int __fd, __off_t __length) throw () ;
2860 extern int ftruncate64 (int __fd, __off64_t __length) throw () ;
2861 extern int brk (void *__addr) throw () ;
2862 extern void *sbrk (intptr_t __delta) throw ();
2863 extern long int syscall (long int __sysno, ...) throw ();
2864 extern int lockf (int __fd, int __cmd, __off_t __len) ;
2865 extern int lockf64 (int __fd, int __cmd, __off64_t __len) ;
2866 extern int fdatasync (int __fildes);
2867 extern char *crypt (__const char *__key, __const char *__salt)
2868 throw () __attribute__ ((__nonnull__ (1, 2)));
2869 extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1)));
2870 extern void swab (__const void *__restrict __from, void *__restrict __to,
2871 ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
2872 extern char *ctermid (char *__s) throw ();
2873 }
2874 typedef unsigned long XID;
2875 typedef unsigned long Mask;
2876 typedef unsigned long Atom;
2877 typedef unsigned long VisualID;
2878 typedef unsigned long Time;
2879 typedef XID Window;
2880 typedef XID Drawable;
2881 typedef XID Font;
2882 typedef XID Pixmap;
2883 typedef XID Cursor;
2884 typedef XID Colormap;
2885 typedef XID GContext;
2886 typedef XID KeySym;
2887 typedef unsigned char KeyCode;
2888 extern int
2889 _Xmblen(
2890 char *str,
2891 int len
2892 );
2893 typedef char *XPointer;
2894 typedef struct _XExtData {
2895 int number;
2896 struct _XExtData *next;
2897 int (*free_private)(
2898 struct _XExtData *extension
2899 );
2900 XPointer private_data;
2901 } XExtData;
2902 typedef struct {
2903 int extension;
2904 int major_opcode;
2905 int first_event;
2906 int first_error;
2907 } XExtCodes;
2908 typedef struct {
2909 int depth;
2910 int bits_per_pixel;
2911 int scanline_pad;
2912 } XPixmapFormatValues;
2913 typedef struct {
2914 int function;
2915 unsigned long plane_mask;
2916 unsigned long foreground;
2917 unsigned long background;
2918 int line_width;
2919 int line_style;
2920 int cap_style;
2921 int join_style;
2922 int fill_style;
2923 int fill_rule;
2924 int arc_mode;
2925 Pixmap tile;
2926 Pixmap stipple;
2927 int ts_x_origin;
2928 int ts_y_origin;
2929 Font font;
2930 int subwindow_mode;
2931 int graphics_exposures;
2932 int clip_x_origin;
2933 int clip_y_origin;
2934 Pixmap clip_mask;
2935 int dash_offset;
2936 char dashes;
2937 } XGCValues;
2938 typedef struct _XGC
2939 *GC;
2940 typedef struct {
2941 XExtData *ext_data;
2942 VisualID visualid;
2943 int c_class;
2944 unsigned long red_mask, green_mask, blue_mask;
2945 int bits_per_rgb;
2946 int map_entries;
2947 } Visual;
2948 typedef struct {
2949 int depth;
2950 int nvisuals;
2951 Visual *visuals;
2952 } Depth;
2953 struct _XDisplay;
2954 typedef struct {
2955 XExtData *ext_data;
2956 struct _XDisplay *display;
2957 Window root;
2958 int width, height;
2959 int mwidth, mheight;
2960 int ndepths;
2961 Depth *depths;
2962 int root_depth;
2963 Visual *root_visual;
2964 GC default_gc;
2965 Colormap cmap;
2966 unsigned long white_pixel;
2967 unsigned long black_pixel;
2968 int max_maps, min_maps;
2969 int backing_store;
2970 int save_unders;
2971 long root_input_mask;
2972 } Screen;
2973 typedef struct {
2974 XExtData *ext_data;
2975 int depth;
2976 int bits_per_pixel;
2977 int scanline_pad;
2978 } ScreenFormat;
2979 typedef struct {
2980 Pixmap background_pixmap;
2981 unsigned long background_pixel;
2982 Pixmap border_pixmap;
2983 unsigned long border_pixel;
2984 int bit_gravity;
2985 int win_gravity;
2986 int backing_store;
2987 unsigned long backing_planes;
2988 unsigned long backing_pixel;
2989 int save_under;
2990 long event_mask;
2991 long do_not_propagate_mask;
2992 int override_redirect;
2993 Colormap colormap;
2994 Cursor cursor;
2995 } XSetWindowAttributes;
2996 typedef struct {
2997 int x, y;
2998 int width, height;
2999 int border_width;
3000 int depth;
3001 Visual *visual;
3002 Window root;
3003 int c_class;
3004 int bit_gravity;
3005 int win_gravity;
3006 int backing_store;
3007 unsigned long backing_planes;
3008 unsigned long backing_pixel;
3009 int save_under;
3010 Colormap colormap;
3011 int map_installed;
3012 int map_state;
3013 long all_event_masks;
3014 long your_event_mask;
3015 long do_not_propagate_mask;
3016 int override_redirect;
3017 Screen *screen;
3018 } XWindowAttributes;
3019 typedef struct {
3020 int family;
3021 int length;
3022 char *address;
3023 } XHostAddress;
3024 typedef struct {
3025 int typelength;
3026 int valuelength;
3027 char *type;
3028 char *value;
3029 } XServerInterpretedAddress;
3030 typedef struct _XImage {
3031 int width, height;
3032 int xoffset;
3033 int format;
3034 char *data;
3035 int byte_order;
3036 int bitmap_unit;
3037 int bitmap_bit_order;
3038 int bitmap_pad;
3039 int depth;
3040 int bytes_per_line;
3041 int bits_per_pixel;
3042 unsigned long red_mask;
3043 unsigned long green_mask;
3044 unsigned long blue_mask;
3045 XPointer obdata;
3046 struct funcs {
3047 struct _XImage *(*create_image)(
3048 struct _XDisplay* ,
3049 Visual* ,
3050 unsigned int ,
3051 int ,
3052 int ,
3053 char* ,
3054 unsigned int ,
3055 unsigned int ,
3056 int ,
3057 int );
3058 int (*destroy_image) (struct _XImage *);
3059 unsigned long (*get_pixel) (struct _XImage *, int, int);
3060 int (*put_pixel) (struct _XImage *, int, int, unsigned long);
3061 struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
3062 int (*add_pixel) (struct _XImage *, long);
3063 } f;
3064 } XImage;
3065 typedef struct {
3066 int x, y;
3067 int width, height;
3068 int border_width;
3069 Window sibling;
3070 int stack_mode;
3071 } XWindowChanges;
3072 typedef struct {
3073 unsigned long pixel;
3074 unsigned short red, green, blue;
3075 char flags;
3076 char pad;
3077 } XColor;
3078 typedef struct {
3079 short x1, y1, x2, y2;
3080 } XSegment;
3081 typedef struct {
3082 short x, y;
3083 } XPoint;
3084 typedef struct {
3085 short x, y;
3086 unsigned short width, height;
3087 } XRectangle;
3088 typedef struct {
3089 short x, y;
3090 unsigned short width, height;
3091 short angle1, angle2;
3092 } XArc;
3093 typedef struct {
3094 int key_click_percent;
3095 int bell_percent;
3096 int bell_pitch;
3097 int bell_duration;
3098 int led;
3099 int led_mode;
3100 int key;
3101 int auto_repeat_mode;
3102 } XKeyboardControl;
3103 typedef struct {
3104 int key_click_percent;
3105 int bell_percent;
3106 unsigned int bell_pitch, bell_duration;
3107 unsigned long led_mask;
3108 int global_auto_repeat;
3109 char auto_repeats[32];
3110 } XKeyboardState;
3111 typedef struct {
3112 Time time;
3113 short x, y;
3114 } XTimeCoord;
3115 typedef struct {
3116 int max_keypermod;
3117 KeyCode *modifiermap;
3118 } XModifierKeymap;
3119 typedef struct _XDisplay Display;
3120 struct _XPrivate;
3121 struct _XrmHashBucketRec;
3122 typedef struct
3123 {
3124 XExtData *ext_data;
3125 struct _XPrivate *private1;
3126 int fd;
3127 int private2;
3128 int proto_major_version;
3129 int proto_minor_version;
3130 char *vendor;
3131 XID private3;
3132 XID private4;
3133 XID private5;
3134 int private6;
3135 XID (*resource_alloc)(
3136 struct _XDisplay*
3137 );
3138 int byte_order;
3139 int bitmap_unit;
3140 int bitmap_pad;
3141 int bitmap_bit_order;
3142 int nformats;
3143 ScreenFormat *pixmap_format;
3144 int private8;
3145 int release;
3146 struct _XPrivate *private9, *private10;
3147 int qlen;
3148 unsigned long last_request_read;
3149 unsigned long request;
3150 XPointer private11;
3151 XPointer private12;
3152 XPointer private13;
3153 XPointer private14;
3154 unsigned max_request_size;
3155 struct _XrmHashBucketRec *db;
3156 int (*private15)(
3157 struct _XDisplay*
3158 );
3159 char *display_name;
3160 int default_screen;
3161 int nscreens;
3162 Screen *screens;
3163 unsigned long motion_buffer;
3164 unsigned long private16;
3165 int min_keycode;
3166 int max_keycode;
3167 XPointer private17;
3168 XPointer private18;
3169 int private19;
3170 char *xdefaults;
3171 }
3172 *_XPrivDisplay;
3173 typedef struct {
3174 int type;
3175 unsigned long serial;
3176 int send_event;
3177 Display *display;
3178 Window window;
3179 Window root;
3180 Window subwindow;
3181 Time time;
3182 int x, y;
3183 int x_root, y_root;
3184 unsigned int state;
3185 unsigned int keycode;
3186 int same_screen;
3187 } XKeyEvent;
3188 typedef XKeyEvent XKeyPressedEvent;
3189 typedef XKeyEvent XKeyReleasedEvent;
3190 typedef struct {
3191 int type;
3192 unsigned long serial;
3193 int send_event;
3194 Display *display;
3195 Window window;
3196 Window root;
3197 Window subwindow;
3198 Time time;
3199 int x, y;
3200 int x_root, y_root;
3201 unsigned int state;
3202 unsigned int button;
3203 int same_screen;
3204 } XButtonEvent;
3205 typedef XButtonEvent XButtonPressedEvent;
3206 typedef XButtonEvent XButtonReleasedEvent;
3207 typedef struct {
3208 int type;
3209 unsigned long serial;
3210 int send_event;
3211 Display *display;
3212 Window window;
3213 Window root;
3214 Window subwindow;
3215 Time time;
3216 int x, y;
3217 int x_root, y_root;
3218 unsigned int state;
3219 char is_hint;
3220 int same_screen;
3221 } XMotionEvent;
3222 typedef XMotionEvent XPointerMovedEvent;
3223 typedef struct {
3224 int type;
3225 unsigned long serial;
3226 int send_event;
3227 Display *display;
3228 Window window;
3229 Window root;
3230 Window subwindow;
3231 Time time;
3232 int x, y;
3233 int x_root, y_root;
3234 int mode;
3235 int detail;
3236 int same_screen;
3237 int focus;
3238 unsigned int state;
3239 } XCrossingEvent;
3240 typedef XCrossingEvent XEnterWindowEvent;
3241 typedef XCrossingEvent XLeaveWindowEvent;
3242 typedef struct {
3243 int type;
3244 unsigned long serial;
3245 int send_event;
3246 Display *display;
3247 Window window;
3248 int mode;
3249 int detail;
3250 } XFocusChangeEvent;
3251 typedef XFocusChangeEvent XFocusInEvent;
3252 typedef XFocusChangeEvent XFocusOutEvent;
3253 typedef struct {
3254 int type;
3255 unsigned long serial;
3256 int send_event;
3257 Display *display;
3258 Window window;
3259 char key_vector[32];
3260 } XKeymapEvent;
3261 typedef struct {
3262 int type;
3263 unsigned long serial;
3264 int send_event;
3265 Display *display;
3266 Window window;
3267 int x, y;
3268 int width, height;
3269 int count;
3270 } XExposeEvent;
3271 typedef struct {
3272 int type;
3273 unsigned long serial;
3274 int send_event;
3275 Display *display;
3276 Drawable drawable;
3277 int x, y;
3278 int width, height;
3279 int count;
3280 int major_code;
3281 int minor_code;
3282 } XGraphicsExposeEvent;
3283 typedef struct {
3284 int type;
3285 unsigned long serial;
3286 int send_event;
3287 Display *display;
3288 Drawable drawable;
3289 int major_code;
3290 int minor_code;
3291 } XNoExposeEvent;
3292 typedef struct {
3293 int type;
3294 unsigned long serial;
3295 int send_event;
3296 Display *display;
3297 Window window;
3298 int state;
3299 } XVisibilityEvent;
3300 typedef struct {
3301 int type;
3302 unsigned long serial;
3303 int send_event;
3304 Display *display;
3305 Window parent;
3306 Window window;
3307 int x, y;
3308 int width, height;
3309 int border_width;
3310 int override_redirect;
3311 } XCreateWindowEvent;
3312 typedef struct {
3313 int type;
3314 unsigned long serial;
3315 int send_event;
3316 Display *display;
3317 Window event;
3318 Window window;
3319 } XDestroyWindowEvent;
3320 typedef struct {
3321 int type;
3322 unsigned long serial;
3323 int send_event;
3324 Display *display;
3325 Window event;
3326 Window window;
3327 int from_configure;
3328 } XUnmapEvent;
3329 typedef struct {
3330 int type;
3331 unsigned long serial;
3332 int send_event;
3333 Display *display;
3334 Window event;
3335 Window window;
3336 int override_redirect;
3337 } XMapEvent;
3338 typedef struct {
3339 int type;
3340 unsigned long serial;
3341 int send_event;
3342 Display *display;
3343 Window parent;
3344 Window window;
3345 } XMapRequestEvent;
3346 typedef struct {
3347 int type;
3348 unsigned long serial;
3349 int send_event;
3350 Display *display;
3351 Window event;
3352 Window window;
3353 Window parent;
3354 int x, y;
3355 int override_redirect;
3356 } XReparentEvent;
3357 typedef struct {
3358 int type;
3359 unsigned long serial;
3360 int send_event;
3361 Display *display;
3362 Window event;
3363 Window window;
3364 int x, y;
3365 int width, height;
3366 int border_width;
3367 Window above;
3368 int override_redirect;
3369 } XConfigureEvent;
3370 typedef struct {
3371 int type;
3372 unsigned long serial;
3373 int send_event;
3374 Display *display;
3375 Window event;
3376 Window window;
3377 int x, y;
3378 } XGravityEvent;
3379 typedef struct {
3380 int type;
3381 unsigned long serial;
3382 int send_event;
3383 Display *display;
3384 Window window;
3385 int width, height;
3386 } XResizeRequestEvent;
3387 typedef struct {
3388 int type;
3389 unsigned long serial;
3390 int send_event;
3391 Display *display;
3392 Window parent;
3393 Window window;
3394 int x, y;
3395 int width, height;
3396 int border_width;
3397 Window above;
3398 int detail;
3399 unsigned long value_mask;
3400 } XConfigureRequestEvent;
3401 typedef struct {
3402 int type;
3403 unsigned long serial;
3404 int send_event;
3405 Display *display;
3406 Window event;
3407 Window window;
3408 int place;
3409 } XCirculateEvent;
3410 typedef struct {
3411 int type;
3412 unsigned long serial;
3413 int send_event;
3414 Display *display;
3415 Window parent;
3416 Window window;
3417 int place;
3418 } XCirculateRequestEvent;
3419 typedef struct {
3420 int type;
3421 unsigned long serial;
3422 int send_event;
3423 Display *display;
3424 Window window;
3425 Atom atom;
3426 Time time;
3427 int state;
3428 } XPropertyEvent;
3429 typedef struct {
3430 int type;
3431 unsigned long serial;
3432 int send_event;
3433 Display *display;
3434 Window window;
3435 Atom selection;
3436 Time time;
3437 } XSelectionClearEvent;
3438 typedef struct {
3439 int type;
3440 unsigned long serial;
3441 int send_event;
3442 Display *display;
3443 Window owner;
3444 Window requestor;
3445 Atom selection;
3446 Atom target;
3447 Atom property;
3448 Time time;
3449 } XSelectionRequestEvent;
3450 typedef struct {
3451 int type;
3452 unsigned long serial;
3453 int send_event;
3454 Display *display;
3455 Window requestor;
3456 Atom selection;
3457 Atom target;
3458 Atom property;
3459 Time time;
3460 } XSelectionEvent;
3461 typedef struct {
3462 int type;
3463 unsigned long serial;
3464 int send_event;
3465 Display *display;
3466 Window window;
3467 Colormap colormap;
3468 int c_new;
3469 int state;
3470 } XColormapEvent;
3471 typedef struct {
3472 int type;
3473 unsigned long serial;
3474 int send_event;
3475 Display *display;
3476 Window window;
3477 Atom message_type;
3478 int format;
3479 union {
3480 char b[20];
3481 short s[10];
3482 long l[5];
3483 } data;
3484 } XClientMessageEvent;
3485 typedef struct {
3486 int type;
3487 unsigned long serial;
3488 int send_event;
3489 Display *display;
3490 Window window;
3491 int request;
3492 int first_keycode;
3493 int count;
3494 } XMappingEvent;
3495 typedef struct {
3496 int type;
3497 Display *display;
3498 XID resourceid;
3499 unsigned long serial;
3500 unsigned char error_code;
3501 unsigned char request_code;
3502 unsigned char minor_code;
3503 } XErrorEvent;
3504 typedef struct {
3505 int type;
3506 unsigned long serial;
3507 int send_event;
3508 Display *display;
3509 Window window;
3510 } XAnyEvent;
3511 typedef union _XEvent {
3512 int type;
3513 XAnyEvent xany;
3514 XKeyEvent xkey;
3515 XButtonEvent xbutton;
3516 XMotionEvent xmotion;
3517 XCrossingEvent xcrossing;
3518 XFocusChangeEvent xfocus;
3519 XExposeEvent xexpose;
3520 XGraphicsExposeEvent xgraphicsexpose;
3521 XNoExposeEvent xnoexpose;
3522 XVisibilityEvent xvisibility;
3523 XCreateWindowEvent xcreatewindow;
3524 XDestroyWindowEvent xdestroywindow;
3525 XUnmapEvent xunmap;
3526 XMapEvent xmap;
3527 XMapRequestEvent xmaprequest;
3528 XReparentEvent xreparent;
3529 XConfigureEvent xconfigure;
3530 XGravityEvent xgravity;
3531 XResizeRequestEvent xresizerequest;
3532 XConfigureRequestEvent xconfigurerequest;
3533 XCirculateEvent xcirculate;
3534 XCirculateRequestEvent xcirculaterequest;
3535 XPropertyEvent xproperty;
3536 XSelectionClearEvent xselectionclear;
3537 XSelectionRequestEvent xselectionrequest;
3538 XSelectionEvent xselection;
3539 XColormapEvent xcolormap;
3540 XClientMessageEvent xclient;
3541 XMappingEvent xmapping;
3542 XErrorEvent xerror;
3543 XKeymapEvent xkeymap;
3544 long pad[24];
3545 } XEvent;
3546 typedef struct {
3547 short lbearing;
3548 short rbearing;
3549 short width;
3550 short ascent;
3551 short descent;
3552 unsigned short attributes;
3553 } XCharStruct;
3554 typedef struct {
3555 Atom name;
3556 unsigned long card32;
3557 } XFontProp;
3558 typedef struct {
3559 XExtData *ext_data;
3560 Font fid;
3561 unsigned direction;
3562 unsigned min_char_or_byte2;
3563 unsigned max_char_or_byte2;
3564 unsigned min_byte1;
3565 unsigned max_byte1;
3566 int all_chars_exist;
3567 unsigned default_char;
3568 int n_properties;
3569 XFontProp *properties;
3570 XCharStruct min_bounds;
3571 XCharStruct max_bounds;
3572 XCharStruct *per_char;
3573 int ascent;
3574 int descent;
3575 } XFontStruct;
3576 typedef struct {
3577 char *chars;
3578 int nchars;
3579 int delta;
3580 Font font;
3581 } XTextItem;
3582 typedef struct {
3583 unsigned char byte1;
3584 unsigned char byte2;
3585 } XChar2b;
3586 typedef struct {
3587 XChar2b *chars;
3588 int nchars;
3589 int delta;
3590 Font font;
3591 } XTextItem16;
3592 typedef union { Display *display;
3593 GC gc;
3594 Visual *visual;
3595 Screen *screen;
3596 ScreenFormat *pixmap_format;
3597 XFontStruct *font; } XEDataObject;
3598 typedef struct {
3599 XRectangle max_ink_extent;
3600 XRectangle max_logical_extent;
3601 } XFontSetExtents;
3602 typedef struct _XOM *XOM;
3603 typedef struct _XOC *XOC, *XFontSet;
3604 typedef struct {
3605 char *chars;
3606 int nchars;
3607 int delta;
3608 XFontSet font_set;
3609 } XmbTextItem;
3610 typedef struct {
3611 wchar_t *chars;
3612 int nchars;
3613 int delta;
3614 XFontSet font_set;
3615 } XwcTextItem;
3616 typedef struct {
3617 int charset_count;
3618 char **charset_list;
3619 } XOMCharSetList;
3620 typedef enum {
3621 XOMOrientation_LTR_TTB,
3622 XOMOrientation_RTL_TTB,
3623 XOMOrientation_TTB_LTR,
3624 XOMOrientation_TTB_RTL,
3625 XOMOrientation_Context
3626 } XOrientation;
3627 typedef struct {
3628 int num_orientation;
3629 XOrientation *orientation;
3630 } XOMOrientation;
3631 typedef struct {
3632 int num_font;
3633 XFontStruct **font_struct_list;
3634 char **font_name_list;
3635 } XOMFontInfo;
3636 typedef struct _XIM *XIM;
3637 typedef struct _XIC *XIC;
3638 typedef void (*XIMProc)(
3639 XIM,
3640 XPointer,
3641 XPointer
3642 );
3643 typedef int (*XICProc)(
3644 XIC,
3645 XPointer,
3646 XPointer
3647 );
3648 typedef void (*XIDProc)(
3649 Display*,
3650 XPointer,
3651 XPointer
3652 );
3653 typedef unsigned long XIMStyle;
3654 typedef struct {
3655 unsigned short count_styles;
3656 XIMStyle *supported_styles;
3657 } XIMStyles;
3658 typedef void *XVaNestedList;
3659 typedef struct {
3660 XPointer client_data;
3661 XIMProc callback;
3662 } XIMCallback;
3663 typedef struct {
3664 XPointer client_data;
3665 XICProc callback;
3666 } XICCallback;
3667 typedef unsigned long XIMFeedback;
3668 typedef struct _XIMText {
3669 unsigned short length;
3670 XIMFeedback *feedback;
3671 int encoding_is_wchar;
3672 union {
3673 char *multi_byte;
3674 wchar_t *wide_char;
3675 } string;
3676 } XIMText;
3677 typedef unsigned long XIMPreeditState;
3678 typedef struct _XIMPreeditStateNotifyCallbackStruct {
3679 XIMPreeditState state;
3680 } XIMPreeditStateNotifyCallbackStruct;
3681 typedef unsigned long XIMResetState;
3682 typedef unsigned long XIMStringConversionFeedback;
3683 typedef struct _XIMStringConversionText {
3684 unsigned short length;
3685 XIMStringConversionFeedback *feedback;
3686 int encoding_is_wchar;
3687 union {
3688 char *mbs;
3689 wchar_t *wcs;
3690 } string;
3691 } XIMStringConversionText;
3692 typedef unsigned short XIMStringConversionPosition;
3693 typedef unsigned short XIMStringConversionType;
3694 typedef unsigned short XIMStringConversionOperation;
3695 typedef enum {
3696 XIMForwardChar, XIMBackwardChar,
3697 XIMForwardWord, XIMBackwardWord,
3698 XIMCaretUp, XIMCaretDown,
3699 XIMNextLine, XIMPreviousLine,
3700 XIMLineStart, XIMLineEnd,
3701 XIMAbsolutePosition,
3702 XIMDontChange
3703 } XIMCaretDirection;
3704 typedef struct _XIMStringConversionCallbackStruct {
3705 XIMStringConversionPosition position;
3706 XIMCaretDirection direction;
3707 XIMStringConversionOperation operation;
3708 unsigned short factor;
3709 XIMStringConversionText *text;
3710 } XIMStringConversionCallbackStruct;
3711 typedef struct _XIMPreeditDrawCallbackStruct {
3712 int caret;
3713 int chg_first;
3714 int chg_length;
3715 XIMText *text;
3716 } XIMPreeditDrawCallbackStruct;
3717 typedef enum {
3718 XIMIsInvisible,
3719 XIMIsPrimary,
3720 XIMIsSecondary
3721 } XIMCaretStyle;
3722 typedef struct _XIMPreeditCaretCallbackStruct {
3723 int position;
3724 XIMCaretDirection direction;
3725 XIMCaretStyle style;
3726 } XIMPreeditCaretCallbackStruct;
3727 typedef enum {
3728 XIMTextType,
3729 XIMBitmapType
3730 } XIMStatusDataType;
3731 typedef struct _XIMStatusDrawCallbackStruct {
3732 XIMStatusDataType type;
3733 union {
3734 XIMText *text;
3735 Pixmap bitmap;
3736 } data;
3737 } XIMStatusDrawCallbackStruct;
3738 typedef struct _XIMHotKeyTrigger {
3739 KeySym keysym;
3740 int modifier;
3741 int modifier_mask;
3742 } XIMHotKeyTrigger;
3743 typedef struct _XIMHotKeyTriggers {
3744 int num_hot_key;
3745 XIMHotKeyTrigger *key;
3746 } XIMHotKeyTriggers;
3747 typedef unsigned long XIMHotKeyState;
3748 typedef struct {
3749 unsigned short count_values;
3750 char **supported_values;
3751 } XIMValuesList;
3752 extern "C" {
3753 extern int _Xdebug;
3754 extern XFontStruct *XLoadQueryFont(
3755 Display* ,
3756 const char*
3757 );
3758 extern XFontStruct *XQueryFont(
3759 Display* ,
3760 XID
3761 );
3762 extern XTimeCoord *XGetMotionEvents(
3763 Display* ,
3764 Window ,
3765 Time ,
3766 Time ,
3767 int*
3768 );
3769 extern XModifierKeymap *XDeleteModifiermapEntry(
3770 XModifierKeymap* ,
3771 KeyCode ,
3772 int
3773 );
3774 extern XModifierKeymap *XGetModifierMapping(
3775 Display*
3776 );
3777 extern XModifierKeymap *XInsertModifiermapEntry(
3778 XModifierKeymap* ,
3779 KeyCode ,
3780 int
3781 );
3782 extern XModifierKeymap *XNewModifiermap(
3783 int
3784 );
3785 extern XImage *XCreateImage(
3786 Display* ,
3787 Visual* ,
3788 unsigned int ,
3789 int ,
3790 int ,
3791 char* ,
3792 unsigned int ,
3793 unsigned int ,
3794 int ,
3795 int
3796 );
3797 extern int XInitImage(
3798 XImage*
3799 );
3800 extern XImage *XGetImage(
3801 Display* ,
3802 Drawable ,
3803 int ,
3804 int ,
3805 unsigned int ,
3806 unsigned int ,
3807 unsigned long ,
3808 int
3809 );
3810 extern XImage *XGetSubImage(
3811 Display* ,
3812 Drawable ,
3813 int ,
3814 int ,
3815 unsigned int ,
3816 unsigned int ,
3817 unsigned long ,
3818 int ,
3819 XImage* ,
3820 int ,
3821 int
3822 );
3823 extern Display *XOpenDisplay(
3824 const char*
3825 );
3826 extern void XrmInitialize(
3827 void
3828 );
3829 extern char *XFetchBytes(
3830 Display* ,
3831 int*
3832 );
3833 extern char *XFetchBuffer(
3834 Display* ,
3835 int* ,
3836 int
3837 );
3838 extern char *XGetAtomName(
3839 Display* ,
3840 Atom
3841 );
3842 extern int XGetAtomNames(
3843 Display* ,
3844 Atom* ,
3845 int ,
3846 char**
3847 );
3848 extern char *XGetDefault(
3849 Display* ,
3850 const char* ,
3851 const char*
3852 );
3853 extern char *XDisplayName(
3854 const char*
3855 );
3856 extern char *XKeysymToString(
3857 KeySym
3858 );
3859 extern int (*XSynchronize(
3860 Display* ,
3861 int
3862 ))(
3863 Display*
3864 );
3865 extern int (*XSetAfterFunction(
3866 Display* ,
3867 int (*) (
3868 Display*
3869 )
3870 ))(
3871 Display*
3872 );
3873 extern Atom XInternAtom(
3874 Display* ,
3875 const char* ,
3876 int
3877 );
3878 extern int XInternAtoms(
3879 Display* ,
3880 char** ,
3881 int ,
3882 int ,
3883 Atom*
3884 );
3885 extern Colormap XCopyColormapAndFree(
3886 Display* ,
3887 Colormap
3888 );
3889 extern Colormap XCreateColormap(
3890 Display* ,
3891 Window ,
3892 Visual* ,
3893 int
3894 );
3895 extern Cursor XCreatePixmapCursor(
3896 Display* ,
3897 Pixmap ,
3898 Pixmap ,
3899 XColor* ,
3900 XColor* ,
3901 unsigned int ,
3902 unsigned int
3903 );
3904 extern Cursor XCreateGlyphCursor(
3905 Display* ,
3906 Font ,
3907 Font ,
3908 unsigned int ,
3909 unsigned int ,
3910 XColor const * ,
3911 XColor const *
3912 );
3913 extern Cursor XCreateFontCursor(
3914 Display* ,
3915 unsigned int
3916 );
3917 extern Font XLoadFont(
3918 Display* ,
3919 const char*
3920 );
3921 extern GC XCreateGC(
3922 Display* ,
3923 Drawable ,
3924 unsigned long ,
3925 XGCValues*
3926 );
3927 extern GContext XGContextFromGC(
3928 GC
3929 );
3930 extern void XFlushGC(
3931 Display* ,
3932 GC
3933 );
3934 extern Pixmap XCreatePixmap(
3935 Display* ,
3936 Drawable ,
3937 unsigned int ,
3938 unsigned int ,
3939 unsigned int
3940 );
3941 extern Pixmap XCreateBitmapFromData(
3942 Display* ,
3943 Drawable ,
3944 const char* ,
3945 unsigned int ,
3946 unsigned int
3947 );
3948 extern Pixmap XCreatePixmapFromBitmapData(
3949 Display* ,
3950 Drawable ,
3951 char* ,
3952 unsigned int ,
3953 unsigned int ,
3954 unsigned long ,
3955 unsigned long ,
3956 unsigned int
3957 );
3958 extern Window XCreateSimpleWindow(
3959 Display* ,
3960 Window ,
3961 int ,
3962 int ,
3963 unsigned int ,
3964 unsigned int ,
3965 unsigned int ,
3966 unsigned long ,
3967 unsigned long
3968 );
3969 extern Window XGetSelectionOwner(
3970 Display* ,
3971 Atom
3972 );
3973 extern Window XCreateWindow(
3974 Display* ,
3975 Window ,
3976 int ,
3977 int ,
3978 unsigned int ,
3979 unsigned int ,
3980 unsigned int ,
3981 int ,
3982 unsigned int ,
3983 Visual* ,
3984 unsigned long ,
3985 XSetWindowAttributes*
3986 );
3987 extern Colormap *XListInstalledColormaps(
3988 Display* ,
3989 Window ,
3990 int*
3991 );
3992 extern char **XListFonts(
3993 Display* ,
3994 const char* ,
3995 int ,
3996 int*
3997 );
3998 extern char **XListFontsWithInfo(
3999 Display* ,
4000 const char* ,
4001 int ,
4002 int* ,
4003 XFontStruct**
4004 );
4005 extern char **XGetFontPath(
4006 Display* ,
4007 int*
4008 );
4009 extern char **XListExtensions(
4010 Display* ,
4011 int*
4012 );
4013 extern Atom *XListProperties(
4014 Display* ,
4015 Window ,
4016 int*
4017 );
4018 extern XHostAddress *XListHosts(
4019 Display* ,
4020 int* ,
4021 int*
4022 );
4023 extern KeySym XKeycodeToKeysym(
4024 Display* ,
4025 KeyCode ,
4026 int
4027 );
4028 extern KeySym XLookupKeysym(
4029 XKeyEvent* ,
4030 int
4031 );
4032 extern KeySym *XGetKeyboardMapping(
4033 Display* ,
4034 KeyCode ,
4035 int ,
4036 int*
4037 );
4038 extern KeySym XStringToKeysym(
4039 const char*
4040 );
4041 extern long XMaxRequestSize(
4042 Display*
4043 );
4044 extern long XExtendedMaxRequestSize(
4045 Display*
4046 );
4047 extern char *XResourceManagerString(
4048 Display*
4049 );
4050 extern char *XScreenResourceString(
4051 Screen*
4052 );
4053 extern unsigned long XDisplayMotionBufferSize(
4054 Display*
4055 );
4056 extern VisualID XVisualIDFromVisual(
4057 Visual*
4058 );
4059 extern int XInitThreads(
4060 void
4061 );
4062 extern void XLockDisplay(
4063 Display*
4064 );
4065 extern void XUnlockDisplay(
4066 Display*
4067 );
4068 extern XExtCodes *XInitExtension(
4069 Display* ,
4070 const char*
4071 );
4072 extern XExtCodes *XAddExtension(
4073 Display*
4074 );
4075 extern XExtData *XFindOnExtensionList(
4076 XExtData** ,
4077 int
4078 );
4079 extern XExtData **XEHeadOfExtensionList(
4080 XEDataObject
4081 );
4082 extern Window XRootWindow(
4083 Display* ,
4084 int
4085 );
4086 extern Window XDefaultRootWindow(
4087 Display*
4088 );
4089 extern Window XRootWindowOfScreen(
4090 Screen*
4091 );
4092 extern Visual *XDefaultVisual(
4093 Display* ,
4094 int
4095 );
4096 extern Visual *XDefaultVisualOfScreen(
4097 Screen*
4098 );
4099 extern GC XDefaultGC(
4100 Display* ,
4101 int
4102 );
4103 extern GC XDefaultGCOfScreen(
4104 Screen*
4105 );
4106 extern unsigned long XBlackPixel(
4107 Display* ,
4108 int
4109 );
4110 extern unsigned long XWhitePixel(
4111 Display* ,
4112 int
4113 );
4114 extern unsigned long XAllPlanes(
4115 void
4116 );
4117 extern unsigned long XBlackPixelOfScreen(
4118 Screen*
4119 );
4120 extern unsigned long XWhitePixelOfScreen(
4121 Screen*
4122 );
4123 extern unsigned long XNextRequest(
4124 Display*
4125 );
4126 extern unsigned long XLastKnownRequestProcessed(
4127 Display*
4128 );
4129 extern char *XServerVendor(
4130 Display*
4131 );
4132 extern char *XDisplayString(
4133 Display*
4134 );
4135 extern Colormap XDefaultColormap(
4136 Display* ,
4137 int
4138 );
4139 extern Colormap XDefaultColormapOfScreen(
4140 Screen*
4141 );
4142 extern Display *XDisplayOfScreen(
4143 Screen*
4144 );
4145 extern Screen *XScreenOfDisplay(
4146 Display* ,
4147 int
4148 );
4149 extern Screen *XDefaultScreenOfDisplay(
4150 Display*
4151 );
4152 extern long XEventMaskOfScreen(
4153 Screen*
4154 );
4155 extern int XScreenNumberOfScreen(
4156 Screen*
4157 );
4158 typedef int (*XErrorHandler) (
4159 Display* ,
4160 XErrorEvent*
4161 );
4162 extern XErrorHandler XSetErrorHandler (
4163 XErrorHandler
4164 );
4165 typedef int (*XIOErrorHandler) (
4166 Display*
4167 );
4168 extern XIOErrorHandler XSetIOErrorHandler (
4169 XIOErrorHandler
4170 );
4171 extern XPixmapFormatValues *XListPixmapFormats(
4172 Display* ,
4173 int*
4174 );
4175 extern int *XListDepths(
4176 Display* ,
4177 int ,
4178 int*
4179 );
4180 extern int XReconfigureWMWindow(
4181 Display* ,
4182 Window ,
4183 int ,
4184 unsigned int ,
4185 XWindowChanges*
4186 );
4187 extern int XGetWMProtocols(
4188 Display* ,
4189 Window ,
4190 Atom** ,
4191 int*
4192 );
4193 extern int XSetWMProtocols(
4194 Display* ,
4195 Window ,
4196 Atom* ,
4197 int
4198 );
4199 extern int XIconifyWindow(
4200 Display* ,
4201 Window ,
4202 int
4203 );
4204 extern int XWithdrawWindow(
4205 Display* ,
4206 Window ,
4207 int
4208 );
4209 extern int XGetCommand(
4210 Display* ,
4211 Window ,
4212 char*** ,
4213 int*
4214 );
4215 extern int XGetWMColormapWindows(
4216 Display* ,
4217 Window ,
4218 Window** ,
4219 int*
4220 );
4221 extern int XSetWMColormapWindows(
4222 Display* ,
4223 Window ,
4224 Window* ,
4225 int
4226 );
4227 extern void XFreeStringList(
4228 char**
4229 );
4230 extern int XSetTransientForHint(
4231 Display* ,
4232 Window ,
4233 Window
4234 );
4235 extern int XActivateScreenSaver(
4236 Display*
4237 );
4238 extern int XAddHost(
4239 Display* ,
4240 XHostAddress*
4241 );
4242 extern int XAddHosts(
4243 Display* ,
4244 XHostAddress* ,
4245 int
4246 );
4247 extern int XAddToExtensionList(
4248 struct _XExtData** ,
4249 XExtData*
4250 );
4251 extern int XAddToSaveSet(
4252 Display* ,
4253 Window
4254 );
4255 extern int XAllocColor(
4256 Display* ,
4257 Colormap ,
4258 XColor*
4259 );
4260 extern int XAllocColorCells(
4261 Display* ,
4262 Colormap ,
4263 int ,
4264 unsigned long* ,
4265 unsigned int ,
4266 unsigned long* ,
4267 unsigned int
4268 );
4269 extern int XAllocColorPlanes(
4270 Display* ,
4271 Colormap ,
4272 int ,
4273 unsigned long* ,
4274 int ,
4275 int ,
4276 int ,
4277 int ,
4278 unsigned long* ,
4279 unsigned long* ,
4280 unsigned long*
4281 );
4282 extern int XAllocNamedColor(
4283 Display* ,
4284 Colormap ,
4285 const char* ,
4286 XColor* ,
4287 XColor*
4288 );
4289 extern int XAllowEvents(
4290 Display* ,
4291 int ,
4292 Time
4293 );
4294 extern int XAutoRepeatOff(
4295 Display*
4296 );
4297 extern int XAutoRepeatOn(
4298 Display*
4299 );
4300 extern int XBell(
4301 Display* ,
4302 int
4303 );
4304 extern int XBitmapBitOrder(
4305 Display*
4306 );
4307 extern int XBitmapPad(
4308 Display*
4309 );
4310 extern int XBitmapUnit(
4311 Display*
4312 );
4313 extern int XCellsOfScreen(
4314 Screen*
4315 );
4316 extern int XChangeActivePointerGrab(
4317 Display* ,
4318 unsigned int ,
4319 Cursor ,
4320 Time
4321 );
4322 extern int XChangeGC(
4323 Display* ,
4324 GC ,
4325 unsigned long ,
4326 XGCValues*
4327 );
4328 extern int XChangeKeyboardControl(
4329 Display* ,
4330 unsigned long ,
4331 XKeyboardControl*
4332 );
4333 extern int XChangeKeyboardMapping(
4334 Display* ,
4335 int ,
4336 int ,
4337 KeySym* ,
4338 int
4339 );
4340 extern int XChangePointerControl(
4341 Display* ,
4342 int ,
4343 int ,
4344 int ,
4345 int ,
4346 int
4347 );
4348 extern int XChangeProperty(
4349 Display* ,
4350 Window ,
4351 Atom ,
4352 Atom ,
4353 int ,
4354 int ,
4355 const unsigned char* ,
4356 int
4357 );
4358 extern int XChangeSaveSet(
4359 Display* ,
4360 Window ,
4361 int
4362 );
4363 extern int XChangeWindowAttributes(
4364 Display* ,
4365 Window ,
4366 unsigned long ,
4367 XSetWindowAttributes*
4368 );
4369 extern int XCheckIfEvent(
4370 Display* ,
4371 XEvent* ,
4372 int (*) (
4373 Display* ,
4374 XEvent* ,
4375 XPointer
4376 ) ,
4377 XPointer
4378 );
4379 extern int XCheckMaskEvent(
4380 Display* ,
4381 long ,
4382 XEvent*
4383 );
4384 extern int XCheckTypedEvent(
4385 Display* ,
4386 int ,
4387 XEvent*
4388 );
4389 extern int XCheckTypedWindowEvent(
4390 Display* ,
4391 Window ,
4392 int ,
4393 XEvent*
4394 );
4395 extern int XCheckWindowEvent(
4396 Display* ,
4397 Window ,
4398 long ,
4399 XEvent*
4400 );
4401 extern int XCirculateSubwindows(
4402 Display* ,
4403 Window ,
4404 int
4405 );
4406 extern int XCirculateSubwindowsDown(
4407 Display* ,
4408 Window
4409 );
4410 extern int XCirculateSubwindowsUp(
4411 Display* ,
4412 Window
4413 );
4414 extern int XClearArea(
4415 Display* ,
4416 Window ,
4417 int ,
4418 int ,
4419 unsigned int ,
4420 unsigned int ,
4421 int
4422 );
4423 extern int XClearWindow(
4424 Display* ,
4425 Window
4426 );
4427 extern int XCloseDisplay(
4428 Display*
4429 );
4430 extern int XConfigureWindow(
4431 Display* ,