4 # 1 "/usr/include/stdc-predef.h" 1 3 4
8 # 1 "/usr/include/stdio.h" 1 3 4
9 # 27 "/usr/include/stdio.h" 3 4
10 # 1 "/usr/include/features.h" 1 3 4
11 # 367 "/usr/include/features.h" 3 4
12 # 1 "/usr/include/i386-linux-gnu/sys/cdefs.h" 1 3 4
13 # 410 "/usr/include/i386-linux-gnu/sys/cdefs.h" 3 4
14 # 1 "/usr/include/i386-linux-gnu/bits/wordsize.h" 1 3 4
15 # 411 "/usr/include/i386-linux-gnu/sys/cdefs.h" 2 3 4
16 # 368 "/usr/include/features.h" 2 3 4
17 # 391 "/usr/include/features.h" 3 4
18 # 1 "/usr/include/i386-linux-gnu/gnu/stubs.h" 1 3 4
25 # 1 "/usr/include/i386-linux-gnu/gnu/stubs-32.h" 1 3 4
26 # 8 "/usr/include/i386-linux-gnu/gnu/stubs.h" 2 3 4
27 # 392 "/usr/include/features.h" 2 3 4
28 # 28 "/usr/include/stdio.h" 2 3 4
34 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
35 # 216 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 3 4
37 # 216 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 3 4
38 typedef unsigned int size_t;
39 # 34 "/usr/include/stdio.h" 2 3 4
41 # 1 "/usr/include/i386-linux-gnu/bits/types.h" 1 3 4
42 # 27 "/usr/include/i386-linux-gnu/bits/types.h" 3 4
43 # 1 "/usr/include/i386-linux-gnu/bits/wordsize.h" 1 3 4
44 # 28 "/usr/include/i386-linux-gnu/bits/types.h" 2 3 4
47 typedef unsigned char __u_char;
48 typedef unsigned short int __u_short;
49 typedef unsigned int __u_int;
50 typedef unsigned long int __u_long;
53 typedef signed char __int8_t;
54 typedef unsigned char __uint8_t;
55 typedef signed short int __int16_t;
56 typedef unsigned short int __uint16_t;
57 typedef signed int __int32_t;
58 typedef unsigned int __uint32_t;
63 __extension__ typedef signed long long int __int64_t;
64 __extension__ typedef unsigned long long int __uint64_t;
72 __extension__ typedef long long int __quad_t;
73 __extension__ typedef unsigned long long int __u_quad_t;
74 # 121 "/usr/include/i386-linux-gnu/bits/types.h" 3 4
75 # 1 "/usr/include/i386-linux-gnu/bits/typesizes.h" 1 3 4
76 # 122 "/usr/include/i386-linux-gnu/bits/types.h" 2 3 4
79 __extension__ typedef __u_quad_t __dev_t;
80 __extension__ typedef unsigned int __uid_t;
81 __extension__ typedef unsigned int __gid_t;
82 __extension__ typedef unsigned long int __ino_t;
83 __extension__ typedef __u_quad_t __ino64_t;
84 __extension__ typedef unsigned int __mode_t;
85 __extension__ typedef unsigned int __nlink_t;
86 __extension__ typedef long int __off_t;
87 __extension__ typedef __quad_t __off64_t;
88 __extension__ typedef int __pid_t;
89 __extension__ typedef struct { int __val[2]; } __fsid_t;
90 __extension__ typedef long int __clock_t;
91 __extension__ typedef unsigned long int __rlim_t;
92 __extension__ typedef __u_quad_t __rlim64_t;
93 __extension__ typedef unsigned int __id_t;
94 __extension__ typedef long int __time_t;
95 __extension__ typedef unsigned int __useconds_t;
96 __extension__ typedef long int __suseconds_t;
98 __extension__ typedef int __daddr_t;
99 __extension__ typedef int __key_t;
102 __extension__ typedef int __clockid_t;
105 __extension__ typedef void * __timer_t;
108 __extension__ typedef long int __blksize_t;
113 __extension__ typedef long int __blkcnt_t;
114 __extension__ typedef __quad_t __blkcnt64_t;
117 __extension__ typedef unsigned long int __fsblkcnt_t;
118 __extension__ typedef __u_quad_t __fsblkcnt64_t;
121 __extension__ typedef unsigned long int __fsfilcnt_t;
122 __extension__ typedef __u_quad_t __fsfilcnt64_t;
125 __extension__ typedef int __fsword_t;
127 __extension__ typedef int __ssize_t;
130 __extension__ typedef long int __syscall_slong_t;
132 __extension__ typedef unsigned long int __syscall_ulong_t;
136 typedef __off64_t __loff_t;
137 typedef __quad_t *__qaddr_t;
138 typedef char *__caddr_t;
141 __extension__ typedef int __intptr_t;
144 __extension__ typedef unsigned int __socklen_t;
145 # 36 "/usr/include/stdio.h" 2 3 4
146 # 44 "/usr/include/stdio.h" 3 4
151 typedef struct _IO_FILE FILE;
157 # 64 "/usr/include/stdio.h" 3 4
158 typedef struct _IO_FILE __FILE;
159 # 74 "/usr/include/stdio.h" 3 4
160 # 1 "/usr/include/libio.h" 1 3 4
161 # 31 "/usr/include/libio.h" 3 4
162 # 1 "/usr/include/_G_config.h" 1 3 4
163 # 15 "/usr/include/_G_config.h" 3 4
164 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
165 # 16 "/usr/include/_G_config.h" 2 3 4
170 # 1 "/usr/include/wchar.h" 1 3 4
171 # 82 "/usr/include/wchar.h" 3 4
185 # 21 "/usr/include/_G_config.h" 2 3 4
196 # 32 "/usr/include/libio.h" 2 3 4
197 # 49 "/usr/include/libio.h" 3 4
198 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h" 1 3 4
199 # 40 "/usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h" 3 4
200 typedef __builtin_va_list __gnuc_va_list;
201 # 50 "/usr/include/libio.h" 2 3 4
202 # 144 "/usr/include/libio.h" 3 4
203 struct _IO_jump_t; struct _IO_FILE;
209 typedef void _IO_lock_t;
216 struct _IO_marker *_next;
217 struct _IO_FILE *_sbuf;
222 # 173 "/usr/include/libio.h" 3 4
226 enum __codecvt_result
233 # 241 "/usr/include/libio.h" 3 4
243 char* _IO_write_base;
250 char *_IO_backup_base;
253 struct _IO_marker *_markers;
255 struct _IO_FILE *_chain;
267 unsigned short _cur_column;
268 signed char _vtable_offset;
274 # 289 "/usr/include/libio.h" 3 4
291 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
296 typedef struct _IO_FILE _IO_FILE;
299 struct _IO_FILE_plus;
301 extern struct _IO_FILE_plus _IO_2_1_stdin_;
302 extern struct _IO_FILE_plus _IO_2_1_stdout_;
303 extern struct _IO_FILE_plus _IO_2_1_stderr_;
304 # 333 "/usr/include/libio.h" 3 4
305 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
313 typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
322 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
325 typedef int __io_close_fn (void *__cookie);
326 # 385 "/usr/include/libio.h" 3 4
327 extern int __underflow (_IO_FILE *);
328 extern int __uflow (_IO_FILE *);
329 extern int __overflow (_IO_FILE *, int);
330 # 429 "/usr/include/libio.h" 3 4
331 extern int _IO_getc (_IO_FILE *__fp);
332 extern int _IO_putc (int __c, _IO_FILE *__fp);
333 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
334 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
336 extern int _IO_peekc_locked (_IO_FILE *__fp);
342 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
343 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
344 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
345 # 459 "/usr/include/libio.h" 3 4
346 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
347 __gnuc_va_list, int *__restrict);
348 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
350 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
351 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
353 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
354 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
356 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
357 # 75 "/usr/include/stdio.h" 2 3 4
362 typedef __gnuc_va_list va_list;
363 # 90 "/usr/include/stdio.h" 3 4
364 typedef __off_t off_t;
365 # 102 "/usr/include/stdio.h" 3 4
366 typedef __ssize_t ssize_t;
374 typedef _G_fpos_t fpos_t;
379 # 164 "/usr/include/stdio.h" 3 4
380 # 1 "/usr/include/i386-linux-gnu/bits/stdio_lim.h" 1 3 4
381 # 165 "/usr/include/stdio.h" 2 3 4
385 extern struct _IO_FILE *stdin;
386 extern struct _IO_FILE *stdout;
387 extern struct _IO_FILE *stderr;
395 extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
397 extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
402 extern int renameat (int __oldfd, const char *__old, int __newfd,
403 const char *__new) __attribute__ ((__nothrow__ , __leaf__));
412 extern FILE *tmpfile (void) ;
413 # 209 "/usr/include/stdio.h" 3 4
414 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ;
420 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ;
421 # 227 "/usr/include/stdio.h" 3 4
422 extern char *tempnam (const char *__dir, const char *__pfx)
423 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
432 extern int fclose (FILE *__stream);
437 extern int fflush (FILE *__stream);
439 # 252 "/usr/include/stdio.h" 3 4
440 extern int fflush_unlocked (FILE *__stream);
441 # 266 "/usr/include/stdio.h" 3 4
448 extern FILE *fopen (const char *__restrict __filename,
449 const char *__restrict __modes) ;
454 extern FILE *freopen (const char *__restrict __filename,
455 const char *__restrict __modes,
456 FILE *__restrict __stream) ;
457 # 295 "/usr/include/stdio.h" 3 4
459 # 306 "/usr/include/stdio.h" 3 4
460 extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) ;
461 # 319 "/usr/include/stdio.h" 3 4
462 extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
463 __attribute__ ((__nothrow__ , __leaf__)) ;
468 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) ;
475 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
479 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
480 int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
486 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
487 size_t __size) __attribute__ ((__nothrow__ , __leaf__));
490 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
499 extern int fprintf (FILE *__restrict __stream,
500 const char *__restrict __format, ...);
505 extern int printf (const char *__restrict __format, ...);
507 extern int sprintf (char *__restrict __s,
508 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
514 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
515 __gnuc_va_list __arg);
520 extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
522 extern int vsprintf (char *__restrict __s, const char *__restrict __format,
523 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
529 extern int snprintf (char *__restrict __s, size_t __maxlen,
530 const char *__restrict __format, ...)
531 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
533 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
534 const char *__restrict __format, __gnuc_va_list __arg)
535 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
537 # 412 "/usr/include/stdio.h" 3 4
538 extern int vdprintf (int __fd, const char *__restrict __fmt,
539 __gnuc_va_list __arg)
540 __attribute__ ((__format__ (__printf__, 2, 0)));
541 extern int dprintf (int __fd, const char *__restrict __fmt, ...)
542 __attribute__ ((__format__ (__printf__, 2, 3)));
551 extern int fscanf (FILE *__restrict __stream,
552 const char *__restrict __format, ...) ;
557 extern int scanf (const char *__restrict __format, ...) ;
559 extern int sscanf (const char *__restrict __s,
560 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
561 # 443 "/usr/include/stdio.h" 3 4
562 extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf")
565 extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf")
567 extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__))
570 # 463 "/usr/include/stdio.h" 3 4
579 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
580 __gnuc_va_list __arg)
581 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
587 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
588 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
591 extern int vsscanf (const char *__restrict __s,
592 const char *__restrict __format, __gnuc_va_list __arg)
593 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
594 # 494 "/usr/include/stdio.h" 3 4
595 extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
599 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
600 extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
602 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
603 extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
607 __attribute__ ((__format__ (__scanf__, 2, 0)));
608 # 522 "/usr/include/stdio.h" 3 4
618 extern int fgetc (FILE *__stream);
619 extern int getc (FILE *__stream);
625 extern int getchar (void);
627 # 550 "/usr/include/stdio.h" 3 4
628 extern int getc_unlocked (FILE *__stream);
629 extern int getchar_unlocked (void);
630 # 561 "/usr/include/stdio.h" 3 4
631 extern int fgetc_unlocked (FILE *__stream);
643 extern int fputc (int __c, FILE *__stream);
644 extern int putc (int __c, FILE *__stream);
650 extern int putchar (int __c);
652 # 594 "/usr/include/stdio.h" 3 4
653 extern int fputc_unlocked (int __c, FILE *__stream);
661 extern int putc_unlocked (int __c, FILE *__stream);
662 extern int putchar_unlocked (int __c);
669 extern int getw (FILE *__stream);
672 extern int putw (int __w, FILE *__stream);
681 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
683 # 640 "/usr/include/stdio.h" 3 4
685 # 665 "/usr/include/stdio.h" 3 4
686 extern __ssize_t __getdelim (char **__restrict __lineptr,
687 size_t *__restrict __n, int __delimiter,
688 FILE *__restrict __stream) ;
689 extern __ssize_t getdelim (char **__restrict __lineptr,
690 size_t *__restrict __n, int __delimiter,
691 FILE *__restrict __stream) ;
699 extern __ssize_t getline (char **__restrict __lineptr,
700 size_t *__restrict __n,
701 FILE *__restrict __stream) ;
710 extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
716 extern int puts (const char *__s);
723 extern int ungetc (int __c, FILE *__stream);
730 extern size_t fread (void *__restrict __ptr, size_t __size,
731 size_t __n, FILE *__restrict __stream) ;
736 extern size_t fwrite (const void *__restrict __ptr, size_t __size,
737 size_t __n, FILE *__restrict __s);
739 # 737 "/usr/include/stdio.h" 3 4
740 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
741 size_t __n, FILE *__restrict __stream) ;
742 extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
743 size_t __n, FILE *__restrict __stream);
752 extern int fseek (FILE *__stream, long int __off, int __whence);
757 extern long int ftell (FILE *__stream) ;
762 extern void rewind (FILE *__stream);
764 # 773 "/usr/include/stdio.h" 3 4
765 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
770 extern __off_t ftello (FILE *__stream) ;
771 # 792 "/usr/include/stdio.h" 3 4
778 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
783 extern int fsetpos (FILE *__stream, const fpos_t *__pos);
784 # 815 "/usr/include/stdio.h" 3 4
786 # 824 "/usr/include/stdio.h" 3 4
789 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
791 extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
793 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
798 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
799 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
800 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
809 extern void perror (const char *__s);
816 # 1 "/usr/include/i386-linux-gnu/bits/sys_errlist.h" 1 3 4
817 # 26 "/usr/include/i386-linux-gnu/bits/sys_errlist.h" 3 4
819 extern const char *const sys_errlist[];
820 # 854 "/usr/include/stdio.h" 2 3 4
825 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
830 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
831 # 872 "/usr/include/stdio.h" 3 4
832 extern FILE *popen (const char *__command, const char *__modes) ;
838 extern int pclose (FILE *__stream);
844 extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
845 # 912 "/usr/include/stdio.h" 3 4
846 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
850 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ;
853 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
854 # 942 "/usr/include/stdio.h" 3 4
857 # 1 "../../include/greatest.h" 1
858 # 302 "../../include/greatest.h"
859 # 1 "/usr/include/stdlib.h" 1 3 4
860 # 32 "/usr/include/stdlib.h" 3 4
861 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
862 # 328 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 3 4
863 typedef long int wchar_t;
864 # 33 "/usr/include/stdlib.h" 2 3 4
873 # 1 "/usr/include/i386-linux-gnu/bits/waitflags.h" 1 3 4
874 # 50 "/usr/include/i386-linux-gnu/bits/waitflags.h" 3 4
881 # 42 "/usr/include/stdlib.h" 2 3 4
882 # 1 "/usr/include/i386-linux-gnu/bits/waitstatus.h" 1 3 4
883 # 64 "/usr/include/i386-linux-gnu/bits/waitstatus.h" 3 4
884 # 1 "/usr/include/endian.h" 1 3 4
885 # 36 "/usr/include/endian.h" 3 4
886 # 1 "/usr/include/i386-linux-gnu/bits/endian.h" 1 3 4
887 # 37 "/usr/include/endian.h" 2 3 4
888 # 60 "/usr/include/endian.h" 3 4
889 # 1 "/usr/include/i386-linux-gnu/bits/byteswap.h" 1 3 4
890 # 28 "/usr/include/i386-linux-gnu/bits/byteswap.h" 3 4
891 # 1 "/usr/include/i386-linux-gnu/bits/wordsize.h" 1 3 4
892 # 29 "/usr/include/i386-linux-gnu/bits/byteswap.h" 2 3 4
899 # 1 "/usr/include/i386-linux-gnu/bits/byteswap-16.h" 1 3 4
900 # 36 "/usr/include/i386-linux-gnu/bits/byteswap.h" 2 3 4
901 # 44 "/usr/include/i386-linux-gnu/bits/byteswap.h" 3 4
902 static __inline unsigned int
903 __bswap_32 (unsigned int __bsx)
905 return __builtin_bswap32 (__bsx);
907 # 108 "/usr/include/i386-linux-gnu/bits/byteswap.h" 3 4
908 static __inline __uint64_t
909 __bswap_64 (__uint64_t __bsx)
911 return __builtin_bswap64 (__bsx);
913 # 61 "/usr/include/endian.h" 2 3 4
914 # 65 "/usr/include/i386-linux-gnu/bits/waitstatus.h" 2 3 4
922 unsigned int __w_termsig:7;
923 unsigned int __w_coredump:1;
924 unsigned int __w_retcode:8;
937 unsigned int __w_stopval:8;
938 unsigned int __w_stopsig:8;
948 # 43 "/usr/include/stdlib.h" 2 3 4
949 # 67 "/usr/include/stdlib.h" 3 4
954 } __WAIT_STATUS __attribute__ ((__transparent_union__));
955 # 95 "/usr/include/stdlib.h" 3 4
978 __extension__ typedef struct
985 # 139 "/usr/include/stdlib.h" 3 4
986 extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) ;
991 extern double atof (const char *__nptr)
992 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
994 extern int atoi (const char *__nptr)
995 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
997 extern long int atol (const char *__nptr)
998 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1004 __extension__ extern long long int atoll (const char *__nptr)
1005 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1011 extern double strtod (const char *__restrict __nptr,
1012 char **__restrict __endptr)
1013 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1019 extern float strtof (const char *__restrict __nptr,
1020 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1022 extern long double strtold (const char *__restrict __nptr,
1023 char **__restrict __endptr)
1024 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1030 extern long int strtol (const char *__restrict __nptr,
1031 char **__restrict __endptr, int __base)
1032 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1034 extern unsigned long int strtoul (const char *__restrict __nptr,
1035 char **__restrict __endptr, int __base)
1036 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1042 extern long long int strtoq (const char *__restrict __nptr,
1043 char **__restrict __endptr, int __base)
1044 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1047 extern unsigned long long int strtouq (const char *__restrict __nptr,
1048 char **__restrict __endptr, int __base)
1049 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1056 extern long long int strtoll (const char *__restrict __nptr,
1057 char **__restrict __endptr, int __base)
1058 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1061 extern unsigned long long int strtoull (const char *__restrict __nptr,
1062 char **__restrict __endptr, int __base)
1063 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1065 # 305 "/usr/include/stdlib.h" 3 4
1066 extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) ;
1069 extern long int a64l (const char *__s)
1070 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1075 # 1 "/usr/include/i386-linux-gnu/sys/types.h" 1 3 4
1076 # 27 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1083 typedef __u_char u_char;
1084 typedef __u_short u_short;
1085 typedef __u_int u_int;
1086 typedef __u_long u_long;
1087 typedef __quad_t quad_t;
1088 typedef __u_quad_t u_quad_t;
1089 typedef __fsid_t fsid_t;
1094 typedef __loff_t loff_t;
1098 typedef __ino_t ino_t;
1099 # 60 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1100 typedef __dev_t dev_t;
1105 typedef __gid_t gid_t;
1110 typedef __mode_t mode_t;
1115 typedef __nlink_t nlink_t;
1120 typedef __uid_t uid_t;
1121 # 98 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1122 typedef __pid_t pid_t;
1128 typedef __id_t id_t;
1129 # 115 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1130 typedef __daddr_t daddr_t;
1131 typedef __caddr_t caddr_t;
1137 typedef __key_t key_t;
1138 # 132 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1139 # 1 "/usr/include/time.h" 1 3 4
1140 # 57 "/usr/include/time.h" 3 4
1143 typedef __clock_t clock_t;
1147 # 73 "/usr/include/time.h" 3 4
1150 typedef __time_t time_t;
1154 # 91 "/usr/include/time.h" 3 4
1155 typedef __clockid_t clockid_t;
1156 # 103 "/usr/include/time.h" 3 4
1157 typedef __timer_t timer_t;
1158 # 133 "/usr/include/i386-linux-gnu/sys/types.h" 2 3 4
1159 # 146 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1160 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
1161 # 147 "/usr/include/i386-linux-gnu/sys/types.h" 2 3 4
1165 typedef unsigned long int ulong;
1166 typedef unsigned short int ushort;
1167 typedef unsigned int uint;
1168 # 194 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1169 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
1170 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
1171 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
1172 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
1175 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
1176 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
1177 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
1178 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
1180 typedef int register_t __attribute__ ((__mode__ (__word__)));
1181 # 219 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1182 # 1 "/usr/include/i386-linux-gnu/sys/select.h" 1 3 4
1183 # 30 "/usr/include/i386-linux-gnu/sys/select.h" 3 4
1184 # 1 "/usr/include/i386-linux-gnu/bits/select.h" 1 3 4
1185 # 22 "/usr/include/i386-linux-gnu/bits/select.h" 3 4
1186 # 1 "/usr/include/i386-linux-gnu/bits/wordsize.h" 1 3 4
1187 # 23 "/usr/include/i386-linux-gnu/bits/select.h" 2 3 4
1188 # 31 "/usr/include/i386-linux-gnu/sys/select.h" 2 3 4
1191 # 1 "/usr/include/i386-linux-gnu/bits/sigset.h" 1 3 4
1192 # 22 "/usr/include/i386-linux-gnu/bits/sigset.h" 3 4
1193 typedef int __sig_atomic_t;
1200 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1202 # 34 "/usr/include/i386-linux-gnu/sys/select.h" 2 3 4
1206 typedef __sigset_t sigset_t;
1212 # 1 "/usr/include/time.h" 1 3 4
1213 # 120 "/usr/include/time.h" 3 4
1217 __syscall_slong_t tv_nsec;
1219 # 44 "/usr/include/i386-linux-gnu/sys/select.h" 2 3 4
1221 # 1 "/usr/include/i386-linux-gnu/bits/time.h" 1 3 4
1222 # 30 "/usr/include/i386-linux-gnu/bits/time.h" 3 4
1226 __suseconds_t tv_usec;
1228 # 46 "/usr/include/i386-linux-gnu/sys/select.h" 2 3 4
1231 typedef __suseconds_t suseconds_t;
1237 typedef long int __fd_mask;
1238 # 64 "/usr/include/i386-linux-gnu/sys/select.h" 3 4
1247 __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
1257 typedef __fd_mask fd_mask;
1258 # 96 "/usr/include/i386-linux-gnu/sys/select.h" 3 4
1260 # 106 "/usr/include/i386-linux-gnu/sys/select.h" 3 4
1261 extern int select (int __nfds, fd_set *__restrict __readfds,
1262 fd_set *__restrict __writefds,
1263 fd_set *__restrict __exceptfds,
1264 struct timeval *__restrict __timeout);
1265 # 118 "/usr/include/i386-linux-gnu/sys/select.h" 3 4
1266 extern int pselect (int __nfds, fd_set *__restrict __readfds,
1267 fd_set *__restrict __writefds,
1268 fd_set *__restrict __exceptfds,
1269 const struct timespec *__restrict __timeout,
1270 const __sigset_t *__restrict __sigmask);
1271 # 131 "/usr/include/i386-linux-gnu/sys/select.h" 3 4
1273 # 220 "/usr/include/i386-linux-gnu/sys/types.h" 2 3 4
1276 # 1 "/usr/include/i386-linux-gnu/sys/sysmacros.h" 1 3 4
1277 # 24 "/usr/include/i386-linux-gnu/sys/sysmacros.h" 3 4
1281 extern unsigned int gnu_dev_major (unsigned long long int __dev)
1282 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1284 extern unsigned int gnu_dev_minor (unsigned long long int __dev)
1285 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1287 extern unsigned long long int gnu_dev_makedev (unsigned int __major,
1288 unsigned int __minor)
1289 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1290 # 58 "/usr/include/i386-linux-gnu/sys/sysmacros.h" 3 4
1292 # 223 "/usr/include/i386-linux-gnu/sys/types.h" 2 3 4
1298 typedef __blksize_t blksize_t;
1305 typedef __blkcnt_t blkcnt_t;
1309 typedef __fsblkcnt_t fsblkcnt_t;
1313 typedef __fsfilcnt_t fsfilcnt_t;
1314 # 270 "/usr/include/i386-linux-gnu/sys/types.h" 3 4
1315 # 1 "/usr/include/i386-linux-gnu/bits/pthreadtypes.h" 1 3 4
1316 # 21 "/usr/include/i386-linux-gnu/bits/pthreadtypes.h" 3 4
1317 # 1 "/usr/include/i386-linux-gnu/bits/wordsize.h" 1 3 4
1318 # 22 "/usr/include/i386-linux-gnu/bits/pthreadtypes.h" 2 3 4
1319 # 60 "/usr/include/i386-linux-gnu/bits/pthreadtypes.h" 3 4
1320 typedef unsigned long int pthread_t;
1323 union pthread_attr_t
1329 typedef union pthread_attr_t pthread_attr_t;
1330 # 81 "/usr/include/i386-linux-gnu/bits/pthreadtypes.h" 3 4
1331 typedef struct __pthread_internal_slist
1333 struct __pthread_internal_slist *__next;
1334 } __pthread_slist_t;
1342 struct __pthread_mutex_s
1345 unsigned int __count;
1353 # 111 "/usr/include/i386-linux-gnu/bits/pthreadtypes.h" 3 4
1354 unsigned int __nusers;
1365 __pthread_slist_t __list;
1377 } pthread_mutexattr_t;
1387 unsigned int __futex;
1388 __extension__ unsigned long long int __total_seq;
1389 __extension__ unsigned long long int __wakeup_seq;
1390 __extension__ unsigned long long int __woken_seq;
1392 unsigned int __nwaiters;
1393 unsigned int __broadcast_seq;
1396 __extension__ long long int __align;
1403 } pthread_condattr_t;
1407 typedef unsigned int pthread_key_t;
1411 typedef int pthread_once_t;
1419 # 202 "/usr/include/i386-linux-gnu/bits/pthreadtypes.h" 3 4
1423 unsigned int __nr_readers;
1424 unsigned int __readers_wakeup;
1425 unsigned int __writer_wakeup;
1426 unsigned int __nr_readers_queued;
1427 unsigned int __nr_writers_queued;
1430 unsigned char __flags;
1431 unsigned char __shared;
1432 signed char __rwelision;
1434 unsigned char __pad2;
1446 } pthread_rwlockattr_t;
1452 typedef volatile int pthread_spinlock_t;
1461 } pthread_barrier_t;
1467 } pthread_barrierattr_t;
1468 # 271 "/usr/include/i386-linux-gnu/sys/types.h" 2 3 4
1472 # 315 "/usr/include/stdlib.h" 2 3 4
1479 extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
1482 extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1488 extern char *initstate (unsigned int __seed, char *__statebuf,
1489 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1493 extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1512 extern int random_r (struct random_data *__restrict __buf,
1513 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1515 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
1516 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1518 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
1520 struct random_data *__restrict __buf)
1521 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
1523 extern int setstate_r (char *__restrict __statebuf,
1524 struct random_data *__restrict __buf)
1525 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1532 extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
1534 extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1539 extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
1547 extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1548 extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1551 extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1552 extern long int nrand48 (unsigned short int __xsubi[3])
1553 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1556 extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1557 extern long int jrand48 (unsigned short int __xsubi[3])
1558 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1561 extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
1562 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
1563 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1564 extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1572 unsigned short int __x[3];
1573 unsigned short int __old_x[3];
1574 unsigned short int __c;
1575 unsigned short int __init;
1576 __extension__ unsigned long long int __a;
1581 extern int drand48_r (struct drand48_data *__restrict __buffer,
1582 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1583 extern int erand48_r (unsigned short int __xsubi[3],
1584 struct drand48_data *__restrict __buffer,
1585 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1588 extern int lrand48_r (struct drand48_data *__restrict __buffer,
1589 long int *__restrict __result)
1590 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1591 extern int nrand48_r (unsigned short int __xsubi[3],
1592 struct drand48_data *__restrict __buffer,
1593 long int *__restrict __result)
1594 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1597 extern int mrand48_r (struct drand48_data *__restrict __buffer,
1598 long int *__restrict __result)
1599 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1600 extern int jrand48_r (unsigned short int __xsubi[3],
1601 struct drand48_data *__restrict __buffer,
1602 long int *__restrict __result)
1603 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1606 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
1607 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1609 extern int seed48_r (unsigned short int __seed16v[3],
1610 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1612 extern int lcong48_r (unsigned short int __param[7],
1613 struct drand48_data *__buffer)
1614 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1624 extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
1626 extern void *calloc (size_t __nmemb, size_t __size)
1627 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
1638 extern void *realloc (void *__ptr, size_t __size)
1639 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1641 extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
1646 extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
1650 # 1 "/usr/include/alloca.h" 1 3 4
1651 # 24 "/usr/include/alloca.h" 3 4
1652 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
1653 # 25 "/usr/include/alloca.h" 2 3 4
1661 extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
1668 # 493 "/usr/include/stdlib.h" 2 3 4
1674 extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ;
1679 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
1680 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
1685 extern void *aligned_alloc (size_t __alignment, size_t __size)
1686 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) ;
1691 extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1695 extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1703 extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1711 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
1712 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1719 extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1725 extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1733 extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1740 extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
1742 # 578 "/usr/include/stdlib.h" 3 4
1743 extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1749 extern int setenv (const char *__name, const char *__value, int __replace)
1750 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1753 extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1760 extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
1761 # 606 "/usr/include/stdlib.h" 3 4
1762 extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1763 # 619 "/usr/include/stdlib.h" 3 4
1764 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
1765 # 641 "/usr/include/stdlib.h" 3 4
1766 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
1767 # 662 "/usr/include/stdlib.h" 3 4
1768 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
1769 # 711 "/usr/include/stdlib.h" 3 4
1775 extern int system (const char *__command) ;
1777 # 733 "/usr/include/stdlib.h" 3 4
1778 extern char *realpath (const char *__restrict __name,
1779 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) ;
1786 typedef int (*__compar_fn_t) (const void *, const void *);
1787 # 751 "/usr/include/stdlib.h" 3 4
1791 extern void *bsearch (const void *__key, const void *__base,
1792 size_t __nmemb, size_t __size, __compar_fn_t __compar)
1793 __attribute__ ((__nonnull__ (1, 2, 5))) ;
1801 extern void qsort (void *__base, size_t __nmemb, size_t __size,
1802 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
1803 # 774 "/usr/include/stdlib.h" 3 4
1804 extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
1805 extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
1809 __extension__ extern long long int llabs (long long int __x)
1810 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
1818 extern div_t div (int __numer, int __denom)
1819 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
1820 extern ldiv_t ldiv (long int __numer, long int __denom)
1821 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
1826 __extension__ extern lldiv_t lldiv (long long int __numer,
1827 long long int __denom)
1828 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ;
1830 # 811 "/usr/include/stdlib.h" 3 4
1831 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
1832 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
1837 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
1838 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
1843 extern char *gcvt (double __value, int __ndigit, char *__buf)
1844 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
1849 extern char *qecvt (long double __value, int __ndigit,
1850 int *__restrict __decpt, int *__restrict __sign)
1851 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
1852 extern char *qfcvt (long double __value, int __ndigit,
1853 int *__restrict __decpt, int *__restrict __sign)
1854 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ;
1855 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
1856 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ;
1861 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
1862 int *__restrict __sign, char *__restrict __buf,
1863 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1864 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
1865 int *__restrict __sign, char *__restrict __buf,
1866 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1868 extern int qecvt_r (long double __value, int __ndigit,
1869 int *__restrict __decpt, int *__restrict __sign,
1870 char *__restrict __buf, size_t __len)
1871 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1872 extern int qfcvt_r (long double __value, int __ndigit,
1873 int *__restrict __decpt, int *__restrict __sign,
1874 char *__restrict __buf, size_t __len)
1875 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1882 extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1885 extern int mbtowc (wchar_t *__restrict __pwc,
1886 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1889 extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
1893 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
1894 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1896 extern size_t wcstombs (char *__restrict __s,
1897 const wchar_t *__restrict __pwcs, size_t __n)
1898 __attribute__ ((__nothrow__ , __leaf__));
1907 extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
1908 # 898 "/usr/include/stdlib.h" 3 4
1909 extern int getsubopt (char **__restrict __optionp,
1910 char *const *__restrict __tokens,
1911 char **__restrict __valuep)
1912 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;
1913 # 950 "/usr/include/stdlib.h" 3 4
1914 extern int getloadavg (double __loadavg[], int __nelem)
1915 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1918 # 1 "/usr/include/i386-linux-gnu/bits/stdlib-float.h" 1 3 4
1919 # 955 "/usr/include/stdlib.h" 2 3 4
1920 # 967 "/usr/include/stdlib.h" 3 4
1922 # 303 "../../include/greatest.h" 2
1924 # 1 "/usr/include/string.h" 1 3 4
1925 # 27 "/usr/include/string.h" 3 4
1931 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
1932 # 33 "/usr/include/string.h" 2 3 4
1942 extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
1943 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1946 extern void *memmove (void *__dest, const void *__src, size_t __n)
1947 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1954 extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
1955 int __c, size_t __n)
1956 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1962 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1965 extern int memcmp (const void *__s1, const void *__s2, size_t __n)
1966 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1967 # 92 "/usr/include/string.h" 3 4
1968 extern void *memchr (const void *__s, int __c, size_t __n)
1969 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1972 # 123 "/usr/include/string.h" 3 4
1975 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
1976 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1978 extern char *strncpy (char *__restrict __dest,
1979 const char *__restrict __src, size_t __n)
1980 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1983 extern char *strcat (char *__restrict __dest, const char *__restrict __src)
1984 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1986 extern char *strncat (char *__restrict __dest, const char *__restrict __src,
1987 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1990 extern int strcmp (const char *__s1, const char *__s2)
1991 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1993 extern int strncmp (const char *__s1, const char *__s2, size_t __n)
1994 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1997 extern int strcoll (const char *__s1, const char *__s2)
1998 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2000 extern size_t strxfrm (char *__restrict __dest,
2001 const char *__restrict __src, size_t __n)
2002 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2009 # 1 "/usr/include/xlocale.h" 1 3 4
2010 # 27 "/usr/include/xlocale.h" 3 4
2011 typedef struct __locale_struct
2014 struct __locale_data *__locales[13];
2017 const unsigned short int *__ctype_b;
2018 const int *__ctype_tolower;
2019 const int *__ctype_toupper;
2022 const char *__names[13];
2026 typedef __locale_t locale_t;
2027 # 160 "/usr/include/string.h" 2 3 4
2030 extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)
2031 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
2033 extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
2034 __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
2039 extern char *strdup (const char *__s)
2040 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
2047 extern char *strndup (const char *__string, size_t __n)
2048 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
2049 # 206 "/usr/include/string.h" 3 4
2051 # 231 "/usr/include/string.h" 3 4
2052 extern char *strchr (const char *__s, int __c)
2053 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2054 # 258 "/usr/include/string.h" 3 4
2055 extern char *strrchr (const char *__s, int __c)
2056 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2059 # 277 "/usr/include/string.h" 3 4
2063 extern size_t strcspn (const char *__s, const char *__reject)
2064 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2067 extern size_t strspn (const char *__s, const char *__accept)
2068 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2069 # 310 "/usr/include/string.h" 3 4
2070 extern char *strpbrk (const char *__s, const char *__accept)
2071 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2072 # 337 "/usr/include/string.h" 3 4
2073 extern char *strstr (const char *__haystack, const char *__needle)
2074 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2079 extern char *strtok (char *__restrict __s, const char *__restrict __delim)
2080 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2085 extern char *__strtok_r (char *__restrict __s,
2086 const char *__restrict __delim,
2087 char **__restrict __save_ptr)
2088 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2090 extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
2091 char **__restrict __save_ptr)
2092 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2093 # 392 "/usr/include/string.h" 3 4
2096 extern size_t strlen (const char *__s)
2097 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2103 extern size_t strnlen (const char *__string, size_t __maxlen)
2104 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2110 extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
2112 # 422 "/usr/include/string.h" 3 4
2113 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ , __leaf__))
2115 __attribute__ ((__nonnull__ (2)));
2116 # 440 "/usr/include/string.h" 3 4
2117 extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
2123 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2127 extern void bcopy (const void *__src, void *__dest, size_t __n)
2128 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2131 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2134 extern int bcmp (const void *__s1, const void *__s2, size_t __n)
2135 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2136 # 484 "/usr/include/string.h" 3 4
2137 extern char *index (const char *__s, int __c)
2138 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2139 # 512 "/usr/include/string.h" 3 4
2140 extern char *rindex (const char *__s, int __c)
2141 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
2146 extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2147 # 529 "/usr/include/string.h" 3 4
2148 extern int strcasecmp (const char *__s1, const char *__s2)
2149 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2152 extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
2153 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
2154 # 552 "/usr/include/string.h" 3 4
2155 extern char *strsep (char **__restrict __stringp,
2156 const char *__restrict __delim)
2157 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2162 extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
2165 extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
2166 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2167 extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
2168 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2172 extern char *__stpncpy (char *__restrict __dest,
2173 const char *__restrict __src, size_t __n)
2174 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2175 extern char *stpncpy (char *__restrict __dest,
2176 const char *__restrict __src, size_t __n)
2177 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2178 # 658 "/usr/include/string.h" 3 4
2180 # 305 "../../include/greatest.h" 2
2181 # 1 "/usr/include/ctype.h" 1 3 4
2182 # 28 "/usr/include/ctype.h" 3 4
2184 # 46 "/usr/include/ctype.h" 3 4
2187 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
2188 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
2189 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
2190 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
2191 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
2192 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
2193 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
2194 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
2195 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
2196 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
2197 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
2198 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
2200 # 79 "/usr/include/ctype.h" 3 4
2201 extern const unsigned short int **__ctype_b_loc (void)
2202 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2203 extern const __int32_t **__ctype_tolower_loc (void)
2204 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2205 extern const __int32_t **__ctype_toupper_loc (void)
2206 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2207 # 104 "/usr/include/ctype.h" 3 4
2214 extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__));
2215 extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__));
2216 extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__));
2217 extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__));
2218 extern int islower (int) __attribute__ ((__nothrow__ , __leaf__));
2219 extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__));
2220 extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__));
2221 extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__));
2222 extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__));
2223 extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__));
2224 extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__));
2228 extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__));
2231 extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__));
2240 extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__));
2243 # 150 "/usr/include/ctype.h" 3 4
2244 extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
2248 extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
2252 extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__));
2253 extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__));
2254 # 271 "/usr/include/ctype.h" 3 4
2255 extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2256 extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2257 extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2258 extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2259 extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2260 extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2261 extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2262 extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2263 extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2264 extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2265 extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2267 extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__));
2271 extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
2272 extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
2275 extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
2276 extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
2277 # 347 "/usr/include/ctype.h" 3 4
2279 # 306 "../../include/greatest.h" 2
2281 # 1 "/usr/include/i386-linux-gnu/sys/stat.h" 1 3 4
2282 # 36 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2283 # 1 "/usr/include/time.h" 1 3 4
2284 # 37 "/usr/include/i386-linux-gnu/sys/stat.h" 2 3 4
2285 # 102 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2288 # 1 "/usr/include/i386-linux-gnu/bits/stat.h" 1 3 4
2289 # 46 "/usr/include/i386-linux-gnu/bits/stat.h" 3 4
2294 unsigned short int __pad1;
2315 unsigned short int __pad2;
2322 __blksize_t st_blksize;
2324 __blkcnt_t st_blocks;
2325 # 91 "/usr/include/i386-linux-gnu/bits/stat.h" 3 4
2326 struct timespec st_atim;
2327 struct timespec st_mtim;
2328 struct timespec st_ctim;
2329 # 109 "/usr/include/i386-linux-gnu/bits/stat.h" 3 4
2330 unsigned long int __glibc_reserved4;
2331 unsigned long int __glibc_reserved5;
2337 # 105 "/usr/include/i386-linux-gnu/sys/stat.h" 2 3 4
2338 # 208 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2339 extern int stat (const char *__restrict __file,
2340 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2344 extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2345 # 237 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2346 extern int fstatat (int __fd, const char *__restrict __file,
2347 struct stat *__restrict __buf, int __flag)
2348 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2349 # 262 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2350 extern int lstat (const char *__restrict __file,
2351 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2352 # 283 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2353 extern int chmod (const char *__file, __mode_t __mode)
2354 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2360 extern int lchmod (const char *__file, __mode_t __mode)
2361 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2366 extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__));
2372 extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
2374 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) ;
2381 extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__));
2382 # 320 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2383 extern int mkdir (const char *__path, __mode_t __mode)
2384 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2390 extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
2391 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2398 extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
2399 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2405 extern int mknodat (int __fd, const char *__path, __mode_t __mode,
2406 __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2412 extern int mkfifo (const char *__path, __mode_t __mode)
2413 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2419 extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
2420 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2426 extern int utimensat (int __fd, const char *__path,
2427 const struct timespec __times[2],
2429 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2434 extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__));
2435 # 398 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2436 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
2437 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
2438 extern int __xstat (int __ver, const char *__filename,
2439 struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2440 extern int __lxstat (int __ver, const char *__filename,
2441 struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2442 extern int __fxstatat (int __ver, int __fildes, const char *__filename,
2443 struct stat *__stat_buf, int __flag)
2444 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4)));
2445 # 441 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2446 extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
2447 __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
2449 extern int __xmknodat (int __ver, int __fd, const char *__path,
2450 __mode_t __mode, __dev_t *__dev)
2451 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5)));
2452 # 533 "/usr/include/i386-linux-gnu/sys/stat.h" 3 4
2454 # 308 "../../include/greatest.h" 2
2455 # 1 "/usr/include/fcntl.h" 1 3 4
2456 # 28 "/usr/include/fcntl.h" 3 4
2464 # 1 "/usr/include/i386-linux-gnu/bits/fcntl.h" 1 3 4
2465 # 35 "/usr/include/i386-linux-gnu/bits/fcntl.h" 3 4
2479 # 61 "/usr/include/i386-linux-gnu/bits/fcntl.h" 3 4
2480 # 1 "/usr/include/i386-linux-gnu/bits/fcntl-linux.h" 1 3 4
2481 # 363 "/usr/include/i386-linux-gnu/bits/fcntl-linux.h" 3 4
2483 # 437 "/usr/include/i386-linux-gnu/bits/fcntl-linux.h" 3 4
2485 # 61 "/usr/include/i386-linux-gnu/bits/fcntl.h" 2 3 4
2486 # 36 "/usr/include/fcntl.h" 2 3 4
2487 # 76 "/usr/include/fcntl.h" 3 4
2488 # 1 "/usr/include/time.h" 1 3 4
2489 # 77 "/usr/include/fcntl.h" 2 3 4
2490 # 1 "/usr/include/i386-linux-gnu/bits/stat.h" 1 3 4
2491 # 78 "/usr/include/fcntl.h" 2 3 4
2492 # 146 "/usr/include/fcntl.h" 3 4
2493 extern int fcntl (int __fd, int __cmd, ...);
2494 # 156 "/usr/include/fcntl.h" 3 4
2495 extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
2496 # 180 "/usr/include/fcntl.h" 3 4
2497 extern int openat (int __fd, const char *__file, int __oflag, ...)
2498 __attribute__ ((__nonnull__ (2)));
2499 # 202 "/usr/include/fcntl.h" 3 4
2500 extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));
2501 # 231 "/usr/include/fcntl.h" 3 4
2502 extern int lockf (int __fd, int __cmd, off_t __len);
2503 # 248 "/usr/include/fcntl.h" 3 4
2504 extern int posix_fadvise (int __fd, off_t __offset, off_t __len,
2505 int __advise) __attribute__ ((__nothrow__ , __leaf__));
2506 # 270 "/usr/include/fcntl.h" 3 4
2507 extern int posix_fallocate (int __fd, off_t __offset, off_t __len);
2508 # 292 "/usr/include/fcntl.h" 3 4
2510 # 309 "../../include/greatest.h" 2
2511 # 1 "/usr/include/unistd.h" 1 3 4
2512 # 27 "/usr/include/unistd.h" 3 4
2514 # 205 "/usr/include/unistd.h" 3 4
2515 # 1 "/usr/include/i386-linux-gnu/bits/posix_opt.h" 1 3 4
2516 # 206 "/usr/include/unistd.h" 2 3 4
2520 # 1 "/usr/include/i386-linux-gnu/bits/environments.h" 1 3 4
2521 # 22 "/usr/include/i386-linux-gnu/bits/environments.h" 3 4
2522 # 1 "/usr/include/i386-linux-gnu/bits/wordsize.h" 1 3 4
2523 # 23 "/usr/include/i386-linux-gnu/bits/environments.h" 2 3 4
2524 # 210 "/usr/include/unistd.h" 2 3 4
2525 # 229 "/usr/include/unistd.h" 3 4
2526 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
2527 # 230 "/usr/include/unistd.h" 2 3 4
2528 # 258 "/usr/include/unistd.h" 3 4
2529 typedef __useconds_t useconds_t;
2530 # 270 "/usr/include/unistd.h" 3 4
2531 typedef __intptr_t intptr_t;
2538 typedef __socklen_t socklen_t;
2539 # 290 "/usr/include/unistd.h" 3 4
2540 extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2541 # 307 "/usr/include/unistd.h" 3 4
2542 extern int faccessat (int __fd, const char *__file, int __type, int __flag)
2543 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) ;
2544 # 337 "/usr/include/unistd.h" 3 4
2545 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
2546 # 356 "/usr/include/unistd.h" 3 4
2547 extern int close (int __fd);
2554 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
2560 extern ssize_t write (int __fd, const void *__buf, size_t __n) ;
2561 # 379 "/usr/include/unistd.h" 3 4
2562 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
2570 extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
2572 # 420 "/usr/include/unistd.h" 3 4
2573 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) ;
2574 # 435 "/usr/include/unistd.h" 3 4
2575 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
2576 # 447 "/usr/include/unistd.h" 3 4
2577 extern unsigned int sleep (unsigned int __seconds);
2585 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
2586 __attribute__ ((__nothrow__ , __leaf__));
2593 extern int usleep (__useconds_t __useconds);
2594 # 472 "/usr/include/unistd.h" 3 4
2595 extern int pause (void);
2599 extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
2600 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
2604 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) ;
2609 extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
2610 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
2617 extern int fchownat (int __fd, const char *__file, __uid_t __owner,
2618 __gid_t __group, int __flag)
2619 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) ;
2623 extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
2627 extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) ;
2628 # 514 "/usr/include/unistd.h" 3 4
2629 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) ;
2630 # 528 "/usr/include/unistd.h" 3 4
2631 extern char *getwd (char *__buf)
2632 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
2637 extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) ;
2640 extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
2641 # 546 "/usr/include/unistd.h" 3 4
2642 extern char **__environ;
2650 extern int execve (const char *__path, char *const __argv[],
2651 char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2656 extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
2657 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2662 extern int execv (const char *__path, char *const __argv[])
2663 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2667 extern int execle (const char *__path, const char *__arg, ...)
2668 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2672 extern int execl (const char *__path, const char *__arg, ...)
2673 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2677 extern int execvp (const char *__file, char *const __argv[])
2678 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2683 extern int execlp (const char *__file, const char *__arg, ...)
2684 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2685 # 601 "/usr/include/unistd.h" 3 4
2686 extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) ;
2691 extern void _exit (int __status) __attribute__ ((__noreturn__));
2697 # 1 "/usr/include/i386-linux-gnu/bits/confname.h" 1 3 4
2698 # 24 "/usr/include/i386-linux-gnu/bits/confname.h" 3 4
2713 _PC_CHOWN_RESTRICTED,
2729 _PC_REC_INCR_XFER_SIZE,
2731 _PC_REC_MAX_XFER_SIZE,
2733 _PC_REC_MIN_XFER_SIZE,
2766 _SC_REALTIME_SIGNALS,
2768 _SC_PRIORITY_SCHEDULING,
2772 _SC_ASYNCHRONOUS_IO,
2776 _SC_SYNCHRONIZED_IO,
2786 _SC_MEMORY_PROTECTION,
2788 _SC_MESSAGE_PASSING,
2792 _SC_SHARED_MEMORY_OBJECTS,
2798 _SC_AIO_PRIO_DELTA_MAX,
2832 _SC_COLL_WEIGHTS_MAX,
2834 _SC_EQUIV_CLASS_MAX,
2842 _SC_CHARCLASS_NAME_MAX,
2876 _SC_IOV_MAX = _SC_UIO_MAXIOV,
2878 _SC_PII_INTERNET_STREAM,
2880 _SC_PII_INTERNET_DGRAM,
2894 _SC_THREAD_SAFE_FUNCTIONS,
2896 _SC_GETGR_R_SIZE_MAX,
2898 _SC_GETPW_R_SIZE_MAX,
2904 _SC_THREAD_DESTRUCTOR_ITERATIONS,
2906 _SC_THREAD_KEYS_MAX,
2908 _SC_THREAD_STACK_MIN,
2910 _SC_THREAD_THREADS_MAX,
2912 _SC_THREAD_ATTR_STACKADDR,
2914 _SC_THREAD_ATTR_STACKSIZE,
2916 _SC_THREAD_PRIORITY_SCHEDULING,
2918 _SC_THREAD_PRIO_INHERIT,
2920 _SC_THREAD_PRIO_PROTECT,
2922 _SC_THREAD_PROCESS_SHARED,
2925 _SC_NPROCESSORS_CONF,
2927 _SC_NPROCESSORS_ONLN,
2940 _SC_XOPEN_XCU_VERSION,
3015 _SC_XBS5_ILP32_OFF32,
3017 _SC_XBS5_ILP32_OFFBIG,
3019 _SC_XBS5_LP64_OFF64,
3021 _SC_XBS5_LPBIG_OFFBIG,
3028 _SC_XOPEN_REALTIME_THREADS,
3039 _SC_C_LANG_SUPPORT_R,
3041 _SC_CLOCK_SELECTION,
3049 _SC_DEVICE_SPECIFIC,
3051 _SC_DEVICE_SPECIFIC_R,
3059 _SC_FILE_ATTRIBUTES,
3065 _SC_MONOTONIC_CLOCK,
3073 _SC_READER_WRITER_LOCKS,
3087 _SC_SPORADIC_SERVER,
3089 _SC_THREAD_SPORADIC_SERVER,
3091 _SC_SYSTEM_DATABASE,
3093 _SC_SYSTEM_DATABASE_R,
3097 _SC_TYPED_MEMORY_OBJECTS,
3105 _SC_2_PBS_ACCOUNTING,
3117 _SC_2_PBS_CHECKPOINT,
3122 _SC_V6_ILP32_OFFBIG,
3126 _SC_V6_LPBIG_OFFBIG,
3133 _SC_TRACE_EVENT_FILTER,
3140 _SC_LEVEL1_ICACHE_SIZE,
3142 _SC_LEVEL1_ICACHE_ASSOC,
3144 _SC_LEVEL1_ICACHE_LINESIZE,
3146 _SC_LEVEL1_DCACHE_SIZE,
3148 _SC_LEVEL1_DCACHE_ASSOC,
3150 _SC_LEVEL1_DCACHE_LINESIZE,
3152 _SC_LEVEL2_CACHE_SIZE,
3154 _SC_LEVEL2_CACHE_ASSOC,
3156 _SC_LEVEL2_CACHE_LINESIZE,
3158 _SC_LEVEL3_CACHE_SIZE,
3160 _SC_LEVEL3_CACHE_ASSOC,
3162 _SC_LEVEL3_CACHE_LINESIZE,
3164 _SC_LEVEL4_CACHE_SIZE,
3166 _SC_LEVEL4_CACHE_ASSOC,
3168 _SC_LEVEL4_CACHE_LINESIZE,
3172 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
3179 _SC_V7_ILP32_OFFBIG,
3183 _SC_V7_LPBIG_OFFBIG,
3189 _SC_TRACE_EVENT_NAME_MAX,
3195 _SC_TRACE_USER_EVENT_MAX,
3201 _SC_THREAD_ROBUST_PRIO_INHERIT,
3203 _SC_THREAD_ROBUST_PRIO_PROTECT
3213 _CS_V6_WIDTH_RESTRICTED_ENVS,
3217 _CS_GNU_LIBC_VERSION,
3219 _CS_GNU_LIBPTHREAD_VERSION,
3222 _CS_V5_WIDTH_RESTRICTED_ENVS,
3226 _CS_V7_WIDTH_RESTRICTED_ENVS,
3230 _CS_LFS_CFLAGS = 1000,
3244 _CS_LFS64_LINTFLAGS,
3247 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
3249 _CS_XBS5_ILP32_OFF32_LDFLAGS,
3251 _CS_XBS5_ILP32_OFF32_LIBS,
3253 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
3255 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
3257 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
3259 _CS_XBS5_ILP32_OFFBIG_LIBS,
3261 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
3263 _CS_XBS5_LP64_OFF64_CFLAGS,
3265 _CS_XBS5_LP64_OFF64_LDFLAGS,
3267 _CS_XBS5_LP64_OFF64_LIBS,
3269 _CS_XBS5_LP64_OFF64_LINTFLAGS,
3271 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
3273 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
3275 _CS_XBS5_LPBIG_OFFBIG_LIBS,
3277 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
3280 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
3282 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
3284 _CS_POSIX_V6_ILP32_OFF32_LIBS,
3286 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
3288 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
3290 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
3292 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
3294 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
3296 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
3298 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
3300 _CS_POSIX_V6_LP64_OFF64_LIBS,
3302 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
3304 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
3306 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
3308 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
3310 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
3313 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
3315 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
3317 _CS_POSIX_V7_ILP32_OFF32_LIBS,
3319 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
3321 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
3323 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
3325 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
3327 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
3329 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
3331 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
3333 _CS_POSIX_V7_LP64_OFF64_LIBS,
3335 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
3337 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
3339 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
3341 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
3343 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
3351 # 613 "/usr/include/unistd.h" 2 3 4
3354 extern long int pathconf (const char *__path, int __name)
3355 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3358 extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
3361 extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
3365 extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
3370 extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
3373 extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
3376 extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
3379 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
3381 extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
3388 extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
3389 # 663 "/usr/include/unistd.h" 3 4
3390 extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
3397 extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
3401 extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
3405 extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
3408 extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
3411 extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
3414 extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
3419 extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) ;
3420 # 703 "/usr/include/unistd.h" 3 4
3421 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) ;
3426 extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) ;
3431 extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) ;
3438 extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) ;
3443 extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) ;
3448 extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) ;
3449 # 759 "/usr/include/unistd.h" 3 4
3450 extern __pid_t fork (void) __attribute__ ((__nothrow__));
3458 extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
3464 extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
3468 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
3469 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) ;
3473 extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
3479 extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
3484 extern int link (const char *__from, const char *__to)
3485 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) ;
3490 extern int linkat (int __fromfd, const char *__from, int __tofd,
3491 const char *__to, int __flags)
3492 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) ;
3497 extern int symlink (const char *__from, const char *__to)
3498 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) ;
3503 extern ssize_t readlink (const char *__restrict __path,
3504 char *__restrict __buf, size_t __len)
3505 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) ;
3510 extern int symlinkat (const char *__from, int __tofd,
3511 const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) ;
3514 extern ssize_t readlinkat (int __fd, const char *__restrict __path,
3515 char *__restrict __buf, size_t __len)
3516 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) ;
3520 extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3524 extern int unlinkat (int __fd, const char *__name, int __flag)
3525 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3529 extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3533 extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
3536 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
3543 extern char *getlogin (void);
3551 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
3556 extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3557 # 874 "/usr/include/unistd.h" 3 4
3558 # 1 "/usr/include/getopt.h" 1 3 4
3559 # 57 "/usr/include/getopt.h" 3 4
3560 extern char *optarg;
3561 # 71 "/usr/include/getopt.h" 3 4
3572 # 150 "/usr/include/getopt.h" 3 4
3573 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
3574 __attribute__ ((__nothrow__ , __leaf__));
3575 # 875 "/usr/include/unistd.h" 2 3 4
3583 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3590 extern int sethostname (const char *__name, size_t __len)
3591 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
3595 extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) ;
3601 extern int getdomainname (char *__name, size_t __len)
3602 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
3603 extern int setdomainname (const char *__name, size_t __len)
3604 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
3610 extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
3613 extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
3621 extern int profil (unsigned short int *__sample_buffer, size_t __size,
3622 size_t __offset, unsigned int __scale)
3623 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3629 extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
3633 extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
3634 extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
3635 extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
3641 extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) ;
3648 extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
3652 extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
3660 extern int fsync (int __fd);
3661 # 972 "/usr/include/unistd.h" 3 4
3662 extern long int gethostid (void);
3665 extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
3671 extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3676 extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
3677 # 996 "/usr/include/unistd.h" 3 4
3678 extern int truncate (const char *__file, __off_t __length)
3679 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ;
3680 # 1019 "/usr/include/unistd.h" 3 4
3681 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) ;
3682 # 1040 "/usr/include/unistd.h" 3 4
3683 extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) ;
3689 extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
3690 # 1061 "/usr/include/unistd.h" 3 4
3691 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
3692 # 1115 "/usr/include/unistd.h" 3 4
3693 extern int fdatasync (int __fildes);
3694 # 1154 "/usr/include/unistd.h" 3 4
3696 # 310 "../../include/greatest.h" 2
3697 # 1 "/usr/include/errno.h" 1 3 4
3698 # 31 "/usr/include/errno.h" 3 4
3703 # 1 "/usr/include/i386-linux-gnu/bits/errno.h" 1 3 4
3704 # 24 "/usr/include/i386-linux-gnu/bits/errno.h" 3 4
3705 # 1 "/usr/include/linux/errno.h" 1 3 4
3706 # 1 "/usr/include/i386-linux-gnu/asm/errno.h" 1 3 4
3707 # 1 "/usr/include/asm-generic/errno.h" 1 3 4
3711 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
3712 # 5 "/usr/include/asm-generic/errno.h" 2 3 4
3713 # 1 "/usr/include/i386-linux-gnu/asm/errno.h" 2 3 4
3714 # 1 "/usr/include/linux/errno.h" 2 3 4
3715 # 25 "/usr/include/i386-linux-gnu/bits/errno.h" 2 3 4
3716 # 50 "/usr/include/i386-linux-gnu/bits/errno.h" 3 4
3717 extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3718 # 36 "/usr/include/errno.h" 2 3 4
3719 # 58 "/usr/include/errno.h" 3 4
3721 # 311 "../../include/greatest.h" 2
3722 # 400 "../../include/greatest.h"
3723 # 1 "/usr/include/time.h" 1 3 4
3724 # 29 "/usr/include/time.h" 3 4
3733 # 1 "/usr/lib/gcc/i686-linux-gnu/5/include/stddef.h" 1 3 4
3734 # 38 "/usr/include/time.h" 2 3 4
3738 # 1 "/usr/include/i386-linux-gnu/bits/time.h" 1 3 4
3739 # 42 "/usr/include/time.h" 2 3 4
3740 # 131 "/usr/include/time.h" 3 4
3757 const char *tm_zone;
3773 struct timespec it_interval;
3774 struct timespec it_value;
3779 # 186 "/usr/include/time.h" 3 4
3783 extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
3786 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3789 extern double difftime (time_t __time1, time_t __time0)
3790 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3793 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3799 extern size_t strftime (char *__restrict __s, size_t __maxsize,
3800 const char *__restrict __format,
3801 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3803 # 223 "/usr/include/time.h" 3 4
3804 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
3805 const char *__restrict __format,
3806 const struct tm *__restrict __tp,
3807 __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
3808 # 236 "/usr/include/time.h" 3 4
3812 extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3816 extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3822 extern struct tm *gmtime_r (const time_t *__restrict __timer,
3823 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3827 extern struct tm *localtime_r (const time_t *__restrict __timer,
3828 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
3834 extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3837 extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
3845 extern char *asctime_r (const struct tm *__restrict __tp,
3846 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
3849 extern char *ctime_r (const time_t *__restrict __timer,
3850 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
3855 extern char *__tzname[2];
3856 extern int __daylight;
3857 extern long int __timezone;
3862 extern char *tzname[2];
3866 extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
3870 extern int daylight;
3871 extern long int timezone;
3877 extern int stime (const time_t *__when) __attribute__ ((__nothrow__ , __leaf__));
3878 # 319 "/usr/include/time.h" 3 4
3879 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3882 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
3885 extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3886 # 334 "/usr/include/time.h" 3 4
3887 extern int nanosleep (const struct timespec *__requested_time,
3888 struct timespec *__remaining);
3892 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
3895 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
3898 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
3899 __attribute__ ((__nothrow__ , __leaf__));
3906 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
3907 const struct timespec *__req,
3908 struct timespec *__rem);
3911 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
3916 extern int timer_create (clockid_t __clock_id,
3917 struct sigevent *__restrict __evp,
3918 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
3921 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
3924 extern int timer_settime (timer_t __timerid, int __flags,
3925 const struct itimerspec *__restrict __value,
3926 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
3929 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
3930 __attribute__ ((__nothrow__ , __leaf__));
3933 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
3939 extern int timespec_get (struct timespec *__ts, int __base)
3940 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
3941 # 430 "/usr/include/time.h" 3 4
3943 # 401 "../../include/greatest.h" 2
3944 # 420 "../../include/greatest.h"
3946 # 420 "../../include/greatest.h"
3947 typedef struct greatest_suite_info {
3948 unsigned int tests_run;
3949 unsigned int passed;
3950 unsigned int failed;
3951 unsigned int skipped;
3960 } greatest_suite_info;
3963 typedef void greatest_suite_cb(void);
3967 typedef void greatest_enter_cb(void *udata);
3968 typedef void greatest_exit_cb(void *udata);
3973 typedef int greatest_equal_cb(const void *expd, const void *got, void *udata);
3978 typedef int greatest_printf_cb(const void *t, void *udata);
3982 typedef struct greatest_type_info {
3983 greatest_equal_cb *equal;
3984 greatest_printf_cb *print;
3985 } greatest_type_info;
3987 typedef struct greatest_memory_cmp_env {
3988 const unsigned char *exp;
3989 const unsigned char *got;
3991 } greatest_memory_cmp_env;
3994 extern greatest_type_info greatest_type_info_string;
3995 extern greatest_type_info greatest_type_info_memory;
3998 GREATEST_FLAG_FIRST_FAIL = 0x01,
3999 GREATEST_FLAG_LIST_ONLY = 0x02,
4000 GREATEST_FLAG_ABORT_ON_FAIL = 0x04
4004 struct greatest_prng {
4005 unsigned char random_order;
4006 unsigned char initialized;
4007 unsigned char pad_0[6];
4008 unsigned long state;
4009 unsigned long count;
4010 unsigned long count_ceil;
4011 unsigned long count_run;
4018 typedef struct greatest_run_info {
4019 unsigned char flags;
4020 unsigned char verbosity;
4021 unsigned char running_test;
4022 unsigned char exact_name_match;
4024 unsigned int tests_run;
4027 greatest_suite_info suite;
4030 unsigned int passed;
4031 unsigned int failed;
4032 unsigned int skipped;
4033 unsigned int assertions;
4036 unsigned int fail_line;
4038 const char *fail_file;
4042 greatest_enter_cb *enter;
4044 greatest_exit_cb *exit;
4052 const char *suite_filter;
4053 const char *test_filter;
4054 const char *test_exclude;
4055 const char *name_suffix;
4058 struct greatest_prng prng[2];
4071 } greatest_run_info;
4073 struct greatest_report_t {
4075 unsigned int passed;
4076 unsigned int failed;
4077 unsigned int skipped;
4078 unsigned int assertions;
4083 extern greatest_run_info greatest_info;
4086 typedef const char *greatest_enum_str_fun(int value);
4090 typedef struct __tag_greatest_test_item greatest_test_item;
4092 typedef enum greatest_test_res (*TEST_ITEM_PROC)(greatest_test_item* ti, ...);
4094 typedef struct __tag_greatest_test_item
4097 TEST_ITEM_PROC func;
4099 } greatest_test_item, *pgreatest_test_item;
4101 typedef greatest_test_item *greatest_test_item_array[0];
4103 typedef struct __tag_greatest_test_unit
4107 greatest_test_item_array *itemarray;
4111 greatest_enter_cb *enter;
4113 greatest_exit_cb *exit;
4115 } greatest_test_unit, *pgreatest_test_unit;
4120 extern greatest_test_unit __start_TEST_UNIT_LIST;
4121 extern greatest_test_unit __stop_TEST_UNIT_LIST;
4122 extern const char __start_TEST_ITEM_LIST;
4123 extern const char __stop_TEST_ITEM_LIST;
4124 # 610 "../../include/greatest.h"
4125 extern int greatest_test_pre(const char *name);
4126 extern void greatest_test_post(int res);
4127 extern int greatest_do_assert_equal_t(const void *expd, const void *got,
4128 greatest_type_info *type_info, void *udata);
4129 extern void greatest_prng_init_first_pass(int id);
4130 extern int greatest_prng_init_second_pass(int id, unsigned long seed);
4131 extern void greatest_prng_step(int id);
4134 extern void GREATEST_SET_ENTER_CB(greatest_enter_cb *cb, void *udata);
4135 extern void GREATEST_SET_EXIT_CB(greatest_exit_cb *cb, void *udata);
4136 extern void GREATEST_INIT(void);
4137 extern void GREATEST_PRINT_REPORT(void);
4138 extern int greatest_all_passed(void);
4139 extern void greatest_set_suite_filter(const char *filter);
4140 extern void greatest_set_test_filter(const char *filter);
4141 extern void greatest_set_test_exclude(const char *filter);
4142 extern void greatest_set_exact_name_match(void);
4143 extern void greatest_stop_at_first_fail(void);
4144 extern void greatest_abort_on_fail(void);
4145 extern void greatest_list_only(void);
4146 extern void greatest_get_report(struct greatest_report_t *report);
4147 extern unsigned int greatest_get_verbosity(void);
4148 extern void greatest_set_verbosity(unsigned int verbosity);
4149 extern void greatest_set_flag(greatest_flag_t flag);
4150 extern void greatest_set_test_suffix(const char *suffix);
4152 extern void GREATEST_ALIVE(int roll);
4153 extern void GREATEST_RUN_TEST_ITEM (greatest_test_item *item);
4154 extern void GREATEST_RUN_TEST_UNIT (greatest_test_unit *unit);
4155 extern void GREATEST_RUN_TEST_SUITE (const char *suite_name);
4158 extern int istdforce;
4159 extern FILE * fdnull;
4160 extern FILE * logfile;
4161 extern FILE * fdalive;
4162 extern FILE * fdclkinfo;
4163 extern FILE * fdforce;
4164 extern FILE * fddbgout;
4165 extern char fstdout[256];
4166 extern char * strlogfile;
4167 extern char * fdbgout;
4168 extern int alive_interval;
4169 # 684 "../../include/greatest.h"
4170 typedef enum greatest_test_res {
4171 GREATEST_TEST_RES_PASS = 0,
4172 GREATEST_TEST_RES_FAIL = -1,
4173 GREATEST_TEST_RES_SKIP = 1
4174 } greatest_test_res;
4177 static void enter_a_cb(void *data) {
4178 fprintf(logfile,"enter callback for each test case\n");
4181 static void exit_a_cb(void *data) {
4182 fprintf(logfile,"exit callback for each test case\n");
4188 __attribute__((section("TEST_ITEM_LIST"))) static const void * pvUnitFlagTestAExampleUnit1Pause = (void *)0x12345678;; __attribute__((section("TEST_UNIT_LIST"))) greatest_test_unit stTestUnitTestAExampleUnit1 = { "TestAExampleUnit1",
4193 , (greatest_test_item_array *)&pvUnitFlagTestAExampleUnit1Pause, "test A example unit 1.", enter_a_cb,
4201 , }; static int greatest_flag=-1; static int greatest_cmpflag=0; int istdforce = -1; FILE * fdnull =
4213 ; FILE * fdclkinfo =
4225 ; char fstdout[256]; char * strlogfile =
4229 ; char * fdbgout = "/tmp/unittest.dbgout"; int alive_interval = 1000; static int greatest_name_match(const char *name, const char *filter, int res_if_none) { size_t offset = 0; size_t filter_len = filter ? strlen(filter) : 0; if (filter_len == 0) { return res_if_none; } if (greatest_info.exact_name_match && strlen(name) != filter_len) { return 0; } while (name[offset] != '\0') { if (name[offset] == filter[0]) { if (0 == strncmp(&name[offset], filter, filter_len)) { return 1; } } offset++; } return 0; } static void greatest_buffer_test_name(const char *name) { struct greatest_run_info *g = &greatest_info; size_t len = strlen(name), size = sizeof(g->name_buf); memset(g->name_buf, 0x00, size); (void)strncat(g->name_buf, name, size - 1); if (g->name_suffix && (len + 1 < size)) { g->name_buf[len] = '_'; strncat(&g->name_buf[len+1], g->name_suffix, size-(len+2)); } } int greatest_test_pre(const char *name) { struct greatest_run_info *g = &greatest_info; int match; greatest_buffer_test_name(name); match = greatest_name_match(g->name_buf, g->test_filter, 1) && !greatest_name_match(g->name_buf, g->test_exclude, 0); if ((greatest_info.flags & GREATEST_FLAG_LIST_ONLY)) { if (match) { fprintf(
4233 , " %s\n", g->name_buf); } goto clear; } if (match && (!(greatest_info.flags & GREATEST_FLAG_FIRST_FAIL) || g->suite.failed == 0)) { struct greatest_prng *p = &g->prng[1]; if (p->random_order) { p->count++; if (!p->initialized || ((p->count - 1) != p->state)) { goto clear; } } if (g->running_test) { fprintf(
4237 , "Error: Test run inside another test.\n"); return 0; } g->suite.pre_test = clock(); if (g->suite.pre_test == (clock_t) -1) { fprintf(
4241 , "clock error: %s\n", "g->suite.pre_test"); exit(
4245 ); }; if (g->enter) { g->enter(g->enter_udata); } p->count_run++; g->running_test = 1; return 1; } else { goto clear; } clear: g->name_suffix =
4249 ; return 0; } static void greatest_do_pass(void) { struct greatest_run_info *g = &greatest_info; fprintf(logfile,"OK %s: %s", g->name_buf, g->msg ? g->msg : ""); if (((greatest_info.verbosity) > 0)) { fprintf(
4253 , "OK %s: %s", g->name_buf, g->msg ? g->msg : ""); } else if (strlogfile != fstdout) { if (greatest_flag) fprintf(
4257 , "."); else fprintf(
4261 , "\033[1m.\033[0m"); } g->suite.passed++; } static void greatest_do_fail(void) { struct greatest_run_info *g = &greatest_info; fprintf(logfile,"FAIL %s: %s (%s:%u)", g->name_buf, g->msg ? g->msg : "", g->fail_file, g->fail_line); if (((greatest_info.verbosity) > 0)) { fprintf(
4265 , "FAIL %s: %s (%s:%u)", g->name_buf, g->msg ? g->msg : "", g->fail_file, g->fail_line); } else if (strlogfile != fstdout) { fprintf(
4269 , "\033[31mF\033[0m"); } g->suite.failed++; } static void greatest_do_skip(void) { struct greatest_run_info *g = &greatest_info; fprintf(logfile,"SKIP %s: %s", g->name_buf, g->msg ? g->msg : ""); if (((greatest_info.verbosity) > 0)) { fprintf(
4273 , "SKIP %s: %s", g->name_buf, g->msg ? g->msg : ""); } else if (strlogfile != fstdout) { if (greatest_flag) fprintf(
4277 , "s"); else fprintf(
4281 , "\033[1ms\033[0m"); } g->suite.skipped++; } void greatest_test_post(int res) { greatest_info.suite.post_test = clock(); if (greatest_info.suite.post_test == (clock_t) -1) { fprintf(
4285 , "clock error: %s\n", "greatest_info.suite.post_test"); exit(
4289 ); }; if (greatest_info.exit) { void *udata = greatest_info.exit_udata; greatest_info.exit(udata); } fprintf(logfile,"T%03d: ", greatest_info.suite.tests_run); if (((greatest_info.verbosity) > 0)) { fprintf(
4293 , "%03d: ", greatest_info.suite.tests_run); } greatest_info.running_test = 0; if (res <= GREATEST_TEST_RES_FAIL) { greatest_do_fail(); } else if (res >= GREATEST_TEST_RES_SKIP) { greatest_do_skip(); } else if (res == GREATEST_TEST_RES_PASS) { greatest_do_pass(); } greatest_info.name_suffix =
4297 ; greatest_info.suite.tests_run++; greatest_info.col++; fprintf(fdclkinfo, " (%lu ticks, %.3f sec)", (long unsigned int) (greatest_info.suite.post_test) - (long unsigned int)(greatest_info.suite.pre_test), (double)((greatest_info.suite.post_test) - (greatest_info.suite.pre_test)) / (1.0 * (double)
4301 )); fprintf(logfile,"\n"); if (((greatest_info.verbosity) > 0)) { fprintf(
4305 , " (%lu ticks, %.3f sec)", (long unsigned int) (greatest_info.suite.post_test) - (long unsigned int)(greatest_info.suite.pre_test), (double)((greatest_info.suite.post_test) - (greatest_info.suite.pre_test)) / (1.0 * (double)
4313 , "\n"); } else if (greatest_info.col % 10 == 0) { fprintf(
4317 , " "); if (greatest_info.col % 50 == 0) { greatest_info.row++; fprintf(
4321 , "\n%03d ", greatest_info.row);; greatest_info.col = 0; } } fflush(
4325 ); } static void report_suite(void) { if (greatest_info.suite.tests_run > 0) { fprintf(
4329 , "\n%u test%s - %u ok, %u failed, %u skipped", greatest_info.suite.tests_run, greatest_info.suite.tests_run == 1 ? "" : "s", greatest_info.suite.passed, greatest_info.suite.failed, greatest_info.suite.skipped); if (((greatest_info.verbosity) > 0)) { fprintf(
4333 , " (%lu ticks, %.3f sec)", (long unsigned int) (greatest_info.suite.post_suite) - (long unsigned int)(greatest_info.suite.pre_suite), (double)((greatest_info.suite.post_suite) - (greatest_info.suite.pre_suite)) / (1.0 * (double)
4341 , "\n"); } } static void update_counts_and_reset_suite(void) { greatest_info.enter =
4345 ; greatest_info.enter_udata =
4349 ; greatest_info.exit =
4353 ; greatest_info.exit_udata =
4357 ; greatest_info.passed += greatest_info.suite.passed; greatest_info.failed += greatest_info.suite.failed; greatest_info.skipped += greatest_info.suite.skipped; greatest_info.tests_run += greatest_info.suite.tests_run; memset(&greatest_info.suite, 0, sizeof(greatest_info.suite)); greatest_info.col = 0; greatest_info.row = 0; } static int greatest_suite_pre(const char *suite_name) { struct greatest_prng *p = &greatest_info.prng[0]; if (!greatest_name_match(suite_name, greatest_info.suite_filter, 1) || (((greatest_info.flags & GREATEST_FLAG_FIRST_FAIL) && (greatest_info.suite.failed > 0 || greatest_info.failed > 0)))) { return 0; } if (p->random_order) { p->count++; if (!p->initialized || ((p->count - 1) != p->state)) { return 0; } } p->count_run++; update_counts_and_reset_suite(); fprintf(
4361 , "\n* Suite %s:\n", suite_name); greatest_info.suite.pre_suite = clock(); if (greatest_info.suite.pre_suite == (clock_t) -1) { fprintf(
4365 , "clock error: %s\n", "greatest_info.suite.pre_suite"); exit(
4369 ); }; return 1; } static void greatest_suite_post(void) { greatest_info.suite.post_suite = clock(); if (greatest_info.suite.post_suite == (clock_t) -1) { fprintf(
4373 , "clock error: %s\n", "greatest_info.suite.post_suite"); exit(
4377 ); }; report_suite(); } static void greatest_run_suite(greatest_suite_cb *suite_cb, const char *suite_name) { if (greatest_suite_pre(suite_name)) { suite_cb(); greatest_suite_post(); } } int greatest_do_assert_equal_t(const void *expd, const void *got, greatest_type_info *type_info, void *udata) { int eq = 0; if (type_info ==
4381 || type_info->equal ==
4385 ) { return 0; } eq = type_info->equal(expd, got, udata); if (!eq) { if (type_info->print !=
4393 , "\nExpected: "); (void)type_info->print(expd, udata); fprintf(
4397 , "\n Got: "); (void)type_info->print(got, udata); fprintf(
4401 , "\n"); } } return eq; } static void greatest_usage(const char *name) { fprintf(
4405 , "Usage: %s [-hlfavex] [-s SUITE] [-t TEST] [-x EXCLUDE]\n" " -h, --help print this Help\n" " -l List suites and tests, then exit (dry run)\n" " -f Stop runner after first failure\n" " -a Abort on first failure (implies -f)\n" " -L LOGFILE output to log file.\n" " -g log gen mode, specify -L exeitem.log.\n" " -c txt comparing mode, specify -L exeitem.log.\n" " -u fd for GREATEST_SCR_INFO(). if stdout/stderr\n" " are redirected.\n" " -V user(developer) verbose standard output\n" " -v Verbose output\n" " -s SUITE only run suites containing substring SUITE\n" " -t TEST only run tests containing substring TEST\n" " -e only run exact name match for -s or -t\n" " -x EXCLUDE exclude tests containing substring EXCLUDE\n", name); } static void greatest_parse_options(int argc, char **argv) { int i = 0; for (i = 1; i < argc; i++) { if (argv[i][0] == '-') { char f = argv[i][1]; if ((f == 's' || f == 't' || f == 'x' || f == 'u' || f == 'L') && argc <= i + 1) { greatest_usage(argv[0]); exit(
4409 ); } switch (f) { case 's': greatest_set_suite_filter(argv[i + 1]); i++; break; case 't': greatest_set_test_filter(argv[i + 1]); i++; break; case 'x': greatest_set_test_exclude(argv[i + 1]); i++; break; case 'e': greatest_set_exact_name_match(); break; case 'f': greatest_stop_at_first_fail(); break; case 'a': greatest_abort_on_fail(); break; case 'l': greatest_list_only(); break; case 'L': strlogfile=argv[i + 1]; break; case 'u': istdforce=atoi(argv[i + 1]); break; case 'g': greatest_cmpflag=1; break; case 'c': greatest_cmpflag=2; break; case 'V': strlogfile=(char *)-1; break; case 'v': greatest_info.verbosity++; break; case 'h': greatest_usage(argv[0]); exit(
4413 ); default: case '-': if (0 == strncmp("--help", argv[i], 6)) { greatest_usage(argv[0]); exit(
4417 ); } else if (0 == strcmp("--", argv[i])) { return; } fprintf(
4421 , "Unknown argument '%s'\n", argv[i]); greatest_usage(argv[0]); exit(
4425 ); } } } } int greatest_all_passed(void) { return (greatest_info.failed == 0); } void greatest_set_test_filter(const char *filter) { greatest_info.test_filter = filter; } void greatest_set_test_exclude(const char *filter) { greatest_info.test_exclude = filter; } void greatest_set_suite_filter(const char *filter) { greatest_info.suite_filter = filter; } void greatest_set_exact_name_match(void) { greatest_info.exact_name_match = 1; } void greatest_stop_at_first_fail(void) { greatest_set_flag(GREATEST_FLAG_FIRST_FAIL); } void greatest_abort_on_fail(void) { greatest_set_flag(GREATEST_FLAG_ABORT_ON_FAIL); } void greatest_list_only(void) { greatest_set_flag(GREATEST_FLAG_LIST_ONLY); } void greatest_get_report(struct greatest_report_t *report) { if (report) { report->passed = greatest_info.passed; report->failed = greatest_info.failed; report->skipped = greatest_info.skipped; report->assertions = greatest_info.assertions; } } unsigned int greatest_get_verbosity(void) { return greatest_info.verbosity; } void greatest_set_verbosity(unsigned int verbosity) { greatest_info.verbosity = (unsigned char)verbosity; } void greatest_set_flag(greatest_flag_t flag) { greatest_info.flags = (unsigned char)(greatest_info.flags | flag); } void greatest_set_test_suffix(const char *suffix) { greatest_info.name_suffix = suffix; } void GREATEST_SET_ENTER_CB(greatest_enter_cb *cb, void *udata) { greatest_info.enter = cb; greatest_info.enter_udata = udata; } void GREATEST_SET_EXIT_CB(greatest_exit_cb *cb, void *udata) { greatest_info.exit = cb; greatest_info.exit_udata = udata; } static int greatest_string_equal_cb(const void *expd, const void *got, void *udata) { size_t *size = (size_t *)udata; return (size !=
4429 ? (0 == strncmp((const char *)expd, (const char *)got, *size)) : (0 == strcmp((const char *)expd, (const char *)got))); } static int greatest_string_printf_cb(const void *t, void *udata) { (void)udata; return fprintf(
4433 , "%s", (const char *)t); } greatest_type_info greatest_type_info_string = { greatest_string_equal_cb, greatest_string_printf_cb, }; static int greatest_memory_equal_cb(const void *expd, const void *got, void *udata) { greatest_memory_cmp_env *env = (greatest_memory_cmp_env *)udata; return (0 == memcmp(expd, got, env->size)); } static int greatest_memory_printf_cb(const void *t, void *udata) { greatest_memory_cmp_env *env = (greatest_memory_cmp_env *)udata; const unsigned char *buf = (const unsigned char *)t; unsigned char diff_mark = ' '; FILE *out =
4437 ; size_t i, line_i, line_len = 0; int len = 0; for (i = 0; i < env->size; i+= line_len) { diff_mark = ' '; line_len = env->size - i; if (line_len > 16) { line_len = 16; } for (line_i = i; line_i < i + line_len; line_i++) { if (env->exp[line_i] != env->got[line_i]) diff_mark = 'X'; } len += fprintf(out, "\n%04x %c ", (unsigned int)i, diff_mark); for (line_i = i; line_i < i + line_len; line_i++) { int m = env->exp[line_i] == env->got[line_i]; len += fprintf(out, "%02x%c", buf[line_i], m ? ' ' : '<'); } for (line_i = 0; line_i < 16 - line_len; line_i++) { len += fprintf(out, " "); } fprintf(out, " "); for (line_i = i; line_i < i + line_len; line_i++) { unsigned char c = buf[line_i]; len += fprintf(out, "%c",
4439 ((*__ctype_b_loc ())[(int) ((
4443 ))] & (unsigned short int) _ISprint)
4445 ? c : '.'); } } len += fprintf(out, "\n"); return len; } void greatest_prng_init_first_pass(int id) { greatest_info.prng[id].random_order = 1; greatest_info.prng[id].count_run = 0; } int greatest_prng_init_second_pass(int id, unsigned long seed) { struct greatest_prng *p = &greatest_info.prng[id]; if (p->count == 0) { return 0; } p->count_ceil = p->count; for (p->m = 1; p->m < p->count; p->m <<= 1) {} p->state = seed & 0x1fffffff; p->a = 4LU * p->state; p->a = (p->a ? p->a : 4) | 1; p->c = 2147483647; p->initialized = 1; fprintf(
4449 , "init_second_pass: a %lu, c %lu, state %lu\n", p->a, p->c, p->state); return 1; } void greatest_prng_step(int id) { struct greatest_prng *p = &greatest_info.prng[id]; do { p->state = ((p->a * p->state) + p->c) & (p->m - 1); } while (p->state >= p->count_ceil); } static const char *stdout_diff_script="\n" "stdout_diff ()\n" "{\n" " #\n" " # read standard log info exeitemfull.stdout, to get exeitem.stdout by name.\n" " #\n" " name=$1\n" " HEADSTR=\"#@ ITEM $name HEAD t31nMG7Kt1u2aUWmWnydXdbo7LaClh\"\n" " TAILSTR=\"#@ ITEM $name TAIL Sh4Bwj46EX1R1RhI7x5DFZOWcKW6hB\"\n" " cat exeitemfull.stdout 2>/dev/null | \n" " grep -A1000000 \"${HEADSTR}\" | \n" " grep -B1000000 \"${TAILSTR}\" > exeitem.stdout\n" " #cp exeitem.stdout \"$name\".stdout \n" "\n" " test ! -e exeitem.stdout && return -1\n" " diff exeitem.log exeitem.stdout > exeitem.diff\n" " #cp exeitem.diff \"$name\".diff\n" "\n" " #\n" " # append content of exeitem.log to exeitemfull.log.\n" " #\n" " if test ! -s exeitem.diff || test \"$2\" = 1; then\n" " echo \"#@\" >> exeitemfull.log\n" " cat exeitem.log >> exeitemfull.log\n" " echo \"#@\" >> exeitemfull.log\n" " return 0\n" " fi\n" " return 1\n" "}\n"; static int greatest_log_diff (int res, char *name) { char cmdbuff[1024]; char cmdstr[256]; if (strcmp(strlogfile, "/dev/null") == 0) return 0; fclose(logfile); strcpy(cmdbuff, stdout_diff_script); sprintf(cmdstr, "\nstdout_diff %s %i\n", name, greatest_cmpflag); strcat(cmdbuff, cmdstr); fdclkinfo = fdnull; logfile=fdnull; if (system(cmdbuff) != 0) { do { greatest_info.fail_file =
4454 ; greatest_info.fail_line =
4459 ; greatest_info.msg =
4463 ; if ((greatest_info.flags & GREATEST_FLAG_ABORT_ON_FAIL)) { abort(); } return GREATEST_TEST_RES_FAIL; } while (0); } return res; } static void greatest_log_reopen (void) { if ((logfile=fopen(strlogfile, "w+")) ==
4471 , "file (%s) can'nt be opened (errno=%d).", strlogfile,
4473 (*__errno_location ())
4479 ); } fdclkinfo = logfile; if (strlogfile == fstdout) fdclkinfo = fdnull; } static void greatest_head_info (char *name) { fprintf(logfile,"#@ ITEM %s HEAD t31nMG7Kt1u2aUWmWnydXdbo7LaClh\n", name); fprintf(logfile,"#@\n"); } static void greatest_tail_info (char *name) { fprintf(logfile,"#@\n"); fprintf(logfile,"#@ ITEM %s TAIL Sh4Bwj46EX1R1RhI7x5DFZOWcKW6hB\n", name); } static void greatest_init_scr_dbgout (void) { fdforce = fdnull; if (istdforce == -1) return; if (fstdout[0] == '/' && fstdout[1] == 'd' && fstdout[2] == 'e' && fstdout[3] == 'v') return; char fdname[512]; char fname[512]; sprintf(fdname, "/proc/self/fd/%d", istdforce); if (readlink(fdname, fname, sizeof(fname)) == 0) { fprintf(
4483 , "readlink(/proc/self/fd/1) err."); exit(
4487 ); } if (!(fname[0] == '/' && fname[1] == 'd' && fname[2] == 'e' && fname[3] == 'v')) return; fdforce = fdopen(istdforce, "w+"); if (fdforce ==
4491 ) fdforce = fdnull; return; } static int greatest_is_stderr_dev (void) { char fname[512]; if (readlink("/proc/self/fd/2", fname, sizeof(fname)) == 0) { fprintf(
4495 , "readlink(/proc/self/fd/1) err."); exit(
4499 ); } if (fname[0] == '/' && fname[1] == 'd' && fname[2] == 'e' && fname[3] == 'v') return 1; return 0; } static void greatest_init_teststdout (void) { do { if (readlink("/proc/self/fd/1", fstdout, sizeof(fstdout)) == 0) { fprintf(
4503 , "readlink(/proc/self/fd/1) err."); exit(
4507 ); } } while (0); if ((fdnull=fopen("/dev/null", "w+")) ==
4515 , "file (%s) can'nt be opened (errno=%d).", "/dev/null",
4517 (*__errno_location ())
4527 ) fdbgout = "/dev/null"; else if (fdbgout == (char *)-1) fdbgout = "/dev/null"; if ((fddbgout=fopen(fdbgout, "w+")) ==
4535 , "file (%s) can'nt be opened (errno=%d).", fdbgout,
4537 (*__errno_location ())
4543 ); } if (strlogfile ==
4547 ) strlogfile = "/dev/null"; else if (strlogfile == (char *)-1) strlogfile = fstdout; if ((logfile=fopen(strlogfile, "w+")) ==
4555 , "file (%s) can'nt be opened (errno=%d).", strlogfile,
4557 (*__errno_location ())
4563 ); } fdclkinfo = logfile; if (strlogfile == fstdout) fdclkinfo = fdnull; if (greatest_is_stderr_dev()) fdalive =
4567 ; else fdalive = fdnull; greatest_init_scr_dbgout(); if (system("truncate -s 0 exeitemfull.log") != 0) fprintf(
4571 , "[warn] truncate exeitemfull.log to zero failed.\n"); } void GREATEST_SAVE_POS(void) { int ret = system("tput sc"); } void GREATEST_RESTORE_POS(void) { int ret = system("tput rc"); } void GREATEST_ALIVE(int roll) { static int j = 0; static int cnt = 0; if (roll < 0) { cnt = 0; j = 0; fprintf(fdalive, " "); return; } else if (roll == 0) { cnt = 0; j = 0; fprintf(fdalive, "\033[1D \033[1D"); return; } if (j) { j--; return; } else j = alive_interval; if (cnt == 0) fprintf(fdalive, "\033[1D/"); else if (cnt == 1) fprintf(fdalive, "\033[1D-"); else if (cnt == 2) fprintf(fdalive, "\033[1D\\"); if (cnt) cnt--; else cnt = 2; } void GREATEST_INIT(void) { (void)greatest_run_suite; (void)greatest_parse_options; (void)greatest_prng_step; (void)greatest_prng_init_first_pass; (void)greatest_prng_init_second_pass; (void)greatest_set_test_suffix; memset(&greatest_info, 0, sizeof(greatest_info)); greatest_info.begin = clock(); if (greatest_info.begin == (clock_t) -1) { fprintf(
4575 , "clock error: %s\n", "greatest_info.begin"); exit(
4579 ); }; } void GREATEST_PRINT_REPORT(void) { if (!(greatest_info.flags & GREATEST_FLAG_LIST_ONLY)) { update_counts_and_reset_suite(); greatest_info.end = clock(); if (greatest_info.end == (clock_t) -1) { fprintf(
4583 , "clock error: %s\n", "greatest_info.end"); exit(
4591 , "\nTotal: %u test%s", greatest_info.tests_run, greatest_info.tests_run == 1 ? "" : "s"); if (((greatest_info.verbosity) > 0)) { fprintf(
4595 , " (%lu ticks, %.3f sec)", (long unsigned int) (greatest_info.end) - (long unsigned int)(greatest_info.begin), (double)((greatest_info.end) - (greatest_info.begin)) / (1.0 * (double)
4603 , ", %u assertion%s\n", greatest_info.assertions, greatest_info.assertions == 1 ? "" : "s"); fprintf(
4607 , "ok: %u, fail: %u, skip: %u.\n", greatest_info.passed, greatest_info.failed, greatest_info.skipped); } } void GREATEST_RUN_TEST_ITEM (greatest_test_item *item) { if (greatest_test_pre(item->name) == 1) { do { ; fclose(
4615 = fopen(strlogfile, "a+"); if (
4627 , "file %s open error.\n", strlogfile); exit(
4631 ); } } while (0); greatest_head_info(item->name); enum greatest_test_res res = GREATEST_TEST_RES_PASS; if (res == GREATEST_TEST_RES_PASS) { res = item->func(item); } greatest_tail_info(item->name); do { ; fclose(
4639 = fopen(fstdout, "a+"); } while (0); if (res != GREATEST_TEST_RES_FAIL && greatest_cmpflag > 0) res = greatest_log_diff(res, item->name); greatest_test_post(res); if (res != GREATEST_TEST_RES_FAIL && greatest_cmpflag > 0) greatest_log_reopen(); } } void GREATEST_RUN_TEST_UNIT (greatest_test_unit *unit) { int i; int cnt=0; greatest_test_item *pitem = (*unit->itemarray)[0]; if ((unsigned int)pitem != 0x12345678) { printf("err: Test Unit (%s) does not have valid test proc array.\n", unit->name); exit(
4643 ); } for (i=-1; i>(-1024); i--) { pitem = (*unit->itemarray)[i]; if ((unsigned int)&(*unit->itemarray)[i] < (unsigned int)&__start_TEST_ITEM_LIST) break; if (pitem ==
4647 ) continue; if ((unsigned int)pitem == 0x12345678 || (unsigned int)pitem == 0x87654321) break; } cnt = i; GREATEST_SET_ENTER_CB(unit->enter, unit->enter_udata); GREATEST_SET_EXIT_CB(unit->exit, unit->exit_udata); for (i=-1; i>cnt; i--) { pitem = (*unit->itemarray)[i]; if ((unsigned int)&(*unit->itemarray)[i] < (unsigned int)&__start_TEST_ITEM_LIST) break; if (pitem ==
4651 ) continue; if ((unsigned int)pitem == 0x12345678 || (unsigned int)pitem == 0x87654321) break; GREATEST_RUN_TEST_ITEM(pitem); } GREATEST_SET_ENTER_CB(
4659 ); GREATEST_SET_EXIT_CB(
4667 ); greatest_flag=~greatest_flag; } void GREATEST_RUN_TEST_SUITE (const char *suite_name) { int i; char c; greatest_test_unit *pstCTTestUnit = (void *)&__stop_TEST_UNIT_LIST; if (greatest_suite_pre(suite_name)) { if (!((greatest_info.verbosity) > 0) && strlogfile != fstdout) { fprintf(
4671 , " "); for (i=0; i<50; i++) { c = '0' + (i % 10); if (c == '0') fprintf(
4679 , "%c", c); } fflush(
4687 , "\n%03d ", greatest_info.row);; } pstCTTestUnit--; for (i=0; i<1024; i++) { if (pstCTTestUnit < &__start_TEST_UNIT_LIST) break; if (pstCTTestUnit ==
4691 ) break; GREATEST_RUN_TEST_UNIT(pstCTTestUnit); pstCTTestUnit-=1; } greatest_suite_post(); } } greatest_type_info greatest_type_info_memory = { greatest_memory_equal_cb, greatest_memory_printf_cb, }; greatest_run_info greatest_info;int __attribute__((weak)) main(int argc, char **argv) { do { GREATEST_INIT(); greatest_parse_options(argc, argv); greatest_init_teststdout(); } while (0); GREATEST_RUN_TEST_SUITE("TestAExampleUnit1"); do { GREATEST_PRINT_REPORT(); return (greatest_all_passed() ?
4707 int func(int i, int j)
4711 fprintf(logfile,"i=%d\n", i);
4712 fprintf(logfile,"j=%d\n", j);
4716 static enum greatest_test_res LFT_TestItem0_macrofunc(greatest_test_item* tc); static greatest_test_item stTestItemLFT_TestItem0_macrofunc = { .name = "LFT_TestItem0_macrofunc", .func = (TEST_ITEM_PROC)LFT_TestItem0_macrofunc, .msg =
4720 , }; __attribute__((section("TEST_ITEM_LIST"))) greatest_test_item * pstTestItemLFT_TestItem0_macrofunc = &stTestItemLFT_TestItem0_macrofunc; static enum greatest_test_res LFT_TestItem0_macrofunc(greatest_test_item* tc)
4722 fprintf(logfile,"LFT_TestItem0_Stack()\n");
4723 fprintf(logfile,"func(1, 2)\n");
4728 do { greatest_info.msg =
4732 ; return GREATEST_TEST_RES_PASS; } while (0);
4735 __attribute__((section("TEST_ITEM_LIST"))) void *pvTestUnitTailTestAExampleUnit1 = (void *)0x87654321;;
4740 typedef struct __tag_STR_IDX_STRUCT {
4741 unsigned short u16StrIdx;
4744 } STR_IDX_STRUCT, *PSTR_IDX_STRUCT;
4746 const char str_idx_tbl[] __attribute__((section("STR_IDX"))) = "abc";
4748 static const char str_idx_tbl2[] = "aaa";
4751 const char szT_STR[] __attribute__((section("STR_IDX"))) = "string";;
4753 STR_IDX_STRUCT gstStrIdxStruct[] = {
4755 {(unsigned short)((char *)
4767 static enum greatest_test_res LFT_TestItem1_StrIdx(greatest_test_item* tc); static greatest_test_item stTestItemLFT_TestItem1_StrIdx = { .name = "LFT_TestItem1_StrIdx", .func = (TEST_ITEM_PROC)LFT_TestItem1_StrIdx, .msg =
4771 , }; __attribute__((section("TEST_ITEM_LIST"))) greatest_test_item * pstTestItemLFT_TestItem1_StrIdx = &stTestItemLFT_TestItem1_StrIdx; static enum greatest_test_res LFT_TestItem1_StrIdx(greatest_test_item* tc)
4773 fprintf(logfile,"LFT_TestItem1_StrIdx()\n");
4774 fprintf(logfile,"func(1, 2)\n");
4776 fprintf(logfile,"gstStrIdxStruct[0] = {\"%s(%p, %d)\", %d, %d}\n", str_idx_tbl + gstStrIdxStruct[0].u16StrIdx, str_idx_tbl, (char *)szT_STR-(char *)str_idx_tbl, gstStrIdxStruct[0].i32OtherValue1, gstStrIdxStruct[0].i32OtherValue1)
4783 do { greatest_info.msg =
4787 ; return GREATEST_TEST_RES_PASS; } while (0);
4790 char *param_str[]={"{int a; int b;}", "TEST1_MACOR1((str1), str2)"};
4792 static enum greatest_test_res LFT_TestItem1_macroparam(greatest_test_item* tc); static greatest_test_item stTestItemLFT_TestItem1_macroparam = { .name = "LFT_TestItem1_macroparam", .func = (TEST_ITEM_PROC)LFT_TestItem1_macroparam, .msg =
4796 , }; __attribute__((section("TEST_ITEM_LIST"))) greatest_test_item * pstTestItemLFT_TestItem1_macroparam = &stTestItemLFT_TestItem1_macroparam; static enum greatest_test_res LFT_TestItem1_macroparam(greatest_test_item* tc)
4798 fprintf(logfile,"LFT_TestItem1_macroparam()\n");
4799 fprintf(logfile,"param_str[0]=\"%s\"\n", param_str[0]);
4800 fprintf(logfile,"param_str[1]=\"%s\"\n", param_str[1]);
4802 do { greatest_info.msg =
4806 ; return GREATEST_TEST_RES_SKIP; } while (0);
4809 static enum greatest_test_res LFT_TestItem2_macro_param_cnt(greatest_test_item* tc); static greatest_test_item stTestItemLFT_TestItem2_macro_param_cnt = { .name = "LFT_TestItem2_macro_param_cnt", .func = (TEST_ITEM_PROC)LFT_TestItem2_macro_param_cnt, .msg =
4813 , }; __attribute__((section("TEST_ITEM_LIST"))) greatest_test_item * pstTestItemLFT_TestItem2_macro_param_cnt = &stTestItemLFT_TestItem2_macro_param_cnt; static enum greatest_test_res LFT_TestItem2_macro_param_cnt(greatest_test_item* tc)
4815 fprintf(logfile,"LFT_TestItem2_macro_param_cnt()\n");
4816 fprintf(logfile,"__STDC_VERSION__=%li\n", 201112L);
4817 fprintf(logfile,"__FILE__=%s\n", "test.c");
4818 fprintf(logfile,"__FUNCTION__=%s\n", __FUNCTION__);
4819 fprintf(logfile,"__LINE__=%d\n", 126);
4820 fprintf(logfile,"count=%d\n", 5);
4821 fprintf(logfile,"count=%d\n", 10);
4823 fprintf(logfile,"AQStackIF_TestItem0_Stack(%d)\n", 1);
4824 fprintf(logfile,"AQStackIF_TestItem0_Stack(%d)\n", 1);
4825 fprintf(logfile,"AQStackIF_TestItem0_Stack(%d)\n", 2);
4826 fprintf(logfile,"%s(%s) = %d\n", "AQStackIF_TestItem0_Stack", "abc, OPR_UINT8, OPR_UINT16, OPR_UINT32, OPR_UINT64, OPR_NBYTES", 6 -1); fprintf(logfile,"%s(%s, %s)\n", "AQStackIF_TestItem0_Stack", "int a", "OPR_UINT8, OPR_UINT16, OPR_UINT32, OPR_UINT64, OPR_NBYTES")
4832 do { greatest_info.msg =
4836 ; return GREATEST_TEST_RES_PASS; } while (0);
4842 typedef struct __tag_TEST_PARAM {
4845 unsigned int param[0];
4846 } TEST_PARAM, *PTEST_PARAM;
4848 typedef int PARAM_ARRAY[50];
4850 typedef struct __tag_GREATEST_LIST_TEST_DESC {
4854 } GREATEST_LIST_TEST_DESC, *PGREATEST_LIST_TEST_DESC;
4856 int aitest_macro_param1Param[]={11, 22, 33, 44, 55}; GREATEST_LIST_TEST_DESC stListParamtest_macro_param1={ 1, 5, (PARAM_ARRAY*)&aitest_macro_param1Param }; __attribute__((section("TEST_ITEM_LIST_BAK"))) void *pvParamtest_macro_param1 = (void *)&stListParamtest_macro_param1;; int test_macro_param1(int a)
4864 printf("test_macro_param1()\n");
4865 do { greatest_info.msg =
4869 ; return GREATEST_TEST_RES_PASS; } while (0);
4872 static enum greatest_test_res LFT_TestItem3_multiparam(greatest_test_item* tc); static greatest_test_item stTestItemLFT_TestItem3_multiparam = { .name = "LFT_TestItem3_multiparam", .func = (TEST_ITEM_PROC)LFT_TestItem3_multiparam, .msg =
4876 , }; __attribute__((section("TEST_ITEM_LIST"))) greatest_test_item * pstTestItemLFT_TestItem3_multiparam = &stTestItemLFT_TestItem3_multiparam; static enum greatest_test_res LFT_TestItem3_multiparam(greatest_test_item* tc)
4878 fprintf(logfile,"LFT_TestItem2_multiparam()\n");
4879 fprintf(logfile,"LFT_TestItem2_multiparam()\n");
4880 do { greatest_info.msg =
4884 ; return GREATEST_TEST_RES_SKIP; } while (0);
4889 static enum greatest_test_res a_unit1_test_ex2(greatest_test_item* tc); static greatest_test_item stTestItema_unit1_test_ex2 = { .name = "a_unit1_test_ex2", .func = (TEST_ITEM_PROC)a_unit1_test_ex2, .msg =
4893 , }; __attribute__((section("TEST_ITEM_LIST"))) greatest_test_item * pstTestItema_unit1_test_ex2 = &stTestItema_unit1_test_ex2; static enum greatest_test_res a_unit1_test_ex2(greatest_test_item* tc)
4895 fprintf(logfile,"a_unit1_test_ex2()\n");
4896 do { greatest_info.assertions++; if (!(1 > 2)) { do { greatest_info.fail_file = "test.c"; greatest_info.fail_line = 336; greatest_info.msg = "1 > 2"; if ((greatest_info.flags & GREATEST_FLAG_ABORT_ON_FAIL)) { abort(); } return GREATEST_TEST_RES_FAIL; } while (0); } } while (0);
4897 do { greatest_info.msg =
4901 ; return GREATEST_TEST_RES_SKIP; } while (0);
4906 __attribute__((section("TEST_ITEM_LIST"))) static const void * pvUnitFlagTestAExampleUnit2Pause = (void *)0x12345678;; __attribute__((section("TEST_UNIT_LIST"))) greatest_test_unit stTestUnitTestAExampleUnit2 = { "TestAExampleUnit2", "test.c", (greatest_test_item_array *)&pvUnitFlagTestAExampleUnit2Pause, "test A example unit 2.", };
4908 static enum greatest_test_res a_unit2_test_ex1(greatest_test_item* tc); static greatest_test_item stTestItema_unit2_test_ex1 = { .name = "a_unit2_test_ex1", .func = (TEST_ITEM_PROC)a_unit2_test_ex1, .msg =
4912 , }; __attribute__((section("TEST_ITEM_LIST"))) greatest_test_item * pstTestItema_unit2_test_ex1 = &stTestItema_unit2_test_ex1; static enum greatest_test_res a_unit2_test_ex1(greatest_test_item* tc)
4914 fprintf(logfile,"a_unit2_test_ex1()\n");
4915 do { greatest_info.msg =
4919 ; return GREATEST_TEST_RES_SKIP; } while (0);