]> git.wh0rd.org - ICEs.git/blob - 321325/lgc_pg-scenarios.pre.i.0
more
[ICEs.git] / 321325 / lgc_pg-scenarios.pre.i.0
1 # 1 "scenarios.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "scenarios.c"
5 # 18 "scenarios.c"
6 # 1 "/usr/include/stdio.h" 1 3 4
7 # 28 "/usr/include/stdio.h" 3 4
8 # 1 "/usr/include/features.h" 1 3 4
9 # 347 "/usr/include/features.h" 3 4
10 # 1 "/usr/include/sys/cdefs.h" 1 3 4
11 # 353 "/usr/include/sys/cdefs.h" 3 4
12 # 1 "/usr/include/bits/wordsize.h" 1 3 4
13 # 354 "/usr/include/sys/cdefs.h" 2 3 4
14 # 348 "/usr/include/features.h" 2 3 4
15 # 371 "/usr/include/features.h" 3 4
16 # 1 "/usr/include/gnu/stubs.h" 1 3 4
17
18
19
20 # 1 "/usr/include/bits/wordsize.h" 1 3 4
21 # 5 "/usr/include/gnu/stubs.h" 2 3 4
22
23
24 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4
25 # 8 "/usr/include/gnu/stubs.h" 2 3 4
26 # 372 "/usr/include/features.h" 2 3 4
27 # 29 "/usr/include/stdio.h" 2 3 4
28
29
30
31
32
33 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
34 # 211 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 3 4
35 typedef unsigned int size_t;
36 # 35 "/usr/include/stdio.h" 2 3 4
37
38 # 1 "/usr/include/bits/types.h" 1 3 4
39 # 28 "/usr/include/bits/types.h" 3 4
40 # 1 "/usr/include/bits/wordsize.h" 1 3 4
41 # 29 "/usr/include/bits/types.h" 2 3 4
42
43
44 typedef unsigned char __u_char;
45 typedef unsigned short int __u_short;
46 typedef unsigned int __u_int;
47 typedef unsigned long int __u_long;
48
49
50 typedef signed char __int8_t;
51 typedef unsigned char __uint8_t;
52 typedef signed short int __int16_t;
53 typedef unsigned short int __uint16_t;
54 typedef signed int __int32_t;
55 typedef unsigned int __uint32_t;
56
57
58
59
60 __extension__ typedef signed long long int __int64_t;
61 __extension__ typedef unsigned long long int __uint64_t;
62
63
64
65
66
67
68
69 __extension__ typedef long long int __quad_t;
70 __extension__ typedef unsigned long long int __u_quad_t;
71 # 131 "/usr/include/bits/types.h" 3 4
72 # 1 "/usr/include/bits/typesizes.h" 1 3 4
73 # 132 "/usr/include/bits/types.h" 2 3 4
74
75
76 __extension__ typedef __u_quad_t __dev_t;
77 __extension__ typedef unsigned int __uid_t;
78 __extension__ typedef unsigned int __gid_t;
79 __extension__ typedef unsigned long int __ino_t;
80 __extension__ typedef __u_quad_t __ino64_t;
81 __extension__ typedef unsigned int __mode_t;
82 __extension__ typedef unsigned int __nlink_t;
83 __extension__ typedef long int __off_t;
84 __extension__ typedef __quad_t __off64_t;
85 __extension__ typedef int __pid_t;
86 __extension__ typedef struct { int __val[2]; } __fsid_t;
87 __extension__ typedef long int __clock_t;
88 __extension__ typedef unsigned long int __rlim_t;
89 __extension__ typedef __u_quad_t __rlim64_t;
90 __extension__ typedef unsigned int __id_t;
91 __extension__ typedef long int __time_t;
92 __extension__ typedef unsigned int __useconds_t;
93 __extension__ typedef long int __suseconds_t;
94
95 __extension__ typedef int __daddr_t;
96 __extension__ typedef long int __swblk_t;
97 __extension__ typedef int __key_t;
98
99
100 __extension__ typedef int __clockid_t;
101
102
103 __extension__ typedef void * __timer_t;
104
105
106 __extension__ typedef long int __blksize_t;
107
108
109
110
111 __extension__ typedef long int __blkcnt_t;
112 __extension__ typedef __quad_t __blkcnt64_t;
113
114
115 __extension__ typedef unsigned long int __fsblkcnt_t;
116 __extension__ typedef __u_quad_t __fsblkcnt64_t;
117
118
119 __extension__ typedef unsigned long int __fsfilcnt_t;
120 __extension__ typedef __u_quad_t __fsfilcnt64_t;
121
122 __extension__ typedef int __ssize_t;
123
124
125
126 typedef __off64_t __loff_t;
127 typedef __quad_t *__qaddr_t;
128 typedef char *__caddr_t;
129
130
131 __extension__ typedef int __intptr_t;
132
133
134 __extension__ typedef unsigned int __socklen_t;
135 # 37 "/usr/include/stdio.h" 2 3 4
136 # 45 "/usr/include/stdio.h" 3 4
137 struct _IO_FILE;
138
139
140
141 typedef struct _IO_FILE FILE;
142
143
144
145
146
147 # 65 "/usr/include/stdio.h" 3 4
148 typedef struct _IO_FILE __FILE;
149 # 75 "/usr/include/stdio.h" 3 4
150 # 1 "/usr/include/libio.h" 1 3 4
151 # 32 "/usr/include/libio.h" 3 4
152 # 1 "/usr/include/_G_config.h" 1 3 4
153 # 15 "/usr/include/_G_config.h" 3 4
154 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
155 # 16 "/usr/include/_G_config.h" 2 3 4
156
157
158
159
160 # 1 "/usr/include/wchar.h" 1 3 4
161 # 83 "/usr/include/wchar.h" 3 4
162 typedef struct
163 {
164 int __count;
165 union
166 {
167
168 unsigned int __wch;
169
170
171
172 char __wchb[4];
173 } __value;
174 } __mbstate_t;
175 # 21 "/usr/include/_G_config.h" 2 3 4
176
177 typedef struct
178 {
179 __off_t __pos;
180 __mbstate_t __state;
181 } _G_fpos_t;
182 typedef struct
183 {
184 __off64_t __pos;
185 __mbstate_t __state;
186 } _G_fpos64_t;
187 # 53 "/usr/include/_G_config.h" 3 4
188 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
189 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
190 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
191 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
192 # 33 "/usr/include/libio.h" 2 3 4
193 # 53 "/usr/include/libio.h" 3 4
194 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdarg.h" 1 3 4
195 # 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdarg.h" 3 4
196 typedef __builtin_va_list __gnuc_va_list;
197 # 54 "/usr/include/libio.h" 2 3 4
198 # 170 "/usr/include/libio.h" 3 4
199 struct _IO_jump_t; struct _IO_FILE;
200 # 180 "/usr/include/libio.h" 3 4
201 typedef void _IO_lock_t;
202
203
204
205
206
207 struct _IO_marker {
208 struct _IO_marker *_next;
209 struct _IO_FILE *_sbuf;
210
211
212
213 int _pos;
214 # 203 "/usr/include/libio.h" 3 4
215 };
216
217
218 enum __codecvt_result
219 {
220 __codecvt_ok,
221 __codecvt_partial,
222 __codecvt_error,
223 __codecvt_noconv
224 };
225 # 271 "/usr/include/libio.h" 3 4
226 struct _IO_FILE {
227 int _flags;
228
229
230
231
232 char* _IO_read_ptr;
233 char* _IO_read_end;
234 char* _IO_read_base;
235 char* _IO_write_base;
236 char* _IO_write_ptr;
237 char* _IO_write_end;
238 char* _IO_buf_base;
239 char* _IO_buf_end;
240
241 char *_IO_save_base;
242 char *_IO_backup_base;
243 char *_IO_save_end;
244
245 struct _IO_marker *_markers;
246
247 struct _IO_FILE *_chain;
248
249 int _fileno;
250
251
252
253 int _flags2;
254
255 __off_t _old_offset;
256
257
258
259 unsigned short _cur_column;
260 signed char _vtable_offset;
261 char _shortbuf[1];
262
263
264
265 _IO_lock_t *_lock;
266 # 319 "/usr/include/libio.h" 3 4
267 __off64_t _offset;
268 # 328 "/usr/include/libio.h" 3 4
269 void *__pad1;
270 void *__pad2;
271 void *__pad3;
272 void *__pad4;
273 size_t __pad5;
274
275 int _mode;
276
277 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
278
279 };
280
281
282 typedef struct _IO_FILE _IO_FILE;
283
284
285 struct _IO_FILE_plus;
286
287 extern struct _IO_FILE_plus _IO_2_1_stdin_;
288 extern struct _IO_FILE_plus _IO_2_1_stdout_;
289 extern struct _IO_FILE_plus _IO_2_1_stderr_;
290 # 364 "/usr/include/libio.h" 3 4
291 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
292
293
294
295
296
297
298
299 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
300 size_t __n);
301
302
303
304
305
306
307
308 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
309
310
311 typedef int __io_close_fn (void *__cookie);
312
313
314
315
316 typedef __io_read_fn cookie_read_function_t;
317 typedef __io_write_fn cookie_write_function_t;
318 typedef __io_seek_fn cookie_seek_function_t;
319 typedef __io_close_fn cookie_close_function_t;
320
321
322 typedef struct
323 {
324 __io_read_fn *read;
325 __io_write_fn *write;
326 __io_seek_fn *seek;
327 __io_close_fn *close;
328 } _IO_cookie_io_functions_t;
329 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
330
331 struct _IO_cookie_file;
332
333
334 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
335 void *__cookie, _IO_cookie_io_functions_t __fns);
336
337
338
339
340
341
342
343 extern int __underflow (_IO_FILE *);
344 extern int __uflow (_IO_FILE *);
345 extern int __overflow (_IO_FILE *, int);
346 # 460 "/usr/include/libio.h" 3 4
347 extern int _IO_getc (_IO_FILE *__fp);
348 extern int _IO_putc (int __c, _IO_FILE *__fp);
349 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
350 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
351
352 extern int _IO_peekc_locked (_IO_FILE *__fp);
353
354
355
356
357
358 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
359 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
360 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
361 # 490 "/usr/include/libio.h" 3 4
362 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
363 __gnuc_va_list, int *__restrict);
364 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
365 __gnuc_va_list);
366 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
367 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
368
369 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
370 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
371
372 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
373 # 76 "/usr/include/stdio.h" 2 3 4
374
375
376
377
378 typedef __gnuc_va_list va_list;
379 # 89 "/usr/include/stdio.h" 3 4
380
381
382 typedef _G_fpos_t fpos_t;
383
384
385
386
387
388 typedef _G_fpos64_t fpos64_t;
389 # 141 "/usr/include/stdio.h" 3 4
390 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
391 # 142 "/usr/include/stdio.h" 2 3 4
392
393
394
395 extern struct _IO_FILE *stdin;
396 extern struct _IO_FILE *stdout;
397 extern struct _IO_FILE *stderr;
398
399
400
401
402
403
404
405 extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
406
407 extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
408
409
410
411
412 extern int renameat (int __oldfd, __const char *__old, int __newfd,
413 __const char *__new) __attribute__ ((__nothrow__));
414
415
416
417
418
419
420
421
422 extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__));
423 # 182 "/usr/include/stdio.h" 3 4
424 extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
425
426
427
428 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
429
430
431
432
433
434 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
435 # 204 "/usr/include/stdio.h" 3 4
436 extern char *tempnam (__const char *__dir, __const char *__pfx)
437 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
438
439
440
441
442
443
444
445
446 extern int fclose (FILE *__stream);
447
448
449
450
451 extern int fflush (FILE *__stream);
452
453 # 229 "/usr/include/stdio.h" 3 4
454 extern int fflush_unlocked (FILE *__stream);
455 # 239 "/usr/include/stdio.h" 3 4
456 extern int fcloseall (void);
457
458
459
460
461
462
463
464
465
466 extern FILE *fopen (__const char *__restrict __filename,
467 __const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
468
469
470
471
472 extern FILE *freopen (__const char *__restrict __filename,
473 __const char *__restrict __modes,
474 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
475 # 272 "/usr/include/stdio.h" 3 4
476
477
478 extern FILE *fopen64 (__const char *__restrict __filename,
479 __const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
480 extern FILE *freopen64 (__const char *__restrict __filename,
481 __const char *__restrict __modes,
482 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
483
484
485
486
487 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
488
489
490
491
492
493 extern FILE *fopencookie (void *__restrict __magic_cookie,
494 __const char *__restrict __modes,
495 _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
496
497
498
499
500 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
501 __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
502
503
504
505
506 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
507
508
509
510
511
512
513 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
514
515
516
517 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
518 int __modes, size_t __n) __attribute__ ((__nothrow__));
519
520
521
522
523
524 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
525 size_t __size) __attribute__ ((__nothrow__));
526
527
528 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
529
530
531
532
533
534
535
536
537 extern int fprintf (FILE *__restrict __stream,
538 __const char *__restrict __format, ...);
539
540
541
542
543 extern int printf (__const char *__restrict __format, ...);
544
545 extern int sprintf (char *__restrict __s,
546 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
547
548
549
550
551
552 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
553 __gnuc_va_list __arg);
554
555
556
557
558 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
559
560 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
561 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
562
563
564
565
566
567 extern int snprintf (char *__restrict __s, size_t __maxlen,
568 __const char *__restrict __format, ...)
569 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
570
571 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
572 __const char *__restrict __format, __gnuc_va_list __arg)
573 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
574
575
576
577
578
579
580 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
581 __gnuc_va_list __arg)
582 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
583 extern int __asprintf (char **__restrict __ptr,
584 __const char *__restrict __fmt, ...)
585 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
586 extern int asprintf (char **__restrict __ptr,
587 __const char *__restrict __fmt, ...)
588 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
589 # 394 "/usr/include/stdio.h" 3 4
590 extern int vdprintf (int __fd, __const char *__restrict __fmt,
591 __gnuc_va_list __arg)
592 __attribute__ ((__format__ (__printf__, 2, 0)));
593 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
594 __attribute__ ((__format__ (__printf__, 2, 3)));
595
596
597
598
599
600
601
602
603 extern int fscanf (FILE *__restrict __stream,
604 __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
605
606
607
608
609 extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
610
611 extern int sscanf (__const char *__restrict __s,
612 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
613 # 445 "/usr/include/stdio.h" 3 4
614
615
616
617
618
619
620
621
622 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
623 __gnuc_va_list __arg)
624 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
625
626
627
628
629
630 extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
631 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
632
633
634 extern int vsscanf (__const char *__restrict __s,
635 __const char *__restrict __format, __gnuc_va_list __arg)
636 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
637 # 504 "/usr/include/stdio.h" 3 4
638
639
640
641
642
643
644
645
646
647 extern int fgetc (FILE *__stream);
648 extern int getc (FILE *__stream);
649
650
651
652
653
654 extern int getchar (void);
655
656 # 532 "/usr/include/stdio.h" 3 4
657 extern int getc_unlocked (FILE *__stream);
658 extern int getchar_unlocked (void);
659 # 543 "/usr/include/stdio.h" 3 4
660 extern int fgetc_unlocked (FILE *__stream);
661
662
663
664
665
666
667
668
669
670
671
672 extern int fputc (int __c, FILE *__stream);
673 extern int putc (int __c, FILE *__stream);
674
675
676
677
678
679 extern int putchar (int __c);
680
681 # 576 "/usr/include/stdio.h" 3 4
682 extern int fputc_unlocked (int __c, FILE *__stream);
683
684
685
686
687
688
689
690 extern int putc_unlocked (int __c, FILE *__stream);
691 extern int putchar_unlocked (int __c);
692
693
694
695
696
697
698 extern int getw (FILE *__stream);
699
700
701 extern int putw (int __w, FILE *__stream);
702
703
704
705
706
707
708
709
710 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
711 __attribute__ ((__warn_unused_result__));
712
713
714
715
716
717
718 extern char *gets (char *__s) __attribute__ ((__warn_unused_result__));
719
720 # 622 "/usr/include/stdio.h" 3 4
721 extern char *fgets_unlocked (char *__restrict __s, int __n,
722 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
723 # 638 "/usr/include/stdio.h" 3 4
724 extern __ssize_t __getdelim (char **__restrict __lineptr,
725 size_t *__restrict __n, int __delimiter,
726 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
727 extern __ssize_t getdelim (char **__restrict __lineptr,
728 size_t *__restrict __n, int __delimiter,
729 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
730
731
732
733
734
735
736
737 extern __ssize_t getline (char **__restrict __lineptr,
738 size_t *__restrict __n,
739 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
740
741
742
743
744
745
746
747
748 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
749
750
751
752
753
754 extern int puts (__const char *__s);
755
756
757
758
759
760
761 extern int ungetc (int __c, FILE *__stream);
762
763
764
765
766
767
768 extern size_t fread (void *__restrict __ptr, size_t __size,
769 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
770
771
772
773
774 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
775 size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__));
776
777 # 699 "/usr/include/stdio.h" 3 4
778 extern int fputs_unlocked (__const char *__restrict __s,
779 FILE *__restrict __stream);
780 # 710 "/usr/include/stdio.h" 3 4
781 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
782 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
783 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
784 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
785
786
787
788
789
790
791
792
793 extern int fseek (FILE *__stream, long int __off, int __whence);
794
795
796
797
798 extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
799
800
801
802
803 extern void rewind (FILE *__stream);
804
805 # 746 "/usr/include/stdio.h" 3 4
806 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
807
808
809
810
811 extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
812 # 765 "/usr/include/stdio.h" 3 4
813
814
815
816
817
818
819 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
820
821
822
823
824 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
825 # 788 "/usr/include/stdio.h" 3 4
826
827
828
829 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
830 extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
831 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
832 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
833
834
835
836
837 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
838
839 extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
840
841 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
842
843
844
845
846 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
847 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
848 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
849
850
851
852
853
854
855
856
857 extern void perror (__const char *__s);
858
859
860
861
862
863
864 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
865 # 27 "/usr/include/bits/sys_errlist.h" 3 4
866 extern int sys_nerr;
867 extern __const char *__const sys_errlist[];
868
869
870 extern int _sys_nerr;
871 extern __const char *__const _sys_errlist[];
872 # 827 "/usr/include/stdio.h" 2 3 4
873
874
875
876
877 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
878
879
880
881
882 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
883 # 846 "/usr/include/stdio.h" 3 4
884 extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__));
885
886
887
888
889
890 extern int pclose (FILE *__stream);
891
892
893
894
895
896 extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
897
898
899
900
901
902 extern char *cuserid (char *__s);
903
904
905
906
907 struct obstack;
908
909
910 extern int obstack_printf (struct obstack *__restrict __obstack,
911 __const char *__restrict __format, ...)
912 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
913 extern int obstack_vprintf (struct obstack *__restrict __obstack,
914 __const char *__restrict __format,
915 __gnuc_va_list __args)
916 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
917
918
919
920
921
922
923
924 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
925
926
927
928 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
929
930
931 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
932 # 907 "/usr/include/stdio.h" 3 4
933 # 1 "/usr/include/bits/stdio.h" 1 3 4
934 # 44 "/usr/include/bits/stdio.h" 3 4
935 extern __inline int
936 getchar (void)
937 {
938 return _IO_getc (stdin);
939 }
940
941
942
943
944 extern __inline int
945 fgetc_unlocked (FILE *__fp)
946 {
947 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
948 }
949
950
951
952
953
954 extern __inline int
955 getc_unlocked (FILE *__fp)
956 {
957 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
958 }
959
960
961 extern __inline int
962 getchar_unlocked (void)
963 {
964 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
965 }
966
967
968
969
970 extern __inline int
971 putchar (int __c)
972 {
973 return _IO_putc (__c, stdout);
974 }
975
976
977
978
979 extern __inline int
980 fputc_unlocked (int __c, FILE *__stream)
981 {
982 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
983 }
984
985
986
987
988
989 extern __inline int
990 putc_unlocked (int __c, FILE *__stream)
991 {
992 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
993 }
994
995
996 extern __inline int
997 putchar_unlocked (int __c)
998 {
999 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
1000 }
1001
1002
1003
1004
1005
1006 extern __inline __ssize_t
1007 getline (char **__lineptr, size_t *__n, FILE *__stream)
1008 {
1009 return __getdelim (__lineptr, __n, '\n', __stream);
1010 }
1011
1012
1013
1014
1015
1016 extern __inline int
1017 __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream)
1018 {
1019 return (((__stream)->_flags & 0x10) != 0);
1020 }
1021
1022
1023 extern __inline int
1024 __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream)
1025 {
1026 return (((__stream)->_flags & 0x20) != 0);
1027 }
1028 # 908 "/usr/include/stdio.h" 2 3 4
1029
1030
1031 # 1 "/usr/include/bits/stdio2.h" 1 3 4
1032 # 24 "/usr/include/bits/stdio2.h" 3 4
1033 extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
1034 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
1035 extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
1036 __const char *__restrict __format,
1037 __gnuc_va_list __ap) __attribute__ ((__nothrow__));
1038
1039
1040 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1041 __attribute__ ((__nothrow__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...)
1042 {
1043 return __builtin___sprintf_chk (__s, 2 - 1,
1044 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
1045 }
1046
1047
1048
1049
1050
1051
1052 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1053 __attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap)
1054
1055 {
1056 return __builtin___vsprintf_chk (__s, 2 - 1,
1057 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
1058 }
1059
1060
1061
1062 extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
1063 size_t __slen, __const char *__restrict __format,
1064 ...) __attribute__ ((__nothrow__));
1065 extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
1066 size_t __slen, __const char *__restrict __format,
1067 __gnuc_va_list __ap) __attribute__ ((__nothrow__));
1068
1069
1070 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1071 __attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...)
1072
1073 {
1074 return __builtin___snprintf_chk (__s, __n, 2 - 1,
1075 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
1076 }
1077
1078
1079
1080
1081
1082
1083 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1084 __attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap)
1085
1086 {
1087 return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
1088 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
1089 }
1090
1091
1092
1093
1094
1095 extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
1096 __const char *__restrict __format, ...);
1097 extern int __printf_chk (int __flag, __const char *__restrict __format, ...);
1098 extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
1099 __const char *__restrict __format, __gnuc_va_list __ap);
1100 extern int __vprintf_chk (int __flag, __const char *__restrict __format,
1101 __gnuc_va_list __ap);
1102
1103
1104 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1105 fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
1106 {
1107 return __fprintf_chk (__stream, 2 - 1, __fmt,
1108 __builtin_va_arg_pack ());
1109 }
1110
1111 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1112 printf (__const char *__restrict __fmt, ...)
1113 {
1114 return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
1115 }
1116
1117
1118
1119
1120
1121
1122
1123 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1124 vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap)
1125 {
1126
1127 return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
1128
1129
1130
1131 }
1132
1133 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1134 vfprintf (FILE *__restrict __stream,
1135 __const char *__restrict __fmt, __gnuc_va_list __ap)
1136 {
1137 return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
1138 }
1139
1140
1141
1142 extern int __asprintf_chk (char **__restrict __ptr, int __flag,
1143 __const char *__restrict __fmt, ...)
1144 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
1145 extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
1146 __const char *__restrict __fmt, __gnuc_va_list __arg)
1147 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
1148 extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt,
1149 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
1150 extern int __vdprintf_chk (int __fd, int __flag,
1151 __const char *__restrict __fmt, __gnuc_va_list __arg)
1152 __attribute__ ((__format__ (__printf__, 3, 0)));
1153 extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
1154 int __flag, __const char *__restrict __format,
1155 ...)
1156 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
1157 extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
1158 int __flag,
1159 __const char *__restrict __format,
1160 __gnuc_va_list __args)
1161 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
1162
1163
1164 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1165 __attribute__ ((__nothrow__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...)
1166 {
1167 return __asprintf_chk (__ptr, 2 - 1, __fmt,
1168 __builtin_va_arg_pack ());
1169 }
1170
1171 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1172 __attribute__ ((__nothrow__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...)
1173
1174 {
1175 return __asprintf_chk (__ptr, 2 - 1, __fmt,
1176 __builtin_va_arg_pack ());
1177 }
1178
1179 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1180 dprintf (int __fd, __const char *__restrict __fmt, ...)
1181 {
1182 return __dprintf_chk (__fd, 2 - 1, __fmt,
1183 __builtin_va_arg_pack ());
1184 }
1185
1186 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1187 __attribute__ ((__nothrow__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...)
1188
1189 {
1190 return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
1191 __builtin_va_arg_pack ());
1192 }
1193 # 195 "/usr/include/bits/stdio2.h" 3 4
1194 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1195 __attribute__ ((__nothrow__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap)
1196
1197 {
1198 return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
1199 }
1200
1201 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1202 vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap)
1203 {
1204 return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
1205 }
1206
1207 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
1208 __attribute__ ((__nothrow__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap)
1209
1210 {
1211 return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
1212 __ap);
1213 }
1214
1215
1216
1217
1218
1219 extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__));
1220 extern char *__gets_warn (char *__str) __asm__ ("" "gets")
1221 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size")))
1222 ;
1223
1224 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
1225 gets (char *__str)
1226 {
1227 if (__builtin_object_size (__str, 2 > 1) != (size_t) -1)
1228 return __gets_chk (__str, __builtin_object_size (__str, 2 > 1));
1229 return __gets_warn (__str);
1230 }
1231
1232 extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
1233 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1234 extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
1235
1236 __attribute__ ((__warn_unused_result__));
1237 extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
1238
1239
1240 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")))
1241 ;
1242
1243 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
1244 fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
1245 {
1246 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
1247 {
1248 if (!__builtin_constant_p (__n) || __n <= 0)
1249 return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1250
1251 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
1252 return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1253 }
1254 return __fgets_alias (__s, __n, __stream);
1255 }
1256
1257 extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
1258 size_t __size, size_t __n,
1259 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1260 extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread")
1261
1262
1263 __attribute__ ((__warn_unused_result__));
1264 extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
1265
1266
1267
1268
1269 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")))
1270 ;
1271
1272 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
1273 fread (void *__restrict __ptr, size_t __size, size_t __n,
1274 FILE *__restrict __stream)
1275 {
1276 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
1277 {
1278 if (!__builtin_constant_p (__size)
1279 || !__builtin_constant_p (__n)
1280 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
1281 return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
1282
1283 if (__size * __n > __builtin_object_size (__ptr, 0))
1284 return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
1285 }
1286 return __fread_alias (__ptr, __size, __n, __stream);
1287 }
1288
1289
1290 extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
1291 int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1292 extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked")
1293
1294 __attribute__ ((__warn_unused_result__));
1295 extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
1296
1297
1298 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")))
1299 ;
1300
1301 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
1302 fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
1303 {
1304 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
1305 {
1306 if (!__builtin_constant_p (__n) || __n <= 0)
1307 return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1308
1309 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
1310 return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1311 }
1312 return __fgets_unlocked_alias (__s, __n, __stream);
1313 }
1314
1315
1316
1317
1318 extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
1319 size_t __size, size_t __n,
1320 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1321 extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked")
1322
1323
1324 __attribute__ ((__warn_unused_result__));
1325 extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
1326
1327
1328
1329
1330 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")))
1331 ;
1332
1333 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
1334 fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
1335 FILE *__restrict __stream)
1336 {
1337 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
1338 {
1339 if (!__builtin_constant_p (__size)
1340 || !__builtin_constant_p (__n)
1341 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
1342 return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
1343 __stream);
1344
1345 if (__size * __n > __builtin_object_size (__ptr, 0))
1346 return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
1347 __stream);
1348 }
1349
1350
1351 if (__builtin_constant_p (__size)
1352 && __builtin_constant_p (__n)
1353 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
1354 && __size * __n <= 8)
1355 {
1356 size_t __cnt = __size * __n;
1357 char *__cptr = (char *) __ptr;
1358 if (__cnt == 0)
1359 return 0;
1360
1361 for (; __cnt > 0; --__cnt)
1362 {
1363 int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++);
1364 if (__c == (-1))
1365 break;
1366 *__cptr++ = __c;
1367 }
1368 return (__cptr - (char *) __ptr) / __size;
1369 }
1370
1371 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
1372 }
1373 # 911 "/usr/include/stdio.h" 2 3 4
1374
1375
1376
1377
1378
1379
1380 # 19 "scenarios.c" 2
1381 # 1 "/usr/include/stdlib.h" 1 3 4
1382 # 33 "/usr/include/stdlib.h" 3 4
1383 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
1384 # 323 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 3 4
1385 typedef long int wchar_t;
1386 # 34 "/usr/include/stdlib.h" 2 3 4
1387
1388
1389
1390
1391
1392
1393
1394
1395 # 1 "/usr/include/bits/waitflags.h" 1 3 4
1396 # 43 "/usr/include/stdlib.h" 2 3 4
1397 # 1 "/usr/include/bits/waitstatus.h" 1 3 4
1398 # 65 "/usr/include/bits/waitstatus.h" 3 4
1399 # 1 "/usr/include/endian.h" 1 3 4
1400 # 37 "/usr/include/endian.h" 3 4
1401 # 1 "/usr/include/bits/endian.h" 1 3 4
1402 # 38 "/usr/include/endian.h" 2 3 4
1403 # 61 "/usr/include/endian.h" 3 4
1404 # 1 "/usr/include/bits/byteswap.h" 1 3 4
1405 # 62 "/usr/include/endian.h" 2 3 4
1406 # 66 "/usr/include/bits/waitstatus.h" 2 3 4
1407
1408 union wait
1409 {
1410 int w_status;
1411 struct
1412 {
1413
1414 unsigned int __w_termsig:7;
1415 unsigned int __w_coredump:1;
1416 unsigned int __w_retcode:8;
1417 unsigned int:16;
1418
1419
1420
1421
1422
1423
1424
1425 } __wait_terminated;
1426 struct
1427 {
1428
1429 unsigned int __w_stopval:8;
1430 unsigned int __w_stopsig:8;
1431 unsigned int:16;
1432
1433
1434
1435
1436
1437
1438 } __wait_stopped;
1439 };
1440 # 44 "/usr/include/stdlib.h" 2 3 4
1441 # 68 "/usr/include/stdlib.h" 3 4
1442 typedef union
1443 {
1444 union wait *__uptr;
1445 int *__iptr;
1446 } __WAIT_STATUS __attribute__ ((__transparent_union__));
1447 # 96 "/usr/include/stdlib.h" 3 4
1448
1449
1450 typedef struct
1451 {
1452 int quot;
1453 int rem;
1454 } div_t;
1455
1456
1457
1458 typedef struct
1459 {
1460 long int quot;
1461 long int rem;
1462 } ldiv_t;
1463
1464
1465
1466
1467
1468
1469
1470 __extension__ typedef struct
1471 {
1472 long long int quot;
1473 long long int rem;
1474 } lldiv_t;
1475
1476
1477 # 140 "/usr/include/stdlib.h" 3 4
1478 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
1479
1480
1481
1482
1483 extern double atof (__const char *__nptr)
1484 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1485
1486 extern int atoi (__const char *__nptr)
1487 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1488
1489 extern long int atol (__const char *__nptr)
1490 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1491
1492
1493
1494
1495
1496 __extension__ extern long long int atoll (__const char *__nptr)
1497 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1498
1499
1500
1501
1502
1503 extern double strtod (__const char *__restrict __nptr,
1504 char **__restrict __endptr)
1505 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1506
1507
1508
1509
1510
1511 extern float strtof (__const char *__restrict __nptr,
1512 char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1513
1514 extern long double strtold (__const char *__restrict __nptr,
1515 char **__restrict __endptr)
1516 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1517
1518
1519
1520
1521
1522 extern long int strtol (__const char *__restrict __nptr,
1523 char **__restrict __endptr, int __base)
1524 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1525
1526 extern unsigned long int strtoul (__const char *__restrict __nptr,
1527 char **__restrict __endptr, int __base)
1528 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1529
1530
1531
1532
1533 __extension__
1534 extern long long int strtoq (__const char *__restrict __nptr,
1535 char **__restrict __endptr, int __base)
1536 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1537
1538 __extension__
1539 extern unsigned long long int strtouq (__const char *__restrict __nptr,
1540 char **__restrict __endptr, int __base)
1541 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1542
1543
1544
1545
1546
1547 __extension__
1548 extern long long int strtoll (__const char *__restrict __nptr,
1549 char **__restrict __endptr, int __base)
1550 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1551
1552 __extension__
1553 extern unsigned long long int strtoull (__const char *__restrict __nptr,
1554 char **__restrict __endptr, int __base)
1555 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1556
1557 # 236 "/usr/include/stdlib.h" 3 4
1558 # 1 "/usr/include/xlocale.h" 1 3 4
1559 # 28 "/usr/include/xlocale.h" 3 4
1560 typedef struct __locale_struct
1561 {
1562
1563 struct locale_data *__locales[13];
1564
1565
1566 const unsigned short int *__ctype_b;
1567 const int *__ctype_tolower;
1568 const int *__ctype_toupper;
1569
1570
1571 const char *__names[13];
1572 } *__locale_t;
1573
1574
1575 typedef __locale_t locale_t;
1576 # 237 "/usr/include/stdlib.h" 2 3 4
1577
1578
1579
1580 extern long int strtol_l (__const char *__restrict __nptr,
1581 char **__restrict __endptr, int __base,
1582 __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
1583
1584 extern unsigned long int strtoul_l (__const char *__restrict __nptr,
1585 char **__restrict __endptr,
1586 int __base, __locale_t __loc)
1587 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
1588
1589 __extension__
1590 extern long long int strtoll_l (__const char *__restrict __nptr,
1591 char **__restrict __endptr, int __base,
1592 __locale_t __loc)
1593 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
1594
1595 __extension__
1596 extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
1597 char **__restrict __endptr,
1598 int __base, __locale_t __loc)
1599 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
1600
1601 extern double strtod_l (__const char *__restrict __nptr,
1602 char **__restrict __endptr, __locale_t __loc)
1603 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
1604
1605 extern float strtof_l (__const char *__restrict __nptr,
1606 char **__restrict __endptr, __locale_t __loc)
1607 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
1608
1609 extern long double strtold_l (__const char *__restrict __nptr,
1610 char **__restrict __endptr,
1611 __locale_t __loc)
1612 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
1613
1614
1615
1616
1617
1618 extern __inline double
1619 __attribute__ ((__nothrow__)) atof (__const char *__nptr)
1620 {
1621 return strtod (__nptr, (char **) ((void *)0));
1622 }
1623 extern __inline int
1624 __attribute__ ((__nothrow__)) atoi (__const char *__nptr)
1625 {
1626 return (int) strtol (__nptr, (char **) ((void *)0), 10);
1627 }
1628 extern __inline long int
1629 __attribute__ ((__nothrow__)) atol (__const char *__nptr)
1630 {
1631 return strtol (__nptr, (char **) ((void *)0), 10);
1632 }
1633
1634
1635
1636
1637 __extension__ extern __inline long long int
1638 __attribute__ ((__nothrow__)) atoll (__const char *__nptr)
1639 {
1640 return strtoll (__nptr, (char **) ((void *)0), 10);
1641 }
1642
1643 # 311 "/usr/include/stdlib.h" 3 4
1644 extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
1645
1646
1647 extern long int a64l (__const char *__s)
1648 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1649
1650
1651
1652
1653 # 1 "/usr/include/sys/types.h" 1 3 4
1654 # 29 "/usr/include/sys/types.h" 3 4
1655
1656
1657
1658
1659
1660
1661 typedef __u_char u_char;
1662 typedef __u_short u_short;
1663 typedef __u_int u_int;
1664 typedef __u_long u_long;
1665 typedef __quad_t quad_t;
1666 typedef __u_quad_t u_quad_t;
1667 typedef __fsid_t fsid_t;
1668
1669
1670
1671
1672 typedef __loff_t loff_t;
1673
1674
1675
1676 typedef __ino_t ino_t;
1677
1678
1679
1680
1681
1682
1683 typedef __ino64_t ino64_t;
1684
1685
1686
1687
1688 typedef __dev_t dev_t;
1689
1690
1691
1692
1693 typedef __gid_t gid_t;
1694
1695
1696
1697
1698 typedef __mode_t mode_t;
1699
1700
1701
1702
1703 typedef __nlink_t nlink_t;
1704
1705
1706
1707
1708 typedef __uid_t uid_t;
1709
1710
1711
1712
1713
1714 typedef __off_t off_t;
1715
1716
1717
1718
1719
1720
1721 typedef __off64_t off64_t;
1722
1723
1724
1725
1726 typedef __pid_t pid_t;
1727
1728
1729
1730
1731 typedef __id_t id_t;
1732
1733
1734
1735
1736 typedef __ssize_t ssize_t;
1737
1738
1739
1740
1741
1742 typedef __daddr_t daddr_t;
1743 typedef __caddr_t caddr_t;
1744
1745
1746
1747
1748
1749 typedef __key_t key_t;
1750 # 133 "/usr/include/sys/types.h" 3 4
1751 # 1 "/usr/include/time.h" 1 3 4
1752 # 58 "/usr/include/time.h" 3 4
1753
1754
1755 typedef __clock_t clock_t;
1756
1757
1758
1759 # 74 "/usr/include/time.h" 3 4
1760
1761
1762 typedef __time_t time_t;
1763
1764
1765
1766 # 92 "/usr/include/time.h" 3 4
1767 typedef __clockid_t clockid_t;
1768 # 104 "/usr/include/time.h" 3 4
1769 typedef __timer_t timer_t;
1770 # 134 "/usr/include/sys/types.h" 2 3 4
1771
1772
1773
1774 typedef __useconds_t useconds_t;
1775
1776
1777
1778 typedef __suseconds_t suseconds_t;
1779
1780
1781
1782
1783
1784 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
1785 # 148 "/usr/include/sys/types.h" 2 3 4
1786
1787
1788
1789 typedef unsigned long int ulong;
1790 typedef unsigned short int ushort;
1791 typedef unsigned int uint;
1792 # 195 "/usr/include/sys/types.h" 3 4
1793 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
1794 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
1795 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
1796 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
1797
1798
1799 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
1800 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
1801 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
1802 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
1803
1804 typedef int register_t __attribute__ ((__mode__ (__word__)));
1805 # 220 "/usr/include/sys/types.h" 3 4
1806 # 1 "/usr/include/sys/select.h" 1 3 4
1807 # 31 "/usr/include/sys/select.h" 3 4
1808 # 1 "/usr/include/bits/select.h" 1 3 4
1809 # 32 "/usr/include/sys/select.h" 2 3 4
1810
1811
1812 # 1 "/usr/include/bits/sigset.h" 1 3 4
1813 # 24 "/usr/include/bits/sigset.h" 3 4
1814 typedef int __sig_atomic_t;
1815
1816
1817
1818
1819 typedef struct
1820 {
1821 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1822 } __sigset_t;
1823 # 35 "/usr/include/sys/select.h" 2 3 4
1824
1825
1826
1827 typedef __sigset_t sigset_t;
1828
1829
1830
1831
1832
1833 # 1 "/usr/include/time.h" 1 3 4
1834 # 120 "/usr/include/time.h" 3 4
1835 struct timespec
1836 {
1837 __time_t tv_sec;
1838 long int tv_nsec;
1839 };
1840 # 45 "/usr/include/sys/select.h" 2 3 4
1841
1842 # 1 "/usr/include/bits/time.h" 1 3 4
1843 # 69 "/usr/include/bits/time.h" 3 4
1844 struct timeval
1845 {
1846 __time_t tv_sec;
1847 __suseconds_t tv_usec;
1848 };
1849 # 47 "/usr/include/sys/select.h" 2 3 4
1850 # 55 "/usr/include/sys/select.h" 3 4
1851 typedef long int __fd_mask;
1852 # 67 "/usr/include/sys/select.h" 3 4
1853 typedef struct
1854 {
1855
1856
1857
1858 __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
1859
1860
1861
1862
1863
1864 } fd_set;
1865
1866
1867
1868
1869
1870
1871 typedef __fd_mask fd_mask;
1872 # 99 "/usr/include/sys/select.h" 3 4
1873
1874 # 109 "/usr/include/sys/select.h" 3 4
1875 extern int select (int __nfds, fd_set *__restrict __readfds,
1876 fd_set *__restrict __writefds,
1877 fd_set *__restrict __exceptfds,
1878 struct timeval *__restrict __timeout);
1879 # 121 "/usr/include/sys/select.h" 3 4
1880 extern int pselect (int __nfds, fd_set *__restrict __readfds,
1881 fd_set *__restrict __writefds,
1882 fd_set *__restrict __exceptfds,
1883 const struct timespec *__restrict __timeout,
1884 const __sigset_t *__restrict __sigmask);
1885
1886
1887
1888 # 221 "/usr/include/sys/types.h" 2 3 4
1889
1890
1891 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
1892 # 30 "/usr/include/sys/sysmacros.h" 3 4
1893 __extension__
1894 extern unsigned int gnu_dev_major (unsigned long long int __dev)
1895 __attribute__ ((__nothrow__));
1896 __extension__
1897 extern unsigned int gnu_dev_minor (unsigned long long int __dev)
1898 __attribute__ ((__nothrow__));
1899 __extension__
1900 extern unsigned long long int gnu_dev_makedev (unsigned int __major,
1901 unsigned int __minor)
1902 __attribute__ ((__nothrow__));
1903
1904
1905 __extension__ extern __inline unsigned int
1906 __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
1907 {
1908 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
1909 }
1910
1911 __extension__ extern __inline unsigned int
1912 __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
1913 {
1914 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
1915 }
1916
1917 __extension__ extern __inline unsigned long long int
1918 __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
1919 {
1920 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
1921 | (((unsigned long long int) (__minor & ~0xff)) << 12)
1922 | (((unsigned long long int) (__major & ~0xfff)) << 32));
1923 }
1924 # 224 "/usr/include/sys/types.h" 2 3 4
1925
1926
1927
1928
1929 typedef __blksize_t blksize_t;
1930
1931
1932
1933
1934
1935
1936 typedef __blkcnt_t blkcnt_t;
1937
1938
1939
1940 typedef __fsblkcnt_t fsblkcnt_t;
1941
1942
1943
1944 typedef __fsfilcnt_t fsfilcnt_t;
1945 # 262 "/usr/include/sys/types.h" 3 4
1946 typedef __blkcnt64_t blkcnt64_t;
1947 typedef __fsblkcnt64_t fsblkcnt64_t;
1948 typedef __fsfilcnt64_t fsfilcnt64_t;
1949
1950
1951
1952
1953
1954 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
1955 # 36 "/usr/include/bits/pthreadtypes.h" 3 4
1956 typedef unsigned long int pthread_t;
1957
1958
1959 typedef union
1960 {
1961 char __size[36];
1962 long int __align;
1963 } pthread_attr_t;
1964
1965
1966 typedef struct __pthread_internal_slist
1967 {
1968 struct __pthread_internal_slist *__next;
1969 } __pthread_slist_t;
1970
1971
1972
1973
1974 typedef union
1975 {
1976 struct __pthread_mutex_s
1977 {
1978 int __lock;
1979 unsigned int __count;
1980 int __owner;
1981
1982
1983 int __kind;
1984 unsigned int __nusers;
1985 __extension__ union
1986 {
1987 int __spins;
1988 __pthread_slist_t __list;
1989 };
1990 } __data;
1991 char __size[24];
1992 long int __align;
1993 } pthread_mutex_t;
1994
1995 typedef union
1996 {
1997 char __size[4];
1998 long int __align;
1999 } pthread_mutexattr_t;
2000
2001
2002
2003
2004 typedef union
2005 {
2006 struct
2007 {
2008 int __lock;
2009 unsigned int __futex;
2010 __extension__ unsigned long long int __total_seq;
2011 __extension__ unsigned long long int __wakeup_seq;
2012 __extension__ unsigned long long int __woken_seq;
2013 void *__mutex;
2014 unsigned int __nwaiters;
2015 unsigned int __broadcast_seq;
2016 } __data;
2017 char __size[48];
2018 __extension__ long long int __align;
2019 } pthread_cond_t;
2020
2021 typedef union
2022 {
2023 char __size[4];
2024 long int __align;
2025 } pthread_condattr_t;
2026
2027
2028
2029 typedef unsigned int pthread_key_t;
2030
2031
2032
2033 typedef int pthread_once_t;
2034
2035
2036
2037
2038
2039 typedef union
2040 {
2041 struct
2042 {
2043 int __lock;
2044 unsigned int __nr_readers;
2045 unsigned int __readers_wakeup;
2046 unsigned int __writer_wakeup;
2047 unsigned int __nr_readers_queued;
2048 unsigned int __nr_writers_queued;
2049
2050
2051 unsigned char __flags;
2052 unsigned char __shared;
2053 unsigned char __pad1;
2054 unsigned char __pad2;
2055 int __writer;
2056 } __data;
2057 char __size[32];
2058 long int __align;
2059 } pthread_rwlock_t;
2060
2061 typedef union
2062 {
2063 char __size[8];
2064 long int __align;
2065 } pthread_rwlockattr_t;
2066
2067
2068
2069
2070
2071 typedef volatile int pthread_spinlock_t;
2072
2073
2074
2075
2076 typedef union
2077 {
2078 char __size[20];
2079 long int __align;
2080 } pthread_barrier_t;
2081
2082 typedef union
2083 {
2084 char __size[4];
2085 int __align;
2086 } pthread_barrierattr_t;
2087 # 271 "/usr/include/sys/types.h" 2 3 4
2088
2089
2090
2091 # 321 "/usr/include/stdlib.h" 2 3 4
2092
2093
2094
2095
2096
2097
2098 extern long int random (void) __attribute__ ((__nothrow__));
2099
2100
2101 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));
2102
2103
2104
2105
2106
2107 extern char *initstate (unsigned int __seed, char *__statebuf,
2108 size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2109
2110
2111
2112 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2113
2114
2115
2116
2117
2118
2119
2120 struct random_data
2121 {
2122 int32_t *fptr;
2123 int32_t *rptr;
2124 int32_t *state;
2125 int rand_type;
2126 int rand_deg;
2127 int rand_sep;
2128 int32_t *end_ptr;
2129 };
2130
2131 extern int random_r (struct random_data *__restrict __buf,
2132 int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2133
2134 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
2135 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2136
2137 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
2138 size_t __statelen,
2139 struct random_data *__restrict __buf)
2140 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
2141
2142 extern int setstate_r (char *__restrict __statebuf,
2143 struct random_data *__restrict __buf)
2144 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2145
2146
2147
2148
2149
2150
2151 extern int rand (void) __attribute__ ((__nothrow__));
2152
2153 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));
2154
2155
2156
2157
2158 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));
2159
2160
2161
2162
2163
2164
2165
2166 extern double drand48 (void) __attribute__ ((__nothrow__));
2167 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2168
2169
2170 extern long int lrand48 (void) __attribute__ ((__nothrow__));
2171 extern long int nrand48 (unsigned short int __xsubi[3])
2172 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2173
2174
2175 extern long int mrand48 (void) __attribute__ ((__nothrow__));
2176 extern long int jrand48 (unsigned short int __xsubi[3])
2177 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2178
2179
2180 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
2181 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
2182 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2183 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2184
2185
2186
2187
2188
2189 struct drand48_data
2190 {
2191 unsigned short int __x[3];
2192 unsigned short int __old_x[3];
2193 unsigned short int __c;
2194 unsigned short int __init;
2195 unsigned long long int __a;
2196 };
2197
2198
2199 extern int drand48_r (struct drand48_data *__restrict __buffer,
2200 double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2201 extern int erand48_r (unsigned short int __xsubi[3],
2202 struct drand48_data *__restrict __buffer,
2203 double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2204
2205
2206 extern int lrand48_r (struct drand48_data *__restrict __buffer,
2207 long int *__restrict __result)
2208 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2209 extern int nrand48_r (unsigned short int __xsubi[3],
2210 struct drand48_data *__restrict __buffer,
2211 long int *__restrict __result)
2212 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2213
2214
2215 extern int mrand48_r (struct drand48_data *__restrict __buffer,
2216 long int *__restrict __result)
2217 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2218 extern int jrand48_r (unsigned short int __xsubi[3],
2219 struct drand48_data *__restrict __buffer,
2220 long int *__restrict __result)
2221 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2222
2223
2224 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
2225 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2226
2227 extern int seed48_r (unsigned short int __seed16v[3],
2228 struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2229
2230 extern int lcong48_r (unsigned short int __param[7],
2231 struct drand48_data *__buffer)
2232 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242 extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
2243
2244 extern void *calloc (size_t __nmemb, size_t __size)
2245 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256 extern void *realloc (void *__ptr, size_t __size)
2257 __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2258
2259 extern void free (void *__ptr) __attribute__ ((__nothrow__));
2260
2261
2262
2263
2264 extern void cfree (void *__ptr) __attribute__ ((__nothrow__));
2265
2266
2267
2268 # 1 "/usr/include/alloca.h" 1 3 4
2269 # 25 "/usr/include/alloca.h" 3 4
2270 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
2271 # 26 "/usr/include/alloca.h" 2 3 4
2272
2273
2274
2275
2276
2277
2278
2279 extern void *alloca (size_t __size) __attribute__ ((__nothrow__));
2280
2281
2282
2283
2284
2285
2286 # 498 "/usr/include/stdlib.h" 2 3 4
2287
2288
2289
2290
2291 extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
2292
2293
2294
2295
2296 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
2297 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2298
2299
2300
2301
2302 extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2303
2304
2305
2306 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2307 # 527 "/usr/include/stdlib.h" 3 4
2308 extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2309
2310
2311
2312
2313
2314
2315
2316 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
2317 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2318
2319
2320
2321
2322
2323
2324 extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2325
2326
2327
2328
2329
2330
2331
2332 extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2333
2334
2335
2336
2337
2338
2339
2340 extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
2341
2342
2343
2344
2345
2346
2347 extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2348
2349
2350
2351
2352 extern char *__secure_getenv (__const char *__name)
2353 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2354
2355
2356
2357
2358
2359 extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2360
2361
2362
2363
2364
2365 extern int setenv (__const char *__name, __const char *__value, int __replace)
2366 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2367
2368
2369 extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));
2370
2371
2372
2373
2374
2375
2376 extern int clearenv (void) __attribute__ ((__nothrow__));
2377 # 604 "/usr/include/stdlib.h" 3 4
2378 extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2379 # 615 "/usr/include/stdlib.h" 3 4
2380 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2381 # 625 "/usr/include/stdlib.h" 3 4
2382 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2383 # 637 "/usr/include/stdlib.h" 3 4
2384 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2385 # 647 "/usr/include/stdlib.h" 3 4
2386 extern int mkstemps64 (char *__template, int __suffixlen)
2387 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2388 # 658 "/usr/include/stdlib.h" 3 4
2389 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2390 # 669 "/usr/include/stdlib.h" 3 4
2391 extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2392 # 679 "/usr/include/stdlib.h" 3 4
2393 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2394 # 689 "/usr/include/stdlib.h" 3 4
2395 extern int mkostemps (char *__template, int __suffixlen, int __flags)
2396 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2397 # 701 "/usr/include/stdlib.h" 3 4
2398 extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
2399 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409 extern int system (__const char *__command) __attribute__ ((__warn_unused_result__));
2410
2411
2412
2413
2414
2415
2416 extern char *canonicalize_file_name (__const char *__name)
2417 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2418 # 729 "/usr/include/stdlib.h" 3 4
2419 extern char *realpath (__const char *__restrict __name,
2420 char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2421
2422
2423
2424
2425
2426
2427 typedef int (*__compar_fn_t) (__const void *, __const void *);
2428
2429
2430 typedef __compar_fn_t comparison_fn_t;
2431
2432
2433
2434 typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
2435
2436
2437
2438
2439
2440 extern void *bsearch (__const void *__key, __const void *__base,
2441 size_t __nmemb, size_t __size, __compar_fn_t __compar)
2442 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
2443
2444
2445
2446 extern void qsort (void *__base, size_t __nmemb, size_t __size,
2447 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
2448
2449 extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
2450 __compar_d_fn_t __compar, void *__arg)
2451 __attribute__ ((__nonnull__ (1, 4)));
2452
2453
2454
2455
2456 extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2457 extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2458
2459
2460
2461 __extension__ extern long long int llabs (long long int __x)
2462 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2463
2464
2465
2466
2467
2468
2469
2470 extern div_t div (int __numer, int __denom)
2471 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2472 extern ldiv_t ldiv (long int __numer, long int __denom)
2473 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2474
2475
2476
2477
2478 __extension__ extern lldiv_t lldiv (long long int __numer,
2479 long long int __denom)
2480 __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
2481
2482 # 802 "/usr/include/stdlib.h" 3 4
2483 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
2484 int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2485
2486
2487
2488
2489 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
2490 int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2491
2492
2493
2494
2495 extern char *gcvt (double __value, int __ndigit, char *__buf)
2496 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
2497
2498
2499
2500
2501 extern char *qecvt (long double __value, int __ndigit,
2502 int *__restrict __decpt, int *__restrict __sign)
2503 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2504 extern char *qfcvt (long double __value, int __ndigit,
2505 int *__restrict __decpt, int *__restrict __sign)
2506 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
2507 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
2508 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
2509
2510
2511
2512
2513 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
2514 int *__restrict __sign, char *__restrict __buf,
2515 size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2516 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
2517 int *__restrict __sign, char *__restrict __buf,
2518 size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2519
2520 extern int qecvt_r (long double __value, int __ndigit,
2521 int *__restrict __decpt, int *__restrict __sign,
2522 char *__restrict __buf, size_t __len)
2523 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2524 extern int qfcvt_r (long double __value, int __ndigit,
2525 int *__restrict __decpt, int *__restrict __sign,
2526 char *__restrict __buf, size_t __len)
2527 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
2528
2529
2530
2531
2532
2533
2534
2535 extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2536
2537
2538 extern int mbtowc (wchar_t *__restrict __pwc,
2539 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2540
2541
2542 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2543
2544
2545
2546 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
2547 __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));
2548
2549 extern size_t wcstombs (char *__restrict __s,
2550 __const wchar_t *__restrict __pwcs, size_t __n)
2551 __attribute__ ((__nothrow__));
2552
2553
2554
2555
2556
2557
2558
2559
2560 extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2561 # 890 "/usr/include/stdlib.h" 3 4
2562 extern int getsubopt (char **__restrict __optionp,
2563 char *__const *__restrict __tokens,
2564 char **__restrict __valuep)
2565 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
2566
2567
2568
2569
2570
2571 extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2572
2573
2574
2575
2576
2577
2578
2579 extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
2580
2581
2582
2583
2584
2585
2586
2587 extern int grantpt (int __fd) __attribute__ ((__nothrow__));
2588
2589
2590
2591 extern int unlockpt (int __fd) __attribute__ ((__nothrow__));
2592
2593
2594
2595
2596 extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2597
2598
2599
2600
2601
2602
2603 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
2604 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2605
2606
2607 extern int getpt (void);
2608
2609
2610
2611
2612
2613
2614 extern int getloadavg (double __loadavg[], int __nelem)
2615 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2616
2617
2618
2619
2620
2621 # 1 "/usr/include/bits/stdlib.h" 1 3 4
2622 # 24 "/usr/include/bits/stdlib.h" 3 4
2623 extern char *__realpath_chk (__const char *__restrict __name,
2624 char *__restrict __resolved,
2625 size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2626 extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__))
2627
2628 __attribute__ ((__warn_unused_result__));
2629 extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__))
2630
2631
2632 __attribute__ ((__warn_unused_result__))
2633 __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")))
2634 ;
2635
2636 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
2637 __attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, char *__restrict __resolved)
2638 {
2639 if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
2640 {
2641
2642
2643
2644
2645 return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
2646 }
2647
2648 return __realpath_alias (__name, __resolved);
2649 }
2650
2651
2652 extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
2653 size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2654 extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__))
2655
2656 __attribute__ ((__nonnull__ (2)));
2657 extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__))
2658
2659
2660 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")))
2661 ;
2662
2663 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int
2664 __attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
2665 {
2666 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2667 {
2668 if (!__builtin_constant_p (__buflen))
2669 return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2670 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2671 return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2672 }
2673 return __ptsname_r_alias (__fd, __buf, __buflen);
2674 }
2675
2676
2677 extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
2678 __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));
2679 extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__))
2680 __attribute__ ((__warn_unused_result__));
2681
2682 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
2683 __attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar)
2684 {
2685
2686
2687
2688
2689
2690
2691
2692 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
2693 return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
2694 return __wctomb_alias (__s, __wchar);
2695 }
2696
2697
2698 extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
2699 __const char *__restrict __src,
2700 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__));
2701 extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__))
2702
2703
2704 ;
2705 extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__))
2706
2707
2708
2709 __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
2710 ;
2711
2712 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t
2713 __attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len)
2714
2715 {
2716 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
2717 {
2718 if (!__builtin_constant_p (__len))
2719 return __mbstowcs_chk (__dst, __src, __len,
2720 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
2721
2722 if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
2723 return __mbstowcs_chk_warn (__dst, __src, __len,
2724 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
2725 }
2726 return __mbstowcs_alias (__dst, __src, __len);
2727 }
2728
2729
2730 extern size_t __wcstombs_chk (char *__restrict __dst,
2731 __const wchar_t *__restrict __src,
2732 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__));
2733 extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__))
2734
2735
2736 ;
2737 extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__))
2738
2739
2740
2741 __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
2742
2743 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t
2744 __attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len)
2745
2746 {
2747 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
2748 {
2749 if (!__builtin_constant_p (__len))
2750 return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
2751 if (__len > __builtin_object_size (__dst, 2 > 1))
2752 return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
2753 }
2754 return __wcstombs_alias (__dst, __src, __len);
2755 }
2756 # 950 "/usr/include/stdlib.h" 2 3 4
2757 # 958 "/usr/include/stdlib.h" 3 4
2758
2759 # 20 "scenarios.c" 2
2760 # 1 "/usr/include/string.h" 1 3 4
2761 # 28 "/usr/include/string.h" 3 4
2762
2763
2764
2765
2766
2767 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
2768 # 34 "/usr/include/string.h" 2 3 4
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778 extern void *memcpy (void *__restrict __dest,
2779 __const void *__restrict __src, size_t __n)
2780 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2781
2782
2783 extern void *memmove (void *__dest, __const void *__src, size_t __n)
2784 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2785
2786
2787
2788
2789
2790
2791 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
2792 int __c, size_t __n)
2793 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2794
2795
2796
2797
2798
2799 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2800
2801
2802 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
2803 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2804 # 94 "/usr/include/string.h" 3 4
2805 extern void *memchr (__const void *__s, int __c, size_t __n)
2806 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2807
2808
2809 # 108 "/usr/include/string.h" 3 4
2810 extern void *rawmemchr (__const void *__s, int __c)
2811 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2812 # 119 "/usr/include/string.h" 3 4
2813 extern void *memrchr (__const void *__s, int __c, size_t __n)
2814 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2815
2816
2817
2818
2819
2820
2821 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
2822 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2823
2824 extern char *strncpy (char *__restrict __dest,
2825 __const char *__restrict __src, size_t __n)
2826 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2827
2828
2829 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
2830 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2831
2832 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
2833 size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2834
2835
2836 extern int strcmp (__const char *__s1, __const char *__s2)
2837 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2838
2839 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
2840 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2841
2842
2843 extern int strcoll (__const char *__s1, __const char *__s2)
2844 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2845
2846 extern size_t strxfrm (char *__restrict __dest,
2847 __const char *__restrict __src, size_t __n)
2848 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2849
2850 # 164 "/usr/include/string.h" 3 4
2851 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
2852 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
2853
2854 extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
2855 __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
2856
2857
2858
2859
2860 extern char *strdup (__const char *__s)
2861 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
2862
2863
2864
2865
2866
2867
2868 extern char *strndup (__const char *__string, size_t __n)
2869 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
2870 # 208 "/usr/include/string.h" 3 4
2871
2872 # 233 "/usr/include/string.h" 3 4
2873 extern char *strchr (__const char *__s, int __c)
2874 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2875 # 260 "/usr/include/string.h" 3 4
2876 extern char *strrchr (__const char *__s, int __c)
2877 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2878
2879
2880 # 274 "/usr/include/string.h" 3 4
2881 extern char *strchrnul (__const char *__s, int __c)
2882 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2883
2884
2885
2886
2887
2888
2889 extern size_t strcspn (__const char *__s, __const char *__reject)
2890 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2891
2892
2893 extern size_t strspn (__const char *__s, __const char *__accept)
2894 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2895 # 312 "/usr/include/string.h" 3 4
2896 extern char *strpbrk (__const char *__s, __const char *__accept)
2897 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2898 # 340 "/usr/include/string.h" 3 4
2899 extern char *strstr (__const char *__haystack, __const char *__needle)
2900 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2901
2902
2903
2904
2905 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
2906 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2907
2908
2909
2910
2911 extern char *__strtok_r (char *__restrict __s,
2912 __const char *__restrict __delim,
2913 char **__restrict __save_ptr)
2914 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
2915
2916 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
2917 char **__restrict __save_ptr)
2918 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
2919 # 371 "/usr/include/string.h" 3 4
2920 extern char *strcasestr (__const char *__haystack, __const char *__needle)
2921 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2922
2923
2924
2925
2926
2927
2928
2929 extern void *memmem (__const void *__haystack, size_t __haystacklen,
2930 __const void *__needle, size_t __needlelen)
2931 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
2932
2933
2934
2935 extern void *__mempcpy (void *__restrict __dest,
2936 __const void *__restrict __src, size_t __n)
2937 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2938 extern void *mempcpy (void *__restrict __dest,
2939 __const void *__restrict __src, size_t __n)
2940 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2941
2942
2943
2944
2945
2946 extern size_t strlen (__const char *__s)
2947 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2948
2949
2950
2951
2952
2953 extern size_t strnlen (__const char *__string, size_t __maxlen)
2954 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2955
2956
2957
2958
2959
2960 extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
2961
2962 # 436 "/usr/include/string.h" 3 4
2963 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
2964 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
2965
2966
2967
2968
2969
2970 extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__));
2971
2972
2973
2974
2975
2976 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2977
2978
2979
2980 extern void bcopy (__const void *__src, void *__dest, size_t __n)
2981 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
2982
2983
2984 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
2985
2986
2987 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
2988 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2989 # 487 "/usr/include/string.h" 3 4
2990 extern char *index (__const char *__s, int __c)
2991 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2992 # 515 "/usr/include/string.h" 3 4
2993 extern char *rindex (__const char *__s, int __c)
2994 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2995
2996
2997
2998
2999 extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3000
3001
3002
3003
3004 extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3005
3006 __extension__ extern int ffsll (long long int __ll)
3007 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3008
3009
3010
3011
3012 extern int strcasecmp (__const char *__s1, __const char *__s2)
3013 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3014
3015
3016 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
3017 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3018
3019
3020
3021
3022
3023 extern int strcasecmp_l (__const char *__s1, __const char *__s2,
3024 __locale_t __loc)
3025 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3026
3027 extern int strncasecmp_l (__const char *__s1, __const char *__s2,
3028 size_t __n, __locale_t __loc)
3029 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
3030
3031
3032
3033
3034
3035 extern char *strsep (char **__restrict __stringp,
3036 __const char *__restrict __delim)
3037 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3038
3039
3040
3041
3042 extern char *strsignal (int __sig) __attribute__ ((__nothrow__));
3043
3044
3045 extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
3046 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3047 extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
3048 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3049
3050
3051
3052 extern char *__stpncpy (char *__restrict __dest,
3053 __const char *__restrict __src, size_t __n)
3054 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3055 extern char *stpncpy (char *__restrict __dest,
3056 __const char *__restrict __src, size_t __n)
3057 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3058
3059
3060
3061
3062 extern int strverscmp (__const char *__s1, __const char *__s2)
3063 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3064
3065
3066 extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3067
3068
3069 extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3070 # 604 "/usr/include/string.h" 3 4
3071 extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3072 # 632 "/usr/include/string.h" 3 4
3073 # 1 "/usr/include/bits/string.h" 1 3 4
3074 # 633 "/usr/include/string.h" 2 3 4
3075
3076
3077 # 1 "/usr/include/bits/string2.h" 1 3 4
3078 # 394 "/usr/include/bits/string2.h" 3 4
3079 extern void *__rawmemchr (const void *__s, int __c);
3080 # 969 "/usr/include/bits/string2.h" 3 4
3081 extern __inline size_t __strcspn_c1 (__const char *__s, int __reject);
3082 extern __inline size_t
3083 __strcspn_c1 (__const char *__s, int __reject)
3084 {
3085 register size_t __result = 0;
3086 while (__s[__result] != '\0' && __s[__result] != __reject)
3087 ++__result;
3088 return __result;
3089 }
3090
3091 extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1,
3092 int __reject2);
3093 extern __inline size_t
3094 __strcspn_c2 (__const char *__s, int __reject1, int __reject2)
3095 {
3096 register size_t __result = 0;
3097 while (__s[__result] != '\0' && __s[__result] != __reject1
3098 && __s[__result] != __reject2)
3099 ++__result;
3100 return __result;
3101 }
3102
3103 extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1,
3104 int __reject2, int __reject3);
3105 extern __inline size_t
3106 __strcspn_c3 (__const char *__s, int __reject1, int __reject2,
3107 int __reject3)
3108 {
3109 register size_t __result = 0;
3110 while (__s[__result] != '\0' && __s[__result] != __reject1
3111 && __s[__result] != __reject2 && __s[__result] != __reject3)
3112 ++__result;
3113 return __result;
3114 }
3115 # 1045 "/usr/include/bits/string2.h" 3 4
3116 extern __inline size_t __strspn_c1 (__const char *__s, int __accept);
3117 extern __inline size_t
3118 __strspn_c1 (__const char *__s, int __accept)
3119 {
3120 register size_t __result = 0;
3121
3122 while (__s[__result] == __accept)
3123 ++__result;
3124 return __result;
3125 }
3126
3127 extern __inline size_t __strspn_c2 (__const char *__s, int __accept1,
3128 int __accept2);
3129 extern __inline size_t
3130 __strspn_c2 (__const char *__s, int __accept1, int __accept2)
3131 {
3132 register size_t __result = 0;
3133
3134 while (__s[__result] == __accept1 || __s[__result] == __accept2)
3135 ++__result;
3136 return __result;
3137 }
3138
3139 extern __inline size_t __strspn_c3 (__const char *__s, int __accept1,
3140 int __accept2, int __accept3);
3141 extern __inline size_t
3142 __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
3143 {
3144 register size_t __result = 0;
3145
3146 while (__s[__result] == __accept1 || __s[__result] == __accept2
3147 || __s[__result] == __accept3)
3148 ++__result;
3149 return __result;
3150 }
3151 # 1121 "/usr/include/bits/string2.h" 3 4
3152 extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1,
3153 int __accept2);
3154 extern __inline char *
3155 __strpbrk_c2 (__const char *__s, int __accept1, int __accept2)
3156 {
3157
3158 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
3159 ++__s;
3160 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
3161 }
3162
3163 extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1,
3164 int __accept2, int __accept3);
3165 extern __inline char *
3166 __strpbrk_c3 (__const char *__s, int __accept1, int __accept2,
3167 int __accept3)
3168 {
3169
3170 while (*__s != '\0' && *__s != __accept1 && *__s != __accept2
3171 && *__s != __accept3)
3172 ++__s;
3173 return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
3174 }
3175 # 1172 "/usr/include/bits/string2.h" 3 4
3176 extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
3177 extern __inline char *
3178 __strtok_r_1c (char *__s, char __sep, char **__nextp)
3179 {
3180 char *__result;
3181 if (__s == ((void *)0))
3182 __s = *__nextp;
3183 while (*__s == __sep)
3184 ++__s;
3185 __result = ((void *)0);
3186 if (*__s != '\0')
3187 {
3188 __result = __s++;
3189 while (*__s != '\0')
3190 if (*__s++ == __sep)
3191 {
3192 __s[-1] = '\0';
3193 break;
3194 }
3195 }
3196 *__nextp = __s;
3197 return __result;
3198 }
3199 # 1204 "/usr/include/bits/string2.h" 3 4
3200 extern char *__strsep_g (char **__stringp, __const char *__delim);
3201 # 1222 "/usr/include/bits/string2.h" 3 4
3202 extern __inline char *__strsep_1c (char **__s, char __reject);
3203 extern __inline char *
3204 __strsep_1c (char **__s, char __reject)
3205 {
3206 register char *__retval = *__s;
3207 if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0))
3208 *(*__s)++ = '\0';
3209 return __retval;
3210 }
3211
3212 extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2);
3213 extern __inline char *
3214 __strsep_2c (char **__s, char __reject1, char __reject2)
3215 {
3216 register char *__retval = *__s;
3217 if (__retval != ((void *)0))
3218 {
3219 register char *__cp = __retval;
3220 while (1)
3221 {
3222 if (*__cp == '\0')
3223 {
3224 __cp = ((void *)0);
3225 break;
3226 }
3227 if (*__cp == __reject1 || *__cp == __reject2)
3228 {
3229 *__cp++ = '\0';
3230 break;
3231 }
3232 ++__cp;
3233 }
3234 *__s = __cp;
3235 }
3236 return __retval;
3237 }
3238
3239 extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2,
3240 char __reject3);
3241 extern __inline char *
3242 __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
3243 {
3244 register char *__retval = *__s;
3245 if (__retval != ((void *)0))
3246 {
3247 register char *__cp = __retval;
3248 while (1)
3249 {
3250 if (*__cp == '\0')
3251 {
3252 __cp = ((void *)0);
3253 break;
3254 }
3255 if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3)
3256 {
3257 *__cp++ = '\0';
3258 break;
3259 }
3260 ++__cp;
3261 }
3262 *__s = __cp;
3263 }
3264 return __retval;
3265 }
3266 # 1303 "/usr/include/bits/string2.h" 3 4
3267 extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
3268 # 1322 "/usr/include/bits/string2.h" 3 4
3269 extern char *__strndup (__const char *__string, size_t __n)
3270 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
3271 # 636 "/usr/include/string.h" 2 3 4
3272
3273
3274
3275
3276 # 1 "/usr/include/bits/string3.h" 1 3 4
3277 # 23 "/usr/include/bits/string3.h" 3 4
3278 extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters")))
3279 ;
3280 # 48 "/usr/include/bits/string3.h" 3 4
3281 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
3282 __attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len)
3283
3284 {
3285 return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
3286 }
3287
3288 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
3289 __attribute__ ((__nothrow__)) memmove (void *__restrict __dest, __const void *__restrict __src, size_t __len)
3290
3291 {
3292 return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
3293 }
3294
3295
3296 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
3297 __attribute__ ((__nothrow__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len)
3298
3299 {
3300 return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
3301 }
3302 # 77 "/usr/include/bits/string3.h" 3 4
3303 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void *
3304 __attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len)
3305 {
3306 if (__builtin_constant_p (__len) && __len == 0
3307 && (!__builtin_constant_p (__ch) || __ch != 0))
3308 {
3309 __warn_memset_zero_len ();
3310 return __dest;
3311 }
3312 return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
3313 }
3314
3315
3316 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void
3317 __attribute__ ((__nothrow__)) bcopy (__const void *__restrict __src, void *__restrict __dest, size_t __len)
3318
3319 {
3320 (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
3321 }
3322
3323 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void
3324 __attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len)
3325 {
3326 (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
3327 }
3328
3329
3330 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
3331 __attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, __const char *__restrict __src)
3332 {
3333 return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
3334 }
3335
3336
3337 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
3338 __attribute__ ((__nothrow__)) stpcpy (char *__restrict __dest, __const char *__restrict __src)
3339 {
3340 return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
3341 }
3342
3343
3344
3345 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
3346 __attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len)
3347
3348 {
3349 return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
3350 }
3351
3352
3353 extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n,
3354 size_t __destlen) __attribute__ ((__nothrow__));
3355 extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__))
3356
3357 ;
3358
3359 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
3360 __attribute__ ((__nothrow__)) stpncpy (char *__dest, __const char *__src, size_t __n)
3361 {
3362 if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
3363 && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1)))
3364 return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
3365 return __stpncpy_alias (__dest, __src, __n);
3366 }
3367
3368
3369 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
3370 __attribute__ ((__nothrow__)) strcat (char *__restrict __dest, __const char *__restrict __src)
3371 {
3372 return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
3373 }
3374
3375
3376 extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char *
3377 __attribute__ ((__nothrow__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len)
3378
3379 {
3380 return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
3381 }
3382 # 641 "/usr/include/string.h" 2 3 4
3383
3384
3385
3386
3387 # 21 "scenarios.c" 2
3388
3389 # 1 "/usr/include/sys/stat.h" 1 3 4
3390 # 39 "/usr/include/sys/stat.h" 3 4
3391 # 1 "/usr/include/time.h" 1 3 4
3392 # 40 "/usr/include/sys/stat.h" 2 3 4
3393 # 105 "/usr/include/sys/stat.h" 3 4
3394
3395
3396 # 1 "/usr/include/bits/stat.h" 1 3 4
3397 # 36 "/usr/include/bits/stat.h" 3 4
3398 struct stat
3399 {
3400 __dev_t st_dev;
3401 unsigned short int __pad1;
3402
3403 __ino_t st_ino;
3404
3405
3406
3407 __mode_t st_mode;
3408 __nlink_t st_nlink;
3409 __uid_t st_uid;
3410 __gid_t st_gid;
3411 __dev_t st_rdev;
3412 unsigned short int __pad2;
3413
3414 __off_t st_size;
3415
3416
3417
3418 __blksize_t st_blksize;
3419
3420
3421 __blkcnt_t st_blocks;
3422 # 70 "/usr/include/bits/stat.h" 3 4
3423 struct timespec st_atim;
3424 struct timespec st_mtim;
3425 struct timespec st_ctim;
3426 # 85 "/usr/include/bits/stat.h" 3 4
3427 unsigned long int __unused4;
3428 unsigned long int __unused5;
3429
3430
3431
3432 };
3433
3434
3435 struct stat64
3436 {
3437 __dev_t st_dev;
3438 unsigned int __pad1;
3439
3440 __ino_t __st_ino;
3441 __mode_t st_mode;
3442 __nlink_t st_nlink;
3443 __uid_t st_uid;
3444 __gid_t st_gid;
3445 __dev_t st_rdev;
3446 unsigned int __pad2;
3447 __off64_t st_size;
3448 __blksize_t st_blksize;
3449
3450 __blkcnt64_t st_blocks;
3451
3452
3453
3454
3455
3456
3457
3458 struct timespec st_atim;
3459 struct timespec st_mtim;
3460 struct timespec st_ctim;
3461 # 127 "/usr/include/bits/stat.h" 3 4
3462 __ino64_t st_ino;
3463 };
3464 # 108 "/usr/include/sys/stat.h" 2 3 4
3465 # 209 "/usr/include/sys/stat.h" 3 4
3466 extern int stat (__const char *__restrict __file,
3467 struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3468
3469
3470
3471 extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3472 # 228 "/usr/include/sys/stat.h" 3 4
3473 extern int stat64 (__const char *__restrict __file,
3474 struct stat64 *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3475 extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3476
3477
3478
3479
3480
3481
3482
3483 extern int fstatat (int __fd, __const char *__restrict __file,
3484 struct stat *__restrict __buf, int __flag)
3485 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3486 # 253 "/usr/include/sys/stat.h" 3 4
3487 extern int fstatat64 (int __fd, __const char *__restrict __file,
3488 struct stat64 *__restrict __buf, int __flag)
3489 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3490
3491
3492
3493
3494
3495
3496
3497 extern int lstat (__const char *__restrict __file,
3498 struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3499 # 276 "/usr/include/sys/stat.h" 3 4
3500 extern int lstat64 (__const char *__restrict __file,
3501 struct stat64 *__restrict __buf)
3502 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
3503
3504
3505
3506
3507
3508 extern int chmod (__const char *__file, __mode_t __mode)
3509 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3510
3511
3512
3513
3514
3515 extern int lchmod (__const char *__file, __mode_t __mode)
3516 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3517
3518
3519
3520
3521 extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__));
3522
3523
3524
3525
3526
3527 extern int fchmodat (int __fd, __const char *__file, __mode_t __mode,
3528 int __flag)
3529 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
3530
3531
3532
3533
3534
3535
3536 extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__));
3537
3538
3539
3540
3541 extern __mode_t getumask (void) __attribute__ ((__nothrow__));
3542
3543
3544
3545 extern int mkdir (__const char *__path, __mode_t __mode)
3546 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3547
3548
3549
3550
3551
3552 extern int mkdirat (int __fd, __const char *__path, __mode_t __mode)
3553 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3554
3555
3556
3557
3558
3559
3560 extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
3561 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3562
3563
3564
3565
3566
3567 extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
3568 __dev_t __dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3569
3570
3571
3572
3573
3574 extern int mkfifo (__const char *__path, __mode_t __mode)
3575 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
3576
3577
3578
3579
3580
3581 extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode)
3582 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3583
3584
3585
3586
3587
3588 extern int utimensat (int __fd, __const char *__path,
3589 __const struct timespec __times[2],
3590 int __flags)
3591 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
3592
3593
3594
3595
3596 extern int futimens (int __fd, __const struct timespec __times[2]) __attribute__ ((__nothrow__));
3597 # 399 "/usr/include/sys/stat.h" 3 4
3598 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
3599 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
3600 extern int __xstat (int __ver, __const char *__filename,
3601 struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3602 extern int __lxstat (int __ver, __const char *__filename,
3603 struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3604 extern int __fxstatat (int __ver, int __fildes, __const char *__filename,
3605 struct stat *__stat_buf, int __flag)
3606 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
3607 # 432 "/usr/include/sys/stat.h" 3 4
3608 extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
3609 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
3610 extern int __xstat64 (int __ver, __const char *__filename,
3611 struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3612 extern int __lxstat64 (int __ver, __const char *__filename,
3613 struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
3614 extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename,
3615 struct stat64 *__stat_buf, int __flag)
3616 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4)));
3617
3618 extern int __xmknod (int __ver, __const char *__path, __mode_t __mode,
3619 __dev_t *__dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));
3620
3621 extern int __xmknodat (int __ver, int __fd, __const char *__path,
3622 __mode_t __mode, __dev_t *__dev)
3623 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 5)));
3624
3625
3626
3627
3628 extern __inline int
3629 __attribute__ ((__nothrow__)) stat (__const char *__path, struct stat *__statbuf)
3630 {
3631 return __xstat (3, __path, __statbuf);
3632 }
3633
3634
3635 extern __inline int
3636 __attribute__ ((__nothrow__)) lstat (__const char *__path, struct stat *__statbuf)
3637 {
3638 return __lxstat (3, __path, __statbuf);
3639 }
3640
3641
3642 extern __inline int
3643 __attribute__ ((__nothrow__)) fstat (int __fd, struct stat *__statbuf)
3644 {
3645 return __fxstat (3, __fd, __statbuf);
3646 }
3647
3648
3649 extern __inline int
3650 __attribute__ ((__nothrow__)) fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag)
3651
3652 {
3653 return __fxstatat (3, __fd, __filename, __statbuf, __flag);
3654 }
3655
3656
3657
3658 extern __inline int
3659 __attribute__ ((__nothrow__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
3660 {
3661 return __xmknod (1, __path, __mode, &__dev);
3662 }
3663
3664
3665
3666 extern __inline int
3667 __attribute__ ((__nothrow__)) mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev)
3668
3669 {
3670 return __xmknodat (1, __fd, __path, __mode, &__dev);
3671 }
3672
3673
3674
3675
3676
3677 extern __inline int
3678 __attribute__ ((__nothrow__)) stat64 (__const char *__path, struct stat64 *__statbuf)
3679 {
3680 return __xstat64 (3, __path, __statbuf);
3681 }
3682
3683
3684 extern __inline int
3685 __attribute__ ((__nothrow__)) lstat64 (__const char *__path, struct stat64 *__statbuf)
3686 {
3687 return __lxstat64 (3, __path, __statbuf);
3688 }
3689
3690
3691 extern __inline int
3692 __attribute__ ((__nothrow__)) fstat64 (int __fd, struct stat64 *__statbuf)
3693 {
3694 return __fxstat64 (3, __fd, __statbuf);
3695 }
3696
3697
3698 extern __inline int
3699 __attribute__ ((__nothrow__)) fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag)
3700
3701 {
3702 return __fxstatat64 (3, __fd, __filename, __statbuf, __flag);
3703 }
3704
3705
3706
3707
3708
3709
3710
3711 # 23 "scenarios.c" 2
3712 # 1 "/usr/include/SDL/SDL_endian.h" 1
3713 # 31 "/usr/include/SDL/SDL_endian.h"
3714 # 1 "/usr/include/SDL/SDL_stdinc.h" 1
3715 # 30 "/usr/include/SDL/SDL_stdinc.h"
3716 # 1 "/usr/include/SDL/SDL_config.h" 1
3717 # 30 "/usr/include/SDL/SDL_config.h"
3718 # 1 "/usr/include/SDL/SDL_platform.h" 1
3719 # 31 "/usr/include/SDL/SDL_config.h" 2
3720 # 31 "/usr/include/SDL/SDL_stdinc.h" 2
3721 # 41 "/usr/include/SDL/SDL_stdinc.h"
3722 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
3723 # 149 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 3 4
3724 typedef int ptrdiff_t;
3725 # 42 "/usr/include/SDL/SDL_stdinc.h" 2
3726 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdarg.h" 1 3 4
3727 # 43 "/usr/include/SDL/SDL_stdinc.h" 2
3728 # 63 "/usr/include/SDL/SDL_stdinc.h"
3729 # 1 "/usr/include/strings.h" 1 3 4
3730 # 64 "/usr/include/SDL/SDL_stdinc.h" 2
3731
3732
3733 # 1 "/usr/include/inttypes.h" 1 3 4
3734 # 28 "/usr/include/inttypes.h" 3 4
3735 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdint.h" 1 3 4
3736
3737
3738 # 1 "/usr/include/stdint.h" 1 3 4
3739 # 27 "/usr/include/stdint.h" 3 4
3740 # 1 "/usr/include/bits/wchar.h" 1 3 4
3741 # 28 "/usr/include/stdint.h" 2 3 4
3742 # 1 "/usr/include/bits/wordsize.h" 1 3 4
3743 # 29 "/usr/include/stdint.h" 2 3 4
3744 # 49 "/usr/include/stdint.h" 3 4
3745 typedef unsigned char uint8_t;
3746 typedef unsigned short int uint16_t;
3747
3748 typedef unsigned int uint32_t;
3749
3750
3751
3752
3753
3754 __extension__
3755 typedef unsigned long long int uint64_t;
3756
3757
3758
3759
3760
3761
3762 typedef signed char int_least8_t;
3763 typedef short int int_least16_t;
3764 typedef int int_least32_t;
3765
3766
3767
3768 __extension__
3769 typedef long long int int_least64_t;
3770
3771
3772
3773 typedef unsigned char uint_least8_t;
3774 typedef unsigned short int uint_least16_t;
3775 typedef unsigned int uint_least32_t;
3776
3777
3778
3779 __extension__
3780 typedef unsigned long long int uint_least64_t;
3781
3782
3783
3784
3785
3786
3787 typedef signed char int_fast8_t;
3788
3789
3790
3791
3792
3793 typedef int int_fast16_t;
3794 typedef int int_fast32_t;
3795 __extension__
3796 typedef long long int int_fast64_t;
3797
3798
3799
3800 typedef unsigned char uint_fast8_t;
3801
3802
3803
3804
3805
3806 typedef unsigned int uint_fast16_t;
3807 typedef unsigned int uint_fast32_t;
3808 __extension__
3809 typedef unsigned long long int uint_fast64_t;
3810 # 126 "/usr/include/stdint.h" 3 4
3811 typedef int intptr_t;
3812
3813
3814 typedef unsigned int uintptr_t;
3815 # 138 "/usr/include/stdint.h" 3 4
3816 __extension__
3817 typedef long long int intmax_t;
3818 __extension__
3819 typedef unsigned long long int uintmax_t;
3820 # 4 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdint.h" 2 3 4
3821 # 29 "/usr/include/inttypes.h" 2 3 4
3822
3823
3824
3825
3826
3827
3828 typedef long int __gwchar_t;
3829 # 274 "/usr/include/inttypes.h" 3 4
3830
3831 # 288 "/usr/include/inttypes.h" 3 4
3832 typedef struct
3833 {
3834 long long int quot;
3835 long long int rem;
3836 } imaxdiv_t;
3837
3838
3839
3840
3841
3842 extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3843
3844
3845 extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
3846 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
3847
3848
3849 extern intmax_t strtoimax (__const char *__restrict __nptr,
3850 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__));
3851
3852
3853 extern uintmax_t strtoumax (__const char *__restrict __nptr,
3854 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__));
3855
3856
3857 extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr,
3858 __gwchar_t **__restrict __endptr, int __base)
3859 __attribute__ ((__nothrow__));
3860
3861
3862 extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
3863 __gwchar_t ** __restrict __endptr, int __base)
3864 __attribute__ ((__nothrow__));
3865 # 379 "/usr/include/inttypes.h" 3 4
3866 __extension__
3867 extern long long int __strtoll_internal (__const char *__restrict __nptr,
3868 char **__restrict __endptr,
3869 int __base, int __group)
3870 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3871
3872 extern __inline intmax_t
3873 __attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base)
3874
3875 {
3876 return __strtoll_internal (nptr, endptr, base, 0);
3877 }
3878
3879 __extension__
3880 extern unsigned long long int __strtoull_internal (__const char *
3881 __restrict __nptr,
3882 char **
3883 __restrict __endptr,
3884 int __base,
3885 int __group)
3886 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3887
3888 extern __inline uintmax_t
3889 __attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base)
3890
3891 {
3892 return __strtoull_internal (nptr, endptr, base, 0);
3893 }
3894
3895 __extension__
3896 extern long long int __wcstoll_internal (__const __gwchar_t *
3897 __restrict __nptr,
3898 __gwchar_t **__restrict __endptr,
3899 int __base, int __group)
3900 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3901
3902 extern __inline intmax_t
3903 __attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
3904
3905 {
3906 return __wcstoll_internal (nptr, endptr, base, 0);
3907 }
3908
3909
3910 __extension__
3911 extern unsigned long long int __wcstoull_internal (__const __gwchar_t *
3912 __restrict __nptr,
3913 __gwchar_t **
3914 __restrict __endptr,
3915 int __base,
3916 int __group)
3917 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3918
3919 extern __inline uintmax_t
3920 __attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
3921
3922 {
3923 return __wcstoull_internal (nptr, endptr, base, 0);
3924 }
3925
3926
3927
3928
3929
3930 # 67 "/usr/include/SDL/SDL_stdinc.h" 2
3931
3932
3933
3934
3935 # 1 "/usr/include/ctype.h" 1 3 4
3936 # 30 "/usr/include/ctype.h" 3 4
3937
3938 # 48 "/usr/include/ctype.h" 3 4
3939 enum
3940 {
3941 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
3942 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
3943 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
3944 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
3945 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
3946 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
3947 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
3948 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
3949 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
3950 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
3951 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
3952 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
3953 };
3954 # 81 "/usr/include/ctype.h" 3 4
3955 extern __const unsigned short int **__ctype_b_loc (void)
3956 __attribute__ ((__nothrow__)) __attribute__ ((__const));
3957 extern __const __int32_t **__ctype_tolower_loc (void)
3958 __attribute__ ((__nothrow__)) __attribute__ ((__const));
3959 extern __const __int32_t **__ctype_toupper_loc (void)
3960 __attribute__ ((__nothrow__)) __attribute__ ((__const));
3961 # 96 "/usr/include/ctype.h" 3 4
3962
3963
3964
3965
3966
3967
3968 extern int isalnum (int) __attribute__ ((__nothrow__));
3969 extern int isalpha (int) __attribute__ ((__nothrow__));
3970 extern int iscntrl (int) __attribute__ ((__nothrow__));
3971 extern int isdigit (int) __attribute__ ((__nothrow__));
3972 extern int islower (int) __attribute__ ((__nothrow__));
3973 extern int isgraph (int) __attribute__ ((__nothrow__));
3974 extern int isprint (int) __attribute__ ((__nothrow__));
3975 extern int ispunct (int) __attribute__ ((__nothrow__));
3976 extern int isspace (int) __attribute__ ((__nothrow__));
3977 extern int isupper (int) __attribute__ ((__nothrow__));
3978 extern int isxdigit (int) __attribute__ ((__nothrow__));
3979
3980
3981
3982 extern int tolower (int __c) __attribute__ ((__nothrow__));
3983
3984
3985 extern int toupper (int __c) __attribute__ ((__nothrow__));
3986
3987
3988
3989
3990
3991
3992
3993
3994 extern int isblank (int) __attribute__ ((__nothrow__));
3995
3996
3997
3998
3999
4000
4001 extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__));
4002
4003
4004
4005
4006
4007
4008 extern int isascii (int __c) __attribute__ ((__nothrow__));
4009
4010
4011
4012 extern int toascii (int __c) __attribute__ ((__nothrow__));
4013
4014
4015
4016 extern int _toupper (int) __attribute__ ((__nothrow__));
4017 extern int _tolower (int) __attribute__ ((__nothrow__));
4018 # 190 "/usr/include/ctype.h" 3 4
4019 extern __inline int
4020 __attribute__ ((__nothrow__)) tolower (int __c)
4021 {
4022 return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
4023 }
4024
4025 extern __inline int
4026 __attribute__ ((__nothrow__)) toupper (int __c)
4027 {
4028 return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
4029 }
4030 # 247 "/usr/include/ctype.h" 3 4
4031 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__));
4032 extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__));
4033 extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__));
4034 extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
4035 extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__));
4036 extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__));
4037 extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__));
4038 extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__));
4039 extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__));
4040 extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__));
4041 extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
4042
4043 extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__));
4044
4045
4046
4047 extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
4048 extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
4049
4050
4051 extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
4052 extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
4053 # 323 "/usr/include/ctype.h" 3 4
4054
4055 # 72 "/usr/include/SDL/SDL_stdinc.h" 2
4056
4057
4058 # 1 "/usr/include/iconv.h" 1 3 4
4059 # 24 "/usr/include/iconv.h" 3 4
4060 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4
4061 # 25 "/usr/include/iconv.h" 2 3 4
4062
4063
4064
4065
4066
4067 typedef void *iconv_t;
4068
4069
4070
4071
4072
4073
4074
4075 extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
4076
4077
4078
4079
4080 extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
4081 size_t *__restrict __inbytesleft,
4082 char **__restrict __outbuf,
4083 size_t *__restrict __outbytesleft);
4084
4085
4086
4087
4088
4089 extern int iconv_close (iconv_t __cd);
4090
4091
4092 # 75 "/usr/include/SDL/SDL_stdinc.h" 2
4093 # 93 "/usr/include/SDL/SDL_stdinc.h"
4094 typedef enum {
4095 SDL_FALSE = 0,
4096 SDL_TRUE = 1
4097 } SDL_bool;
4098
4099 typedef int8_t Sint8;
4100 typedef uint8_t Uint8;
4101 typedef int16_t Sint16;
4102 typedef uint16_t Uint16;
4103 typedef int32_t Sint32;
4104 typedef uint32_t Uint32;
4105
4106
4107 typedef int64_t Sint64;
4108
4109 typedef uint64_t Uint64;
4110 # 125 "/usr/include/SDL/SDL_stdinc.h"
4111 typedef int SDL_dummy_uint8[(sizeof(Uint8) == 1) * 2 - 1];
4112 typedef int SDL_dummy_sint8[(sizeof(Sint8) == 1) * 2 - 1];
4113 typedef int SDL_dummy_uint16[(sizeof(Uint16) == 2) * 2 - 1];
4114 typedef int SDL_dummy_sint16[(sizeof(Sint16) == 2) * 2 - 1];
4115 typedef int SDL_dummy_uint32[(sizeof(Uint32) == 4) * 2 - 1];
4116 typedef int SDL_dummy_sint32[(sizeof(Sint32) == 4) * 2 - 1];
4117 typedef int SDL_dummy_uint64[(sizeof(Uint64) == 8) * 2 - 1];
4118 typedef int SDL_dummy_sint64[(sizeof(Sint64) == 8) * 2 - 1];
4119 # 146 "/usr/include/SDL/SDL_stdinc.h"
4120 typedef enum {
4121 DUMMY_ENUM_VALUE
4122 } SDL_DUMMY_ENUM;
4123
4124
4125 typedef int SDL_dummy_enum[(sizeof(SDL_DUMMY_ENUM) == sizeof(int)) * 2 - 1];
4126
4127
4128
4129 # 1 "/usr/include/SDL/begin_code.h" 1
4130 # 156 "/usr/include/SDL/SDL_stdinc.h" 2
4131 # 403 "/usr/include/SDL/SDL_stdinc.h"
4132 extern __attribute__ ((visibility("default"))) size_t SDL_strlcpy(char *dst, const char *src, size_t maxlen);
4133
4134
4135
4136
4137
4138 extern __attribute__ ((visibility("default"))) size_t SDL_strlcat(char *dst, const char *src, size_t maxlen);
4139 # 421 "/usr/include/SDL/SDL_stdinc.h"
4140 extern __attribute__ ((visibility("default"))) char * SDL_strrev(char *string);
4141
4142
4143
4144
4145
4146 extern __attribute__ ((visibility("default"))) char * SDL_strupr(char *string);
4147
4148
4149
4150
4151
4152 extern __attribute__ ((visibility("default"))) char * SDL_strlwr(char *string);
4153 # 467 "/usr/include/SDL/SDL_stdinc.h"
4154 extern __attribute__ ((visibility("default"))) char * SDL_ltoa(long value, char *string, int radix);
4155 # 479 "/usr/include/SDL/SDL_stdinc.h"
4156 extern __attribute__ ((visibility("default"))) char * SDL_ultoa(unsigned long value, char *string, int radix);
4157 # 499 "/usr/include/SDL/SDL_stdinc.h"
4158 extern __attribute__ ((visibility("default"))) char* SDL_lltoa(Sint64 value, char *string, int radix);
4159
4160
4161
4162
4163
4164 extern __attribute__ ((visibility("default"))) char* SDL_ulltoa(Uint64 value, char *string, int radix);
4165 # 605 "/usr/include/SDL/SDL_stdinc.h"
4166 extern __attribute__ ((visibility("default"))) size_t SDL_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
4167
4168
4169
4170 extern __attribute__ ((visibility("default"))) char * SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft);
4171 # 618 "/usr/include/SDL/SDL_stdinc.h"
4172 # 1 "/usr/include/SDL/close_code.h" 1
4173 # 619 "/usr/include/SDL/SDL_stdinc.h" 2
4174 # 32 "/usr/include/SDL/SDL_endian.h" 2
4175 # 54 "/usr/include/SDL/SDL_endian.h"
4176 # 1 "/usr/include/SDL/begin_code.h" 1
4177 # 55 "/usr/include/SDL/SDL_endian.h" 2
4178 # 70 "/usr/include/SDL/SDL_endian.h"
4179 static __inline__ Uint16 SDL_Swap16(Uint16 x)
4180 {
4181 __asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x));
4182 return x;
4183 }
4184 # 103 "/usr/include/SDL/SDL_endian.h"
4185 static __inline__ Uint32 SDL_Swap32(Uint32 x)
4186 {
4187 __asm__("bswap %0" : "=r" (x) : "0" (x));
4188 return x;
4189 }
4190 # 139 "/usr/include/SDL/SDL_endian.h"
4191 static __inline__ Uint64 SDL_Swap64(Uint64 x)
4192 {
4193 union {
4194 struct { Uint32 a,b; } s;
4195 Uint64 u;
4196 } v;
4197 v.u = x;
4198 __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
4199 : "=r" (v.s.a), "=r" (v.s.b)
4200 : "0" (v.s.a), "1" (v.s.b));
4201 return v.u;
4202 }
4203 # 207 "/usr/include/SDL/SDL_endian.h"
4204 # 1 "/usr/include/SDL/close_code.h" 1
4205 # 208 "/usr/include/SDL/SDL_endian.h" 2
4206 # 24 "scenarios.c" 2
4207 # 1 "units.h" 1
4208 # 29 "units.h"
4209 int units_find_panzequp();
4210
4211
4212
4213
4214
4215
4216 int units_find_tacicons();
4217
4218
4219
4220
4221
4222
4223
4224 int units_convert_database( char *tac_icons );
4225
4226
4227
4228
4229
4230
4231
4232 int units_convert_graphics( char *tac_icons );
4233 # 25 "scenarios.c" 2
4234 # 1 "misc.h" 1
4235 # 21 "misc.h"
4236 # 1 "../config.h" 1
4237 # 22 "misc.h" 2
4238 # 46 "misc.h"
4239 typedef struct {
4240 int limit;
4241 int cur;
4242 } Delay;
4243
4244
4245 inline void set_delay( Delay *delay, int ms );
4246
4247
4248 inline void reset_delay( Delay *delay );
4249
4250
4251 inline int timed_out( Delay *delay, int ms );
4252
4253
4254 int get_dist( int x1, int y1, int x2, int y2 );
4255
4256
4257 void set_random_seed();
4258
4259
4260 void get_coord( char *str, int *x, int *y );
4261
4262
4263 typedef struct {
4264 char **lines;
4265 int count;
4266 } Text;
4267
4268 Text* create_text( char *str, int char_width );
4269
4270 void delete_text( Text *text );
4271
4272
4273
4274
4275
4276
4277 void delete_string_list( char ***list, int *count );
4278
4279
4280
4281
4282
4283
4284
4285 typedef struct { char *string; int flag; } StrToFlag;
4286
4287
4288
4289
4290
4291
4292 int check_flag( char *name, StrToFlag *fct );
4293
4294
4295
4296
4297
4298
4299 int get_close_hex_pos( int x, int y, int id, int *dest_x, int *dest_y );
4300
4301
4302
4303
4304
4305
4306 int is_close( int x1, int y1, int x2, int y2 );
4307
4308
4309
4310
4311
4312
4313 void strcpy_lt( char *dest, char *src, int limit );
4314
4315
4316
4317
4318
4319
4320 char *strlower( const char *str );
4321
4322
4323
4324
4325
4326
4327 FILE *open_file( const char *name );
4328
4329
4330
4331
4332
4333
4334 void copy( char *sname, char *dname );
4335 int copy_pg_bmp( char *src, char *dest );
4336
4337
4338
4339
4340
4341
4342 const char *get_gamedir(void);
4343 # 26 "scenarios.c" 2
4344 # 1 "scenarios.h" 1
4345 # 28 "scenarios.h"
4346 int scenarios_convert( int scen_id );
4347 # 27 "scenarios.c" 2
4348 # 1 "parser.h" 1
4349 # 22 "parser.h"
4350 # 1 "list.h" 1
4351 # 30 "list.h"
4352 typedef struct _List_Entry {
4353 struct _List_Entry *next;
4354 struct _List_Entry *prev;
4355 void *item;
4356 } List_Entry;
4357 typedef struct {
4358 int auto_delete;
4359 int count;
4360 List_Entry head;
4361 List_Entry tail;
4362 void (*callback)(void*);
4363 List_Entry *cur_entry;
4364 } List;
4365 # 53 "list.h"
4366 enum { LIST_NO_AUTO_DELETE = 0, LIST_AUTO_DELETE };
4367 enum { LIST_NO_CALLBACK = 0 };
4368 List *list_create( int auto_delete, void (*callback)(void*) );
4369
4370
4371
4372
4373
4374 void list_delete( List *list );
4375
4376
4377
4378
4379
4380
4381 void list_clear( List *list );
4382
4383
4384
4385
4386
4387
4388 int list_insert( List *list, void *item, int pos );
4389
4390
4391
4392
4393
4394 int list_add( List *list, void *item );
4395
4396
4397
4398
4399
4400
4401
4402 int list_delete_pos( List *list, int pos );
4403
4404
4405
4406
4407
4408
4409
4410 int list_delete_item( List *list, void *item );
4411
4412
4413
4414
4415
4416 int list_delete_entry( List *list, List_Entry *entry );
4417
4418
4419
4420
4421
4422
4423 void* list_get( List *list, int pos );
4424
4425
4426
4427
4428
4429
4430 int list_check( List *list, void *item );
4431
4432
4433
4434
4435
4436
4437
4438 void* list_first( List *list );
4439
4440
4441
4442
4443
4444
4445
4446 void* list_last( List *list );
4447
4448
4449
4450
4451
4452
4453 void* list_current( List *list );
4454
4455
4456
4457
4458
4459 void list_reset( List *list );
4460
4461
4462
4463
4464
4465
4466 void* list_next( List *list );
4467
4468
4469
4470
4471
4472
4473 void* list_prev( List *list );
4474
4475
4476
4477
4478
4479
4480
4481 int list_delete_current( List *list );
4482
4483
4484
4485
4486
4487
4488 int list_empty( List *list );
4489
4490
4491
4492
4493
4494
4495 List_Entry *list_entry( List *list, void *item );
4496
4497
4498
4499
4500
4501
4502
4503 void list_transfer( List *source, List *dest, void *item );
4504
4505
4506
4507
4508
4509 void *list_dequeue( List *list );
4510 # 23 "parser.h" 2
4511 # 79 "parser.h"
4512 typedef struct {
4513 char *name;
4514 List *values;
4515 List *entries;
4516 } PData;
4517 # 93 "parser.h"
4518 List* parser_split_string( char *string, char *symbols );
4519
4520
4521
4522
4523
4524
4525
4526 List *parser_explode_string( char *string, char c );
4527 # 110 "parser.h"
4528 PData* parser_read_file( char *tree_name, char *fname );
4529
4530
4531
4532
4533
4534
4535 void parser_free( PData **pdata );
4536 # 135 "parser.h"
4537 int parser_get_pdata ( PData *pd, char *name, PData **result );
4538 int parser_get_entries( PData *pd, char *name, List **result );
4539 int parser_get_values ( PData *pd, char *name, List **result );
4540 int parser_get_value ( PData *pd, char *name, char **result, int index );
4541 int parser_get_int ( PData *pd, char *name, int *result );
4542 int parser_get_double ( PData *pd, char *name, double *result );
4543 int parser_get_string ( PData *pd, char *name, char **result );
4544
4545
4546
4547
4548
4549
4550 char* parser_get_error( void );
4551 # 28 "scenarios.c" 2
4552
4553
4554
4555
4556
4557
4558 extern char *source_path;
4559 extern char *dest_path;
4560 extern char *custom_name;
4561 extern int nation_count;
4562 extern char *nations[];
4563
4564 int unit_entry_used[1000];
4565 # 82 "scenarios.c"
4566 char *fnames[] = {
4567 "Poland",
4568 "Warsaw",
4569 "Norway",
4570 "LowCountries",
4571 "France",
4572 "Sealion40",
4573 "NorthAfrica",
4574 "MiddleEast",
4575 "ElAlamein",
4576 "Caucasus",
4577 "Sealion43",
4578 "Torch",
4579 "Husky",
4580 "Anzio",
4581 "D-Day",
4582 "Anvil",
4583 "Ardennes",
4584 "Cobra",
4585 "MarketGarden",
4586 "BerlinWest",
4587 "Balkans",
4588 "Crete",
4589 "Barbarossa",
4590 "Kiev",
4591 "Moscow41",
4592 "Sevastapol",
4593 "Moscow42",
4594 "Stalingrad",
4595 "Kharkov",
4596 "Kursk",
4597 "Moscow43",
4598 "Byelorussia",
4599 "Budapest",
4600 "BerlinEast",
4601 "Berlin",
4602 "Washington",
4603 "EarlyMoscow",
4604 "SealionPlus"
4605 };
4606
4607
4608
4609
4610
4611
4612 char *ai_modules[] = {
4613
4614 "default", "default",
4615 "default", "default",
4616 "default", "default",
4617 "default", "default",
4618 "default", "default",
4619 "default", "default",
4620 "default", "default",
4621 "default", "default",
4622 "default", "default",
4623 "default", "default",
4624 "default", "default",
4625 "default", "default",
4626 "default", "default",
4627 "default", "default",
4628 "default", "default",
4629 "default", "default",
4630 "default", "default",
4631 "default", "default",
4632 "default", "default",
4633 "default", "default",
4634 "default", "default",
4635 "default", "default",
4636 "default", "default",
4637 "default", "default",
4638 "default", "default",
4639 "default", "default",
4640 "default", "default",
4641 "default", "default",
4642 "default", "default",
4643 "default", "default",
4644 "default", "default",
4645 "default", "default",
4646 "default", "default",
4647 "default", "default",
4648 "default", "default",
4649 "default", "default",
4650 "default", "default",
4651 "default", "default",
4652 "default", "default"
4653 };
4654
4655
4656
4657
4658
4659 int prestige_per_turn[] = {
4660
4661 0, 20,
4662 0, 20,
4663 0, 40,
4664 0, 48,
4665 0, 45,
4666 0, 84,
4667 0, 45,
4668 0, 70,
4669 0, 63,
4670 0, 85,
4671 0, 103,
4672 0, 0,
4673 71, 0,
4674 47, 0,
4675 70, 0,
4676 48, 0,
4677 0, 75,
4678 48, 0,
4679 61, 0,
4680 70, 0,
4681 0, 101,
4682 0, 45,
4683 0, 60,
4684 0, 80,
4685 0, 115,
4686 0, 63,
4687 0, 105,
4688 0, 95,
4689 0, 55,
4690 0, 115,
4691 0, 122,
4692 47, 0,
4693 0, 0,
4694 70, 0,
4695 82, 0,
4696 0, 115,
4697 0, 135,
4698 0, 85
4699 };
4700 # 228 "scenarios.c"
4701 int seed;
4702 void random_seed( int _seed )
4703 {
4704 seed = _seed;
4705 }
4706 int random_get( int low, int high )
4707 {
4708 int p1 = 1103515245;
4709 int p2 = 12345;
4710 seed = ( seed * p1 + p2 ) % 2147483647;
4711 return ( ( abs( seed ) / 3 ) % ( high - low + 1 ) ) + low;
4712 }
4713 # 248 "scenarios.c"
4714 int scen_add_flags( FILE *dest_file, FILE *scen_file, int id )
4715 {
4716 FILE *map_file;
4717 char path[512];
4718 int width, height, ibuf;
4719 int x, y, i, obj;
4720 int vic_hexes[40];
4721 int obj_count = 0;
4722
4723 memset( vic_hexes, 0, sizeof(int) * 40 );
4724 fseek( scen_file, 37, 0 );
4725 for ( i = 0; i < 20; i++ ) {
4726 fread( &vic_hexes[i * 2], 2, 1, scen_file );
4727 vic_hexes[i * 2] = (vic_hexes[i * 2]);
4728 fread( &vic_hexes[i * 2 + 1], 2, 1, scen_file );
4729 vic_hexes[i * 2 + 1] = (vic_hexes[i * 2 + 1]);
4730 if ( vic_hexes[i * 2] >= 1000 || vic_hexes[i * 2] < 0 )
4731 break;
4732 obj_count++;
4733 }
4734
4735 sprintf( path, "%s/MAP%02i.SET", source_path, id );
4736 if ( ( map_file = fopen( path, "r" ) ) == 0 ) {
4737 sprintf( path, "%s/map%02i.set", source_path, id );
4738 if ( ( map_file = fopen( path, "r" ) ) == 0 ) {
4739 fprintf( stderr, "%s: file not found\n", path );
4740 return 0;
4741 }
4742 }
4743
4744 width = height = 0;
4745 fseek( map_file, 101, 0 );
4746 fread( &width, 2, 1, map_file );
4747 width = (width);
4748 fseek( map_file, 103, 0 );
4749 fread( &height, 2, 1, map_file );
4750 height = (height);
4751 width++; height++;
4752
4753 fseek( map_file, 123 + 3 * width * height, 0 );
4754 for ( y = 0; y < height; y++ ) {
4755 for ( x = 0; x < width; x++ ) {
4756 ibuf = 0; fread( &ibuf, 1, 1, map_file );
4757 if ( ibuf > 0 ) {
4758 obj = 0;
4759 for ( i = 0; i < obj_count; i++ )
4760 if ( vic_hexes[i * 2] == x && vic_hexes[i * 2 + 1] == y ) {
4761 obj = 1; break;
4762 }
4763 fprintf( dest_file, "<flag\nx»%i\ny»%i\nnation»%s\nobj»%i\n>\n", x, y, nations[(ibuf - 1) * 3], obj );
4764 }
4765 }
4766 }
4767 return 1;
4768 }
4769 # 324 "scenarios.c"
4770 void scen_create_random_weather( FILE *dest_file, FILE *scen_file, int month, int turns )
4771 {
4772 float month_mod[13] = { 0, 1.7, 1.6, 1.0, 2.0, 1.2, 0.7, 0.5, 0.6, 1.4, 1.7, 2.2, 1.7 };
4773 int med_weather[4] = { 0, 16, 24, 36 };
4774 int bad_weather[4] = { 0, 8, 12, 18 };
4775 int i, result;
4776 int init_cond = 0, region = 0;
4777 int weather[turns];
4778 memset( weather, 0, sizeof( int ) * turns );
4779
4780 fseek( scen_file, 16, 0 );
4781 fread( &init_cond, 1, 1, scen_file );
4782 fread( &region, 1, 1, scen_file );
4783
4784
4785 random_seed( month * turns + ( region + 1 ) * ( init_cond + 1 ) );
4786 for ( i = 0; i < turns; i++ ) {
4787 result = random_get( 1, 100 );
4788 if ( result <= (int)( month_mod[month] * bad_weather[region] ) )
4789 weather[i] = 2;
4790 else
4791 if ( result <= (int)( month_mod[month] * med_weather[region] ) )
4792 weather[i] = 1;
4793 }
4794
4795
4796 weather[0] = (init_cond==1)?0:2;
4797
4798 if ( month < 3 || month == 12 ) {
4799 for ( i = 0; i < turns; i++ )
4800 if ( weather[i] == 2 )
4801 weather[i]++;
4802 }
4803
4804
4805 fprintf( dest_file, "weather»" );
4806 i = 0;
4807 while ( i < turns ) {
4808 fprintf( dest_file, "%s", weather[i]==0?"fair":weather[i]==1?"clouds":weather[i]==2?"rain":"snow" );
4809 if ( i < turns - 1 )
4810 fprintf( dest_file, "°" );
4811 i++;
4812 }
4813 fprintf( dest_file, "\n" );
4814 }
4815
4816
4817
4818
4819
4820
4821
4822 void scen_create_pg_weather( FILE *dest_file, int scen_id, FILE *scen_file, int turns )
4823 {
4824
4825 char *weathers[] = {
4826 "fffffroRff",
4827 "ffffffffffffrooorRff",
4828 "fffforRRRmfffforRROffffff",
4829 "fffffffrROooffffffffffooroffff",
4830 "ffffffffffffoorfffffffffff",
4831 "ffffffooorfffff",
4832 "",
4833 "",
4834 "",
4835 "ffffffffffffffrooooofffsoSISSi",
4836 "fffffffffffffoo",
4837 "",
4838 "ffffffffooorRffffffff",
4839 "fffforofffffff",
4840 "",
4841 "ooofffffffforRoffffffff",
4842 "SISSSSSSSIISISSiffsSSSSISSSISSII",
4843 "ffffffffffffffrooffffffff",
4844 "fffffroRooffffff",
4845 "ffroorfffffff",
4846 "ffffffffffforooffffffffoo",
4847 "fffffffffroRR",
4848 "ffffffffoorofffffffffff",
4849 "fffffffffoorofffffffffffrooo",
4850 "fffffsooSSSiffffsSffff",
4851 "ffffffffffforofff",
4852 "fffooooosSfffsoSIffffoo",
4853 "ffffffffffffforoooffffffffffffo",
4854 "ffsoSSiffroooroRffffsS",
4855 "fffffffffffffoorofff",
4856 "ffffooosfffffosSSSIif",
4857 "ffffffffffffffrooffffff",
4858 "fffffoorRRRmffffosSf",
4859 "ffffoosofffoo",
4860 "fffroRofffrRM",
4861 "fffffffffffffrffffffff",
4862 "ffffffffffsooofffffoosos",
4863 "ffffffroforofff"
4864 };
4865 int i;
4866 char w[32];
4867 if (strlen(weathers[scen_id])>0&&strlen(weathers[scen_id])!=turns)
4868 fprintf(stderr,"ERROR: scen %d: mismatch in length of weather (%d) and turn number (%d)\n",
4869 scen_id,strlen(weathers[scen_id]),turns);
4870
4871 fprintf( dest_file, "weather»" );
4872 i = 0;
4873 while ( i < turns ) {
4874 if (weathers[0]==0)
4875 strcpy(w,"fair");
4876 else
4877 {
4878 w[0] = weathers[scen_id][i]; w[1] = 0;
4879 if (w[0]=='f') strcpy(w,"fair");
4880 else if (w[0]=='o') strcpy(w,"clouds");
4881 else if (w[0]=='R') strcpy(w,"rain");
4882 else if (w[0]=='S') strcpy(w,"snow");
4883 }
4884 fprintf( dest_file, "%s", w );
4885 if ( i < turns - 1 )
4886 fprintf( dest_file, "°" );
4887 i++;
4888 }
4889 fprintf( dest_file, "\n" );
4890 }
4891
4892
4893
4894
4895
4896
4897 void scen_create_unit( int scen_id, FILE *dest_file, FILE *scen_file )
4898 {
4899 int id = 0, nation = 0, x = 0, y = 0, str = 0, entr = 0, exp = 0, trsp_id = 0, org_trsp_id = 0;
4900
4901
4902 fread( &id, 2, 1, scen_file );
4903 id = (id);
4904 fread( &org_trsp_id, 2, 1, scen_file );
4905 org_trsp_id = (org_trsp_id);
4906 fread( &nation, 1, 1, scen_file ); nation--;
4907 fread( &trsp_id, 2, 1, scen_file );
4908 trsp_id = (trsp_id);
4909 fread( &x, 2, 1, scen_file );
4910 x = (x);
4911 fread( &y, 2, 1, scen_file );
4912 y = (y);
4913 fread( &str, 1, 1, scen_file );
4914 fread( &entr, 1, 1, scen_file );
4915 fread( &exp, 1, 1, scen_file );
4916
4917 if (scen_id==23)
4918 {
4919 if (x==7&&y==14) trsp_id = 86;
4920 if (x==8&&y==23) trsp_id = 86;
4921 }
4922
4923 unit_entry_used[id - 1] = 1;
4924 if ( trsp_id )
4925 unit_entry_used[trsp_id - 1] = 1;
4926 else
4927 if ( org_trsp_id )
4928 unit_entry_used[org_trsp_id - 1] = 1;
4929
4930 fprintf( dest_file, "<unit\n" );
4931 fprintf( dest_file, "id»%i\nnation»%s\n", id - 1, nations[nation * 3] );
4932 fprintf( dest_file, "x»%i\ny»%i\n", x, y );
4933 fprintf( dest_file, "str»%i\nentr»%i\nexp»%i\n", str, entr, exp );
4934 if ( trsp_id == 0 && org_trsp_id == 0 )
4935 fprintf( dest_file, "trsp»none\n" );
4936 else {
4937 if ( trsp_id )
4938 fprintf( dest_file, "trsp»%i\n", trsp_id - 1 );
4939 else
4940 fprintf( dest_file, "trsp»%i\n", org_trsp_id - 1 );
4941 }
4942 fprintf( dest_file, ">\n" );
4943 }
4944
4945
4946
4947
4948
4949
4950 int major_limits[] = {
4951
4952
4953
4954 -1,
4955 3,
4956 7,
4957 5,
4958 6,
4959 13,
4960 3,
4961 4,
4962 5,
4963 3,
4964 12,
4965 3,
4966 -1,
4967 -1,
4968 -1,
4969 -1,
4970 -1,
4971 -1,
4972 -1,
4973 -1,
4974 -1,
4975 3,
4976 2,
4977 10,
4978 8,
4979 4,
4980 3,
4981 6,
4982 13,
4983 4,
4984 -1,
4985 5,
4986 -1,
4987 5,
4988 -1,
4989 -1,
4990 7,
4991 5,
4992 3,
4993 };
4994
4995
4996
4997
4998 void scen_add_vic_conds( FILE *file, int id )
4999 {
5000 # 563 "scenarios.c"
5001 if ( id == 15 || id == 16 || id == 17 )
5002 fprintf( file, "<result\ncheck»last_turn\n" );
5003 else
5004 fprintf( file, "<result\ncheck»every_turn\n" );
5005
5006 if ( major_limits[id] != -1 ) {
5007 fprintf( file, "<cond\n" );
5008 fprintf( file, "<and\n<control_all_hexes\nplayer»axis\n>\n<turns_left\ncount»%i\n>\n>\n", major_limits[id] );
5009 fprintf( file, "result»%s\n", "major" );
5010 fprintf( file, "message»%s\n", "Axis Major Victory" );
5011 fprintf( file, ">\n" );
5012 fprintf( file, "<cond\n" );
5013 fprintf( file, "<and\n<control_all_hexes\nplayer»axis\n>\n>\n" );
5014 fprintf( file, "result»%s\n", "minor" );
5015 fprintf( file, "message»%s\n", "Axis Minor Victory" );
5016 fprintf( file, ">\n" );
5017 fprintf( file, "<else\n" );
5018 fprintf( file, "result»%s\n", "defeat" );
5019 fprintf( file, "message»%s\n", "Axis Defeat" );
5020 fprintf( file, ">\n" );
5021 }
5022 else
5023 if ( id == 17 ) {
5024
5025 fprintf( file, "<cond\n" );
5026 fprintf( file, "<and\n"
5027 "<control_hex\nplayer»axis\nx»16\ny»16\n>\n"
5028 "<control_hex\nplayer»axis\nx»26\ny»4\n>\n"
5029 "<control_hex\nplayer»axis\nx»27\ny»21\n>\n"
5030 "<control_hex\nplayer»axis\nx»39\ny»21\n>\n"
5031 "<control_hex\nplayer»axis\nx»48\ny»8\n>\n"
5032 "<control_hex\nplayer»axis\nx»54\ny»14\n>\n"
5033 "<control_hex\nplayer»axis\nx»59\ny»18\n>\n"
5034 ">\n" );
5035 fprintf( file, "result»%s\n", "minor" );
5036 fprintf( file, "message»%s\n", "Axis Minor Victory" );
5037 fprintf( file, ">\n" );
5038
5039 fprintf( file, "<cond\n" );
5040 fprintf( file, "<or\n<control_all_hexes\nplayer»axis\n>\n>\n" );
5041 fprintf( file, "result»%s\n", "major" );
5042 fprintf( file, "message»%s\n", "Axis Major Victory" );
5043 fprintf( file, ">\n" );
5044
5045 fprintf( file, "<else\n" );
5046 fprintf( file, "result»%s\n", "defeat" );
5047 fprintf( file, "message»%s\n", "Axis Defeat" );
5048 fprintf( file, ">\n" );
5049 }
5050 else {
5051
5052 fprintf( file, "<cond\n" );
5053 switch ( id ) {
5054 case 12:
5055 fprintf( file, "<or\n<control_hex\nplayer»allies\nx»27\ny»5\n>\n<control_hex_num\nplayer»allies\ncount»6\n>\n>\n" );
5056 break;
5057 case 13:
5058 fprintf( file, "<or\n<control_hex_num\nplayer»allies\ncount»14\n>\n>\n" );
5059 break;
5060 case 14:
5061 fprintf( file, "<or\n<control_hex\nplayer»allies\nx»13\ny»17\n>\n<control_hex_num\nplayer»allies\ncount»5\n>\n>\n" );
5062 break;
5063 case 15:
5064 fprintf( file, "<or\n<control_hex_num\nplayer»allies\ncount»4\n>\n>\n" );
5065 break;
5066 case 16:
5067 fprintf( file, "<or\n<control_hex_num\nplayer»allies\ncount»5\n>\n>\n" );
5068 break;
5069 case 18:
5070 fprintf( file, "<or\n<control_hex_num\nplayer»allies\ncount»5\n>\n>\n" );
5071 break;
5072 case 19:
5073 fprintf( file, "<and\n<control_hex\nplayer»allies\nx»37\ny»10\n>\n>\n" );
5074 break;
5075 case 20:
5076 fprintf( file, "<or\n<control_hex\nplayer»allies\nx»36\ny»14\n>\n<control_hex_num\nplayer»allies\ncount»5\n>\n>\n" );
5077 break;
5078 case 30:
5079 fprintf( file, "<or\n<control_all_hexes\nplayer»allies\n>\n>\n" );
5080 break;
5081 case 32:
5082 fprintf( file, "<or\n<control_hex\nplayer»allies\nx»3\ny»12\n>\n>\n" );
5083 break;
5084 case 34:
5085 fprintf( file, "<or\n<control_hex\nplayer»allies\nx»36\ny»14\n>\n<control_hex_num\nplayer»allies\ncount»8\n>\n>\n" );
5086 break;
5087 case 35:
5088 fprintf( file, "<or\n<control_hex\nplayer»allies\nx»36\ny»14\n>\n>\n" );
5089 break;
5090 }
5091 fprintf( file, "result»%s\n", "defeat" );
5092 fprintf( file, "message»%s\n", "Axis Defeat" );
5093 fprintf( file, ">\n" );
5094
5095 fprintf( file, "<cond\n" );
5096 if ( id == 15 )
5097 {
5098
5099 fprintf( file, "<and\n"
5100 "<control_hex\nplayer»axis\nx»11\ny»7\n>\n"
5101 "<control_hex\nplayer»axis\nx»22\ny»28\n>\n"
5102 "<control_hex\nplayer»axis\nx»43\ny»27\n>\n"
5103 ">\n" );
5104 }
5105 else if ( id == 16 )
5106 {
5107
5108 fprintf( file, "<and\n"
5109 "<control_hex\nplayer»axis\nx»7\ny»3\n>\n"
5110 "<control_hex\nplayer»axis\nx»15\ny»4\n>\n"
5111 "<control_hex\nplayer»axis\nx»5\ny»22\n>\n"
5112 "<control_hex\nplayer»axis\nx»12\ny»27\n>\n"
5113 "<control_hex\nplayer»axis\nx»31\ny»21\n>\n"
5114 ">\n" );
5115 }
5116 else
5117 {
5118
5119 fprintf( file, "<or\n<control_all_hexes\nplayer»axis\n>\n>\n" );
5120 }
5121 fprintf( file, "result»%s\n", "major" );
5122 fprintf( file, "message»%s\n", "Axis Major Victory" );
5123 fprintf( file, ">\n" );
5124 fprintf( file, "<else\n" );
5125 fprintf( file, "result»%s\n", "minor" );
5126 fprintf( file, "message»%s\n", "Axis Minor Victory" );
5127 fprintf( file, ">\n" );
5128 }
5129
5130 fprintf( file, ">\n" );
5131 }
5132 # 708 "scenarios.c"
5133 int scenarios_convert( int scen_id )
5134 {
5135 int i, j;
5136 char dummy[256];
5137 int day, month, year, turns, turns_per_day, days_per_turn, ibuf;
5138 int unit_offset, unit_count;
5139 int axis_orient, axis_strat, allied_strat;
5140 int deploy_fields_count;
5141 int prest_bucket[2], prest_int[2], prest_start[2], prest_per_turn[2];
5142 char path[512];
5143 FILE *dest_file = 0, *scen_file = 0, *aux_file = 0;
5144 PData *pd = 0, *reinf, *unit;
5145 int def_str, def_exp, def_entr;
5146 char *str;
5147 printf( " scenarios...\n" );
5148 sprintf( path, "%s/scenarios/pg", dest_path );
5149 mkdir( path, (0400|0200|0100) | (0400 >> 3) | (0100 >> 3) | ((0400 >> 3) >> 3) | ((0100 >> 3) >> 3) );
5150 if ( scen_id == -1 ) {
5151
5152 sprintf( path, "%s/scenarios/pg/.order", dest_path );
5153 aux_file = fopen( path, "w" );
5154 if ( aux_file ) {
5155 for (i = 0; i < sizeof fnames/sizeof fnames[0]; i++)
5156 fprintf( aux_file, "%s\n", fnames[i] );
5157 fclose( aux_file );
5158 } else
5159 fprintf( stderr, "Could not write sort order to %s\n", path );
5160
5161
5162 sprintf( path, "%s/convdata/reinf", get_gamedir() );
5163 if ( ( pd = parser_read_file( "reinforcements", path ) ) == 0 ) {
5164 fprintf( stderr, "%s\n", parser_get_error() );
5165 goto failure;
5166 }
5167
5168 }
5169
5170 for ( i = (( scen_id == -1 ) ? 1 : scen_id);
5171 i < (( scen_id == -1 ) ? 38 : scen_id) + 1; i++ ) {
5172
5173 if ( scen_id == -1 )
5174 sprintf( path, "%s/scenarios/pg/%s", dest_path, fnames[i - 1] );
5175 else
5176 sprintf( path, "%s/scenarios/pg/%s", dest_path, custom_name );
5177 if ( ( dest_file = fopen( path, "w" ) ) == 0 ) {
5178 fprintf( stderr, "%s: access denied\n", path );
5179 goto failure;
5180 }
5181
5182 fprintf( dest_file, "@\n" );
5183 if ( scen_id == -1 ) {
5184 if ( ( aux_file = open_file( "SCENSTAT.BIN" ) ) == 0 )
5185 goto failure;
5186 fseek( aux_file, 40 + (i - 1) * 14, 0 );
5187 fread( dummy, 14, 1, aux_file );
5188 fprintf( dest_file, "name»%s\n", dummy );
5189 fseek( aux_file, 600 + (i - 1) * 160 , 0 );
5190 fread( dummy, 160, 1, aux_file );
5191 fprintf( dest_file, "desc»%s\n", dummy );
5192 fprintf( dest_file, "authors»Strategic Simulation Inc.\n" );
5193 fclose( aux_file );
5194 }
5195 else {
5196 fprintf( dest_file, "name»%s\n", custom_name );
5197 fprintf( dest_file, "desc»none\n" );
5198 fprintf( dest_file, "authors»nobody\n" );
5199 }
5200
5201 sprintf( path, "GAME%03i.SCN", i );
5202 if ( ( scen_file = open_file( path ) ) == 0 )
5203 goto failure;
5204
5205 fseek( scen_file, 22, 0 );
5206 day = 0; fread( &day, 1, 1, scen_file );
5207 month = 0; fread( &month, 1, 1, scen_file );
5208 year = 0; fread( &year, 1, 1, scen_file );
5209 fprintf( dest_file, "date»%02i.%02i.19%i\n", day, month, year );
5210
5211 fseek( scen_file, 21, 0 );
5212 turns = 0; fread( &turns, 1, 1, scen_file );
5213 fprintf( dest_file, "turns»%i\n", turns );
5214 fseek( scen_file, 25, 0 );
5215 turns_per_day = 0; fread( &turns_per_day, 1, 1, scen_file );
5216 fprintf( dest_file, "turns_per_day»%i\n", turns_per_day );
5217 days_per_turn = 0; fread( &days_per_turn, 1, 1, scen_file );
5218 if ( turns_per_day == 0 && days_per_turn == 0 )
5219 days_per_turn = 1;
5220 fprintf( dest_file, "days_per_turn»%i\n", days_per_turn );
5221
5222 fprintf( dest_file, "domain»pg\n" );
5223
5224 fprintf( dest_file, "nation_db»pg.ndb\n" );
5225
5226 if ( scen_id == -1 || !units_find_panzequp() )
5227 fprintf( dest_file, "<unit_db\nmain»pg.udb\n>\n" );
5228
5229
5230
5231
5232
5233
5234
5235 if ( scen_id == -1 )
5236 fprintf( dest_file, "map»pg/map%02i\n", i );
5237
5238 if (scen_id==-1)
5239 scen_create_pg_weather( dest_file, i-1, scen_file, turns );
5240 else
5241 scen_create_random_weather( dest_file, scen_file, month, turns );
5242
5243 fprintf( dest_file, "<flags\n" );
5244 if ( !scen_add_flags( dest_file, scen_file, i ) ) goto failure;
5245 fprintf( dest_file, ">\n" );
5246
5247 fseek( scen_file, 117, 0 );
5248 ibuf = 0; fread( &ibuf, 1, 1, scen_file );
5249 unit_offset = ibuf * 4 + 135;
5250
5251 if ( scen_id == -1 )
5252 {
5253 fseek( scen_file, 27, 0 ); fread( &dummy, 6, 1, scen_file );
5254 prest_bucket[0] = dummy[0] + 256*dummy[1];
5255 prest_bucket[1] = dummy[2] + 256*dummy[3];
5256 prest_int[0] = dummy[4];
5257 prest_int[1] = dummy[5];
5258 fseek( scen_file, 0x75, 0 ); fread( &dummy, 1, 1, scen_file );
5259 fseek( scen_file, dummy[0]*4+0x77, 0 ); fread( &dummy, 4, 1, scen_file );
5260 prest_start[0] = dummy[0] + 256 * dummy[1];
5261 prest_start[1] = dummy[2] + 256 * dummy[3];
5262
5263
5264
5265
5266
5267 prest_per_turn[0] = prestige_per_turn[(i-1)*2];
5268 prest_per_turn[1] = prestige_per_turn[(i-1)*2+1];
5269
5270 prest_start[0] += prest_per_turn[0];
5271 prest_start[1] += prest_per_turn[1];
5272 }
5273 else
5274 {
5275 prest_bucket[0] = prest_bucket[1] = 0;
5276 prest_int[0] = prest_int[1] = 0;
5277 prest_start[0] = prest_start[1] = 0;
5278 prest_per_turn[0] = prest_per_turn[1] = 0;
5279 }
5280
5281 fprintf( dest_file, "<players\n" );
5282
5283 fseek( scen_file, 12, 0 );
5284
5285 axis_orient = 0; fread( &axis_orient, 1, 1, scen_file );
5286 if ( axis_orient == 1 )
5287 sprintf( dummy, "right" );
5288 else
5289 sprintf( dummy, "left" );
5290
5291 fseek( scen_file, 15, 0 );
5292 axis_strat = 0; fread( &axis_strat, 1, 1, scen_file );
5293 if ( axis_strat == 0 )
5294 axis_strat = 1;
5295 else
5296 axis_strat = -1;
5297
5298 fprintf( dest_file, "<axis\nname»Axis\n" );
5299 fprintf( dest_file, "nations»ger°aus°it°hun°bul°rum°fin°esp\n" );
5300 fprintf( dest_file, "allied_players»\n" );
5301 fprintf( dest_file, "orientation»%s\ncontrol»human\nstrategy»%i\n", dummy, axis_strat );
5302 fprintf( dest_file, "start_prestige»%d\nprestige_per_turn»%d\n", prest_start[0], prest_per_turn[0] );
5303 if ( scen_id == -1 )
5304 fprintf( dest_file, "ai_module»%s\n", ai_modules[i*2] );
5305 else
5306 fprintf( dest_file, "ai_module»default\n" );
5307
5308 fprintf( dest_file, "<transporters\n" );
5309
5310 fseek( scen_file, unit_offset - 8, 0 );
5311 ibuf = 0; fread( &ibuf, 2, 1, scen_file );
5312 ibuf = (ibuf);
5313 if ( ibuf )
5314 fprintf( dest_file, "<air\nunit»%i\ncount»50\n>\n", ibuf - 1 );
5315
5316 fseek( scen_file, unit_offset - 4, 0 );
5317 ibuf = 0; fread( &ibuf, 2, 1, scen_file );
5318 ibuf = (ibuf);
5319 if ( ibuf )
5320 fprintf( dest_file, "<sea\nunit»%i\ncount»50\n>\n", ibuf - 1 );
5321 fprintf( dest_file, ">\n" );
5322 fprintf( dest_file, ">\n" );
5323
5324 if ( axis_orient == 1 )
5325 sprintf( dummy, "left" );
5326 else
5327 sprintf( dummy, "right" );
5328 if ( axis_strat == 1 )
5329 allied_strat = -1;
5330 else
5331 allied_strat = 1;
5332 fprintf( dest_file, "<allies\nname»Allies\n" );
5333 fprintf( dest_file, "nations»bel°lux°den°fra°gre°usa°tur°net°nor°pol°por°so°swe°swi°eng°yug\n" );
5334 fprintf( dest_file, "allied_players»\n" );
5335 fprintf( dest_file, "orientation»%s\ncontrol»cpu\nstrategy»%i\n", dummy, allied_strat );
5336 fprintf( dest_file, "start_prestige»%d\nprestige_per_turn»%d\n", prest_start[1], prest_per_turn[1] );
5337 if ( scen_id == -1 )
5338 fprintf( dest_file, "ai_module»%s\n", ai_modules[i*2 + 1] );
5339 else
5340 fprintf( dest_file, "ai_module»default\n" );
5341
5342 fprintf( dest_file, "<transporters\n" );
5343
5344 fseek( scen_file, unit_offset - 6, 0 );
5345 ibuf = 0; fread( &ibuf, 2, 1, scen_file );
5346 ibuf = (ibuf);
5347 if ( ibuf )
5348 fprintf( dest_file, "<air\nunit»%i\ncount»50\n>\n", ibuf - 1 );
5349
5350 fseek( scen_file, unit_offset - 2, 0 );
5351 ibuf = 0; fread( &ibuf, 2, 1, scen_file );
5352 ibuf = (ibuf);
5353 if ( ibuf )
5354 fprintf( dest_file, "<sea\nunit»%i\ncount»50\n>\n", ibuf - 1 );
5355 fprintf( dest_file, ">\n" );
5356 fprintf( dest_file, ">\n" );
5357 fprintf( dest_file, ">\n" );
5358
5359 if ( scen_id == -1 )
5360 scen_add_vic_conds( dest_file, i );
5361 else {
5362
5363
5364 fprintf( dest_file, "<result\ncheck»every_turn\n" );
5365 fprintf( dest_file, "<cond\n" );
5366 fprintf( dest_file, "<and\n<control_all_hexes\nplayer»%s\n>\n>\n",
5367 (axis_strat > 0) ? "axis" : "allies" );
5368 fprintf( dest_file, "result»victory\n" );
5369 fprintf( dest_file, "message»%s\n",
5370 (axis_strat > 0) ? "Axis Victory" : "Allied Victory" );
5371 fprintf( dest_file, ">\n" );
5372 fprintf( dest_file, "<else\n" );
5373 fprintf( dest_file, "result»defeat\n" );
5374 fprintf( dest_file, "message»%s\n",
5375 (axis_strat > 0) ? "Axis Defeat" : "Allied Defeat" );
5376 fprintf( dest_file, ">\n" );
5377 fprintf( dest_file, ">\n" );
5378 }
5379
5380 fseek( scen_file, 117, 0 );
5381 ibuf = 0; fread( &ibuf, 2, 1, scen_file );
5382 deploy_fields_count = (ibuf);
5383 fprintf( dest_file, "<deployfields\n<player\nid»axis\ncoordinates»default°" );
5384
5385 for (j = 0; j < deploy_fields_count - 1; j++) {
5386 int x, y;
5387 ibuf = 0; fread( &ibuf, 2, 1, scen_file );
5388 x = (ibuf);
5389 ibuf = 0; fread( &ibuf, 2, 1, scen_file );
5390 y = (ibuf);
5391 fprintf( dest_file, "%s%d,%d", j ? "°" : "", x, y );
5392 }
5393 fprintf( dest_file, "\n>\n" );
5394 if (scen_id==-1&&i==19)
5395 fprintf( dest_file, "<player\nid»allies\ncoordinates»none\n>\n" );
5396 else
5397 fprintf( dest_file, "<player\nid»allies\ncoordinates»default\n>\n" );
5398 fprintf( dest_file, ">\n" );
5399
5400
5401
5402 memset( unit_entry_used, 0, sizeof( unit_entry_used ) );
5403
5404 fseek( scen_file, 33, 0 );
5405 ibuf = 0; fread( &ibuf, 1, 1, scen_file );
5406 unit_count = ibuf;
5407 ibuf = 0; fread( &ibuf, 1, 1, scen_file );
5408 unit_count += ibuf;
5409 ibuf = 0; fread( &ibuf, 1, 1, scen_file );
5410 unit_count += ibuf;
5411
5412 fseek( scen_file, unit_offset, 0 );
5413 fprintf( dest_file, "<units\n" );
5414 for ( j = 0; j < unit_count; j++ )
5415 scen_create_unit( (scen_id!=-1)?(-1):(i-1), dest_file, scen_file );
5416
5417 if ( scen_id == -1 ) {
5418 if ( parser_get_pdata( pd, fnames[i - 1], &reinf ) ) {
5419
5420
5421 def_str = 10; def_exp = 0; def_entr = 0;
5422 list_reset( reinf->entries );
5423 while ( ( unit = list_next( reinf->entries ) ) )
5424 if ( !__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("unit") && __builtin_constant_p (unit->name) && (__s1_len = strlen ("unit"), __s2_len = strlen (unit->name), (!((size_t)(const void *)(("unit") + 1) - (size_t)(const void *)("unit") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((unit->name) + 1) - (size_t)(const void *)(unit->name) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("unit", unit->name) : (__builtin_constant_p ("unit") && ((size_t)(const void *)(("unit") + 1) - (size_t)(const void *)("unit") == 1) && (__s1_len = strlen ("unit"), __s1_len < 4) ? (__builtin_constant_p (unit->name) && ((size_t)(const void *)((unit->name) + 1) - (size_t)(const void *)(unit->name) == 1) ? __builtin_strcmp ("unit", unit->name) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (unit->name); register int __result = (((__const unsigned char *) (__const char *) ("unit"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("unit"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("unit"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("unit"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (unit->name) && ((size_t)(const void *)((unit->name) + 1) - (size_t)(const void *)(unit->name) == 1) && (__s2_len = strlen (unit->name), __s2_len < 4) ? (__builtin_constant_p ("unit") && ((size_t)(const void *)(("unit") + 1) - (size_t)(const void *)("unit") == 1) ? __builtin_strcmp ("unit", unit->name) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("unit"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (unit->name))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (unit->name))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (unit->name))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (unit->name))[3]); } } __result; }))) : __builtin_strcmp ("unit", unit->name)))); }) ) {
5425
5426 fprintf( dest_file, "<unit\n" );
5427 if ( !parser_get_value( unit, "nation", &str, 0 ) )
5428 goto failure;
5429 fprintf( dest_file, "nation»%s\n", str );
5430 if ( !parser_get_int( unit, "id", &ibuf ) )
5431 goto failure;
5432 fprintf( dest_file, "id»%i\n", ibuf );
5433 ibuf = def_str; parser_get_int( unit, "str", &ibuf );
5434 fprintf( dest_file, "str»%i\n", ibuf );
5435 ibuf = def_exp; parser_get_int( unit, "exp", &ibuf );
5436 fprintf( dest_file, "exp»%i\n", ibuf );
5437 fprintf( dest_file, "entr»0\n" );
5438 if ( parser_get_value( unit, "trsp", &str, 0 ) )
5439 fprintf( dest_file, "trsp»%s\n", str );
5440 if ( !parser_get_int( unit, "delay", &ibuf ) )
5441 goto failure;
5442 fprintf( dest_file, "delay»%i\n", ibuf );
5443 fprintf( dest_file, ">\n" );
5444 }
5445 }
5446 }
5447 fprintf( dest_file, ">\n" );
5448 fclose( scen_file );
5449 fclose( dest_file );
5450 }
5451 parser_free( &pd );
5452 return 1;
5453 failure:
5454 parser_free( &pd );
5455 if ( aux_file ) fclose( aux_file );
5456 if ( scen_file ) fclose( scen_file );
5457 if ( dest_file ) fclose( dest_file );
5458 return 0;
5459 }