# 1 "<built-in>"
#define __STDC__ 1
#define __STDC_VERSION__ 199901L
#define __STDC_HOSTED__ 1
#define __GNUC__ 4
#define __GNUC_MINOR__ 6
#define __GNUC_PATCHLEVEL__ 0
#define __VERSION__ "4.6.0"
#define __FINITE_MATH_ONLY__ 0
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG__ 4
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_LONG_DOUBLE__ 12
#define __SIZEOF_SIZE_T__ 4
#define __CHAR_BIT__ 8
#define __BIGGEST_ALIGNMENT__ 16
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_PDP_ENDIAN__ 3412
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __SIZEOF_POINTER__ 4
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __WCHAR_TYPE__ long int
#define __WINT_TYPE__ unsigned int
#define __INTMAX_TYPE__ long long int
#define __UINTMAX_TYPE__ long long unsigned int
#define __CHAR16_TYPE__ short unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __SIG_ATOMIC_TYPE__ int
#define __INT8_TYPE__ signed char
#define __INT16_TYPE__ short int
#define __INT32_TYPE__ int
#define __INT64_TYPE__ long long int
#define __UINT8_TYPE__ unsigned char
#define __UINT16_TYPE__ short unsigned int
#define __UINT32_TYPE__ unsigned int
#define __UINT64_TYPE__ long long unsigned int
#define __INT_LEAST8_TYPE__ signed char
#define __INT_LEAST16_TYPE__ short int
#define __INT_LEAST32_TYPE__ int
#define __INT_LEAST64_TYPE__ long long int
#define __UINT_LEAST8_TYPE__ unsigned char
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __UINT_LEAST32_TYPE__ unsigned int
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __INT_FAST8_TYPE__ signed char
#define __INT_FAST16_TYPE__ int
#define __INT_FAST32_TYPE__ int
#define __INT_FAST64_TYPE__ long long int
#define __UINT_FAST8_TYPE__ unsigned char
#define __UINT_FAST16_TYPE__ unsigned int
#define __UINT_FAST32_TYPE__ unsigned int
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __INTPTR_TYPE__ int
#define __UINTPTR_TYPE__ unsigned int
#define __GXX_ABI_VERSION 1002
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __INT_MAX__ 2147483647
#define __LONG_MAX__ 2147483647L
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __WCHAR_MAX__ 2147483647L
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __WINT_MAX__ 4294967295U
#define __WINT_MIN__ 0U
#define __PTRDIFF_MAX__ 2147483647
#define __SIZE_MAX__ 4294967295U
#define __INTMAX_MAX__ 9223372036854775807LL
#define __INTMAX_C(c) c ## LL
#define __UINTMAX_MAX__ 18446744073709551615ULL
#define __UINTMAX_C(c) c ## ULL
#define __SIG_ATOMIC_MAX__ 2147483647
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __INT8_MAX__ 127
#define __INT16_MAX__ 32767
#define __INT32_MAX__ 2147483647
#define __INT64_MAX__ 9223372036854775807LL
#define __UINT8_MAX__ 255
#define __UINT16_MAX__ 65535
#define __UINT32_MAX__ 4294967295U
#define __UINT64_MAX__ 18446744073709551615ULL
#define __INT_LEAST8_MAX__ 127
#define __INT8_C(c) c
#define __INT_LEAST16_MAX__ 32767
#define __INT16_C(c) c
#define __INT_LEAST32_MAX__ 2147483647
#define __INT32_C(c) c
#define __INT_LEAST64_MAX__ 9223372036854775807LL
#define __INT64_C(c) c ## LL
#define __UINT_LEAST8_MAX__ 255
#define __UINT8_C(c) c
#define __UINT_LEAST16_MAX__ 65535
#define __UINT16_C(c) c
#define __UINT_LEAST32_MAX__ 4294967295U
#define __UINT32_C(c) c ## U
#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
#define __UINT64_C(c) c ## ULL
#define __INT_FAST8_MAX__ 127
#define __INT_FAST16_MAX__ 2147483647
#define __INT_FAST32_MAX__ 2147483647
#define __INT_FAST64_MAX__ 9223372036854775807LL
#define __UINT_FAST8_MAX__ 255
#define __UINT_FAST16_MAX__ 4294967295U
#define __UINT_FAST32_MAX__ 4294967295U
#define __UINT_FAST64_MAX__ 18446744073709551615ULL
#define __INTPTR_MAX__ 2147483647
#define __UINTPTR_MAX__ 4294967295U
#define __FLT_EVAL_METHOD__ 2
#define __DEC_EVAL_METHOD__ 2
#define __FLT_RADIX__ 2
#define __FLT_MANT_DIG__ 24
#define __FLT_DIG__ 6
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX_10_EXP__ 38
#define __FLT_DECIMAL_DIG__ 9
#define __FLT_MAX__ 3.40282346638528859812e+38F
#define __FLT_MIN__ 1.17549435082228750797e-38F
#define __FLT_EPSILON__ 1.19209289550781250000e-7F
#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_DIG__ 15
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX_10_EXP__ 308
#define __DBL_DECIMAL_DIG__ 17
#define __DBL_MAX__ ((double)1.79769313486231570815e+308L)
#define __DBL_MIN__ ((double)2.22507385850720138309e-308L)
#define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L)
#define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L)
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 64
#define __LDBL_DIG__ 18
#define __LDBL_MIN_EXP__ (-16381)
#define __LDBL_MIN_10_EXP__ (-4931)
#define __LDBL_MAX_EXP__ 16384
#define __LDBL_MAX_10_EXP__ 4932
#define __DECIMAL_DIG__ 21
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __DEC32_MANT_DIG__ 7
#define __DEC32_MIN_EXP__ (-94)
#define __DEC32_MAX_EXP__ 97
#define __DEC32_MIN__ 1E-95DF
#define __DEC32_MAX__ 9.999999E96DF
#define __DEC32_EPSILON__ 1E-6DF
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __DEC64_MANT_DIG__ 16
#define __DEC64_MIN_EXP__ (-382)
#define __DEC64_MAX_EXP__ 385
#define __DEC64_MIN__ 1E-383DD
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __DEC128_MIN_EXP__ (-6142)
#define __DEC128_MAX_EXP__ 6145
#define __DEC128_MIN__ 1E-6143DL
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC128_EPSILON__ 1E-33DL
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __REGISTER_PREFIX__ 
#define __USER_LABEL_PREFIX__ 
#define __GNUC_STDC_INLINE__ 1
#define __NO_INLINE__ 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __i386 1
#define __i386__ 1
#define i386 1
#define __corei7 1
#define __corei7__ 1
#define __tune_corei7__ 1
#define __MMX__ 1
#define __SSE__ 1
#define __SSE2__ 1
#define __SSE3__ 1
#define __SSSE3__ 1
#define __SSE4_1__ 1
#define __SSE4_2__ 1
#define __AES__ 1
#define __PCLMUL__ 1
#define __POPCNT__ 1
#define __gnu_linux__ 1
#define __linux 1
#define __linux__ 1
#define linux 1
#define __unix 1
#define __unix__ 1
#define unix 1
#define __ELF__ 1
#define __DECIMAL_BID_FORMAT__ 1

# 1 "/usr/include/fcntl.h" 1 3 4
# 25 "/usr/include/fcntl.h" 3 4
#define _FCNTL_H 1

# 1 "/usr/include/features.h" 1 3 4
# 21 "/usr/include/features.h" 3 4
#define _FEATURES_H 1
# 97 "/usr/include/features.h" 3 4
#undef __USE_ISOC99
#undef __USE_ISOC95
#undef __USE_POSIX
#undef __USE_POSIX2
#undef __USE_POSIX199309
#undef __USE_POSIX199506
#undef __USE_XOPEN
#undef __USE_XOPEN_EXTENDED
#undef __USE_UNIX98
#undef __USE_XOPEN2K
#undef __USE_XOPEN2KXSI
#undef __USE_XOPEN2K8
#undef __USE_XOPEN2K8XSI
#undef __USE_LARGEFILE
#undef __USE_LARGEFILE64
#undef __USE_FILE_OFFSET64
#undef __USE_BSD
#undef __USE_SVID
#undef __USE_MISC
#undef __USE_ATFILE
#undef __USE_GNU
#undef __USE_REENTRANT
#undef __USE_FORTIFY_LEVEL
#undef __FAVOR_BSD
#undef __KERNEL_STRICT_NAMES




#define __KERNEL_STRICT_NAMES 



#define __USE_ANSI 1
# 140 "/usr/include/features.h" 3 4
#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
# 156 "/usr/include/features.h" 3 4
#undef _ISOC95_SOURCE
#define _ISOC95_SOURCE 1
#undef _ISOC99_SOURCE
#define _ISOC99_SOURCE 1
#undef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700
#undef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED 1
#undef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE 1
#undef _BSD_SOURCE
#define _BSD_SOURCE 1
#undef _SVID_SOURCE
#define _SVID_SOURCE 1
#undef _ATFILE_SOURCE
#define _ATFILE_SOURCE 1
# 193 "/usr/include/features.h" 3 4
#define __USE_ISOC99 1





#define __USE_ISOC95 1
# 220 "/usr/include/features.h" 3 4
#define __USE_POSIX 1



#define __USE_POSIX2 1



#define __USE_POSIX199309 1



#define __USE_POSIX199506 1



#define __USE_XOPEN2K 1
#undef __USE_ISOC95
#define __USE_ISOC95 1
#undef __USE_ISOC99
#define __USE_ISOC99 1



#define __USE_XOPEN2K8 1
#undef _ATFILE_SOURCE
#define _ATFILE_SOURCE 1



#define __USE_XOPEN 1

#define __USE_XOPEN_EXTENDED 1
#define __USE_UNIX98 1
#undef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE 1


#define __USE_XOPEN2K8 1
#define __USE_XOPEN2K8XSI 1

#define __USE_XOPEN2K 1
#define __USE_XOPEN2KXSI 1
#undef __USE_ISOC95
#define __USE_ISOC95 1
#undef __USE_ISOC99
#define __USE_ISOC99 1
# 276 "/usr/include/features.h" 3 4
#define __USE_LARGEFILE 1



#define __USE_LARGEFILE64 1







#define __USE_MISC 1



#define __USE_BSD 1



#define __USE_SVID 1



#define __USE_ATFILE 1



#define __USE_GNU 1
# 319 "/usr/include/features.h" 3 4
#define __USE_FORTIFY_LEVEL 0



#define __STDC_IEC_559__ 1
#define __STDC_IEC_559_COMPLEX__ 1


#define __STDC_ISO_10646__ 200009L







#undef __GNU_LIBRARY__
#define __GNU_LIBRARY__ 6



#define __GLIBC__ 2
#define __GLIBC_MINOR__ 13

#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))







#define __GLIBC_HAVE_LONG_LONG 1





# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 21 "/usr/include/sys/cdefs.h" 3 4
#define _SYS_CDEFS_H 1
# 36 "/usr/include/sys/cdefs.h" 3 4
#undef __P
#undef __PMT
# 47 "/usr/include/sys/cdefs.h" 3 4
#define __THROW __attribute__ ((__nothrow__))
#define __NTH(fct) __attribute__ ((__nothrow__)) fct
# 74 "/usr/include/sys/cdefs.h" 3 4
#define __P(args) args
#define __PMT(args) args




#define __CONCAT(x,y) x ## y
#define __STRING(x) #x


#define __ptr_t void *
#define __long_double_t long double







#define __BEGIN_DECLS 
#define __END_DECLS 
# 114 "/usr/include/sys/cdefs.h" 3 4
#define __BEGIN_NAMESPACE_STD 
#define __END_NAMESPACE_STD 
#define __USING_NAMESPACE_STD(name) 
#define __BEGIN_NAMESPACE_C99 
#define __END_NAMESPACE_C99 
#define __USING_NAMESPACE_C99(name) 





#define __bounded 
#define __unbounded 
#define __ptrvalue 




#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
#define __bos0(ptr) __builtin_object_size (ptr, 0)


#define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg)))

#define __warnattr(msg) __attribute__((__warning__ (msg)))
#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg)))
# 150 "/usr/include/sys/cdefs.h" 3 4
#define __flexarr []
# 177 "/usr/include/sys/cdefs.h" 3 4
#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))




#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW


#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
# 207 "/usr/include/sys/cdefs.h" 3 4
#define __attribute_malloc__ __attribute__ ((__malloc__))
# 216 "/usr/include/sys/cdefs.h" 3 4
#define __attribute_pure__ __attribute__ ((__pure__))
# 225 "/usr/include/sys/cdefs.h" 3 4
#define __attribute_used__ __attribute__ ((__used__))
#define __attribute_noinline__ __attribute__ ((__noinline__))







#define __attribute_deprecated__ __attribute__ ((__deprecated__))
# 246 "/usr/include/sys/cdefs.h" 3 4
#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
# 256 "/usr/include/sys/cdefs.h" 3 4
#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
# 265 "/usr/include/sys/cdefs.h" 3 4
#define __nonnull(params) __attribute__ ((__nonnull__ params))







#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
# 282 "/usr/include/sys/cdefs.h" 3 4
#define __wur 




#define __always_inline __inline __attribute__ ((__always_inline__))
# 296 "/usr/include/sys/cdefs.h" 3 4
#define __extern_inline extern __inline __attribute__ ((__gnu_inline__))

#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
# 318 "/usr/include/sys/cdefs.h" 3 4
#define __va_arg_pack() __builtin_va_arg_pack ()
#define __va_arg_pack_len() __builtin_va_arg_pack_len ()
# 339 "/usr/include/sys/cdefs.h" 3 4
#define __restrict_arr __restrict
# 353 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 19 "/usr/include/bits/wordsize.h" 3 4
#define __WORDSIZE 32
# 354 "/usr/include/sys/cdefs.h" 2 3 4
# 375 "/usr/include/sys/cdefs.h" 3 4
#define __LDBL_REDIR1(name,proto,alias) name proto
#define __LDBL_REDIR(name,proto) name proto
#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
#define __LDBL_REDIR_NTH(name,proto) name proto __THROW
#define __LDBL_REDIR_DECL(name) 

#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias)
#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias)
# 358 "/usr/include/features.h" 2 3 4
# 381 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4



# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 19 "/usr/include/bits/wordsize.h" 3 4
#define __WORDSIZE 32
# 5 "/usr/include/gnu/stubs.h" 2 3 4


# 1 "/usr/include/gnu/stubs-32.h" 1 3 4
# 10 "/usr/include/gnu/stubs-32.h" 3 4
#define __stub___kernel_cosl 
#define __stub___kernel_sinl 
#define __stub___kernel_tanl 
#define __stub_chflags 
#define __stub_fattach 
#define __stub_fchflags 
#define __stub_fdetach 
#define __stub_gtty 
#define __stub_lchmod 
#define __stub_revoke 
#define __stub_setlogin 
#define __stub_sigreturn 
#define __stub_sstk 
#define __stub_stty 
# 8 "/usr/include/gnu/stubs.h" 2 3 4
# 382 "/usr/include/features.h" 2 3 4
# 28 "/usr/include/fcntl.h" 2 3 4






# 1 "/usr/include/bits/fcntl.h" 1 3 4
# 25 "/usr/include/bits/fcntl.h" 3 4
# 1 "/usr/include/sys/types.h" 1 3 4
# 24 "/usr/include/sys/types.h" 3 4
#define _SYS_TYPES_H 1





# 1 "/usr/include/bits/types.h" 1 3 4
# 25 "/usr/include/bits/types.h" 3 4
#define _BITS_TYPES_H 1


# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 19 "/usr/include/bits/wordsize.h" 3 4
#define __WORDSIZE 32
# 29 "/usr/include/bits/types.h" 2 3 4


typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;


typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;




__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;







__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
# 99 "/usr/include/bits/types.h" 3 4
#define __S16_TYPE short int
#define __U16_TYPE unsigned short int
#define __S32_TYPE int
#define __U32_TYPE unsigned int
#define __SLONGWORD_TYPE long int
#define __ULONGWORD_TYPE unsigned long int

#define __SQUAD_TYPE __quad_t
#define __UQUAD_TYPE __u_quad_t
#define __SWORD_TYPE int
#define __UWORD_TYPE unsigned int
#define __SLONG32_TYPE long int
#define __ULONG32_TYPE unsigned long int
#define __S64_TYPE __quad_t
#define __U64_TYPE __u_quad_t


#define __STD_TYPE __extension__ typedef
# 131 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 25 "/usr/include/bits/typesizes.h" 3 4
#define _BITS_TYPESIZES_H 1




#define __DEV_T_TYPE __UQUAD_TYPE
#define __UID_T_TYPE __U32_TYPE
#define __GID_T_TYPE __U32_TYPE
#define __INO_T_TYPE __ULONGWORD_TYPE
#define __INO64_T_TYPE __UQUAD_TYPE
#define __MODE_T_TYPE __U32_TYPE
#define __NLINK_T_TYPE __UWORD_TYPE
#define __OFF_T_TYPE __SLONGWORD_TYPE
#define __OFF64_T_TYPE __SQUAD_TYPE
#define __PID_T_TYPE __S32_TYPE
#define __RLIM_T_TYPE __ULONGWORD_TYPE
#define __RLIM64_T_TYPE __UQUAD_TYPE
#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
#define __BLKCNT64_T_TYPE __SQUAD_TYPE
#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
#define __ID_T_TYPE __U32_TYPE
#define __CLOCK_T_TYPE __SLONGWORD_TYPE
#define __TIME_T_TYPE __SLONGWORD_TYPE
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE


#define __FD_SETSIZE 1024
# 132 "/usr/include/bits/types.h" 2 3 4


__extension__ typedef __u_quad_t __dev_t;
__extension__ typedef unsigned int __uid_t;
__extension__ typedef unsigned int __gid_t;
__extension__ typedef unsigned long int __ino_t;
__extension__ typedef __u_quad_t __ino64_t;
__extension__ typedef unsigned int __mode_t;
__extension__ typedef unsigned int __nlink_t;
__extension__ typedef long int __off_t;
__extension__ typedef __quad_t __off64_t;
__extension__ typedef int __pid_t;
__extension__ typedef struct { int __val[2]; } __fsid_t;
__extension__ typedef long int __clock_t;
__extension__ typedef unsigned long int __rlim_t;
__extension__ typedef __u_quad_t __rlim64_t;
__extension__ typedef unsigned int __id_t;
__extension__ typedef long int __time_t;
__extension__ typedef unsigned int __useconds_t;
__extension__ typedef long int __suseconds_t;

__extension__ typedef int __daddr_t;
__extension__ typedef long int __swblk_t;
__extension__ typedef int __key_t;


__extension__ typedef int __clockid_t;


__extension__ typedef void * __timer_t;


__extension__ typedef long int __blksize_t;




__extension__ typedef long int __blkcnt_t;
__extension__ typedef __quad_t __blkcnt64_t;


__extension__ typedef unsigned long int __fsblkcnt_t;
__extension__ typedef __u_quad_t __fsblkcnt64_t;


__extension__ typedef unsigned long int __fsfilcnt_t;
__extension__ typedef __u_quad_t __fsfilcnt64_t;

__extension__ typedef int __ssize_t;



typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;


__extension__ typedef int __intptr_t;


__extension__ typedef unsigned int __socklen_t;


#undef __STD_TYPE
# 31 "/usr/include/sys/types.h" 2 3 4



typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
#define __u_char_defined 



typedef __loff_t loff_t;



typedef __ino_t ino_t;



#define __ino_t_defined 


typedef __ino64_t ino64_t;
#define __ino64_t_defined 



typedef __dev_t dev_t;
#define __dev_t_defined 



typedef __gid_t gid_t;
#define __gid_t_defined 



typedef __mode_t mode_t;
#define __mode_t_defined 



typedef __nlink_t nlink_t;
#define __nlink_t_defined 



typedef __uid_t uid_t;
#define __uid_t_defined 




typedef __off_t off_t;



#define __off_t_defined 


typedef __off64_t off64_t;
#define __off64_t_defined 



typedef __pid_t pid_t;
#define __pid_t_defined 




typedef __id_t id_t;
#define __id_t_defined 



typedef __ssize_t ssize_t;
#define __ssize_t_defined 




typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
#define __daddr_t_defined 




typedef __key_t key_t;
#define __key_t_defined 



#define __need_clock_t 

#define __need_time_t 
#define __need_timer_t 
#define __need_clockid_t 
# 1 "/usr/include/time.h" 1 3 4
# 54 "/usr/include/time.h" 3 4
#define __clock_t_defined 1





typedef __clock_t clock_t;






#undef __need_clock_t


#define __time_t_defined 1





typedef __time_t time_t;






#undef __need_time_t



#define __clockid_t_defined 1




typedef __clockid_t clockid_t;


#undef __clockid_time_t



#define __timer_t_defined 1




typedef __timer_t timer_t;


#undef __need_timer_t
# 127 "/usr/include/time.h" 3 4
#undef __need_timespec
# 134 "/usr/include/sys/types.h" 2 3 4



typedef __useconds_t useconds_t;
#define __useconds_t_defined 


typedef __suseconds_t suseconds_t;
#define __suseconds_t_defined 



#define __need_size_t 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 187 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#define __size_t__ 
#define __SIZE_T__ 
#define _SIZE_T 
#define _SYS_SIZE_T_H 
#define _T_SIZE_ 
#define _T_SIZE 
#define __SIZE_T 
#define _SIZE_T_ 
#define _BSD_SIZE_T_ 
#define _SIZE_T_DEFINED_ 
#define _SIZE_T_DEFINED 
#define _BSD_SIZE_T_DEFINED_ 
#define _SIZE_T_DECLARED 
#define ___int_size_t_h 
#define _GCC_SIZE_T 
#define _SIZET_ 



#define __size_t 





typedef unsigned int size_t;
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 408 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_NULL
# 148 "/usr/include/sys/types.h" 2 3 4



typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 188 "/usr/include/sys/types.h" 3 4
#define __intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE)))

#define __u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE)))



#define __int8_t_defined 
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));





#define __BIT_TYPES_DEFINED__ 1




# 1 "/usr/include/endian.h" 1 3 4
# 20 "/usr/include/endian.h" 3 4
#define _ENDIAN_H 1
# 32 "/usr/include/endian.h" 3 4
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __PDP_ENDIAN 3412


# 1 "/usr/include/bits/endian.h" 1 3 4






#define __BYTE_ORDER __LITTLE_ENDIAN
# 38 "/usr/include/endian.h" 2 3 4




#define __FLOAT_WORD_ORDER __BYTE_ORDER



#define LITTLE_ENDIAN __LITTLE_ENDIAN
#define BIG_ENDIAN __BIG_ENDIAN
#define PDP_ENDIAN __PDP_ENDIAN
#define BYTE_ORDER __BYTE_ORDER



#define __LONG_LONG_PAIR(HI,LO) LO, HI







# 1 "/usr/include/bits/byteswap.h" 1 3 4
# 26 "/usr/include/bits/byteswap.h" 3 4
#define _BITS_BYTESWAP_H 1


#define __bswap_constant_16(x) ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))




#define __bswap_16(x) (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (x); if (__builtin_constant_p (__x)) __v = __bswap_constant_16 (__x); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }))
# 61 "/usr/include/bits/byteswap.h" 3 4
#define __bswap_constant_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
# 73 "/usr/include/bits/byteswap.h" 3 4
#define __bswap_32(x) (__extension__ ({ register unsigned int __v, __x = (x); if (__builtin_constant_p (__x)) __v = __bswap_constant_32 (__x); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; }))
# 112 "/usr/include/bits/byteswap.h" 3 4
#define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))
# 122 "/usr/include/bits/byteswap.h" 3 4
#define __bswap_64(x) (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned long int __l[2]; } __w, __r; if (__builtin_constant_p (x)) __r.__ll = __bswap_constant_64 (x); else { __w.__ll = (x); __r.__l[0] = __bswap_32 (__w.__l[1]); __r.__l[1] = __bswap_32 (__w.__l[0]); } __r.__ll; }))
# 62 "/usr/include/endian.h" 2 3 4


#define htobe16(x) __bswap_16 (x)
#define htole16(x) (x)
#define be16toh(x) __bswap_16 (x)
#define le16toh(x) (x)

#define htobe32(x) __bswap_32 (x)
#define htole32(x) (x)
#define be32toh(x) __bswap_32 (x)
#define le32toh(x) (x)

#define htobe64(x) __bswap_64 (x)
#define htole64(x) (x)
#define be64toh(x) __bswap_64 (x)
#define le64toh(x) (x)
# 218 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/select.h" 1 3 4
# 23 "/usr/include/sys/select.h" 3 4
#define _SYS_SELECT_H 1







# 1 "/usr/include/bits/select.h" 1 3 4
# 25 "/usr/include/bits/select.h" 3 4
#define __FD_ZERO(fdsp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; stosl" : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0)
# 50 "/usr/include/bits/select.h" 3 4
#define __FD_SET(d,set) ((void) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d)))

#define __FD_CLR(d,set) ((void) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d)))

#define __FD_ISSET(d,set) ((__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d)) != 0)
# 32 "/usr/include/sys/select.h" 2 3 4


# 1 "/usr/include/bits/sigset.h" 1 3 4
# 22 "/usr/include/bits/sigset.h" 3 4
#define _SIGSET_H_types 1

typedef int __sig_atomic_t;



#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4


#define __sigset_t_defined 
typedef __sigset_t sigset_t;



#define __need_time_t 
#define __need_timespec 
# 1 "/usr/include/time.h" 1 3 4
# 67 "/usr/include/time.h" 3 4
#undef __need_clock_t
# 83 "/usr/include/time.h" 3 4
#undef __need_time_t
# 95 "/usr/include/time.h" 3 4
#undef __clockid_time_t
# 107 "/usr/include/time.h" 3 4
#undef __need_timer_t






#define __timespec_defined 1





struct timespec
  {
    __time_t tv_sec;
    long int tv_nsec;
  };


#undef __need_timespec
# 45 "/usr/include/sys/select.h" 2 3 4
#define __need_timeval 
# 1 "/usr/include/bits/time.h" 1 3 4
# 68 "/usr/include/bits/time.h" 3 4
#undef __need_timeval

#define _STRUCT_TIMEVAL 1




struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
# 47 "/usr/include/sys/select.h" 2 3 4
# 55 "/usr/include/sys/select.h" 3 4
typedef long int __fd_mask;


#undef __NFDBITS
#undef __FDELT
#undef __FDMASK

#define __NFDBITS (8 * (int) sizeof (__fd_mask))
#define __FDELT(d) ((d) / __NFDBITS)
#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))


typedef struct
  {



    __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
#define __FDS_BITS(set) ((set)->fds_bits)




  } fd_set;


#define FD_SETSIZE __FD_SETSIZE



typedef __fd_mask fd_mask;


#define NFDBITS __NFDBITS




#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)
#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)
#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)
#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)



# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
     fd_set *__restrict __writefds,
     fd_set *__restrict __exceptfds,
     struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
      fd_set *__restrict __writefds,
      fd_set *__restrict __exceptfds,
      const struct timespec *__restrict __timeout,
      const __sigset_t *__restrict __sigmask);



# 221 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 22 "/usr/include/sys/sysmacros.h" 3 4
#define _SYS_SYSMACROS_H 1







__extension__
extern unsigned int gnu_dev_major (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern unsigned int gnu_dev_minor (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern unsigned long long int gnu_dev_makedev (unsigned int __major,
            unsigned int __minor)
     __attribute__ ((__nothrow__));
# 65 "/usr/include/sys/sysmacros.h" 3 4
#define major(dev) gnu_dev_major (dev)
#define minor(dev) gnu_dev_minor (dev)
#define makedev(maj,min) gnu_dev_makedev (maj, min)
# 224 "/usr/include/sys/types.h" 2 3 4





typedef __blksize_t blksize_t;
#define __blksize_t_defined 





typedef __blkcnt_t blkcnt_t;
#define __blkcnt_t_defined 


typedef __fsblkcnt_t fsblkcnt_t;
#define __fsblkcnt_t_defined 


typedef __fsfilcnt_t fsfilcnt_t;
#define __fsfilcnt_t_defined 
# 263 "/usr/include/sys/types.h" 3 4
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;





# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 20 "/usr/include/bits/pthreadtypes.h" 3 4
#define _BITS_PTHREADTYPES_H 1

#define __SIZEOF_PTHREAD_ATTR_T 36
#define __SIZEOF_PTHREAD_MUTEX_T 24
#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
#define __SIZEOF_PTHREAD_COND_T 48
#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
#define __SIZEOF_PTHREAD_CONDATTR_T 4
#define __SIZEOF_PTHREAD_RWLOCK_T 32
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
#define __SIZEOF_PTHREAD_BARRIER_T 20
#define __SIZEOF_PTHREAD_BARRIERATTR_T 4




typedef unsigned long int pthread_t;


typedef union
{
  char __size[36];
  long int __align;
} pthread_attr_t;


typedef struct __pthread_internal_slist
{
  struct __pthread_internal_slist *__next;
} __pthread_slist_t;




typedef union
{
  struct __pthread_mutex_s
  {
    int __lock;
    unsigned int __count;
    int __owner;


    int __kind;
    unsigned int __nusers;
    __extension__ union
    {
      int __spins;
      __pthread_slist_t __list;
    };
  } __data;
  char __size[24];
  long int __align;
} pthread_mutex_t;

typedef union
{
  char __size[4];
  long int __align;
} pthread_mutexattr_t;




typedef union
{
  struct
  {
    int __lock;
    unsigned int __futex;
    __extension__ unsigned long long int __total_seq;
    __extension__ unsigned long long int __wakeup_seq;
    __extension__ unsigned long long int __woken_seq;
    void *__mutex;
    unsigned int __nwaiters;
    unsigned int __broadcast_seq;
  } __data;
  char __size[48];
  __extension__ long long int __align;
} pthread_cond_t;

typedef union
{
  char __size[4];
  long int __align;
} pthread_condattr_t;



typedef unsigned int pthread_key_t;



typedef int pthread_once_t;





typedef union
{
  struct
  {
    int __lock;
    unsigned int __nr_readers;
    unsigned int __readers_wakeup;
    unsigned int __writer_wakeup;
    unsigned int __nr_readers_queued;
    unsigned int __nr_writers_queued;


    unsigned char __flags;
    unsigned char __shared;
    unsigned char __pad1;
    unsigned char __pad2;
    int __writer;
  } __data;
  char __size[32];
  long int __align;
} pthread_rwlock_t;

typedef union
{
  char __size[8];
  long int __align;
} pthread_rwlockattr_t;





typedef volatile int pthread_spinlock_t;




typedef union
{
  char __size[20];
  long int __align;
} pthread_barrier_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_barrierattr_t;




#define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
# 272 "/usr/include/sys/types.h" 2 3 4



# 26 "/usr/include/bits/fcntl.h" 2 3 4

# 1 "/usr/include/bits/uio.h" 1 3 4
# 24 "/usr/include/bits/uio.h" 3 4
#define _BITS_UIO_H 1
# 40 "/usr/include/bits/uio.h" 3 4
#define UIO_MAXIOV 1024



struct iovec
  {
    void *iov_base;
    size_t iov_len;
  };
# 28 "/usr/include/bits/fcntl.h" 2 3 4





#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 0100
#define O_EXCL 0200
#define O_NOCTTY 0400
#define O_TRUNC 01000
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000


#define O_DIRECTORY 0200000
#define O_NOFOLLOW 0400000
#define O_CLOEXEC 02000000


#define O_DIRECT 040000
#define O_NOATIME 01000000






#define O_DSYNC 010000
#define O_RSYNC O_SYNC



#define O_LARGEFILE 0100000



#define F_DUPFD 0
#define F_GETFD 1
#define F_SETFD 2
#define F_GETFL 3
#define F_SETFL 4

#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7





#define F_GETLK64 12
#define F_SETLK64 13
#define F_SETLKW64 14


#define F_SETOWN 8
#define F_GETOWN 9



#define F_SETSIG 10
#define F_GETSIG 11
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16



#define F_SETLEASE 1024
#define F_GETLEASE 1025
#define F_NOTIFY 1026
#define F_SETPIPE_SZ 1031
#define F_GETPIPE_SZ 1032


#define F_DUPFD_CLOEXEC 1030




#define FD_CLOEXEC 1


#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2


#define F_EXLCK 4
#define F_SHLCK 8



#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4

#define LOCK_UN 8



#define LOCK_MAND 32
#define LOCK_READ 64
#define LOCK_WRITE 128
#define LOCK_RW 192




#define DN_ACCESS 0x00000001
#define DN_MODIFY 0x00000002
#define DN_CREATE 0x00000004
#define DN_DELETE 0x00000008
#define DN_RENAME 0x00000010
#define DN_ATTRIB 0x00000020
#define DN_MULTISHOT 0x80000000


struct flock
  {
    short int l_type;
    short int l_whence;

    __off_t l_start;
    __off_t l_len;




    __pid_t l_pid;
  };


struct flock64
  {
    short int l_type;
    short int l_whence;
    __off64_t l_start;
    __off64_t l_len;
    __pid_t l_pid;
  };




enum __pid_type
  {
    F_OWNER_TID = 0,
    F_OWNER_PID,
    F_OWNER_PGRP,
    F_OWNER_GID = F_OWNER_PGRP
  };


struct f_owner_ex
  {
    enum __pid_type type;
    __pid_t pid;
  };





#define FAPPEND O_APPEND
#define FFSYNC O_FSYNC
#define FASYNC O_ASYNC
#define FNONBLOCK O_NONBLOCK
#define FNDELAY O_NDELAY




#define POSIX_FADV_NORMAL 0
#define POSIX_FADV_RANDOM 1
#define POSIX_FADV_SEQUENTIAL 2
#define POSIX_FADV_WILLNEED 3
#define POSIX_FADV_DONTNEED 4
#define POSIX_FADV_NOREUSE 5





#define SYNC_FILE_RANGE_WAIT_BEFORE 1


#define SYNC_FILE_RANGE_WRITE 2


#define SYNC_FILE_RANGE_WAIT_AFTER 4




#define SPLICE_F_MOVE 1
#define SPLICE_F_NONBLOCK 2


#define SPLICE_F_MORE 4
#define SPLICE_F_GIFT 8







extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
    __attribute__ ((__nothrow__));



extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
       unsigned int __flags);



extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
    size_t __count, unsigned int __flags);


extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
         __off64_t *__offout, size_t __len,
         unsigned int __flags);


extern ssize_t tee (int __fdin, int __fdout, size_t __len,
      unsigned int __flags);



extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# 277 "/usr/include/bits/fcntl.h" 3 4
extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
   __off64_t __len);





# 35 "/usr/include/fcntl.h" 2 3 4




#define __need_timespec 
# 1 "/usr/include/time.h" 1 3 4
# 67 "/usr/include/time.h" 3 4
#undef __need_clock_t
# 83 "/usr/include/time.h" 3 4
#undef __need_time_t
# 95 "/usr/include/time.h" 3 4
#undef __clockid_time_t
# 107 "/usr/include/time.h" 3 4
#undef __need_timer_t
# 127 "/usr/include/time.h" 3 4
#undef __need_timespec
# 41 "/usr/include/fcntl.h" 2 3 4
# 1 "/usr/include/bits/stat.h" 1 3 4
# 24 "/usr/include/bits/stat.h" 3 4
#define _BITS_STAT_H 1


#define _STAT_VER_LINUX_OLD 1
#define _STAT_VER_KERNEL 1
#define _STAT_VER_SVR4 2
#define _STAT_VER_LINUX 3
#define _STAT_VER _STAT_VER_LINUX


#define _MKNOD_VER_LINUX 1
#define _MKNOD_VER_SVR4 2
#define _MKNOD_VER _MKNOD_VER_LINUX


struct stat
  {
    __dev_t st_dev;
    unsigned short int __pad1;

    __ino_t st_ino;



    __mode_t st_mode;
    __nlink_t st_nlink;
    __uid_t st_uid;
    __gid_t st_gid;
    __dev_t st_rdev;
    unsigned short int __pad2;

    __off_t st_size;



    __blksize_t st_blksize;


    __blkcnt_t st_blocks;
# 73 "/usr/include/bits/stat.h" 3 4
    struct timespec st_atim;
    struct timespec st_mtim;
    struct timespec st_ctim;
#define st_atime st_atim.tv_sec
#define st_mtime st_mtim.tv_sec
#define st_ctime st_ctim.tv_sec
# 88 "/usr/include/bits/stat.h" 3 4
    unsigned long int __unused4;
    unsigned long int __unused5;



  };


struct stat64
  {
    __dev_t st_dev;
    unsigned int __pad1;

    __ino_t __st_ino;
    __mode_t st_mode;
    __nlink_t st_nlink;
    __uid_t st_uid;
    __gid_t st_gid;
    __dev_t st_rdev;
    unsigned int __pad2;
    __off64_t st_size;
    __blksize_t st_blksize;

    __blkcnt64_t st_blocks;







    struct timespec st_atim;
    struct timespec st_mtim;
    struct timespec st_ctim;
# 130 "/usr/include/bits/stat.h" 3 4
    __ino64_t st_ino;
  };



#define _STATBUF_ST_BLKSIZE 
#define _STATBUF_ST_RDEV 

#define _STATBUF_ST_NSEC 



#define __S_IFMT 0170000


#define __S_IFDIR 0040000
#define __S_IFCHR 0020000
#define __S_IFBLK 0060000
#define __S_IFREG 0100000
#define __S_IFIFO 0010000
#define __S_IFLNK 0120000
#define __S_IFSOCK 0140000



#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)



#define __S_ISUID 04000
#define __S_ISGID 02000
#define __S_ISVTX 01000
#define __S_IREAD 0400
#define __S_IWRITE 0200
#define __S_IEXEC 0100


#define UTIME_NOW ((1l << 30) - 1l)
#define UTIME_OMIT ((1l << 30) - 2l)
# 42 "/usr/include/fcntl.h" 2 3 4

#define S_IFMT __S_IFMT
#define S_IFDIR __S_IFDIR
#define S_IFCHR __S_IFCHR
#define S_IFBLK __S_IFBLK
#define S_IFREG __S_IFREG

#define S_IFIFO __S_IFIFO


#define S_IFLNK __S_IFLNK


#define S_IFSOCK __S_IFSOCK




#define S_ISUID __S_ISUID
#define S_ISGID __S_ISGID



#define S_ISVTX __S_ISVTX


#define S_IRUSR __S_IREAD
#define S_IWUSR __S_IWRITE
#define S_IXUSR __S_IEXEC

#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)

#define S_IRGRP (S_IRUSR >> 3)
#define S_IWGRP (S_IWUSR >> 3)
#define S_IXGRP (S_IXUSR >> 3)

#define S_IRWXG (S_IRWXU >> 3)

#define S_IROTH (S_IRGRP >> 3)
#define S_IWOTH (S_IWGRP >> 3)
#define S_IXOTH (S_IXGRP >> 3)

#define S_IRWXO (S_IRWXG >> 3)






#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0





#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2



#define AT_FDCWD -100


#define AT_SYMLINK_NOFOLLOW 0x100
#define AT_REMOVEDIR 0x200

#define AT_SYMLINK_FOLLOW 0x400
#define AT_NO_AUTOMOUNT 0x800

#define AT_EACCESS 0x200
# 124 "/usr/include/fcntl.h" 3 4
extern int fcntl (int __fd, int __cmd, ...);
# 133 "/usr/include/fcntl.h" 3 4
extern int open (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
# 143 "/usr/include/fcntl.h" 3 4
extern int open64 (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
# 157 "/usr/include/fcntl.h" 3 4
extern int openat (int __fd, __const char *__file, int __oflag, ...)
     __attribute__ ((__nonnull__ (2)));
# 168 "/usr/include/fcntl.h" 3 4
extern int openat64 (int __fd, __const char *__file, int __oflag, ...)
     __attribute__ ((__nonnull__ (2)));
# 179 "/usr/include/fcntl.h" 3 4
extern int creat (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1)));
# 189 "/usr/include/fcntl.h" 3 4
extern int creat64 (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1)));
# 202 "/usr/include/fcntl.h" 3 4
#define F_ULOCK 0
#define F_LOCK 1
#define F_TLOCK 2
#define F_TEST 3


extern int lockf (int __fd, int __cmd, __off_t __len);
# 217 "/usr/include/fcntl.h" 3 4
extern int lockf64 (int __fd, int __cmd, __off64_t __len);







extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
     int __advise) __attribute__ ((__nothrow__));
# 237 "/usr/include/fcntl.h" 3 4
extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
       int __advise) __attribute__ ((__nothrow__));
# 247 "/usr/include/fcntl.h" 3 4
extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
# 258 "/usr/include/fcntl.h" 3 4
extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
# 269 "/usr/include/fcntl.h" 3 4

# 1 "/usr/include/poll.h" 1 3 4
# 1 "/usr/include/sys/poll.h" 1 3 4
# 21 "/usr/include/sys/poll.h" 3 4
#define _SYS_POLL_H 1




# 1 "/usr/include/bits/poll.h" 1 3 4
# 26 "/usr/include/bits/poll.h" 3 4
#define POLLIN 0x001
#define POLLPRI 0x002
#define POLLOUT 0x004



#define POLLRDNORM 0x040
#define POLLRDBAND 0x080
#define POLLWRNORM 0x100
#define POLLWRBAND 0x200




#define POLLMSG 0x400
#define POLLREMOVE 0x1000
#define POLLRDHUP 0x2000





#define POLLERR 0x008
#define POLLHUP 0x010
#define POLLNVAL 0x020
# 27 "/usr/include/sys/poll.h" 2 3 4


# 1 "/usr/include/bits/sigset.h" 1 3 4
# 30 "/usr/include/sys/poll.h" 2 3 4

#define __need_timespec 
# 1 "/usr/include/time.h" 1 3 4
# 67 "/usr/include/time.h" 3 4
#undef __need_clock_t
# 83 "/usr/include/time.h" 3 4
#undef __need_time_t
# 95 "/usr/include/time.h" 3 4
#undef __clockid_time_t
# 107 "/usr/include/time.h" 3 4
#undef __need_timer_t
# 127 "/usr/include/time.h" 3 4
#undef __need_timespec
# 33 "/usr/include/sys/poll.h" 2 3 4




typedef unsigned long int nfds_t;


struct pollfd
  {
    int fd;
    short int events;
    short int revents;
  };



# 58 "/usr/include/sys/poll.h" 3 4
extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
# 67 "/usr/include/sys/poll.h" 3 4
extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
    __const struct timespec *__timeout,
    __const __sigset_t *__ss);



# 1 "/usr/include/poll.h" 2 3 4
# 1 "/usr/include/sys/ioctl.h" 1 3 4
# 20 "/usr/include/sys/ioctl.h" 3 4
#define _SYS_IOCTL_H 1






# 1 "/usr/include/bits/ioctls.h" 1 3 4
# 24 "/usr/include/bits/ioctls.h" 3 4
# 1 "/usr/include/asm/ioctls.h" 1 3 4
# 1 "/usr/include/asm-generic/ioctls.h" 1 3 4

#define __ASM_GENERIC_IOCTLS_H 

# 1 "/usr/include/linux/ioctl.h" 1 3 4

#define _LINUX_IOCTL_H 

# 1 "/usr/include/asm/ioctl.h" 1 3 4
# 1 "/usr/include/asm-generic/ioctl.h" 1 3 4

#define _ASM_GENERIC_IOCTL_H 
# 22 "/usr/include/asm-generic/ioctl.h" 3 4
#define _IOC_NRBITS 8
#define _IOC_TYPEBITS 8







#define _IOC_SIZEBITS 14



#define _IOC_DIRBITS 2


#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)

#define _IOC_NRSHIFT 0
#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)







#define _IOC_NONE 0U



#define _IOC_WRITE 1U



#define _IOC_READ 2U


#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))





#define _IOC_TYPECHECK(t) (sizeof(t))


#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))


#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)



#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
# 1 "/usr/include/asm/ioctl.h" 2 3 4
# 5 "/usr/include/linux/ioctl.h" 2 3 4
# 5 "/usr/include/asm-generic/ioctls.h" 2 3 4
# 19 "/usr/include/asm-generic/ioctls.h" 3 4
#define TCGETS 0x5401
#define TCSETS 0x5402
#define TCSETSW 0x5403
#define TCSETSF 0x5404
#define TCGETA 0x5405
#define TCSETA 0x5406
#define TCSETAW 0x5407
#define TCSETAF 0x5408
#define TCSBRK 0x5409
#define TCXONC 0x540A
#define TCFLSH 0x540B
#define TIOCEXCL 0x540C
#define TIOCNXCL 0x540D
#define TIOCSCTTY 0x540E
#define TIOCGPGRP 0x540F
#define TIOCSPGRP 0x5410
#define TIOCOUTQ 0x5411
#define TIOCSTI 0x5412
#define TIOCGWINSZ 0x5413
#define TIOCSWINSZ 0x5414
#define TIOCMGET 0x5415
#define TIOCMBIS 0x5416
#define TIOCMBIC 0x5417
#define TIOCMSET 0x5418
#define TIOCGSOFTCAR 0x5419
#define TIOCSSOFTCAR 0x541A
#define FIONREAD 0x541B
#define TIOCINQ FIONREAD
#define TIOCLINUX 0x541C
#define TIOCCONS 0x541D
#define TIOCGSERIAL 0x541E
#define TIOCSSERIAL 0x541F
#define TIOCPKT 0x5420
#define FIONBIO 0x5421
#define TIOCNOTTY 0x5422
#define TIOCSETD 0x5423
#define TIOCGETD 0x5424
#define TCSBRKP 0x5425
#define TIOCSBRK 0x5427
#define TIOCCBRK 0x5428
#define TIOCGSID 0x5429
#define TCGETS2 _IOR('T', 0x2A, struct termios2)
#define TCSETS2 _IOW('T', 0x2B, struct termios2)
#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
#define TIOCGRS485 0x542E

#define TIOCSRS485 0x542F

#define TIOCGPTN _IOR('T', 0x30, unsigned int)
#define TIOCSPTLCK _IOW('T', 0x31, int)
#define TIOCGDEV _IOR('T', 0x32, unsigned int)
#define TCGETX 0x5432
#define TCSETX 0x5433
#define TCSETXF 0x5434
#define TCSETXW 0x5435
#define TIOCSIG _IOW('T', 0x36, int)
#define TIOCVHANGUP 0x5437

#define FIONCLEX 0x5450
#define FIOCLEX 0x5451
#define FIOASYNC 0x5452
#define TIOCSERCONFIG 0x5453
#define TIOCSERGWILD 0x5454
#define TIOCSERSWILD 0x5455
#define TIOCGLCKTRMIOS 0x5456
#define TIOCSLCKTRMIOS 0x5457
#define TIOCSERGSTRUCT 0x5458
#define TIOCSERGETLSR 0x5459
#define TIOCSERGETMULTI 0x545A
#define TIOCSERSETMULTI 0x545B

#define TIOCMIWAIT 0x545C
#define TIOCGICOUNT 0x545D






#define FIOQSIZE 0x5460



#define TIOCPKT_DATA 0
#define TIOCPKT_FLUSHREAD 1
#define TIOCPKT_FLUSHWRITE 2
#define TIOCPKT_STOP 4
#define TIOCPKT_START 8
#define TIOCPKT_NOSTOP 16
#define TIOCPKT_DOSTOP 32
#define TIOCPKT_IOCTL 64

#define TIOCSER_TEMT 0x01
# 1 "/usr/include/asm/ioctls.h" 2 3 4
# 25 "/usr/include/bits/ioctls.h" 2 3 4


#define SIOCADDRT 0x890B
#define SIOCDELRT 0x890C
#define SIOCRTMSG 0x890D


#define SIOCGIFNAME 0x8910
#define SIOCSIFLINK 0x8911
#define SIOCGIFCONF 0x8912
#define SIOCGIFFLAGS 0x8913
#define SIOCSIFFLAGS 0x8914
#define SIOCGIFADDR 0x8915
#define SIOCSIFADDR 0x8916
#define SIOCGIFDSTADDR 0x8917
#define SIOCSIFDSTADDR 0x8918
#define SIOCGIFBRDADDR 0x8919
#define SIOCSIFBRDADDR 0x891a
#define SIOCGIFNETMASK 0x891b
#define SIOCSIFNETMASK 0x891c
#define SIOCGIFMETRIC 0x891d
#define SIOCSIFMETRIC 0x891e
#define SIOCGIFMEM 0x891f
#define SIOCSIFMEM 0x8920
#define SIOCGIFMTU 0x8921
#define SIOCSIFMTU 0x8922
#define SIOCSIFNAME 0x8923
#define SIOCSIFHWADDR 0x8924
#define SIOCGIFENCAP 0x8925
#define SIOCSIFENCAP 0x8926
#define SIOCGIFHWADDR 0x8927
#define SIOCGIFSLAVE 0x8929
#define SIOCSIFSLAVE 0x8930
#define SIOCADDMULTI 0x8931
#define SIOCDELMULTI 0x8932
#define SIOCGIFINDEX 0x8933
#define SIOGIFINDEX SIOCGIFINDEX
#define SIOCSIFPFLAGS 0x8934
#define SIOCGIFPFLAGS 0x8935
#define SIOCDIFADDR 0x8936
#define SIOCSIFHWBROADCAST 0x8937
#define SIOCGIFCOUNT 0x8938

#define SIOCGIFBR 0x8940
#define SIOCSIFBR 0x8941

#define SIOCGIFTXQLEN 0x8942
#define SIOCSIFTXQLEN 0x8943




#define SIOCDARP 0x8953
#define SIOCGARP 0x8954
#define SIOCSARP 0x8955


#define SIOCDRARP 0x8960
#define SIOCGRARP 0x8961
#define SIOCSRARP 0x8962



#define SIOCGIFMAP 0x8970
#define SIOCSIFMAP 0x8971



#define SIOCADDDLCI 0x8980
#define SIOCDELDLCI 0x8981
# 103 "/usr/include/bits/ioctls.h" 3 4
#define SIOCDEVPRIVATE 0x89F0





#define SIOCPROTOPRIVATE 0x89E0
# 28 "/usr/include/sys/ioctl.h" 2 3 4


# 1 "/usr/include/bits/ioctl-types.h" 1 3 4
# 25 "/usr/include/bits/ioctl-types.h" 3 4
# 1 "/usr/include/asm/ioctls.h" 1 3 4
# 26 "/usr/include/bits/ioctl-types.h" 2 3 4


struct winsize
  {
    unsigned short int ws_row;
    unsigned short int ws_col;
    unsigned short int ws_xpixel;
    unsigned short int ws_ypixel;
  };

#define NCC 8
struct termio
  {
    unsigned short int c_iflag;
    unsigned short int c_oflag;
    unsigned short int c_cflag;
    unsigned short int c_lflag;
    unsigned char c_line;
    unsigned char c_cc[8];
};


#define TIOCM_LE 0x001
#define TIOCM_DTR 0x002
#define TIOCM_RTS 0x004
#define TIOCM_ST 0x008
#define TIOCM_SR 0x010
#define TIOCM_CTS 0x020
#define TIOCM_CAR 0x040
#define TIOCM_RNG 0x080
#define TIOCM_DSR 0x100
#define TIOCM_CD TIOCM_CAR
#define TIOCM_RI TIOCM_RNG




#define N_TTY 0
#define N_SLIP 1
#define N_MOUSE 2
#define N_PPP 3
#define N_STRIP 4
#define N_AX25 5
#define N_X25 6
#define N_6PACK 7
#define N_MASC 8
#define N_R3964 9
#define N_PROFIBUS_FDL 10
#define N_IRDA 11
#define N_SMSBLOCK 12
#define N_HDLC 13
#define N_SYNC_PPP 14
#define N_HCI 15
# 31 "/usr/include/sys/ioctl.h" 2 3 4






# 1 "/usr/include/sys/ttydefaults.h" 1 3 4
# 41 "/usr/include/sys/ttydefaults.h" 3 4
#define _SYS_TTYDEFAULTS_H_ 




#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS)
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
#define TTYDEF_SPEED (B9600)




#define CTRL(x) (x&037)
#define CEOF CTRL('d')



#define CEOL '\0'

#define CERASE 0177
#define CINTR CTRL('c')



#define CSTATUS '\0'

#define CKILL CTRL('u')
#define CMIN 1
#define CQUIT 034
#define CSUSP CTRL('z')
#define CTIME 0
#define CDSUSP CTRL('y')
#define CSTART CTRL('q')
#define CSTOP CTRL('s')
#define CLNEXT CTRL('v')
#define CDISCARD CTRL('o')
#define CWERASE CTRL('w')
#define CREPRINT CTRL('r')
#define CEOT CEOF

#define CBRK CEOL
#define CRPRNT CREPRINT
#define CFLUSH CDISCARD
# 38 "/usr/include/sys/ioctl.h" 2 3 4




extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__));


# 1 "/usr/include/sys/mman.h" 1 3 4
# 21 "/usr/include/sys/mman.h" 3 4
#define _SYS_MMAN_H 1



#define __need_size_t 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 408 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_NULL
# 27 "/usr/include/sys/mman.h" 2 3 4
# 42 "/usr/include/sys/mman.h" 3 4
# 1 "/usr/include/bits/mman.h" 1 3 4
# 34 "/usr/include/bits/mman.h" 3 4
#define PROT_READ 0x1
#define PROT_WRITE 0x2
#define PROT_EXEC 0x4
#define PROT_NONE 0x0
#define PROT_GROWSDOWN 0x01000000

#define PROT_GROWSUP 0x02000000



#define MAP_SHARED 0x01
#define MAP_PRIVATE 0x02

#define MAP_TYPE 0x0f



#define MAP_FIXED 0x10

#define MAP_FILE 0
#define MAP_ANONYMOUS 0x20
#define MAP_ANON MAP_ANONYMOUS




#define MAP_GROWSDOWN 0x00100
#define MAP_DENYWRITE 0x00800
#define MAP_EXECUTABLE 0x01000
#define MAP_LOCKED 0x02000
#define MAP_NORESERVE 0x04000
#define MAP_POPULATE 0x08000
#define MAP_NONBLOCK 0x10000
#define MAP_STACK 0x20000
#define MAP_HUGETLB 0x40000



#define MS_ASYNC 1
#define MS_SYNC 4
#define MS_INVALIDATE 2


#define MCL_CURRENT 1
#define MCL_FUTURE 2




#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2




#define MADV_NORMAL 0
#define MADV_RANDOM 1
#define MADV_SEQUENTIAL 2
#define MADV_WILLNEED 3
#define MADV_DONTNEED 4
#define MADV_REMOVE 9
#define MADV_DONTFORK 10
#define MADV_DOFORK 11
#define MADV_MERGEABLE 12
#define MADV_UNMERGEABLE 13
#define MADV_HUGEPAGE 14
#define MADV_NOHUGEPAGE 15
#define MADV_HWPOISON 100




#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
#define POSIX_MADV_SEQUENTIAL 2
#define POSIX_MADV_WILLNEED 3
#define POSIX_MADV_DONTNEED 4
# 43 "/usr/include/sys/mman.h" 2 3 4


#define MAP_FAILED ((void *) -1)


# 58 "/usr/include/sys/mman.h" 3 4
extern void *mmap (void *__addr, size_t __len, int __prot,
     int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__));
# 71 "/usr/include/sys/mman.h" 3 4
extern void *mmap64 (void *__addr, size_t __len, int __prot,
       int __flags, int __fd, __off64_t __offset) __attribute__ ((__nothrow__));




extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__));




extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__));







extern int msync (void *__addr, size_t __len, int __flags);




extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__));



extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__));




extern int mlock (__const void *__addr, size_t __len) __attribute__ ((__nothrow__));


extern int munlock (__const void *__addr, size_t __len) __attribute__ ((__nothrow__));




extern int mlockall (int __flags) __attribute__ ((__nothrow__));



extern int munlockall (void) __attribute__ ((__nothrow__));







extern int mincore (void *__start, size_t __len, unsigned char *__vec)
     __attribute__ ((__nothrow__));
# 134 "/usr/include/sys/mman.h" 3 4
extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
       int __flags, ...) __attribute__ ((__nothrow__));



extern int remap_file_pages (void *__start, size_t __size, int __prot,
        size_t __pgoff, int __flags) __attribute__ ((__nothrow__));




extern int shm_open (__const char *__name, int __oflag, mode_t __mode);


extern int shm_unlink (__const char *__name);


# 1 "/usr/include/unistd.h" 1 3 4
# 24 "/usr/include/unistd.h" 3 4
#define _UNISTD_H 1










#define _POSIX_VERSION 200809L
# 54 "/usr/include/unistd.h" 3 4
#define __POSIX2_THIS_VERSION 200809L
# 68 "/usr/include/unistd.h" 3 4
#define _POSIX2_VERSION __POSIX2_THIS_VERSION



#define _POSIX2_C_BIND __POSIX2_THIS_VERSION



#define _POSIX2_C_DEV __POSIX2_THIS_VERSION



#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION



#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION



#define _XOPEN_VERSION 700
# 98 "/usr/include/unistd.h" 3 4
#define _XOPEN_XCU_VERSION 4


#define _XOPEN_XPG2 1
#define _XOPEN_XPG3 1
#define _XOPEN_XPG4 1


#define _XOPEN_UNIX 1


#define _XOPEN_CRYPT 1



#define _XOPEN_ENH_I18N 1


#define _XOPEN_LEGACY 1
# 203 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/bits/posix_opt.h" 1 3 4
# 21 "/usr/include/bits/posix_opt.h" 3 4
#define _BITS_POSIX_OPT_H 1


#define _POSIX_JOB_CONTROL 1


#define _POSIX_SAVED_IDS 1


#define _POSIX_PRIORITY_SCHEDULING 200809L


#define _POSIX_SYNCHRONIZED_IO 200809L


#define _POSIX_FSYNC 200809L


#define _POSIX_MAPPED_FILES 200809L


#define _POSIX_MEMLOCK 200809L


#define _POSIX_MEMLOCK_RANGE 200809L


#define _POSIX_MEMORY_PROTECTION 200809L


#define _POSIX_CHOWN_RESTRICTED 0



#define _POSIX_VDISABLE '\0'


#define _POSIX_NO_TRUNC 1


#define _XOPEN_REALTIME 1


#define _XOPEN_REALTIME_THREADS 1


#define _XOPEN_SHM 1


#define _POSIX_THREADS 200809L


#define _POSIX_REENTRANT_FUNCTIONS 1
#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L


#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L


#define _POSIX_THREAD_ATTR_STACKSIZE 200809L


#define _POSIX_THREAD_ATTR_STACKADDR 200809L


#define _POSIX_THREAD_PRIO_INHERIT 200809L



#define _POSIX_THREAD_PRIO_PROTECT 200809L



#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L


#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1



#define _POSIX_SEMAPHORES 200809L


#define _POSIX_REALTIME_SIGNALS 200809L


#define _POSIX_ASYNCHRONOUS_IO 200809L
#define _POSIX_ASYNC_IO 1

#define _LFS_ASYNCHRONOUS_IO 1

#define _POSIX_PRIORITIZED_IO 200809L


#define _LFS64_ASYNCHRONOUS_IO 1


#define _LFS_LARGEFILE 1
#define _LFS64_LARGEFILE 1
#define _LFS64_STDIO 1


#define _POSIX_SHARED_MEMORY_OBJECTS 200809L


#define _POSIX_CPUTIME 0


#define _POSIX_THREAD_CPUTIME 0


#define _POSIX_REGEXP 1


#define _POSIX_READER_WRITER_LOCKS 200809L


#define _POSIX_SHELL 1


#define _POSIX_TIMEOUTS 200809L


#define _POSIX_SPIN_LOCKS 200809L


#define _POSIX_SPAWN 200809L


#define _POSIX_TIMERS 200809L


#define _POSIX_BARRIERS 200809L


#define _POSIX_MESSAGE_PASSING 200809L


#define _POSIX_THREAD_PROCESS_SHARED 200809L


#define _POSIX_MONOTONIC_CLOCK 0


#define _POSIX_CLOCK_SELECTION 200809L


#define _POSIX_ADVISORY_INFO 200809L


#define _POSIX_IPV6 200809L


#define _POSIX_RAW_SOCKETS 200809L


#define _POSIX2_CHAR_TERM 200809L


#define _POSIX_SPORADIC_SERVER -1
#define _POSIX_THREAD_SPORADIC_SERVER -1


#define _POSIX_TRACE -1
#define _POSIX_TRACE_EVENT_FILTER -1
#define _POSIX_TRACE_INHERIT -1
#define _POSIX_TRACE_LOG -1


#define _POSIX_TYPED_MEMORY_OBJECTS -1
# 204 "/usr/include/unistd.h" 2 3 4



# 1 "/usr/include/bits/environments.h" 1 3 4
# 43 "/usr/include/bits/environments.h" 3 4
#define _POSIX_V7_ILP32_OFF32 1
#define _POSIX_V7_ILP32_OFFBIG 1
#define _POSIX_V6_ILP32_OFF32 1
#define _POSIX_V6_ILP32_OFFBIG 1
#define _XBS5_ILP32_OFF32 1
#define _XBS5_ILP32_OFFBIG 1
# 63 "/usr/include/bits/environments.h" 3 4
#define __ILP32_OFF32_CFLAGS "-m32"
#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
#define __ILP32_OFF32_LDFLAGS "-m32"
#define __ILP32_OFFBIG_LDFLAGS "-m32"
#define __LP64_OFF64_CFLAGS "-m64"
#define __LP64_OFF64_LDFLAGS "-m64"
# 208 "/usr/include/unistd.h" 2 3 4



#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
# 225 "/usr/include/unistd.h" 3 4
#define __need_size_t 
#define __need_NULL 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef NULL




#define NULL ((void *)0)





#undef __need_NULL
# 228 "/usr/include/unistd.h" 2 3 4
# 268 "/usr/include/unistd.h" 3 4
typedef __intptr_t intptr_t;
#define __intptr_t_defined 





typedef __socklen_t socklen_t;
#define __socklen_t_defined 





#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0


extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));




extern int euidaccess (__const char *__name, int __type)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int eaccess (__const char *__name, int __type)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ;





#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2




#define L_SET SEEK_SET
#define L_INCR SEEK_CUR
#define L_XTND SEEK_END
# 331 "/usr/include/unistd.h" 3 4
extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__));
# 342 "/usr/include/unistd.h" 3 4
extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
     __attribute__ ((__nothrow__));






extern int close (int __fd);






extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;





extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
# 373 "/usr/include/unistd.h" 3 4
extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
        __off_t __offset) ;






extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
         __off_t __offset) ;
# 401 "/usr/include/unistd.h" 3 4
extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
   __off64_t __offset) ;


extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
    __off64_t __offset) ;







extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) ;




extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__)) ;
# 429 "/usr/include/unistd.h" 3 4
extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__));
# 441 "/usr/include/unistd.h" 3 4
extern unsigned int sleep (unsigned int __seconds);







extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
     __attribute__ ((__nothrow__));






extern int usleep (__useconds_t __useconds);
# 466 "/usr/include/unistd.h" 3 4
extern int pause (void);



extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) ;




extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;






extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
       __gid_t __group, int __flag)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ;



extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern int fchdir (int __fd) __attribute__ ((__nothrow__)) ;
# 508 "/usr/include/unistd.h" 3 4
extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) ;





extern char *get_current_dir_name (void) __attribute__ ((__nothrow__));







extern char *getwd (char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;




extern int dup (int __fd) __attribute__ ((__nothrow__)) ;


extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__));




extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__));



extern char **__environ;

extern char **environ;





extern int execve (__const char *__path, char *__const __argv[],
     char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));




extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));




extern int execv (__const char *__path, char *__const __argv[])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));



extern int execle (__const char *__path, __const char *__arg, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));



extern int execl (__const char *__path, __const char *__arg, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));



extern int execvp (__const char *__file, char *__const __argv[])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));




extern int execlp (__const char *__file, __const char *__arg, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));




extern int execvpe (__const char *__file, char *__const __argv[],
      char *__const __envp[])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern int nice (int __inc) __attribute__ ((__nothrow__)) ;




extern void _exit (int __status) __attribute__ ((__noreturn__));





# 1 "/usr/include/bits/confname.h" 1 3 4
# 26 "/usr/include/bits/confname.h" 3 4
enum
  {
    _PC_LINK_MAX,
#define _PC_LINK_MAX _PC_LINK_MAX
    _PC_MAX_CANON,
#define _PC_MAX_CANON _PC_MAX_CANON
    _PC_MAX_INPUT,
#define _PC_MAX_INPUT _PC_MAX_INPUT
    _PC_NAME_MAX,
#define _PC_NAME_MAX _PC_NAME_MAX
    _PC_PATH_MAX,
#define _PC_PATH_MAX _PC_PATH_MAX
    _PC_PIPE_BUF,
#define _PC_PIPE_BUF _PC_PIPE_BUF
    _PC_CHOWN_RESTRICTED,
#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
    _PC_NO_TRUNC,
#define _PC_NO_TRUNC _PC_NO_TRUNC
    _PC_VDISABLE,
#define _PC_VDISABLE _PC_VDISABLE
    _PC_SYNC_IO,
#define _PC_SYNC_IO _PC_SYNC_IO
    _PC_ASYNC_IO,
#define _PC_ASYNC_IO _PC_ASYNC_IO
    _PC_PRIO_IO,
#define _PC_PRIO_IO _PC_PRIO_IO
    _PC_SOCK_MAXBUF,
#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
    _PC_FILESIZEBITS,
#define _PC_FILESIZEBITS _PC_FILESIZEBITS
    _PC_REC_INCR_XFER_SIZE,
#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
    _PC_REC_MAX_XFER_SIZE,
#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
    _PC_REC_MIN_XFER_SIZE,
#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
    _PC_REC_XFER_ALIGN,
#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
    _PC_ALLOC_SIZE_MIN,
#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
    _PC_SYMLINK_MAX,
#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
    _PC_2_SYMLINKS
#define _PC_2_SYMLINKS _PC_2_SYMLINKS
  };


enum
  {
    _SC_ARG_MAX,
#define _SC_ARG_MAX _SC_ARG_MAX
    _SC_CHILD_MAX,
#define _SC_CHILD_MAX _SC_CHILD_MAX
    _SC_CLK_TCK,
#define _SC_CLK_TCK _SC_CLK_TCK
    _SC_NGROUPS_MAX,
#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
    _SC_OPEN_MAX,
#define _SC_OPEN_MAX _SC_OPEN_MAX
    _SC_STREAM_MAX,
#define _SC_STREAM_MAX _SC_STREAM_MAX
    _SC_TZNAME_MAX,
#define _SC_TZNAME_MAX _SC_TZNAME_MAX
    _SC_JOB_CONTROL,
#define _SC_JOB_CONTROL _SC_JOB_CONTROL
    _SC_SAVED_IDS,
#define _SC_SAVED_IDS _SC_SAVED_IDS
    _SC_REALTIME_SIGNALS,
#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
    _SC_PRIORITY_SCHEDULING,
#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
    _SC_TIMERS,
#define _SC_TIMERS _SC_TIMERS
    _SC_ASYNCHRONOUS_IO,
#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
    _SC_PRIORITIZED_IO,
#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
    _SC_SYNCHRONIZED_IO,
#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
    _SC_FSYNC,
#define _SC_FSYNC _SC_FSYNC
    _SC_MAPPED_FILES,
#define _SC_MAPPED_FILES _SC_MAPPED_FILES
    _SC_MEMLOCK,
#define _SC_MEMLOCK _SC_MEMLOCK
    _SC_MEMLOCK_RANGE,
#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
    _SC_MEMORY_PROTECTION,
#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
    _SC_MESSAGE_PASSING,
#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
    _SC_SEMAPHORES,
#define _SC_SEMAPHORES _SC_SEMAPHORES
    _SC_SHARED_MEMORY_OBJECTS,
#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
    _SC_AIO_LISTIO_MAX,
#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
    _SC_AIO_MAX,
#define _SC_AIO_MAX _SC_AIO_MAX
    _SC_AIO_PRIO_DELTA_MAX,
#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
    _SC_DELAYTIMER_MAX,
#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
    _SC_MQ_OPEN_MAX,
#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
    _SC_MQ_PRIO_MAX,
#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
    _SC_VERSION,
#define _SC_VERSION _SC_VERSION
    _SC_PAGESIZE,
#define _SC_PAGESIZE _SC_PAGESIZE
#define _SC_PAGE_SIZE _SC_PAGESIZE
    _SC_RTSIG_MAX,
#define _SC_RTSIG_MAX _SC_RTSIG_MAX
    _SC_SEM_NSEMS_MAX,
#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
    _SC_SEM_VALUE_MAX,
#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
    _SC_SIGQUEUE_MAX,
#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
    _SC_TIMER_MAX,
#define _SC_TIMER_MAX _SC_TIMER_MAX



    _SC_BC_BASE_MAX,
#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
    _SC_BC_DIM_MAX,
#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
    _SC_BC_SCALE_MAX,
#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
    _SC_BC_STRING_MAX,
#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
    _SC_COLL_WEIGHTS_MAX,
#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
    _SC_EQUIV_CLASS_MAX,
#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
    _SC_EXPR_NEST_MAX,
#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
    _SC_LINE_MAX,
#define _SC_LINE_MAX _SC_LINE_MAX
    _SC_RE_DUP_MAX,
#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
    _SC_CHARCLASS_NAME_MAX,
#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX

    _SC_2_VERSION,
#define _SC_2_VERSION _SC_2_VERSION
    _SC_2_C_BIND,
#define _SC_2_C_BIND _SC_2_C_BIND
    _SC_2_C_DEV,
#define _SC_2_C_DEV _SC_2_C_DEV
    _SC_2_FORT_DEV,
#define _SC_2_FORT_DEV _SC_2_FORT_DEV
    _SC_2_FORT_RUN,
#define _SC_2_FORT_RUN _SC_2_FORT_RUN
    _SC_2_SW_DEV,
#define _SC_2_SW_DEV _SC_2_SW_DEV
    _SC_2_LOCALEDEF,
#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF

    _SC_PII,
#define _SC_PII _SC_PII
    _SC_PII_XTI,
#define _SC_PII_XTI _SC_PII_XTI
    _SC_PII_SOCKET,
#define _SC_PII_SOCKET _SC_PII_SOCKET
    _SC_PII_INTERNET,
#define _SC_PII_INTERNET _SC_PII_INTERNET
    _SC_PII_OSI,
#define _SC_PII_OSI _SC_PII_OSI
    _SC_POLL,
#define _SC_POLL _SC_POLL
    _SC_SELECT,
#define _SC_SELECT _SC_SELECT
    _SC_UIO_MAXIOV,
#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
    _SC_IOV_MAX = _SC_UIO_MAXIOV,
#define _SC_IOV_MAX _SC_IOV_MAX
    _SC_PII_INTERNET_STREAM,
#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
    _SC_PII_INTERNET_DGRAM,
#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
    _SC_PII_OSI_COTS,
#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
    _SC_PII_OSI_CLTS,
#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
    _SC_PII_OSI_M,
#define _SC_PII_OSI_M _SC_PII_OSI_M
    _SC_T_IOV_MAX,
#define _SC_T_IOV_MAX _SC_T_IOV_MAX


    _SC_THREADS,
#define _SC_THREADS _SC_THREADS
    _SC_THREAD_SAFE_FUNCTIONS,
#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
    _SC_GETGR_R_SIZE_MAX,
#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
    _SC_GETPW_R_SIZE_MAX,
#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
    _SC_LOGIN_NAME_MAX,
#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
    _SC_TTY_NAME_MAX,
#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
    _SC_THREAD_DESTRUCTOR_ITERATIONS,
#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
    _SC_THREAD_KEYS_MAX,
#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
    _SC_THREAD_STACK_MIN,
#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
    _SC_THREAD_THREADS_MAX,
#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
    _SC_THREAD_ATTR_STACKADDR,
#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
    _SC_THREAD_ATTR_STACKSIZE,
#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
    _SC_THREAD_PRIORITY_SCHEDULING,
#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
    _SC_THREAD_PRIO_INHERIT,
#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
    _SC_THREAD_PRIO_PROTECT,
#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
    _SC_THREAD_PROCESS_SHARED,
#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED

    _SC_NPROCESSORS_CONF,
#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
    _SC_NPROCESSORS_ONLN,
#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
    _SC_PHYS_PAGES,
#define _SC_PHYS_PAGES _SC_PHYS_PAGES
    _SC_AVPHYS_PAGES,
#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
    _SC_ATEXIT_MAX,
#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
    _SC_PASS_MAX,
#define _SC_PASS_MAX _SC_PASS_MAX

    _SC_XOPEN_VERSION,
#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
    _SC_XOPEN_XCU_VERSION,
#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
    _SC_XOPEN_UNIX,
#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
    _SC_XOPEN_CRYPT,
#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
    _SC_XOPEN_ENH_I18N,
#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
    _SC_XOPEN_SHM,
#define _SC_XOPEN_SHM _SC_XOPEN_SHM

    _SC_2_CHAR_TERM,
#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
    _SC_2_C_VERSION,
#define _SC_2_C_VERSION _SC_2_C_VERSION
    _SC_2_UPE,
#define _SC_2_UPE _SC_2_UPE

    _SC_XOPEN_XPG2,
#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
    _SC_XOPEN_XPG3,
#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
    _SC_XOPEN_XPG4,
#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4

    _SC_CHAR_BIT,
#define _SC_CHAR_BIT _SC_CHAR_BIT
    _SC_CHAR_MAX,
#define _SC_CHAR_MAX _SC_CHAR_MAX
    _SC_CHAR_MIN,
#define _SC_CHAR_MIN _SC_CHAR_MIN
    _SC_INT_MAX,
#define _SC_INT_MAX _SC_INT_MAX
    _SC_INT_MIN,
#define _SC_INT_MIN _SC_INT_MIN
    _SC_LONG_BIT,
#define _SC_LONG_BIT _SC_LONG_BIT
    _SC_WORD_BIT,
#define _SC_WORD_BIT _SC_WORD_BIT
    _SC_MB_LEN_MAX,
#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
    _SC_NZERO,
#define _SC_NZERO _SC_NZERO
    _SC_SSIZE_MAX,
#define _SC_SSIZE_MAX _SC_SSIZE_MAX
    _SC_SCHAR_MAX,
#define _SC_SCHAR_MAX _SC_SCHAR_MAX
    _SC_SCHAR_MIN,
#define _SC_SCHAR_MIN _SC_SCHAR_MIN
    _SC_SHRT_MAX,
#define _SC_SHRT_MAX _SC_SHRT_MAX
    _SC_SHRT_MIN,
#define _SC_SHRT_MIN _SC_SHRT_MIN
    _SC_UCHAR_MAX,
#define _SC_UCHAR_MAX _SC_UCHAR_MAX
    _SC_UINT_MAX,
#define _SC_UINT_MAX _SC_UINT_MAX
    _SC_ULONG_MAX,
#define _SC_ULONG_MAX _SC_ULONG_MAX
    _SC_USHRT_MAX,
#define _SC_USHRT_MAX _SC_USHRT_MAX

    _SC_NL_ARGMAX,
#define _SC_NL_ARGMAX _SC_NL_ARGMAX
    _SC_NL_LANGMAX,
#define _SC_NL_LANGMAX _SC_NL_LANGMAX
    _SC_NL_MSGMAX,
#define _SC_NL_MSGMAX _SC_NL_MSGMAX
    _SC_NL_NMAX,
#define _SC_NL_NMAX _SC_NL_NMAX
    _SC_NL_SETMAX,
#define _SC_NL_SETMAX _SC_NL_SETMAX
    _SC_NL_TEXTMAX,
#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX

    _SC_XBS5_ILP32_OFF32,
#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
    _SC_XBS5_ILP32_OFFBIG,
#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
    _SC_XBS5_LP64_OFF64,
#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
    _SC_XBS5_LPBIG_OFFBIG,
#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG

    _SC_XOPEN_LEGACY,
#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
    _SC_XOPEN_REALTIME,
#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
    _SC_XOPEN_REALTIME_THREADS,
#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS

    _SC_ADVISORY_INFO,
#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
    _SC_BARRIERS,
#define _SC_BARRIERS _SC_BARRIERS
    _SC_BASE,
#define _SC_BASE _SC_BASE
    _SC_C_LANG_SUPPORT,
#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
    _SC_C_LANG_SUPPORT_R,
#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
    _SC_CLOCK_SELECTION,
#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
    _SC_CPUTIME,
#define _SC_CPUTIME _SC_CPUTIME
    _SC_THREAD_CPUTIME,
#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
    _SC_DEVICE_IO,
#define _SC_DEVICE_IO _SC_DEVICE_IO
    _SC_DEVICE_SPECIFIC,
#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
    _SC_DEVICE_SPECIFIC_R,
#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
    _SC_FD_MGMT,
#define _SC_FD_MGMT _SC_FD_MGMT
    _SC_FIFO,
#define _SC_FIFO _SC_FIFO
    _SC_PIPE,
#define _SC_PIPE _SC_PIPE
    _SC_FILE_ATTRIBUTES,
#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
    _SC_FILE_LOCKING,
#define _SC_FILE_LOCKING _SC_FILE_LOCKING
    _SC_FILE_SYSTEM,
#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
    _SC_MONOTONIC_CLOCK,
#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
    _SC_MULTI_PROCESS,
#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
    _SC_SINGLE_PROCESS,
#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
    _SC_NETWORKING,
#define _SC_NETWORKING _SC_NETWORKING
    _SC_READER_WRITER_LOCKS,
#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
    _SC_SPIN_LOCKS,
#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
    _SC_REGEXP,
#define _SC_REGEXP _SC_REGEXP
    _SC_REGEX_VERSION,
#define _SC_REGEX_VERSION _SC_REGEX_VERSION
    _SC_SHELL,
#define _SC_SHELL _SC_SHELL
    _SC_SIGNALS,
#define _SC_SIGNALS _SC_SIGNALS
    _SC_SPAWN,
#define _SC_SPAWN _SC_SPAWN
    _SC_SPORADIC_SERVER,
#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
    _SC_THREAD_SPORADIC_SERVER,
#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
    _SC_SYSTEM_DATABASE,
#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
    _SC_SYSTEM_DATABASE_R,
#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
    _SC_TIMEOUTS,
#define _SC_TIMEOUTS _SC_TIMEOUTS
    _SC_TYPED_MEMORY_OBJECTS,
#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
    _SC_USER_GROUPS,
#define _SC_USER_GROUPS _SC_USER_GROUPS
    _SC_USER_GROUPS_R,
#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
    _SC_2_PBS,
#define _SC_2_PBS _SC_2_PBS
    _SC_2_PBS_ACCOUNTING,
#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
    _SC_2_PBS_LOCATE,
#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
    _SC_2_PBS_MESSAGE,
#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
    _SC_2_PBS_TRACK,
#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
    _SC_SYMLOOP_MAX,
#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
    _SC_STREAMS,
#define _SC_STREAMS _SC_STREAMS
    _SC_2_PBS_CHECKPOINT,
#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT

    _SC_V6_ILP32_OFF32,
#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
    _SC_V6_ILP32_OFFBIG,
#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
    _SC_V6_LP64_OFF64,
#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
    _SC_V6_LPBIG_OFFBIG,
#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG

    _SC_HOST_NAME_MAX,
#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
    _SC_TRACE,
#define _SC_TRACE _SC_TRACE
    _SC_TRACE_EVENT_FILTER,
#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
    _SC_TRACE_INHERIT,
#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
    _SC_TRACE_LOG,
#define _SC_TRACE_LOG _SC_TRACE_LOG

    _SC_LEVEL1_ICACHE_SIZE,
#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
    _SC_LEVEL1_ICACHE_ASSOC,
#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
    _SC_LEVEL1_ICACHE_LINESIZE,
#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
    _SC_LEVEL1_DCACHE_SIZE,
#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
    _SC_LEVEL1_DCACHE_ASSOC,
#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
    _SC_LEVEL1_DCACHE_LINESIZE,
#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
    _SC_LEVEL2_CACHE_SIZE,
#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
    _SC_LEVEL2_CACHE_ASSOC,
#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
    _SC_LEVEL2_CACHE_LINESIZE,
#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
    _SC_LEVEL3_CACHE_SIZE,
#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
    _SC_LEVEL3_CACHE_ASSOC,
#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
    _SC_LEVEL3_CACHE_LINESIZE,
#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
    _SC_LEVEL4_CACHE_SIZE,
#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
    _SC_LEVEL4_CACHE_ASSOC,
#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
    _SC_LEVEL4_CACHE_LINESIZE,
#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE


    _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
#define _SC_IPV6 _SC_IPV6
    _SC_RAW_SOCKETS,
#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS

    _SC_V7_ILP32_OFF32,
#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32
    _SC_V7_ILP32_OFFBIG,
#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
    _SC_V7_LP64_OFF64,
#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
    _SC_V7_LPBIG_OFFBIG,
#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG

    _SC_SS_REPL_MAX,
#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX

    _SC_TRACE_EVENT_NAME_MAX,
#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX
    _SC_TRACE_NAME_MAX,
#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX
    _SC_TRACE_SYS_MAX,
#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX
    _SC_TRACE_USER_EVENT_MAX,
#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX

    _SC_XOPEN_STREAMS,
#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS

    _SC_THREAD_ROBUST_PRIO_INHERIT,
#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
    _SC_THREAD_ROBUST_PRIO_PROTECT
#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
  };


enum
  {
    _CS_PATH,
#define _CS_PATH _CS_PATH

    _CS_V6_WIDTH_RESTRICTED_ENVS,
#define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS

    _CS_GNU_LIBC_VERSION,
#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
    _CS_GNU_LIBPTHREAD_VERSION,
#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION

    _CS_V5_WIDTH_RESTRICTED_ENVS,
#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS

    _CS_V7_WIDTH_RESTRICTED_ENVS,
#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS

    _CS_LFS_CFLAGS = 1000,
#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
    _CS_LFS_LDFLAGS,
#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
    _CS_LFS_LIBS,
#define _CS_LFS_LIBS _CS_LFS_LIBS
    _CS_LFS_LINTFLAGS,
#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
    _CS_LFS64_CFLAGS,
#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
    _CS_LFS64_LDFLAGS,
#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
    _CS_LFS64_LIBS,
#define _CS_LFS64_LIBS _CS_LFS64_LIBS
    _CS_LFS64_LINTFLAGS,
#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS

    _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
    _CS_XBS5_ILP32_OFF32_LDFLAGS,
#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
    _CS_XBS5_ILP32_OFF32_LIBS,
#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
    _CS_XBS5_ILP32_OFF32_LINTFLAGS,
#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
    _CS_XBS5_ILP32_OFFBIG_CFLAGS,
#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
    _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
    _CS_XBS5_ILP32_OFFBIG_LIBS,
#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
    _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
    _CS_XBS5_LP64_OFF64_CFLAGS,
#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
    _CS_XBS5_LP64_OFF64_LDFLAGS,
#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
    _CS_XBS5_LP64_OFF64_LIBS,
#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
    _CS_XBS5_LP64_OFF64_LINTFLAGS,
#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
    _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
    _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
    _CS_XBS5_LPBIG_OFFBIG_LIBS,
#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
    _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS

    _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
    _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
    _CS_POSIX_V6_ILP32_OFF32_LIBS,
#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
    _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
    _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
    _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
    _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
    _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
    _CS_POSIX_V6_LP64_OFF64_CFLAGS,
#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
    _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
    _CS_POSIX_V6_LP64_OFF64_LIBS,
#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
    _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
    _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
    _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
    _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
    _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS

    _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
    _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
    _CS_POSIX_V7_ILP32_OFF32_LIBS,
#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
    _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
    _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
    _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
    _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
    _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
    _CS_POSIX_V7_LP64_OFF64_CFLAGS,
#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
    _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
    _CS_POSIX_V7_LP64_OFF64_LIBS,
#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
    _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
    _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
    _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
    _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
    _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS

    _CS_V6_ENV,
#define _CS_V6_ENV _CS_V6_ENV
    _CS_V7_ENV
#define _CS_V7_ENV _CS_V7_ENV
  };
# 607 "/usr/include/unistd.h" 2 3 4


extern long int pathconf (__const char *__path, int __name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__));


extern long int sysconf (int __name) __attribute__ ((__nothrow__));



extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__));




extern __pid_t getpid (void) __attribute__ ((__nothrow__));


extern __pid_t getppid (void) __attribute__ ((__nothrow__));




extern __pid_t getpgrp (void) __attribute__ ((__nothrow__));
# 643 "/usr/include/unistd.h" 3 4
extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__));

extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__));






extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__));
# 669 "/usr/include/unistd.h" 3 4
extern int setpgrp (void) __attribute__ ((__nothrow__));
# 686 "/usr/include/unistd.h" 3 4
extern __pid_t setsid (void) __attribute__ ((__nothrow__));



extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__));



extern __uid_t getuid (void) __attribute__ ((__nothrow__));


extern __uid_t geteuid (void) __attribute__ ((__nothrow__));


extern __gid_t getgid (void) __attribute__ ((__nothrow__));


extern __gid_t getegid (void) __attribute__ ((__nothrow__));




extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) ;



extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__));






extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__));




extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__));




extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__));






extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__));




extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__));




extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__));





extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
     __attribute__ ((__nothrow__));



extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
     __attribute__ ((__nothrow__));



extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
     __attribute__ ((__nothrow__));



extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
     __attribute__ ((__nothrow__));






extern __pid_t fork (void) __attribute__ ((__nothrow__));







extern __pid_t vfork (void) __attribute__ ((__nothrow__));





extern char *ttyname (int __fd) __attribute__ ((__nothrow__));



extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ;



extern int isatty (int __fd) __attribute__ ((__nothrow__));





extern int ttyslot (void) __attribute__ ((__nothrow__));




extern int link (__const char *__from, __const char *__to)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ;




extern int linkat (int __fromfd, __const char *__from, int __tofd,
     __const char *__to, int __flags)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))) ;




extern int symlink (__const char *__from, __const char *__to)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ;




extern ssize_t readlink (__const char *__restrict __path,
    char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ;




extern int symlinkat (__const char *__from, int __tofd,
        __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;


extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) ;



extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern int unlinkat (int __fd, __const char *__name, int __flag)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));



extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__));


extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__));






extern char *getlogin (void);







extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));




extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







#define __need_getopt 
# 1 "/usr/include/getopt.h" 1 3 4
# 59 "/usr/include/getopt.h" 3 4
extern char *optarg;
# 73 "/usr/include/getopt.h" 3 4
extern int optind;




extern int opterr;



extern int optopt;
# 152 "/usr/include/getopt.h" 3 4
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
       __attribute__ ((__nothrow__));
# 191 "/usr/include/getopt.h" 3 4
#undef __need_getopt
# 891 "/usr/include/unistd.h" 2 3 4







extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern int sethostname (__const char *__name, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern int sethostid (long int __id) __attribute__ ((__nothrow__)) ;





extern int getdomainname (char *__name, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
extern int setdomainname (__const char *__name, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern int vhangup (void) __attribute__ ((__nothrow__));


extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;







extern int profil (unsigned short int *__sample_buffer, size_t __size,
     size_t __offset, unsigned int __scale)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int acct (__const char *__name) __attribute__ ((__nothrow__));



extern char *getusershell (void) __attribute__ ((__nothrow__));
extern void endusershell (void) __attribute__ ((__nothrow__));
extern void setusershell (void) __attribute__ ((__nothrow__));





extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) ;






extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;



extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
# 976 "/usr/include/unistd.h" 3 4
extern int fsync (int __fd);






extern long int gethostid (void);


extern void sync (void) __attribute__ ((__nothrow__));





extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern int getdtablesize (void) __attribute__ ((__nothrow__));
# 1007 "/usr/include/unistd.h" 3 4
extern int truncate (__const char *__file, __off_t __length)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 1019 "/usr/include/unistd.h" 3 4
extern int truncate64 (__const char *__file, __off64_t __length)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 1029 "/usr/include/unistd.h" 3 4
extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__)) ;
# 1039 "/usr/include/unistd.h" 3 4
extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__)) ;
# 1050 "/usr/include/unistd.h" 3 4
extern int brk (void *__addr) __attribute__ ((__nothrow__)) ;





extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__));
# 1071 "/usr/include/unistd.h" 3 4
extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__));
# 1114 "/usr/include/unistd.h" 3 4
#define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; }))
# 1125 "/usr/include/unistd.h" 3 4
extern int fdatasync (int __fildes);







extern char *crypt (__const char *__key, __const char *__salt)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));



extern void encrypt (char *__block, int __edflag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern void swab (__const void *__restrict __from, void *__restrict __to,
    ssize_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));







extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
# 1163 "/usr/include/unistd.h" 3 4

# 1 "/usr/include/directfb/directfb.h" 1
# 30 "/usr/include/directfb/directfb.h"
#define __DIRECTFB_H__ 







# 1 "/usr/include/directfb/dfb_types.h" 1
# 30 "/usr/include/directfb/dfb_types.h"
#define __DFB_TYPES_H__ 

# 1 "/usr/include/directfb/direct/types.h" 1
# 30 "/usr/include/directfb/direct/types.h"
#define __DIRECT__TYPES_H__ 

# 1 "/usr/include/directfb/direct/build.h" 1
# 29 "/usr/include/directfb/direct/build.h"
#define __DIRECT__BUILD_H__ 

#define DIRECT_BUILD_DEBUG (0)
#define DIRECT_BUILD_DEBUGS (1)
#define DIRECT_BUILD_TRACE (0)
#define DIRECT_BUILD_TEXT (1)
#define DIRECT_BUILD_GETTID (1)
#define DIRECT_BUILD_NETWORK (1)
#define DIRECT_BUILD_STDBOOL (1)
# 33 "/usr/include/directfb/direct/types.h" 2





# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdbool.h" 1 3 4
# 29 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdbool.h" 3 4
#define _STDBOOL_H 



#define bool _Bool
#define true 1
#define false 0
# 48 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdbool.h" 3 4
#define __bool_true_false_are_defined 1
# 39 "/usr/include/directfb/direct/types.h" 2
# 55 "/usr/include/directfb/direct/types.h"
#define __DIRECT__STDTYPES__ 
# 72 "/usr/include/directfb/direct/types.h"
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdint.h" 1 3 4


# 1 "/usr/include/stdint.h" 1 3 4
# 24 "/usr/include/stdint.h" 3 4
#define _STDINT_H 1


# 1 "/usr/include/bits/wchar.h" 1 3 4
# 21 "/usr/include/bits/wchar.h" 3 4
#define _BITS_WCHAR_H 1

#define __WCHAR_MIN (-2147483647l - 1l)
#define __WCHAR_MAX (2147483647l)
# 28 "/usr/include/stdint.h" 2 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 19 "/usr/include/bits/wordsize.h" 3 4
#define __WORDSIZE 32
# 29 "/usr/include/stdint.h" 2 3 4
# 49 "/usr/include/stdint.h" 3 4
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;

typedef unsigned int uint32_t;
#define __uint32_t_defined 




__extension__
typedef unsigned long long int uint64_t;






typedef signed char int_least8_t;
typedef short int int_least16_t;
typedef int int_least32_t;



__extension__
typedef long long int int_least64_t;



typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;



__extension__
typedef unsigned long long int uint_least64_t;






typedef signed char int_fast8_t;





typedef int int_fast16_t;
typedef int int_fast32_t;
__extension__
typedef long long int int_fast64_t;



typedef unsigned char uint_fast8_t;





typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
__extension__
typedef unsigned long long int uint_fast64_t;
# 129 "/usr/include/stdint.h" 3 4
typedef unsigned int uintptr_t;
# 138 "/usr/include/stdint.h" 3 4
__extension__
typedef long long int intmax_t;
__extension__
typedef unsigned long long int uintmax_t;
# 153 "/usr/include/stdint.h" 3 4
#define __INT64_C(c) c ## LL
#define __UINT64_C(c) c ## ULL





#define INT8_MIN (-128)
#define INT16_MIN (-32767-1)
#define INT32_MIN (-2147483647-1)
#define INT64_MIN (-__INT64_C(9223372036854775807)-1)

#define INT8_MAX (127)
#define INT16_MAX (32767)
#define INT32_MAX (2147483647)
#define INT64_MAX (__INT64_C(9223372036854775807))


#define UINT8_MAX (255)
#define UINT16_MAX (65535)
#define UINT32_MAX (4294967295U)
#define UINT64_MAX (__UINT64_C(18446744073709551615))



#define INT_LEAST8_MIN (-128)
#define INT_LEAST16_MIN (-32767-1)
#define INT_LEAST32_MIN (-2147483647-1)
#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)

#define INT_LEAST8_MAX (127)
#define INT_LEAST16_MAX (32767)
#define INT_LEAST32_MAX (2147483647)
#define INT_LEAST64_MAX (__INT64_C(9223372036854775807))


#define UINT_LEAST8_MAX (255)
#define UINT_LEAST16_MAX (65535)
#define UINT_LEAST32_MAX (4294967295U)
#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))



#define INT_FAST8_MIN (-128)




#define INT_FAST16_MIN (-2147483647-1)
#define INT_FAST32_MIN (-2147483647-1)

#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)

#define INT_FAST8_MAX (127)




#define INT_FAST16_MAX (2147483647)
#define INT_FAST32_MAX (2147483647)

#define INT_FAST64_MAX (__INT64_C(9223372036854775807))


#define UINT_FAST8_MAX (255)




#define UINT_FAST16_MAX (4294967295U)
#define UINT_FAST32_MAX (4294967295U)

#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
# 234 "/usr/include/stdint.h" 3 4
#define INTPTR_MIN (-2147483647-1)
#define INTPTR_MAX (2147483647)
#define UINTPTR_MAX (4294967295U)




#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)

#define INTMAX_MAX (__INT64_C(9223372036854775807))


#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
# 256 "/usr/include/stdint.h" 3 4
#define PTRDIFF_MIN (-2147483647-1)
#define PTRDIFF_MAX (2147483647)



#define SIG_ATOMIC_MIN (-2147483647-1)
#define SIG_ATOMIC_MAX (2147483647)





#define SIZE_MAX (4294967295U)





#define WCHAR_MIN __WCHAR_MIN
#define WCHAR_MAX __WCHAR_MAX



#define WINT_MIN (0u)
#define WINT_MAX (4294967295u)
# 290 "/usr/include/stdint.h" 3 4
#define INT8_C(c) c
#define INT16_C(c) c
#define INT32_C(c) c



#define INT64_C(c) c ## LL



#define UINT8_C(c) c
#define UINT16_C(c) c
#define UINT32_C(c) c ## U



#define UINT64_C(c) c ## ULL







#define INTMAX_C(c) c ## LL
#define UINTMAX_C(c) c ## ULL
# 4 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdint.h" 2 3 4



#define _GCC_WRAP_STDINT_H 
# 73 "/usr/include/directfb/direct/types.h" 2

typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;

typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;





typedef enum {
     DR_OK = 0x00000000,
     DR_FAILURE,
     DR_INIT,
     DR_BUG,
     DR_DEAD,
     DR_UNSUPPORTED,
     DR_UNIMPLEMENTED,
     DR_ACCESSDENIED,
     DR_INVAREA,
     DR_INVARG,
     DR_NOLOCALMEMORY,
     DR_NOSHAREDMEMORY,
     DR_LOCKED,
     DR_BUFFEREMPTY,
     DR_FILENOTFOUND,
     DR_IO,
     DR_BUSY,
     DR_NOIMPL,
     DR_TIMEOUT,
     DR_THIZNULL,
     DR_IDNOTFOUND,
     DR_DESTROYED,
     DR_FUSION,
     DR_BUFFERTOOLARGE,
     DR_INTERRUPTED,
     DR_NOCONTEXT,
     DR_TEMPUNAVAIL,
     DR_LIMITEXCEEDED,
     DR_NOSUCHMETHOD,
     DR_NOSUCHINSTANCE,
     DR_ITEMNOTFOUND,
     DR_VERSIONMISMATCH,
     DR_EOF,
     DR_SUSPENDED,
     DR_INCOMPLETE,
     DR_NOCORE
} DirectResult;




#define D_RESULT_TYPE_BASE(a,b,c) ((((unsigned)(a)&0x7f) * 0x02000000) + (((unsigned)(b)&0x7f) * 0x00040000) + (((unsigned)(c)&0x7f) * 0x00000800))






#define D_RESULT_TYPE_MAX(a,b,c) (D_RESULT_TYPE_BASE(a,b,c) + 0x7ff)




#define D_RESULT_TYPE_IS(code,a,b,c) ((code) >= D_RESULT_TYPE_BASE(a,b,c) && (code) <= D_RESULT_TYPE_MAX(a,b,c))





typedef enum {
     DENUM_OK = 0x00000000,
     DENUM_CANCEL = 0x00000001
} DirectEnumerationResult;


typedef u32 unichar;

typedef struct __D_DirectCleanupHandler DirectCleanupHandler;
typedef struct __D_DirectConfig DirectConfig;
typedef struct __D_DirectHash DirectHash;
typedef struct __D_DirectLink DirectLink;
typedef struct __D_DirectLog DirectLog;
typedef struct __D_DirectMap DirectMap;
typedef struct __D_DirectModuleDir DirectModuleDir;
typedef struct __D_DirectModuleEntry DirectModuleEntry;
typedef struct __D_DirectSerial DirectSerial;
typedef struct __D_DirectSignalHandler DirectSignalHandler;
typedef struct __D_DirectStream DirectStream;
typedef struct __D_DirectTraceBuffer DirectTraceBuffer;
typedef struct __D_DirectTree DirectTree;
typedef struct __D_DirectThread DirectThread;
typedef struct __D_DirectThreadInitHandler DirectThreadInitHandler;
# 33 "/usr/include/directfb/dfb_types.h" 2
# 39 "/usr/include/directfb/directfb.h" 2
# 1 "/usr/include/sys/time.h" 1 3 4
# 21 "/usr/include/sys/time.h" 3 4
#define _SYS_TIME_H 1




#define __need_time_t 
# 1 "/usr/include/time.h" 1 3 4
# 67 "/usr/include/time.h" 3 4
#undef __need_clock_t
# 83 "/usr/include/time.h" 3 4
#undef __need_time_t
# 95 "/usr/include/time.h" 3 4
#undef __clockid_time_t
# 107 "/usr/include/time.h" 3 4
#undef __need_timer_t
# 127 "/usr/include/time.h" 3 4
#undef __need_timespec
# 28 "/usr/include/sys/time.h" 2 3 4
#define __need_timeval 
# 1 "/usr/include/bits/time.h" 1 3 4
# 68 "/usr/include/bits/time.h" 3 4
#undef __need_timeval
# 30 "/usr/include/sys/time.h" 2 3 4
# 39 "/usr/include/sys/time.h" 3 4




#define TIMEVAL_TO_TIMESPEC(tv,ts) { (ts)->tv_sec = (tv)->tv_sec; (ts)->tv_nsec = (tv)->tv_usec * 1000; }



#define TIMESPEC_TO_TIMEVAL(tv,ts) { (tv)->tv_sec = (ts)->tv_sec; (tv)->tv_usec = (ts)->tv_nsec / 1000; }
# 57 "/usr/include/sys/time.h" 3 4
struct timezone
  {
    int tz_minuteswest;
    int tz_dsttime;
  };

typedef struct timezone *__restrict __timezone_ptr_t;
# 73 "/usr/include/sys/time.h" 3 4
extern int gettimeofday (struct timeval *__restrict __tv,
    __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));




extern int settimeofday (__const struct timeval *__tv,
    __const struct timezone *__tz)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int adjtime (__const struct timeval *__delta,
      struct timeval *__olddelta) __attribute__ ((__nothrow__));




enum __itimer_which
  {

    ITIMER_REAL = 0,
#define ITIMER_REAL ITIMER_REAL

    ITIMER_VIRTUAL = 1,
#define ITIMER_VIRTUAL ITIMER_VIRTUAL


    ITIMER_PROF = 2
#define ITIMER_PROF ITIMER_PROF
  };



struct itimerval
  {

    struct timeval it_interval;

    struct timeval it_value;
  };




typedef enum __itimer_which __itimer_which_t;






extern int getitimer (__itimer_which_t __which,
        struct itimerval *__value) __attribute__ ((__nothrow__));




extern int setitimer (__itimer_which_t __which,
        __const struct itimerval *__restrict __new,
        struct itimerval *__restrict __old) __attribute__ ((__nothrow__));




extern int utimes (__const char *__file, __const struct timeval __tvp[2])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));






extern int futimesat (int __fd, __const char *__file,
        __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));






#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
#define timercmp(a,b,CMP) (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) : ((a)->tv_sec CMP (b)->tv_sec))



#define timeradd(a,b,result) do { (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; if ((result)->tv_usec >= 1000000) { ++(result)->tv_sec; (result)->tv_usec -= 1000000; } } while (0)
# 180 "/usr/include/sys/time.h" 3 4
#define timersub(a,b,result) do { (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; if ((result)->tv_usec < 0) { --(result)->tv_sec; (result)->tv_usec += 1000000; } } while (0)
# 191 "/usr/include/sys/time.h" 3 4

# 40 "/usr/include/directfb/directfb.h" 2

# 1 "/usr/include/directfb/directfb_build.h" 1
# 30 "/usr/include/directfb/directfb_build.h"
#define __DIRECTFB_BUILD_H__ 

#define DIRECTFB_BUILD_VOODOO (0)
#define DIRECTFB_BUILD_PURE_VOODOO (0)
# 42 "/usr/include/directfb/directfb.h" 2
# 1 "/usr/include/directfb/directfb_keyboard.h" 1
# 30 "/usr/include/directfb/directfb_keyboard.h"
#define __DIRECTFB_KEYBOARD_H__ 
# 41 "/usr/include/directfb/directfb_keyboard.h"
typedef enum {
     DIKT_UNICODE = 0x0000,

     DIKT_SPECIAL = 0xF000,
     DIKT_FUNCTION = 0xF100,
     DIKT_MODIFIER = 0xF200,
     DIKT_LOCK = 0xF300,
     DIKT_DEAD = 0xF400,
     DIKT_CUSTOM = 0xF500,
     DIKT_IDENTIFIER = 0xF600
} DFBInputDeviceKeyType;

#define DFB_KEY(type,index) ((DIKT_ ##type) | (index))

#define DFB_KEY_TYPE(symbol) ((((symbol) & ~0xFFF) == 0xF000) ? (symbol) & 0xFF00 : DIKT_UNICODE)
#define DFB_KEY_INDEX(symbol) ((symbol) & 0x00FF)

#define DFB_KEY_IS_ASCII(symbol) ((symbol) < 128)

#define DFB_FUNCTION_KEY(n) (DFB_KEY( FUNCTION, n ))
#define DFB_MODIFIER_KEY(i) (DFB_KEY( MODIFIER, (1 << i) ))
#define DFB_CUSTOM_KEY(n) (DFB_KEY( CUSTOM, n ))

#define DFB_LOWER_CASE(symbol) (((symbol) >= 'A' && (symbol) <= 'Z') ? ((symbol) | 0x20) : (symbol))

#define DFB_UPPER_CASE(symbol) (((symbol) >= 'a' && (symbol) <= 'z') ? ((symbol) & ~0x20) : (symbol))





typedef enum {
     DIMKI_SHIFT,
     DIMKI_CONTROL,
     DIMKI_ALT,
     DIMKI_ALTGR,
     DIMKI_META,
     DIMKI_SUPER,
     DIMKI_HYPER,

     DIMKI_FIRST = DIMKI_SHIFT,
     DIMKI_LAST = DIMKI_HYPER
} DFBInputDeviceModifierKeyIdentifier;




typedef enum {
     DIKI_UNKNOWN = ((DIKT_IDENTIFIER) | (0)),

     DIKI_A,
     DIKI_B,
     DIKI_C,
     DIKI_D,
     DIKI_E,
     DIKI_F,
     DIKI_G,
     DIKI_H,
     DIKI_I,
     DIKI_J,
     DIKI_K,
     DIKI_L,
     DIKI_M,
     DIKI_N,
     DIKI_O,
     DIKI_P,
     DIKI_Q,
     DIKI_R,
     DIKI_S,
     DIKI_T,
     DIKI_U,
     DIKI_V,
     DIKI_W,
     DIKI_X,
     DIKI_Y,
     DIKI_Z,

     DIKI_0,
     DIKI_1,
     DIKI_2,
     DIKI_3,
     DIKI_4,
     DIKI_5,
     DIKI_6,
     DIKI_7,
     DIKI_8,
     DIKI_9,

     DIKI_F1,
     DIKI_F2,
     DIKI_F3,
     DIKI_F4,
     DIKI_F5,
     DIKI_F6,
     DIKI_F7,
     DIKI_F8,
     DIKI_F9,
     DIKI_F10,
     DIKI_F11,
     DIKI_F12,

     DIKI_SHIFT_L,
     DIKI_SHIFT_R,
     DIKI_CONTROL_L,
     DIKI_CONTROL_R,
     DIKI_ALT_L,
     DIKI_ALT_R,
     DIKI_META_L,
     DIKI_META_R,
     DIKI_SUPER_L,
     DIKI_SUPER_R,
     DIKI_HYPER_L,
     DIKI_HYPER_R,

     DIKI_CAPS_LOCK,
     DIKI_NUM_LOCK,
     DIKI_SCROLL_LOCK,

     DIKI_ESCAPE,
     DIKI_LEFT,
     DIKI_RIGHT,
     DIKI_UP,
     DIKI_DOWN,
     DIKI_TAB,
     DIKI_ENTER,
     DIKI_SPACE,
     DIKI_BACKSPACE,
     DIKI_INSERT,
     DIKI_DELETE,
     DIKI_HOME,
     DIKI_END,
     DIKI_PAGE_UP,
     DIKI_PAGE_DOWN,
     DIKI_PRINT,
     DIKI_PAUSE,





     DIKI_QUOTE_LEFT,
     DIKI_MINUS_SIGN,
     DIKI_EQUALS_SIGN,
     DIKI_BRACKET_LEFT,
     DIKI_BRACKET_RIGHT,
     DIKI_BACKSLASH,
     DIKI_SEMICOLON,
     DIKI_QUOTE_RIGHT,
     DIKI_COMMA,
     DIKI_PERIOD,
     DIKI_SLASH,

     DIKI_LESS_SIGN,

     DIKI_KP_DIV,
     DIKI_KP_MULT,
     DIKI_KP_MINUS,
     DIKI_KP_PLUS,
     DIKI_KP_ENTER,
     DIKI_KP_SPACE,
     DIKI_KP_TAB,
     DIKI_KP_F1,
     DIKI_KP_F2,
     DIKI_KP_F3,
     DIKI_KP_F4,
     DIKI_KP_EQUAL,
     DIKI_KP_SEPARATOR,

     DIKI_KP_DECIMAL,
     DIKI_KP_0,
     DIKI_KP_1,
     DIKI_KP_2,
     DIKI_KP_3,
     DIKI_KP_4,
     DIKI_KP_5,
     DIKI_KP_6,
     DIKI_KP_7,
     DIKI_KP_8,
     DIKI_KP_9,

     DIKI_KEYDEF_END,
     DIKI_NUMBER_OF_KEYS = DIKI_KEYDEF_END - ((DIKT_IDENTIFIER) | (0))

} DFBInputDeviceKeyIdentifier;




typedef enum {






     DIKS_NULL = ((DIKT_UNICODE) | (0x00)),
     DIKS_BACKSPACE = ((DIKT_UNICODE) | (0x08)),
     DIKS_TAB = ((DIKT_UNICODE) | (0x09)),
     DIKS_RETURN = ((DIKT_UNICODE) | (0x0D)),
     DIKS_CANCEL = ((DIKT_UNICODE) | (0x18)),
     DIKS_ESCAPE = ((DIKT_UNICODE) | (0x1B)),
     DIKS_SPACE = ((DIKT_UNICODE) | (0x20)),
     DIKS_EXCLAMATION_MARK = ((DIKT_UNICODE) | (0x21)),
     DIKS_QUOTATION = ((DIKT_UNICODE) | (0x22)),
     DIKS_NUMBER_SIGN = ((DIKT_UNICODE) | (0x23)),
     DIKS_DOLLAR_SIGN = ((DIKT_UNICODE) | (0x24)),
     DIKS_PERCENT_SIGN = ((DIKT_UNICODE) | (0x25)),
     DIKS_AMPERSAND = ((DIKT_UNICODE) | (0x26)),
     DIKS_APOSTROPHE = ((DIKT_UNICODE) | (0x27)),
     DIKS_PARENTHESIS_LEFT = ((DIKT_UNICODE) | (0x28)),
     DIKS_PARENTHESIS_RIGHT = ((DIKT_UNICODE) | (0x29)),
     DIKS_ASTERISK = ((DIKT_UNICODE) | (0x2A)),
     DIKS_PLUS_SIGN = ((DIKT_UNICODE) | (0x2B)),
     DIKS_COMMA = ((DIKT_UNICODE) | (0x2C)),
     DIKS_MINUS_SIGN = ((DIKT_UNICODE) | (0x2D)),
     DIKS_PERIOD = ((DIKT_UNICODE) | (0x2E)),
     DIKS_SLASH = ((DIKT_UNICODE) | (0x2F)),
     DIKS_0 = ((DIKT_UNICODE) | (0x30)),
     DIKS_1 = ((DIKT_UNICODE) | (0x31)),
     DIKS_2 = ((DIKT_UNICODE) | (0x32)),
     DIKS_3 = ((DIKT_UNICODE) | (0x33)),
     DIKS_4 = ((DIKT_UNICODE) | (0x34)),
     DIKS_5 = ((DIKT_UNICODE) | (0x35)),
     DIKS_6 = ((DIKT_UNICODE) | (0x36)),
     DIKS_7 = ((DIKT_UNICODE) | (0x37)),
     DIKS_8 = ((DIKT_UNICODE) | (0x38)),
     DIKS_9 = ((DIKT_UNICODE) | (0x39)),
     DIKS_COLON = ((DIKT_UNICODE) | (0x3A)),
     DIKS_SEMICOLON = ((DIKT_UNICODE) | (0x3B)),
     DIKS_LESS_THAN_SIGN = ((DIKT_UNICODE) | (0x3C)),
     DIKS_EQUALS_SIGN = ((DIKT_UNICODE) | (0x3D)),
     DIKS_GREATER_THAN_SIGN = ((DIKT_UNICODE) | (0x3E)),
     DIKS_QUESTION_MARK = ((DIKT_UNICODE) | (0x3F)),
     DIKS_AT = ((DIKT_UNICODE) | (0x40)),
     DIKS_CAPITAL_A = ((DIKT_UNICODE) | (0x41)),
     DIKS_CAPITAL_B = ((DIKT_UNICODE) | (0x42)),
     DIKS_CAPITAL_C = ((DIKT_UNICODE) | (0x43)),
     DIKS_CAPITAL_D = ((DIKT_UNICODE) | (0x44)),
     DIKS_CAPITAL_E = ((DIKT_UNICODE) | (0x45)),
     DIKS_CAPITAL_F = ((DIKT_UNICODE) | (0x46)),
     DIKS_CAPITAL_G = ((DIKT_UNICODE) | (0x47)),
     DIKS_CAPITAL_H = ((DIKT_UNICODE) | (0x48)),
     DIKS_CAPITAL_I = ((DIKT_UNICODE) | (0x49)),
     DIKS_CAPITAL_J = ((DIKT_UNICODE) | (0x4A)),
     DIKS_CAPITAL_K = ((DIKT_UNICODE) | (0x4B)),
     DIKS_CAPITAL_L = ((DIKT_UNICODE) | (0x4C)),
     DIKS_CAPITAL_M = ((DIKT_UNICODE) | (0x4D)),
     DIKS_CAPITAL_N = ((DIKT_UNICODE) | (0x4E)),
     DIKS_CAPITAL_O = ((DIKT_UNICODE) | (0x4F)),
     DIKS_CAPITAL_P = ((DIKT_UNICODE) | (0x50)),
     DIKS_CAPITAL_Q = ((DIKT_UNICODE) | (0x51)),
     DIKS_CAPITAL_R = ((DIKT_UNICODE) | (0x52)),
     DIKS_CAPITAL_S = ((DIKT_UNICODE) | (0x53)),
     DIKS_CAPITAL_T = ((DIKT_UNICODE) | (0x54)),
     DIKS_CAPITAL_U = ((DIKT_UNICODE) | (0x55)),
     DIKS_CAPITAL_V = ((DIKT_UNICODE) | (0x56)),
     DIKS_CAPITAL_W = ((DIKT_UNICODE) | (0x57)),
     DIKS_CAPITAL_X = ((DIKT_UNICODE) | (0x58)),
     DIKS_CAPITAL_Y = ((DIKT_UNICODE) | (0x59)),
     DIKS_CAPITAL_Z = ((DIKT_UNICODE) | (0x5A)),
     DIKS_SQUARE_BRACKET_LEFT = ((DIKT_UNICODE) | (0x5B)),
     DIKS_BACKSLASH = ((DIKT_UNICODE) | (0x5C)),
     DIKS_SQUARE_BRACKET_RIGHT = ((DIKT_UNICODE) | (0x5D)),
     DIKS_CIRCUMFLEX_ACCENT = ((DIKT_UNICODE) | (0x5E)),
     DIKS_UNDERSCORE = ((DIKT_UNICODE) | (0x5F)),
     DIKS_GRAVE_ACCENT = ((DIKT_UNICODE) | (0x60)),
     DIKS_SMALL_A = ((DIKT_UNICODE) | (0x61)),
     DIKS_SMALL_B = ((DIKT_UNICODE) | (0x62)),
     DIKS_SMALL_C = ((DIKT_UNICODE) | (0x63)),
     DIKS_SMALL_D = ((DIKT_UNICODE) | (0x64)),
     DIKS_SMALL_E = ((DIKT_UNICODE) | (0x65)),
     DIKS_SMALL_F = ((DIKT_UNICODE) | (0x66)),
     DIKS_SMALL_G = ((DIKT_UNICODE) | (0x67)),
     DIKS_SMALL_H = ((DIKT_UNICODE) | (0x68)),
     DIKS_SMALL_I = ((DIKT_UNICODE) | (0x69)),
     DIKS_SMALL_J = ((DIKT_UNICODE) | (0x6A)),
     DIKS_SMALL_K = ((DIKT_UNICODE) | (0x6B)),
     DIKS_SMALL_L = ((DIKT_UNICODE) | (0x6C)),
     DIKS_SMALL_M = ((DIKT_UNICODE) | (0x6D)),
     DIKS_SMALL_N = ((DIKT_UNICODE) | (0x6E)),
     DIKS_SMALL_O = ((DIKT_UNICODE) | (0x6F)),
     DIKS_SMALL_P = ((DIKT_UNICODE) | (0x70)),
     DIKS_SMALL_Q = ((DIKT_UNICODE) | (0x71)),
     DIKS_SMALL_R = ((DIKT_UNICODE) | (0x72)),
     DIKS_SMALL_S = ((DIKT_UNICODE) | (0x73)),
     DIKS_SMALL_T = ((DIKT_UNICODE) | (0x74)),
     DIKS_SMALL_U = ((DIKT_UNICODE) | (0x75)),
     DIKS_SMALL_V = ((DIKT_UNICODE) | (0x76)),
     DIKS_SMALL_W = ((DIKT_UNICODE) | (0x77)),
     DIKS_SMALL_X = ((DIKT_UNICODE) | (0x78)),
     DIKS_SMALL_Y = ((DIKT_UNICODE) | (0x79)),
     DIKS_SMALL_Z = ((DIKT_UNICODE) | (0x7A)),
     DIKS_CURLY_BRACKET_LEFT = ((DIKT_UNICODE) | (0x7B)),
     DIKS_VERTICAL_BAR = ((DIKT_UNICODE) | (0x7C)),
     DIKS_CURLY_BRACKET_RIGHT = ((DIKT_UNICODE) | (0x7D)),
     DIKS_TILDE = ((DIKT_UNICODE) | (0x7E)),
     DIKS_DELETE = ((DIKT_UNICODE) | (0x7F)),

     DIKS_ENTER = DIKS_RETURN,




     DIKS_CURSOR_LEFT = ((DIKT_SPECIAL) | (0x00)),
     DIKS_CURSOR_RIGHT = ((DIKT_SPECIAL) | (0x01)),
     DIKS_CURSOR_UP = ((DIKT_SPECIAL) | (0x02)),
     DIKS_CURSOR_DOWN = ((DIKT_SPECIAL) | (0x03)),
     DIKS_INSERT = ((DIKT_SPECIAL) | (0x04)),
     DIKS_HOME = ((DIKT_SPECIAL) | (0x05)),
     DIKS_END = ((DIKT_SPECIAL) | (0x06)),
     DIKS_PAGE_UP = ((DIKT_SPECIAL) | (0x07)),
     DIKS_PAGE_DOWN = ((DIKT_SPECIAL) | (0x08)),
     DIKS_PRINT = ((DIKT_SPECIAL) | (0x09)),
     DIKS_PAUSE = ((DIKT_SPECIAL) | (0x0A)),
     DIKS_OK = ((DIKT_SPECIAL) | (0x0B)),
     DIKS_SELECT = ((DIKT_SPECIAL) | (0x0C)),
     DIKS_GOTO = ((DIKT_SPECIAL) | (0x0D)),
     DIKS_CLEAR = ((DIKT_SPECIAL) | (0x0E)),
     DIKS_POWER = ((DIKT_SPECIAL) | (0x0F)),
     DIKS_POWER2 = ((DIKT_SPECIAL) | (0x10)),
     DIKS_OPTION = ((DIKT_SPECIAL) | (0x11)),
     DIKS_MENU = ((DIKT_SPECIAL) | (0x12)),
     DIKS_HELP = ((DIKT_SPECIAL) | (0x13)),
     DIKS_INFO = ((DIKT_SPECIAL) | (0x14)),
     DIKS_TIME = ((DIKT_SPECIAL) | (0x15)),
     DIKS_VENDOR = ((DIKT_SPECIAL) | (0x16)),

     DIKS_ARCHIVE = ((DIKT_SPECIAL) | (0x17)),
     DIKS_PROGRAM = ((DIKT_SPECIAL) | (0x18)),
     DIKS_CHANNEL = ((DIKT_SPECIAL) | (0x19)),
     DIKS_FAVORITES = ((DIKT_SPECIAL) | (0x1A)),
     DIKS_EPG = ((DIKT_SPECIAL) | (0x1B)),
     DIKS_PVR = ((DIKT_SPECIAL) | (0x1C)),
     DIKS_MHP = ((DIKT_SPECIAL) | (0x1D)),
     DIKS_LANGUAGE = ((DIKT_SPECIAL) | (0x1E)),
     DIKS_TITLE = ((DIKT_SPECIAL) | (0x1F)),
     DIKS_SUBTITLE = ((DIKT_SPECIAL) | (0x20)),
     DIKS_ANGLE = ((DIKT_SPECIAL) | (0x21)),
     DIKS_ZOOM = ((DIKT_SPECIAL) | (0x22)),
     DIKS_MODE = ((DIKT_SPECIAL) | (0x23)),
     DIKS_KEYBOARD = ((DIKT_SPECIAL) | (0x24)),
     DIKS_PC = ((DIKT_SPECIAL) | (0x25)),
     DIKS_SCREEN = ((DIKT_SPECIAL) | (0x26)),

     DIKS_TV = ((DIKT_SPECIAL) | (0x27)),
     DIKS_TV2 = ((DIKT_SPECIAL) | (0x28)),
     DIKS_VCR = ((DIKT_SPECIAL) | (0x29)),
     DIKS_VCR2 = ((DIKT_SPECIAL) | (0x2A)),
     DIKS_SAT = ((DIKT_SPECIAL) | (0x2B)),
     DIKS_SAT2 = ((DIKT_SPECIAL) | (0x2C)),
     DIKS_CD = ((DIKT_SPECIAL) | (0x2D)),
     DIKS_TAPE = ((DIKT_SPECIAL) | (0x2E)),
     DIKS_RADIO = ((DIKT_SPECIAL) | (0x2F)),
     DIKS_TUNER = ((DIKT_SPECIAL) | (0x30)),
     DIKS_PLAYER = ((DIKT_SPECIAL) | (0x31)),
     DIKS_TEXT = ((DIKT_SPECIAL) | (0x32)),
     DIKS_DVD = ((DIKT_SPECIAL) | (0x33)),
     DIKS_AUX = ((DIKT_SPECIAL) | (0x34)),
     DIKS_MP3 = ((DIKT_SPECIAL) | (0x35)),
     DIKS_PHONE = ((DIKT_SPECIAL) | (0x36)),
     DIKS_AUDIO = ((DIKT_SPECIAL) | (0x37)),
     DIKS_VIDEO = ((DIKT_SPECIAL) | (0x38)),

     DIKS_INTERNET = ((DIKT_SPECIAL) | (0x39)),
     DIKS_MAIL = ((DIKT_SPECIAL) | (0x3A)),
     DIKS_NEWS = ((DIKT_SPECIAL) | (0x3B)),
     DIKS_DIRECTORY = ((DIKT_SPECIAL) | (0x3C)),
     DIKS_LIST = ((DIKT_SPECIAL) | (0x3D)),
     DIKS_CALCULATOR = ((DIKT_SPECIAL) | (0x3E)),
     DIKS_MEMO = ((DIKT_SPECIAL) | (0x3F)),
     DIKS_CALENDAR = ((DIKT_SPECIAL) | (0x40)),
     DIKS_EDITOR = ((DIKT_SPECIAL) | (0x41)),

     DIKS_RED = ((DIKT_SPECIAL) | (0x42)),
     DIKS_GREEN = ((DIKT_SPECIAL) | (0x43)),
     DIKS_YELLOW = ((DIKT_SPECIAL) | (0x44)),
     DIKS_BLUE = ((DIKT_SPECIAL) | (0x45)),

     DIKS_CHANNEL_UP = ((DIKT_SPECIAL) | (0x46)),
     DIKS_CHANNEL_DOWN = ((DIKT_SPECIAL) | (0x47)),
     DIKS_BACK = ((DIKT_SPECIAL) | (0x48)),
     DIKS_FORWARD = ((DIKT_SPECIAL) | (0x49)),
     DIKS_FIRST = ((DIKT_SPECIAL) | (0x4A)),
     DIKS_LAST = ((DIKT_SPECIAL) | (0x4B)),
     DIKS_VOLUME_UP = ((DIKT_SPECIAL) | (0x4C)),
     DIKS_VOLUME_DOWN = ((DIKT_SPECIAL) | (0x4D)),
     DIKS_MUTE = ((DIKT_SPECIAL) | (0x4E)),
     DIKS_AB = ((DIKT_SPECIAL) | (0x4F)),
     DIKS_PLAYPAUSE = ((DIKT_SPECIAL) | (0x50)),
     DIKS_PLAY = ((DIKT_SPECIAL) | (0x51)),
     DIKS_STOP = ((DIKT_SPECIAL) | (0x52)),
     DIKS_RESTART = ((DIKT_SPECIAL) | (0x53)),
     DIKS_SLOW = ((DIKT_SPECIAL) | (0x54)),
     DIKS_FAST = ((DIKT_SPECIAL) | (0x55)),
     DIKS_RECORD = ((DIKT_SPECIAL) | (0x56)),
     DIKS_EJECT = ((DIKT_SPECIAL) | (0x57)),
     DIKS_SHUFFLE = ((DIKT_SPECIAL) | (0x58)),
     DIKS_REWIND = ((DIKT_SPECIAL) | (0x59)),
     DIKS_FASTFORWARD = ((DIKT_SPECIAL) | (0x5A)),
     DIKS_PREVIOUS = ((DIKT_SPECIAL) | (0x5B)),
     DIKS_NEXT = ((DIKT_SPECIAL) | (0x5C)),
     DIKS_BEGIN = ((DIKT_SPECIAL) | (0x5D)),

     DIKS_DIGITS = ((DIKT_SPECIAL) | (0x5E)),
     DIKS_TEEN = ((DIKT_SPECIAL) | (0x5F)),
     DIKS_TWEN = ((DIKT_SPECIAL) | (0x60)),

     DIKS_BREAK = ((DIKT_SPECIAL) | (0x61)),
     DIKS_EXIT = ((DIKT_SPECIAL) | (0x62)),
     DIKS_SETUP = ((DIKT_SPECIAL) | (0x63)),

     DIKS_CURSOR_LEFT_UP = ((DIKT_SPECIAL) | (0x64)),
     DIKS_CURSOR_LEFT_DOWN = ((DIKT_SPECIAL) | (0x65)),
     DIKS_CURSOR_UP_RIGHT = ((DIKT_SPECIAL) | (0x66)),
     DIKS_CURSOR_DOWN_RIGHT = ((DIKT_SPECIAL) | (0x67)),






     DIKS_F1 = (((DIKT_FUNCTION) | (1))),
     DIKS_F2 = (((DIKT_FUNCTION) | (2))),
     DIKS_F3 = (((DIKT_FUNCTION) | (3))),
     DIKS_F4 = (((DIKT_FUNCTION) | (4))),
     DIKS_F5 = (((DIKT_FUNCTION) | (5))),
     DIKS_F6 = (((DIKT_FUNCTION) | (6))),
     DIKS_F7 = (((DIKT_FUNCTION) | (7))),
     DIKS_F8 = (((DIKT_FUNCTION) | (8))),
     DIKS_F9 = (((DIKT_FUNCTION) | (9))),
     DIKS_F10 = (((DIKT_FUNCTION) | (10))),
     DIKS_F11 = (((DIKT_FUNCTION) | (11))),
     DIKS_F12 = (((DIKT_FUNCTION) | (12))),




     DIKS_SHIFT = (((DIKT_MODIFIER) | ((1 << DIMKI_SHIFT)))),
     DIKS_CONTROL = (((DIKT_MODIFIER) | ((1 << DIMKI_CONTROL)))),
     DIKS_ALT = (((DIKT_MODIFIER) | ((1 << DIMKI_ALT)))),
     DIKS_ALTGR = (((DIKT_MODIFIER) | ((1 << DIMKI_ALTGR)))),
     DIKS_META = (((DIKT_MODIFIER) | ((1 << DIMKI_META)))),
     DIKS_SUPER = (((DIKT_MODIFIER) | ((1 << DIMKI_SUPER)))),
     DIKS_HYPER = (((DIKT_MODIFIER) | ((1 << DIMKI_HYPER)))),




     DIKS_CAPS_LOCK = ((DIKT_LOCK) | (0x00)),
     DIKS_NUM_LOCK = ((DIKT_LOCK) | (0x01)),
     DIKS_SCROLL_LOCK = ((DIKT_LOCK) | (0x02)),




     DIKS_DEAD_ABOVEDOT = ((DIKT_DEAD) | (0x00)),
     DIKS_DEAD_ABOVERING = ((DIKT_DEAD) | (0x01)),
     DIKS_DEAD_ACUTE = ((DIKT_DEAD) | (0x02)),
     DIKS_DEAD_BREVE = ((DIKT_DEAD) | (0x03)),
     DIKS_DEAD_CARON = ((DIKT_DEAD) | (0x04)),
     DIKS_DEAD_CEDILLA = ((DIKT_DEAD) | (0x05)),
     DIKS_DEAD_CIRCUMFLEX = ((DIKT_DEAD) | (0x06)),
     DIKS_DEAD_DIAERESIS = ((DIKT_DEAD) | (0x07)),
     DIKS_DEAD_DOUBLEACUTE = ((DIKT_DEAD) | (0x08)),
     DIKS_DEAD_GRAVE = ((DIKT_DEAD) | (0x09)),
     DIKS_DEAD_IOTA = ((DIKT_DEAD) | (0x0A)),
     DIKS_DEAD_MACRON = ((DIKT_DEAD) | (0x0B)),
     DIKS_DEAD_OGONEK = ((DIKT_DEAD) | (0x0C)),
     DIKS_DEAD_SEMIVOICED_SOUND = ((DIKT_DEAD) | (0x0D)),
     DIKS_DEAD_TILDE = ((DIKT_DEAD) | (0x0E)),
     DIKS_DEAD_VOICED_SOUND = ((DIKT_DEAD) | (0x0F)),






     DIKS_CUSTOM0 = (((DIKT_CUSTOM) | (0))),
     DIKS_CUSTOM1 = (((DIKT_CUSTOM) | (1))),
     DIKS_CUSTOM2 = (((DIKT_CUSTOM) | (2))),
     DIKS_CUSTOM3 = (((DIKT_CUSTOM) | (3))),
     DIKS_CUSTOM4 = (((DIKT_CUSTOM) | (4))),
     DIKS_CUSTOM5 = (((DIKT_CUSTOM) | (5))),
     DIKS_CUSTOM6 = (((DIKT_CUSTOM) | (6))),
     DIKS_CUSTOM7 = (((DIKT_CUSTOM) | (7))),
     DIKS_CUSTOM8 = (((DIKT_CUSTOM) | (8))),
     DIKS_CUSTOM9 = (((DIKT_CUSTOM) | (9))),
     DIKS_CUSTOM10 = (((DIKT_CUSTOM) | (10))),
     DIKS_CUSTOM11 = (((DIKT_CUSTOM) | (11))),
     DIKS_CUSTOM12 = (((DIKT_CUSTOM) | (12))),
     DIKS_CUSTOM13 = (((DIKT_CUSTOM) | (13))),
     DIKS_CUSTOM14 = (((DIKT_CUSTOM) | (14))),
     DIKS_CUSTOM15 = (((DIKT_CUSTOM) | (15))),
     DIKS_CUSTOM16 = (((DIKT_CUSTOM) | (16))),
     DIKS_CUSTOM17 = (((DIKT_CUSTOM) | (17))),
     DIKS_CUSTOM18 = (((DIKT_CUSTOM) | (18))),
     DIKS_CUSTOM19 = (((DIKT_CUSTOM) | (19))),
     DIKS_CUSTOM20 = (((DIKT_CUSTOM) | (20))),
     DIKS_CUSTOM21 = (((DIKT_CUSTOM) | (21))),
     DIKS_CUSTOM22 = (((DIKT_CUSTOM) | (22))),
     DIKS_CUSTOM23 = (((DIKT_CUSTOM) | (23))),
     DIKS_CUSTOM24 = (((DIKT_CUSTOM) | (24))),
     DIKS_CUSTOM25 = (((DIKT_CUSTOM) | (25))),
     DIKS_CUSTOM26 = (((DIKT_CUSTOM) | (26))),
     DIKS_CUSTOM27 = (((DIKT_CUSTOM) | (27))),
     DIKS_CUSTOM28 = (((DIKT_CUSTOM) | (28))),
     DIKS_CUSTOM29 = (((DIKT_CUSTOM) | (29))),
     DIKS_CUSTOM30 = (((DIKT_CUSTOM) | (30))),
     DIKS_CUSTOM31 = (((DIKT_CUSTOM) | (31))),
     DIKS_CUSTOM32 = (((DIKT_CUSTOM) | (32))),
     DIKS_CUSTOM33 = (((DIKT_CUSTOM) | (33))),
     DIKS_CUSTOM34 = (((DIKT_CUSTOM) | (34))),
     DIKS_CUSTOM35 = (((DIKT_CUSTOM) | (35))),
     DIKS_CUSTOM36 = (((DIKT_CUSTOM) | (36))),
     DIKS_CUSTOM37 = (((DIKT_CUSTOM) | (37))),
     DIKS_CUSTOM38 = (((DIKT_CUSTOM) | (38))),
     DIKS_CUSTOM39 = (((DIKT_CUSTOM) | (39))),
     DIKS_CUSTOM40 = (((DIKT_CUSTOM) | (40))),
     DIKS_CUSTOM41 = (((DIKT_CUSTOM) | (41))),
     DIKS_CUSTOM42 = (((DIKT_CUSTOM) | (42))),
     DIKS_CUSTOM43 = (((DIKT_CUSTOM) | (43))),
     DIKS_CUSTOM44 = (((DIKT_CUSTOM) | (44))),
     DIKS_CUSTOM45 = (((DIKT_CUSTOM) | (45))),
     DIKS_CUSTOM46 = (((DIKT_CUSTOM) | (46))),
     DIKS_CUSTOM47 = (((DIKT_CUSTOM) | (47))),
     DIKS_CUSTOM48 = (((DIKT_CUSTOM) | (48))),
     DIKS_CUSTOM49 = (((DIKT_CUSTOM) | (49))),
     DIKS_CUSTOM50 = (((DIKT_CUSTOM) | (50))),
     DIKS_CUSTOM51 = (((DIKT_CUSTOM) | (51))),
     DIKS_CUSTOM52 = (((DIKT_CUSTOM) | (52))),
     DIKS_CUSTOM53 = (((DIKT_CUSTOM) | (53))),
     DIKS_CUSTOM54 = (((DIKT_CUSTOM) | (54))),
     DIKS_CUSTOM55 = (((DIKT_CUSTOM) | (55))),
     DIKS_CUSTOM56 = (((DIKT_CUSTOM) | (56))),
     DIKS_CUSTOM57 = (((DIKT_CUSTOM) | (57))),
     DIKS_CUSTOM58 = (((DIKT_CUSTOM) | (58))),
     DIKS_CUSTOM59 = (((DIKT_CUSTOM) | (59))),
     DIKS_CUSTOM60 = (((DIKT_CUSTOM) | (60))),
     DIKS_CUSTOM61 = (((DIKT_CUSTOM) | (61))),
     DIKS_CUSTOM62 = (((DIKT_CUSTOM) | (62))),
     DIKS_CUSTOM63 = (((DIKT_CUSTOM) | (63))),
     DIKS_CUSTOM64 = (((DIKT_CUSTOM) | (64))),
     DIKS_CUSTOM65 = (((DIKT_CUSTOM) | (65))),
     DIKS_CUSTOM66 = (((DIKT_CUSTOM) | (66))),
     DIKS_CUSTOM67 = (((DIKT_CUSTOM) | (67))),
     DIKS_CUSTOM68 = (((DIKT_CUSTOM) | (68))),
     DIKS_CUSTOM69 = (((DIKT_CUSTOM) | (69))),
     DIKS_CUSTOM70 = (((DIKT_CUSTOM) | (70))),
     DIKS_CUSTOM71 = (((DIKT_CUSTOM) | (71))),
     DIKS_CUSTOM72 = (((DIKT_CUSTOM) | (72))),
     DIKS_CUSTOM73 = (((DIKT_CUSTOM) | (73))),
     DIKS_CUSTOM74 = (((DIKT_CUSTOM) | (74))),
     DIKS_CUSTOM75 = (((DIKT_CUSTOM) | (75))),
     DIKS_CUSTOM76 = (((DIKT_CUSTOM) | (76))),
     DIKS_CUSTOM77 = (((DIKT_CUSTOM) | (77))),
     DIKS_CUSTOM78 = (((DIKT_CUSTOM) | (78))),
     DIKS_CUSTOM79 = (((DIKT_CUSTOM) | (79))),
     DIKS_CUSTOM80 = (((DIKT_CUSTOM) | (80))),
     DIKS_CUSTOM81 = (((DIKT_CUSTOM) | (81))),
     DIKS_CUSTOM82 = (((DIKT_CUSTOM) | (82))),
     DIKS_CUSTOM83 = (((DIKT_CUSTOM) | (83))),
     DIKS_CUSTOM84 = (((DIKT_CUSTOM) | (84))),
     DIKS_CUSTOM85 = (((DIKT_CUSTOM) | (85))),
     DIKS_CUSTOM86 = (((DIKT_CUSTOM) | (86))),
     DIKS_CUSTOM87 = (((DIKT_CUSTOM) | (87))),
     DIKS_CUSTOM88 = (((DIKT_CUSTOM) | (88))),
     DIKS_CUSTOM89 = (((DIKT_CUSTOM) | (89))),
     DIKS_CUSTOM90 = (((DIKT_CUSTOM) | (90))),
     DIKS_CUSTOM91 = (((DIKT_CUSTOM) | (91))),
     DIKS_CUSTOM92 = (((DIKT_CUSTOM) | (92))),
     DIKS_CUSTOM93 = (((DIKT_CUSTOM) | (93))),
     DIKS_CUSTOM94 = (((DIKT_CUSTOM) | (94))),
     DIKS_CUSTOM95 = (((DIKT_CUSTOM) | (95))),
     DIKS_CUSTOM96 = (((DIKT_CUSTOM) | (96))),
     DIKS_CUSTOM97 = (((DIKT_CUSTOM) | (97))),
     DIKS_CUSTOM98 = (((DIKT_CUSTOM) | (98))),
     DIKS_CUSTOM99 = (((DIKT_CUSTOM) | (99))),
     DIKS_CUSTOM100 = (((DIKT_CUSTOM) | (100))),
     DIKS_CUSTOM101 = (((DIKT_CUSTOM) | (101))),
     DIKS_CUSTOM102 = (((DIKT_CUSTOM) | (102))),
     DIKS_CUSTOM103 = (((DIKT_CUSTOM) | (103))),
     DIKS_CUSTOM104 = (((DIKT_CUSTOM) | (104))),
     DIKS_CUSTOM105 = (((DIKT_CUSTOM) | (105))),
     DIKS_CUSTOM106 = (((DIKT_CUSTOM) | (106))),
     DIKS_CUSTOM107 = (((DIKT_CUSTOM) | (107))),
     DIKS_CUSTOM108 = (((DIKT_CUSTOM) | (108))),
     DIKS_CUSTOM109 = (((DIKT_CUSTOM) | (109))),
     DIKS_CUSTOM110 = (((DIKT_CUSTOM) | (110))),
     DIKS_CUSTOM111 = (((DIKT_CUSTOM) | (111))),
     DIKS_CUSTOM112 = (((DIKT_CUSTOM) | (112))),
     DIKS_CUSTOM113 = (((DIKT_CUSTOM) | (113))),
     DIKS_CUSTOM114 = (((DIKT_CUSTOM) | (114))),
     DIKS_CUSTOM115 = (((DIKT_CUSTOM) | (115))),
     DIKS_CUSTOM116 = (((DIKT_CUSTOM) | (116))),
     DIKS_CUSTOM117 = (((DIKT_CUSTOM) | (117))),
     DIKS_CUSTOM118 = (((DIKT_CUSTOM) | (118))),
     DIKS_CUSTOM119 = (((DIKT_CUSTOM) | (119))),
     DIKS_CUSTOM120 = (((DIKT_CUSTOM) | (120))),
     DIKS_CUSTOM121 = (((DIKT_CUSTOM) | (121))),
     DIKS_CUSTOM122 = (((DIKT_CUSTOM) | (122))),
     DIKS_CUSTOM123 = (((DIKT_CUSTOM) | (123))),
     DIKS_CUSTOM124 = (((DIKT_CUSTOM) | (124))),
     DIKS_CUSTOM125 = (((DIKT_CUSTOM) | (125))),
     DIKS_CUSTOM126 = (((DIKT_CUSTOM) | (126))),
     DIKS_CUSTOM127 = (((DIKT_CUSTOM) | (127))),
     DIKS_CUSTOM128 = (((DIKT_CUSTOM) | (128))),
     DIKS_CUSTOM129 = (((DIKT_CUSTOM) | (129))),
     DIKS_CUSTOM130 = (((DIKT_CUSTOM) | (130))),
     DIKS_CUSTOM131 = (((DIKT_CUSTOM) | (131))),
     DIKS_CUSTOM132 = (((DIKT_CUSTOM) | (132))),
     DIKS_CUSTOM133 = (((DIKT_CUSTOM) | (133))),
     DIKS_CUSTOM134 = (((DIKT_CUSTOM) | (134))),
     DIKS_CUSTOM135 = (((DIKT_CUSTOM) | (135))),
     DIKS_CUSTOM136 = (((DIKT_CUSTOM) | (136))),
     DIKS_CUSTOM137 = (((DIKT_CUSTOM) | (137))),
     DIKS_CUSTOM138 = (((DIKT_CUSTOM) | (138))),
     DIKS_CUSTOM139 = (((DIKT_CUSTOM) | (139))),
     DIKS_CUSTOM140 = (((DIKT_CUSTOM) | (140))),
     DIKS_CUSTOM141 = (((DIKT_CUSTOM) | (141))),
     DIKS_CUSTOM142 = (((DIKT_CUSTOM) | (142))),
     DIKS_CUSTOM143 = (((DIKT_CUSTOM) | (143))),
     DIKS_CUSTOM144 = (((DIKT_CUSTOM) | (144))),
     DIKS_CUSTOM145 = (((DIKT_CUSTOM) | (145))),
     DIKS_CUSTOM146 = (((DIKT_CUSTOM) | (146))),
     DIKS_CUSTOM147 = (((DIKT_CUSTOM) | (147))),
     DIKS_CUSTOM148 = (((DIKT_CUSTOM) | (148))),
     DIKS_CUSTOM149 = (((DIKT_CUSTOM) | (149))),
     DIKS_CUSTOM150 = (((DIKT_CUSTOM) | (150))),
     DIKS_CUSTOM151 = (((DIKT_CUSTOM) | (151))),
     DIKS_CUSTOM152 = (((DIKT_CUSTOM) | (152))),
     DIKS_CUSTOM153 = (((DIKT_CUSTOM) | (153))),
     DIKS_CUSTOM154 = (((DIKT_CUSTOM) | (154))),
     DIKS_CUSTOM155 = (((DIKT_CUSTOM) | (155))),
     DIKS_CUSTOM156 = (((DIKT_CUSTOM) | (156))),
     DIKS_CUSTOM157 = (((DIKT_CUSTOM) | (157))),
     DIKS_CUSTOM158 = (((DIKT_CUSTOM) | (158))),
     DIKS_CUSTOM159 = (((DIKT_CUSTOM) | (159))),
     DIKS_CUSTOM160 = (((DIKT_CUSTOM) | (160))),
     DIKS_CUSTOM161 = (((DIKT_CUSTOM) | (161))),
     DIKS_CUSTOM162 = (((DIKT_CUSTOM) | (162))),
     DIKS_CUSTOM163 = (((DIKT_CUSTOM) | (163))),
     DIKS_CUSTOM164 = (((DIKT_CUSTOM) | (164))),
     DIKS_CUSTOM165 = (((DIKT_CUSTOM) | (165))),
     DIKS_CUSTOM166 = (((DIKT_CUSTOM) | (166))),
     DIKS_CUSTOM167 = (((DIKT_CUSTOM) | (167))),
     DIKS_CUSTOM168 = (((DIKT_CUSTOM) | (168))),
     DIKS_CUSTOM169 = (((DIKT_CUSTOM) | (169))),
     DIKS_CUSTOM170 = (((DIKT_CUSTOM) | (170))),
     DIKS_CUSTOM171 = (((DIKT_CUSTOM) | (171))),
     DIKS_CUSTOM172 = (((DIKT_CUSTOM) | (172))),
     DIKS_CUSTOM173 = (((DIKT_CUSTOM) | (173))),
     DIKS_CUSTOM174 = (((DIKT_CUSTOM) | (174))),
     DIKS_CUSTOM175 = (((DIKT_CUSTOM) | (175))),
     DIKS_CUSTOM176 = (((DIKT_CUSTOM) | (176))),
     DIKS_CUSTOM177 = (((DIKT_CUSTOM) | (177))),
     DIKS_CUSTOM178 = (((DIKT_CUSTOM) | (178))),
     DIKS_CUSTOM179 = (((DIKT_CUSTOM) | (179))),
     DIKS_CUSTOM180 = (((DIKT_CUSTOM) | (180))),
     DIKS_CUSTOM181 = (((DIKT_CUSTOM) | (181))),
     DIKS_CUSTOM182 = (((DIKT_CUSTOM) | (182))),
     DIKS_CUSTOM183 = (((DIKT_CUSTOM) | (183))),
     DIKS_CUSTOM184 = (((DIKT_CUSTOM) | (184))),
     DIKS_CUSTOM185 = (((DIKT_CUSTOM) | (185))),
     DIKS_CUSTOM186 = (((DIKT_CUSTOM) | (186))),
     DIKS_CUSTOM187 = (((DIKT_CUSTOM) | (187))),
     DIKS_CUSTOM188 = (((DIKT_CUSTOM) | (188))),
     DIKS_CUSTOM189 = (((DIKT_CUSTOM) | (189))),
     DIKS_CUSTOM190 = (((DIKT_CUSTOM) | (190))),
     DIKS_CUSTOM191 = (((DIKT_CUSTOM) | (191))),
     DIKS_CUSTOM192 = (((DIKT_CUSTOM) | (192))),
     DIKS_CUSTOM193 = (((DIKT_CUSTOM) | (193))),
     DIKS_CUSTOM194 = (((DIKT_CUSTOM) | (194))),
     DIKS_CUSTOM195 = (((DIKT_CUSTOM) | (195))),
     DIKS_CUSTOM196 = (((DIKT_CUSTOM) | (196))),
     DIKS_CUSTOM197 = (((DIKT_CUSTOM) | (197))),
     DIKS_CUSTOM198 = (((DIKT_CUSTOM) | (198))),
     DIKS_CUSTOM199 = (((DIKT_CUSTOM) | (199))),
     DIKS_CUSTOM200 = (((DIKT_CUSTOM) | (200))),
     DIKS_CUSTOM201 = (((DIKT_CUSTOM) | (201))),
     DIKS_CUSTOM202 = (((DIKT_CUSTOM) | (202))),
     DIKS_CUSTOM203 = (((DIKT_CUSTOM) | (203))),
     DIKS_CUSTOM204 = (((DIKT_CUSTOM) | (204))),
     DIKS_CUSTOM205 = (((DIKT_CUSTOM) | (205))),
     DIKS_CUSTOM206 = (((DIKT_CUSTOM) | (206))),
     DIKS_CUSTOM207 = (((DIKT_CUSTOM) | (207))),
     DIKS_CUSTOM208 = (((DIKT_CUSTOM) | (208))),
     DIKS_CUSTOM209 = (((DIKT_CUSTOM) | (209))),
     DIKS_CUSTOM210 = (((DIKT_CUSTOM) | (210))),
     DIKS_CUSTOM211 = (((DIKT_CUSTOM) | (211))),
     DIKS_CUSTOM212 = (((DIKT_CUSTOM) | (212))),
     DIKS_CUSTOM213 = (((DIKT_CUSTOM) | (213))),
     DIKS_CUSTOM214 = (((DIKT_CUSTOM) | (214))),
     DIKS_CUSTOM215 = (((DIKT_CUSTOM) | (215))),
     DIKS_CUSTOM216 = (((DIKT_CUSTOM) | (216))),
     DIKS_CUSTOM217 = (((DIKT_CUSTOM) | (217))),
     DIKS_CUSTOM218 = (((DIKT_CUSTOM) | (218))),
     DIKS_CUSTOM219 = (((DIKT_CUSTOM) | (219))),
     DIKS_CUSTOM220 = (((DIKT_CUSTOM) | (220))),
     DIKS_CUSTOM221 = (((DIKT_CUSTOM) | (221))),
     DIKS_CUSTOM222 = (((DIKT_CUSTOM) | (222))),
     DIKS_CUSTOM223 = (((DIKT_CUSTOM) | (223))),
     DIKS_CUSTOM224 = (((DIKT_CUSTOM) | (224))),
     DIKS_CUSTOM225 = (((DIKT_CUSTOM) | (225))),
     DIKS_CUSTOM226 = (((DIKT_CUSTOM) | (226))),
     DIKS_CUSTOM227 = (((DIKT_CUSTOM) | (227))),
     DIKS_CUSTOM228 = (((DIKT_CUSTOM) | (228))),
     DIKS_CUSTOM229 = (((DIKT_CUSTOM) | (229))),
     DIKS_CUSTOM230 = (((DIKT_CUSTOM) | (230))),
     DIKS_CUSTOM231 = (((DIKT_CUSTOM) | (231))),
     DIKS_CUSTOM232 = (((DIKT_CUSTOM) | (232))),
     DIKS_CUSTOM233 = (((DIKT_CUSTOM) | (233))),
     DIKS_CUSTOM234 = (((DIKT_CUSTOM) | (234))),
     DIKS_CUSTOM235 = (((DIKT_CUSTOM) | (235))),
     DIKS_CUSTOM236 = (((DIKT_CUSTOM) | (236))),
     DIKS_CUSTOM237 = (((DIKT_CUSTOM) | (237))),
     DIKS_CUSTOM238 = (((DIKT_CUSTOM) | (238))),
     DIKS_CUSTOM239 = (((DIKT_CUSTOM) | (239))),
     DIKS_CUSTOM240 = (((DIKT_CUSTOM) | (240))),
     DIKS_CUSTOM241 = (((DIKT_CUSTOM) | (241))),
     DIKS_CUSTOM242 = (((DIKT_CUSTOM) | (242))),
     DIKS_CUSTOM243 = (((DIKT_CUSTOM) | (243))),
     DIKS_CUSTOM244 = (((DIKT_CUSTOM) | (244))),
     DIKS_CUSTOM245 = (((DIKT_CUSTOM) | (245))),
     DIKS_CUSTOM246 = (((DIKT_CUSTOM) | (246))),
     DIKS_CUSTOM247 = (((DIKT_CUSTOM) | (247))),
     DIKS_CUSTOM248 = (((DIKT_CUSTOM) | (248))),
     DIKS_CUSTOM249 = (((DIKT_CUSTOM) | (249))),
     DIKS_CUSTOM250 = (((DIKT_CUSTOM) | (250))),
     DIKS_CUSTOM251 = (((DIKT_CUSTOM) | (251))),
     DIKS_CUSTOM252 = (((DIKT_CUSTOM) | (252))),
     DIKS_CUSTOM253 = (((DIKT_CUSTOM) | (253))),
     DIKS_CUSTOM254 = (((DIKT_CUSTOM) | (254))),
     DIKS_CUSTOM255 = (((DIKT_CUSTOM) | (255)))
} DFBInputDeviceKeySymbol;




typedef enum {
     DILS_SCROLL = 0x00000001,
     DILS_NUM = 0x00000002,
     DILS_CAPS = 0x00000004
} DFBInputDeviceLockState;




typedef enum {
     DIKSI_BASE = 0x00,

     DIKSI_BASE_SHIFT = 0x01,

     DIKSI_ALT = 0x02,

     DIKSI_ALT_SHIFT = 0x03,


     DIKSI_LAST = DIKSI_ALT_SHIFT
} DFBInputDeviceKeymapSymbolIndex;




typedef struct {
     int code;

     DFBInputDeviceLockState locks;

     DFBInputDeviceKeyIdentifier identifier;
     DFBInputDeviceKeySymbol symbols[DIKSI_LAST+1];

} DFBInputDeviceKeymapEntry;
# 43 "/usr/include/directfb/directfb.h" 2

# 1 "/usr/include/directfb/direct/interface.h" 1
# 30 "/usr/include/directfb/direct/interface.h"
#define __DIRECT__INTERFACE_H__ 

# 1 "/usr/include/directfb/direct/debug.h" 1
# 30 "/usr/include/directfb/direct/debug.h"
#define __DIRECT__DEBUG_H__ 



# 1 "/usr/include/stdio.h" 1 3 4
# 27 "/usr/include/stdio.h" 3 4
#define _STDIO_H 1




#define __need_size_t 
#define __need_NULL 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef NULL




#define NULL ((void *)0)





#undef __need_NULL
# 35 "/usr/include/stdio.h" 2 3 4


#define __need_FILE 
#define __need___FILE 






struct _IO_FILE;



typedef struct _IO_FILE FILE;







#define __FILE_defined 1

#undef __need_FILE





typedef struct _IO_FILE __FILE;

#define ____FILE_defined 1

#undef __need___FILE



#define _STDIO_USES_IOSTREAM 

# 1 "/usr/include/libio.h" 1 3 4
# 30 "/usr/include/libio.h" 3 4
#define _IO_STDIO_H 

# 1 "/usr/include/_G_config.h" 1 3 4




#define _G_config_h 1




#define __need_size_t 



#define __need_NULL 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef NULL




#define NULL ((void *)0)





#undef __need_NULL
# 16 "/usr/include/_G_config.h" 2 3 4
#define __need_mbstate_t 



# 1 "/usr/include/wchar.h" 1 3 4
# 81 "/usr/include/wchar.h" 3 4
#define __mbstate_t_defined 1

typedef struct
{
  int __count;
  union
  {

    unsigned int __wch;



    char __wchb[4];
  } __value;
} __mbstate_t;

#undef __need_mbstate_t
# 897 "/usr/include/wchar.h" 3 4
#undef __need_mbstate_t
#undef __need_wint_t
# 21 "/usr/include/_G_config.h" 2 3 4
#define _G_size_t size_t
typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
#define _G_ssize_t __ssize_t
#define _G_off_t __off_t
#define _G_off64_t __off64_t
#define _G_pid_t __pid_t
#define _G_uid_t __uid_t
#define _G_wchar_t wchar_t
#define _G_wint_t wint_t
#define _G_stat64 stat64
# 53 "/usr/include/_G_config.h" 3 4
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));

#define _G_HAVE_BOOL 1



#define _G_HAVE_ATEXIT 1
#define _G_HAVE_SYS_CDEFS 1
#define _G_HAVE_SYS_WAIT 1
#define _G_NEED_STDARG_H 1
#define _G_va_list __gnuc_va_list

#define _G_HAVE_PRINTF_FP 1
#define _G_HAVE_MMAP 1
#define _G_HAVE_MREMAP 1
#define _G_HAVE_LONG_DOUBLE_IO 1
#define _G_HAVE_IO_FILE_OPEN 1
#define _G_HAVE_IO_GETLINE_INFO 1

#define _G_IO_IO_FILE_VERSION 0x20001

#define _G_OPEN64 __open64
#define _G_LSEEK64 __lseek64
#define _G_MMAP64 __mmap64
#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)


#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)

#define _G_BUFSIZ 8192


#define _G_NAMES_HAVE_UNDERSCORE 0
#define _G_VTABLE_LABEL_HAS_LENGTH 1
#define _G_USING_THUNKS 1
#define _G_VTABLE_LABEL_PREFIX "__vt_"
#define _G_VTABLE_LABEL_PREFIX_ID __vt_



#define _G_ARGS(ARGLIST) ARGLIST
# 33 "/usr/include/libio.h" 2 3 4

#define _IO_pos_t _G_fpos_t
#define _IO_fpos_t _G_fpos_t
#define _IO_fpos64_t _G_fpos64_t
#define _IO_size_t _G_size_t
#define _IO_ssize_t _G_ssize_t
#define _IO_off_t _G_off_t
#define _IO_off64_t _G_off64_t
#define _IO_pid_t _G_pid_t
#define _IO_uid_t _G_uid_t
#define _IO_iconv_t _G_iconv_t
#define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT
#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
#define _IO_BUFSIZ _G_BUFSIZ
#define _IO_va_list _G_va_list
#define _IO_wint_t _G_wint_t



#define __need___va_list 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdarg.h" 1 3 4
# 34 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdarg.h" 3 4
#undef __need___va_list




#define __GNUC_VA_LIST 
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4

#undef _IO_va_list
#define _IO_va_list __gnuc_va_list
# 76 "/usr/include/libio.h" 3 4
#define _PARAMS(protos) __P(protos)







#define _IO_UNIFIED_JUMPTABLES 1





#define EOF (-1)
# 105 "/usr/include/libio.h" 3 4
#define _IOS_INPUT 1
#define _IOS_OUTPUT 2
#define _IOS_ATEND 4
#define _IOS_APPEND 8
#define _IOS_TRUNC 16
#define _IOS_NOCREATE 32
#define _IOS_NOREPLACE 64
#define _IOS_BIN 128







#define _IO_MAGIC 0xFBAD0000
#define _OLD_STDIO_MAGIC 0xFABC0000
#define _IO_MAGIC_MASK 0xFFFF0000
#define _IO_USER_BUF 1
#define _IO_UNBUFFERED 2
#define _IO_NO_READS 4
#define _IO_NO_WRITES 8
#define _IO_EOF_SEEN 0x10
#define _IO_ERR_SEEN 0x20
#define _IO_DELETE_DONT_CLOSE 0x40
#define _IO_LINKED 0x80
#define _IO_IN_BACKUP 0x100
#define _IO_LINE_BUF 0x200
#define _IO_TIED_PUT_GET 0x400
#define _IO_CURRENTLY_PUTTING 0x800
#define _IO_IS_APPENDING 0x1000
#define _IO_IS_FILEBUF 0x2000
#define _IO_BAD_SEEN 0x4000
#define _IO_USER_LOCK 0x8000

#define _IO_FLAGS2_MMAP 1
#define _IO_FLAGS2_NOTCANCEL 2



#define _IO_FLAGS2_USER_WBUF 8





#define _IO_SKIPWS 01
#define _IO_LEFT 02
#define _IO_RIGHT 04
#define _IO_INTERNAL 010
#define _IO_DEC 020
#define _IO_OCT 040
#define _IO_HEX 0100
#define _IO_SHOWBASE 0200
#define _IO_SHOWPOINT 0400
#define _IO_UPPERCASE 01000
#define _IO_SHOWPOS 02000
#define _IO_SCIENTIFIC 04000
#define _IO_FIXED 010000
#define _IO_UNITBUF 020000
#define _IO_STDIO 040000
#define _IO_DONT_CLOSE 0100000
#define _IO_BOOLALPHA 0200000


struct _IO_jump_t; struct _IO_FILE;
# 180 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 203 "/usr/include/libio.h" 3 4
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 271 "/usr/include/libio.h" 3 4
struct _IO_FILE {
  int _flags;
#define _IO_file_flags _flags



  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;



  int _flags2;

  __off_t _old_offset;

#define __HAVE_COLUMN 

  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 319 "/usr/include/libio.h" 3 4
  __off64_t _offset;
# 328 "/usr/include/libio.h" 3 4
  void *__pad1;
  void *__pad2;
  void *__pad3;
  void *__pad4;
  size_t __pad5;

  int _mode;

  char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;

#define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_))
#define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_))
#define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_))
# 364 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
     size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);




typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;


typedef struct
{
  __io_read_fn *read;
  __io_write_fn *write;
  __io_seek_fn *seek;
  __io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;

struct _IO_cookie_file;


extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
        void *__cookie, _IO_cookie_io_functions_t __fns);







extern int __underflow (_IO_FILE *);
extern int __uflow (_IO_FILE *);
extern int __overflow (_IO_FILE *, int);







#define _IO_BE(expr,res) __builtin_expect ((expr), res)




#define _IO_getc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++)


#define _IO_peekc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) && __underflow (_fp) == EOF ? EOF : *(unsigned char *) (_fp)->_IO_read_ptr)



#define _IO_putc_unlocked(_ch,_fp) (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))
# 457 "/usr/include/libio.h" 3 4
#define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0)
#define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0)

extern int _IO_getc (_IO_FILE *__fp);
extern int _IO_putc (int __c, _IO_FILE *__fp);
extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));

extern int _IO_peekc_locked (_IO_FILE *__fp);


#define _IO_PENDING_OUTPUT_COUNT(_fp) ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base)


extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
# 482 "/usr/include/libio.h" 3 4
#define _IO_peekc(_fp) _IO_peekc_unlocked (_fp)
#define _IO_flockfile(_fp) 
#define _IO_funlockfile(_fp) 
#define _IO_ftrylockfile(_fp) 
#define _IO_cleanup_region_start(_fct,_fp) 
#define _IO_cleanup_region_end(_Doit) 


extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
   __gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
    __gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);

extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
# 76 "/usr/include/stdio.h" 2 3 4




typedef __gnuc_va_list va_list;
#define _VA_LIST_DEFINED 
# 109 "/usr/include/stdio.h" 3 4


typedef _G_fpos_t fpos_t;





typedef _G_fpos64_t fpos64_t;



#define _IOFBF 0
#define _IOLBF 1
#define _IONBF 2




#define BUFSIZ _IO_BUFSIZ
# 141 "/usr/include/stdio.h" 3 4
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2




#define P_tmpdir "/tmp"
# 161 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 24 "/usr/include/bits/stdio_lim.h" 3 4
#define L_tmpnam 20
#define TMP_MAX 238328
#define FILENAME_MAX 4096


#define L_ctermid 9

#define L_cuserid 9





#undef FOPEN_MAX
#define FOPEN_MAX 16
# 162 "/usr/include/stdio.h" 2 3 4



extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;

#define stdin stdin
#define stdout stdout
#define stderr stderr



extern int remove (__const char *__filename) __attribute__ ((__nothrow__));

extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));




extern int renameat (int __oldfd, __const char *__old, int __newfd,
       __const char *__new) __attribute__ ((__nothrow__));








extern FILE *tmpfile (void) ;
# 202 "/usr/include/stdio.h" 3 4
extern FILE *tmpfile64 (void) ;



extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ;





extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ;
# 224 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;








extern int fclose (FILE *__stream);




extern int fflush (FILE *__stream);

# 249 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 259 "/usr/include/stdio.h" 3 4
extern int fcloseall (void);









extern FILE *fopen (__const char *__restrict __filename,
      __const char *__restrict __modes) ;




extern FILE *freopen (__const char *__restrict __filename,
        __const char *__restrict __modes,
        FILE *__restrict __stream) ;
# 292 "/usr/include/stdio.h" 3 4


extern FILE *fopen64 (__const char *__restrict __filename,
        __const char *__restrict __modes) ;
extern FILE *freopen64 (__const char *__restrict __filename,
   __const char *__restrict __modes,
   FILE *__restrict __stream) ;




extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ;





extern FILE *fopencookie (void *__restrict __magic_cookie,
     __const char *__restrict __modes,
     _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) ;




extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
  __attribute__ ((__nothrow__)) ;




extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ;






extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
      int __modes, size_t __n) __attribute__ ((__nothrow__));





extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
         size_t __size) __attribute__ ((__nothrow__));


extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));








extern int fprintf (FILE *__restrict __stream,
      __const char *__restrict __format, ...);




extern int printf (__const char *__restrict __format, ...);

extern int sprintf (char *__restrict __s,
      __const char *__restrict __format, ...) __attribute__ ((__nothrow__));





extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg);




extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg) __attribute__ ((__nothrow__));





extern int snprintf (char *__restrict __s, size_t __maxlen,
       __const char *__restrict __format, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
        __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));






extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
        __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) ;
extern int __asprintf (char **__restrict __ptr,
         __const char *__restrict __fmt, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) ;
extern int asprintf (char **__restrict __ptr,
       __const char *__restrict __fmt, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) ;
# 414 "/usr/include/stdio.h" 3 4
extern int vdprintf (int __fd, __const char *__restrict __fmt,
       __gnuc_va_list __arg)
     __attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
     __attribute__ ((__format__ (__printf__, 2, 3)));








extern int fscanf (FILE *__restrict __stream,
     __const char *__restrict __format, ...) ;




extern int scanf (__const char *__restrict __format, ...) ;

extern int sscanf (__const char *__restrict __s,
     __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
# 465 "/usr/include/stdio.h" 3 4








extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
      __gnuc_va_list __arg)
     __attribute__ ((__format__ (__scanf__, 2, 0))) ;





extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__format__ (__scanf__, 1, 0))) ;


extern int vsscanf (__const char *__restrict __s,
      __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
# 524 "/usr/include/stdio.h" 3 4









extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);





extern int getchar (void);




#define getc(_fp) _IO_getc (_fp)






extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 563 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);











extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);





extern int putchar (int __c);




#define putc(_ch,_fp) _IO_putc (_ch, _fp)
# 596 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);







extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);






extern int getw (FILE *__stream);


extern int putw (int __w, FILE *__stream);








extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
     ;






extern char *gets (char *__s) ;

# 642 "/usr/include/stdio.h" 3 4
extern char *fgets_unlocked (char *__restrict __s, int __n,
        FILE *__restrict __stream) ;
# 658 "/usr/include/stdio.h" 3 4
extern __ssize_t __getdelim (char **__restrict __lineptr,
          size_t *__restrict __n, int __delimiter,
          FILE *__restrict __stream) ;
extern __ssize_t getdelim (char **__restrict __lineptr,
        size_t *__restrict __n, int __delimiter,
        FILE *__restrict __stream) ;







extern __ssize_t getline (char **__restrict __lineptr,
       size_t *__restrict __n,
       FILE *__restrict __stream) ;








extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);





extern int puts (__const char *__s);






extern int ungetc (int __c, FILE *__stream);






extern size_t fread (void *__restrict __ptr, size_t __size,
       size_t __n, FILE *__restrict __stream) ;




extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
        size_t __n, FILE *__restrict __s) ;

# 719 "/usr/include/stdio.h" 3 4
extern int fputs_unlocked (__const char *__restrict __s,
      FILE *__restrict __stream);
# 730 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
         size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
          size_t __n, FILE *__restrict __stream) ;








extern int fseek (FILE *__stream, long int __off, int __whence);




extern long int ftell (FILE *__stream) ;




extern void rewind (FILE *__stream);

# 766 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);




extern __off_t ftello (FILE *__stream) ;
# 785 "/usr/include/stdio.h" 3 4






extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);




extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 808 "/usr/include/stdio.h" 3 4



extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
extern __off64_t ftello64 (FILE *__stream) ;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);




extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));

extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;

extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;








extern void perror (__const char *__s);






# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];


extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
# 847 "/usr/include/stdio.h" 2 3 4




extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
# 866 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;





extern int pclose (FILE *__stream);





extern char *ctermid (char *__s) __attribute__ ((__nothrow__));





extern char *cuserid (char *__s);




struct obstack;


extern int obstack_printf (struct obstack *__restrict __obstack,
      __const char *__restrict __format, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
       __const char *__restrict __format,
       __gnuc_va_list __args)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));







extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));



extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;


extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
# 936 "/usr/include/stdio.h" 3 4

# 35 "/usr/include/directfb/direct/debug.h" 2
# 1 "/usr/include/errno.h" 1 3 4
# 28 "/usr/include/errno.h" 3 4
#define _ERRNO_H 1







# 1 "/usr/include/bits/errno.h" 1 3 4
# 22 "/usr/include/bits/errno.h" 3 4
#undef EDOM
#undef EILSEQ
#undef ERANGE
# 1 "/usr/include/linux/errno.h" 1 3 4

#define _LINUX_ERRNO_H 

# 1 "/usr/include/asm/errno.h" 1 3 4
# 1 "/usr/include/asm-generic/errno.h" 1 3 4

#define _ASM_GENERIC_ERRNO_H 

# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4

#define _ASM_GENERIC_ERRNO_BASE_H 

#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#define EIO 5
#define ENXIO 6
#define E2BIG 7
#define ENOEXEC 8
#define EBADF 9
#define ECHILD 10
#define EAGAIN 11
#define ENOMEM 12
#define EACCES 13
#define EFAULT 14
#define ENOTBLK 15
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#define ENOTDIR 20
#define EISDIR 21
#define EINVAL 22
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define ETXTBSY 26
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
#define EDOM 33
#define ERANGE 34
# 5 "/usr/include/asm-generic/errno.h" 2 3 4

#define EDEADLK 35
#define ENAMETOOLONG 36
#define ENOLCK 37
#define ENOSYS 38
#define ENOTEMPTY 39
#define ELOOP 40
#define EWOULDBLOCK EAGAIN
#define ENOMSG 42
#define EIDRM 43
#define ECHRNG 44
#define EL2NSYNC 45
#define EL3HLT 46
#define EL3RST 47
#define ELNRNG 48
#define EUNATCH 49
#define ENOCSI 50
#define EL2HLT 51
#define EBADE 52
#define EBADR 53
#define EXFULL 54
#define ENOANO 55
#define EBADRQC 56
#define EBADSLT 57

#define EDEADLOCK EDEADLK

#define EBFONT 59
#define ENOSTR 60
#define ENODATA 61
#define ETIME 62
#define ENOSR 63
#define ENONET 64
#define ENOPKG 65
#define EREMOTE 66
#define ENOLINK 67
#define EADV 68
#define ESRMNT 69
#define ECOMM 70
#define EPROTO 71
#define EMULTIHOP 72
#define EDOTDOT 73
#define EBADMSG 74
#define EOVERFLOW 75
#define ENOTUNIQ 76
#define EBADFD 77
#define EREMCHG 78
#define ELIBACC 79
#define ELIBBAD 80
#define ELIBSCN 81
#define ELIBMAX 82
#define ELIBEXEC 83
#define EILSEQ 84
#define ERESTART 85
#define ESTRPIPE 86
#define EUSERS 87
#define ENOTSOCK 88
#define EDESTADDRREQ 89
#define EMSGSIZE 90
#define EPROTOTYPE 91
#define ENOPROTOOPT 92
#define EPROTONOSUPPORT 93
#define ESOCKTNOSUPPORT 94
#define EOPNOTSUPP 95
#define EPFNOSUPPORT 96
#define EAFNOSUPPORT 97
#define EADDRINUSE 98
#define EADDRNOTAVAIL 99
#define ENETDOWN 100
#define ENETUNREACH 101
#define ENETRESET 102
#define ECONNABORTED 103
#define ECONNRESET 104
#define ENOBUFS 105
#define EISCONN 106
#define ENOTCONN 107
#define ESHUTDOWN 108
#define ETOOMANYREFS 109
#define ETIMEDOUT 110
#define ECONNREFUSED 111
#define EHOSTDOWN 112
#define EHOSTUNREACH 113
#define EALREADY 114
#define EINPROGRESS 115
#define ESTALE 116
#define EUCLEAN 117
#define ENOTNAM 118
#define ENAVAIL 119
#define EISNAM 120
#define EREMOTEIO 121
#define EDQUOT 122

#define ENOMEDIUM 123
#define EMEDIUMTYPE 124
#define ECANCELED 125
#define ENOKEY 126
#define EKEYEXPIRED 127
#define EKEYREVOKED 128
#define EKEYREJECTED 129


#define EOWNERDEAD 130
#define ENOTRECOVERABLE 131

#define ERFKILL 132

#define EHWPOISON 133
# 1 "/usr/include/asm/errno.h" 2 3 4
# 5 "/usr/include/linux/errno.h" 2 3 4
# 26 "/usr/include/bits/errno.h" 2 3 4


#define ENOTSUP EOPNOTSUPP
# 47 "/usr/include/bits/errno.h" 3 4
extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



#define errno (*__errno_location ())
# 37 "/usr/include/errno.h" 2 3 4
#undef __need_Emath
# 55 "/usr/include/errno.h" 3 4
extern char *program_invocation_name, *program_invocation_short_name;




# 69 "/usr/include/errno.h" 3 4
typedef int error_t;
#define __error_t_defined 1

#undef __need_error_t
# 36 "/usr/include/directfb/direct/debug.h" 2

# 1 "/usr/include/directfb/direct/clock.h" 1
# 30 "/usr/include/directfb/direct/clock.h"
#define __DIRECT__CLOCK_H__ 



long long direct_clock_get_micros( void );
long long direct_clock_get_millis( void );

void direct_clock_set_start( const struct timeval *start );

long long direct_clock_get_abs_micros( void );
long long direct_clock_get_abs_millis( void );
# 38 "/usr/include/directfb/direct/debug.h" 2
# 1 "/usr/include/directfb/direct/conf.h" 1
# 30 "/usr/include/directfb/direct/conf.h"
#define __DIRECT__CONF_H__ 


# 1 "/usr/include/directfb/direct/messages.h" 1
# 30 "/usr/include/directfb/direct/messages.h"
#define __DIRECT__MESSAGES_H__ 






#define D_FORMAT_PRINTF(n) __attribute__((__format__ (__printf__, n, n+1)))




typedef enum {
     DMT_NONE = 0x00000000,

     DMT_BANNER = 0x00000001,
     DMT_INFO = 0x00000002,
     DMT_WARNING = 0x00000004,
     DMT_ERROR = 0x00000008,

     DMT_UNIMPLEMENTED = 0x00000010,
     DMT_ONCE = 0x00000020,

     DMT_ALL = 0x0000003f
} DirectMessageType;



# 1 "/usr/include/errno.h" 1 3 4
# 72 "/usr/include/errno.h" 3 4
#undef __need_error_t
# 59 "/usr/include/directfb/direct/messages.h" 2

# 1 "/usr/include/directfb/direct/conf.h" 1
# 61 "/usr/include/directfb/direct/messages.h" 2


void direct_messages_info ( const char *format, ... ) __attribute__((__format__ (__printf__, 1, 1 +1)));

void direct_messages_error ( const char *format, ... ) __attribute__((__format__ (__printf__, 1, 1 +1)));

void direct_messages_derror ( DirectResult result,
                                    const char *format, ... ) __attribute__((__format__ (__printf__, 2, 2 +1)));

void direct_messages_perror ( int erno,
                                    const char *format, ... ) __attribute__((__format__ (__printf__, 2, 2 +1)));

void direct_messages_dlerror ( const char *dlerr,
                                    const char *format, ... ) __attribute__((__format__ (__printf__, 2, 2 +1)));

void direct_messages_once ( const char *func,
                                    const char *file,
                                    int line,
                                    const char *format, ... ) __attribute__((__format__ (__printf__, 4, 4 +1)));

void direct_messages_unimplemented( const char *func,
                                    const char *file,
                                    int line );

void direct_messages_bug ( const char *func,
                                    const char *file,
                                    int line,
                                    const char *format, ... ) __attribute__((__format__ (__printf__, 4, 4 +1)));

void direct_messages_warn ( const char *func,
                                    const char *file,
                                    int line,
                                    const char *format, ... ) __attribute__((__format__ (__printf__, 4, 4 +1)));


#define D_INFO(x...) do { if (!(direct_config->quiet & DMT_INFO)) direct_messages_info( x ); } while (0)




#define D_ERROR(x...) do { if (!(direct_config->quiet & DMT_ERROR)) direct_messages_error( x ); } while (0)




#define D_DERROR(r,x...) do { if (!(direct_config->quiet & DMT_ERROR)) direct_messages_derror( r, x ); } while (0)




#define D_PERROR(x...) do { if (!(direct_config->quiet & DMT_ERROR)) direct_messages_perror( errno, x ); } while (0)




#define D_DLERROR(x...) do { if (!(direct_config->quiet & DMT_ERROR)) direct_messages_dlerror( dlerror(), x ); } while (0)





#define D_ONCE(x...) do { if (!(direct_config->quiet & DMT_ONCE)) { static bool first = true; if (first) { direct_messages_once( __FUNCTION__, __FILE__, __LINE__, x ); first = false; } } } while (0)
# 133 "/usr/include/directfb/direct/messages.h"
#define D_UNIMPLEMENTED() do { if (!(direct_config->quiet & DMT_UNIMPLEMENTED)) { static bool first = true; if (first) { direct_messages_unimplemented( __FUNCTION__, __FILE__, __LINE__ ); first = false; } } } while (0)
# 144 "/usr/include/directfb/direct/messages.h"
#define D_BUG(x...) do { if (!(direct_config->quiet & DMT_ERROR)) direct_messages_bug( __FUNCTION__, __FILE__, __LINE__, x ); } while (0)




#define D_WARN(x...) do { if (!(direct_config->quiet & DMT_WARNING)) direct_messages_warn( __FUNCTION__, __FILE__, __LINE__, x ); } while (0)




#define D_OOM() (direct_messages_warn( __FUNCTION__, __FILE__, __LINE__, "out of memory" ), DR_NOLOCALMEMORY)
# 34 "/usr/include/directfb/direct/conf.h" 2




# 1 "/usr/include/sys/signal.h" 1 3 4
# 1 "/usr/include/signal.h" 1 3 4
# 26 "/usr/include/signal.h" 3 4
#define _SIGNAL_H 






# 1 "/usr/include/bits/sigset.h" 1 3 4
# 44 "/usr/include/bits/sigset.h" 3 4
#define _SIGSET_H_fns 1


#define _EXTERN_INLINE __extern_inline



#define __sigmask(sig) (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int))))



#define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int)))


#define __sigemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = 0; 0; }))




#define __sigfillset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; 0; }))
# 73 "/usr/include/bits/sigset.h" 3 4
#define __sigisemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; const sigset_t *__set = (set); int __ret = __set->__val[--__cnt]; while (!__ret && --__cnt >= 0) __ret = __set->__val[__cnt]; __ret == 0; }))






#define __sigandset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] & __right->__val[__cnt]); 0; }))
# 89 "/usr/include/bits/sigset.h" 3 4
#define __sigorset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] | __right->__val[__cnt]); 0; }))
# 104 "/usr/include/bits/sigset.h" 3 4
extern int __sigismember (__const __sigset_t *, int);
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
# 34 "/usr/include/signal.h" 2 3 4





#define __sig_atomic_t_defined 

typedef __sig_atomic_t sig_atomic_t;


#undef __need_sig_atomic_t







#undef __need_sigset_t





# 1 "/usr/include/bits/signum.h" 1 3 4
# 23 "/usr/include/bits/signum.h" 3 4
#define SIG_ERR ((__sighandler_t) -1)
#define SIG_DFL ((__sighandler_t) 0)
#define SIG_IGN ((__sighandler_t) 1)


#define SIG_HOLD ((__sighandler_t) 2)




#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGABRT 6
#define SIGIOT 6
#define SIGBUS 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGUSR1 10
#define SIGSEGV 11
#define SIGUSR2 12
#define SIGPIPE 13
#define SIGALRM 14
#define SIGTERM 15
#define SIGSTKFLT 16
#define SIGCLD SIGCHLD
#define SIGCHLD 17
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
#define SIGTTIN 21
#define SIGTTOU 22
#define SIGURG 23
#define SIGXCPU 24
#define SIGXFSZ 25
#define SIGVTALRM 26
#define SIGPROF 27
#define SIGWINCH 28
#define SIGPOLL SIGIO
#define SIGIO 29
#define SIGPWR 30
#define SIGSYS 31
#define SIGUNUSED 31

#define _NSIG 65


#define SIGRTMIN (__libc_current_sigrtmin ())
#define SIGRTMAX (__libc_current_sigrtmax ())



#define __SIGRTMIN 32
#define __SIGRTMAX (_NSIG - 1)
# 59 "/usr/include/signal.h" 2 3 4
# 75 "/usr/include/signal.h" 3 4
#define __need_timespec 
# 1 "/usr/include/time.h" 1 3 4
# 67 "/usr/include/time.h" 3 4
#undef __need_clock_t
# 83 "/usr/include/time.h" 3 4
#undef __need_time_t
# 95 "/usr/include/time.h" 3 4
#undef __clockid_time_t
# 107 "/usr/include/time.h" 3 4
#undef __need_timer_t
# 127 "/usr/include/time.h" 3 4
#undef __need_timespec
# 77 "/usr/include/signal.h" 2 3 4


# 1 "/usr/include/bits/siginfo.h" 1 3 4
# 25 "/usr/include/bits/siginfo.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 19 "/usr/include/bits/wordsize.h" 3 4
#define __WORDSIZE 32
# 26 "/usr/include/bits/siginfo.h" 2 3 4




#define __have_sigval_t 1


typedef union sigval
  {
    int sival_int;
    void *sival_ptr;
  } sigval_t;




#define __have_siginfo_t 1

#define __SI_MAX_SIZE 128



#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)


typedef struct siginfo
  {
    int si_signo;
    int si_errno;

    int si_code;

    union
      {
 int _pad[((128 / sizeof (int)) - 3)];


 struct
   {
     __pid_t si_pid;
     __uid_t si_uid;
   } _kill;


 struct
   {
     int si_tid;
     int si_overrun;
     sigval_t si_sigval;
   } _timer;


 struct
   {
     __pid_t si_pid;
     __uid_t si_uid;
     sigval_t si_sigval;
   } _rt;


 struct
   {
     __pid_t si_pid;
     __uid_t si_uid;
     int si_status;
     __clock_t si_utime;
     __clock_t si_stime;
   } _sigchld;


 struct
   {
     void *si_addr;
   } _sigfault;


 struct
   {
     long int si_band;
     int si_fd;
   } _sigpoll;
      } _sifields;
  } siginfo_t;



#define si_pid _sifields._kill.si_pid
#define si_uid _sifields._kill.si_uid
#define si_timerid _sifields._timer.si_tid
#define si_overrun _sifields._timer.si_overrun
#define si_status _sifields._sigchld.si_status
#define si_utime _sifields._sigchld.si_utime
#define si_stime _sifields._sigchld.si_stime
#define si_value _sifields._rt.si_sigval
#define si_int _sifields._rt.si_sigval.sival_int
#define si_ptr _sifields._rt.si_sigval.sival_ptr
#define si_addr _sifields._sigfault.si_addr
#define si_band _sifields._sigpoll.si_band
#define si_fd _sifields._sigpoll.si_fd




enum
{
  SI_ASYNCNL = -60,
#define SI_ASYNCNL SI_ASYNCNL
  SI_TKILL = -6,
#define SI_TKILL SI_TKILL
  SI_SIGIO,
#define SI_SIGIO SI_SIGIO
  SI_ASYNCIO,
#define SI_ASYNCIO SI_ASYNCIO
  SI_MESGQ,
#define SI_MESGQ SI_MESGQ
  SI_TIMER,
#define SI_TIMER SI_TIMER
  SI_QUEUE,
#define SI_QUEUE SI_QUEUE
  SI_USER,
#define SI_USER SI_USER
  SI_KERNEL = 0x80
#define SI_KERNEL SI_KERNEL
};



enum
{
  ILL_ILLOPC = 1,
#define ILL_ILLOPC ILL_ILLOPC
  ILL_ILLOPN,
#define ILL_ILLOPN ILL_ILLOPN
  ILL_ILLADR,
#define ILL_ILLADR ILL_ILLADR
  ILL_ILLTRP,
#define ILL_ILLTRP ILL_ILLTRP
  ILL_PRVOPC,
#define ILL_PRVOPC ILL_PRVOPC
  ILL_PRVREG,
#define ILL_PRVREG ILL_PRVREG
  ILL_COPROC,
#define ILL_COPROC ILL_COPROC
  ILL_BADSTK
#define ILL_BADSTK ILL_BADSTK
};


enum
{
  FPE_INTDIV = 1,
#define FPE_INTDIV FPE_INTDIV
  FPE_INTOVF,
#define FPE_INTOVF FPE_INTOVF
  FPE_FLTDIV,
#define FPE_FLTDIV FPE_FLTDIV
  FPE_FLTOVF,
#define FPE_FLTOVF FPE_FLTOVF
  FPE_FLTUND,
#define FPE_FLTUND FPE_FLTUND
  FPE_FLTRES,
#define FPE_FLTRES FPE_FLTRES
  FPE_FLTINV,
#define FPE_FLTINV FPE_FLTINV
  FPE_FLTSUB
#define FPE_FLTSUB FPE_FLTSUB
};


enum
{
  SEGV_MAPERR = 1,
#define SEGV_MAPERR SEGV_MAPERR
  SEGV_ACCERR
#define SEGV_ACCERR SEGV_ACCERR
};


enum
{
  BUS_ADRALN = 1,
#define BUS_ADRALN BUS_ADRALN
  BUS_ADRERR,
#define BUS_ADRERR BUS_ADRERR
  BUS_OBJERR
#define BUS_OBJERR BUS_OBJERR
};


enum
{
  TRAP_BRKPT = 1,
#define TRAP_BRKPT TRAP_BRKPT
  TRAP_TRACE
#define TRAP_TRACE TRAP_TRACE
};


enum
{
  CLD_EXITED = 1,
#define CLD_EXITED CLD_EXITED
  CLD_KILLED,
#define CLD_KILLED CLD_KILLED
  CLD_DUMPED,
#define CLD_DUMPED CLD_DUMPED
  CLD_TRAPPED,
#define CLD_TRAPPED CLD_TRAPPED
  CLD_STOPPED,
#define CLD_STOPPED CLD_STOPPED
  CLD_CONTINUED
#define CLD_CONTINUED CLD_CONTINUED
};


enum
{
  POLL_IN = 1,
#define POLL_IN POLL_IN
  POLL_OUT,
#define POLL_OUT POLL_OUT
  POLL_MSG,
#define POLL_MSG POLL_MSG
  POLL_ERR,
#define POLL_ERR POLL_ERR
  POLL_PRI,
#define POLL_PRI POLL_PRI
  POLL_HUP
#define POLL_HUP POLL_HUP
};

#undef __need_siginfo_t





#define __have_sigevent_t 1


#define __SIGEV_MAX_SIZE 64



#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)


typedef struct sigevent
  {
    sigval_t sigev_value;
    int sigev_signo;
    int sigev_notify;

    union
      {
 int _pad[((64 / sizeof (int)) - 3)];



 __pid_t _tid;

 struct
   {
     void (*_function) (sigval_t);
     void *_attribute;
   } _sigev_thread;
      } _sigev_un;
  } sigevent_t;


#define sigev_notify_function _sigev_un._sigev_thread._function
#define sigev_notify_attributes _sigev_un._sigev_thread._attribute


enum
{
  SIGEV_SIGNAL = 0,
#define SIGEV_SIGNAL SIGEV_SIGNAL
  SIGEV_NONE,
#define SIGEV_NONE SIGEV_NONE
  SIGEV_THREAD,
#define SIGEV_THREAD SIGEV_THREAD

  SIGEV_THREAD_ID = 4
#define SIGEV_THREAD_ID SIGEV_THREAD_ID
};
# 80 "/usr/include/signal.h" 2 3 4




typedef void (*__sighandler_t) (int);




extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));

extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));







extern __sighandler_t signal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));
# 113 "/usr/include/signal.h" 3 4





extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));






extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__));






extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__));




extern int raise (int __sig) __attribute__ ((__nothrow__));




extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
     __attribute__ ((__nothrow__));
extern int gsignal (int __sig) __attribute__ ((__nothrow__));




extern void psignal (int __sig, __const char *__s);




extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s);
# 168 "/usr/include/signal.h" 3 4
extern int __sigpause (int __sig_or_mask, int __is_sig);
# 177 "/usr/include/signal.h" 3 4
extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
# 193 "/usr/include/signal.h" 3 4
#define sigmask(sig) __sigmask(sig)


extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));


extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));


extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));




#define NSIG _NSIG



typedef __sighandler_t sighandler_t;




typedef __sighandler_t sig_t;





extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigismember (__const sigset_t *__set, int __signo)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern int sigisemptyset (__const sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int sigandset (sigset_t *__set, __const sigset_t *__left,
        __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));


extern int sigorset (sigset_t *__set, __const sigset_t *__left,
       __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));




# 1 "/usr/include/bits/sigaction.h" 1 3 4
# 25 "/usr/include/bits/sigaction.h" 3 4
struct sigaction
  {


    union
      {

 __sighandler_t sa_handler;

 void (*sa_sigaction) (int, siginfo_t *, void *);
      }
    __sigaction_handler;
#define sa_handler __sigaction_handler.sa_handler
#define sa_sigaction __sigaction_handler.sa_sigaction





    __sigset_t sa_mask;


    int sa_flags;


    void (*sa_restorer) (void);
  };


#define SA_NOCLDSTOP 1
#define SA_NOCLDWAIT 2
#define SA_SIGINFO 4


#define SA_ONSTACK 0x08000000


#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000

#define SA_RESETHAND 0x80000000


#define SA_INTERRUPT 0x20000000


#define SA_NOMASK SA_NODEFER
#define SA_ONESHOT SA_RESETHAND
#define SA_STACK SA_ONSTACK



#define SIG_BLOCK 0
#define SIG_UNBLOCK 1
#define SIG_SETMASK 2
# 253 "/usr/include/signal.h" 2 3 4


extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
   sigset_t *__restrict __oset) __attribute__ ((__nothrow__));






extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));


extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
        struct sigaction *__restrict __oact) __attribute__ ((__nothrow__));


extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
     __attribute__ ((__nonnull__ (1, 2)));






extern int sigwaitinfo (__const sigset_t *__restrict __set,
   siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));






extern int sigtimedwait (__const sigset_t *__restrict __set,
    siginfo_t *__restrict __info,
    __const struct timespec *__restrict __timeout)
     __attribute__ ((__nonnull__ (1)));



extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
     __attribute__ ((__nothrow__));
# 310 "/usr/include/signal.h" 3 4
extern __const char *__const _sys_siglist[65];
extern __const char *__const sys_siglist[65];


struct sigvec
  {
    __sighandler_t sv_handler;
    int sv_mask;

    int sv_flags;
#define sv_onstack sv_flags
  };


#define SV_ONSTACK (1 << 0)
#define SV_INTERRUPT (1 << 1)
#define SV_RESETHAND (1 << 2)







extern int sigvec (int __sig, __const struct sigvec *__vec,
     struct sigvec *__ovec) __attribute__ ((__nothrow__));



# 1 "/usr/include/bits/sigcontext.h" 1 3 4
# 26 "/usr/include/bits/sigcontext.h" 3 4
#define sigcontext_struct sigcontext

# 1 "/usr/include/asm/sigcontext.h" 1 3 4

#define _ASM_X86_SIGCONTEXT_H 


# 1 "/usr/include/linux/types.h" 1 3 4

#define _LINUX_TYPES_H 

# 1 "/usr/include/asm/types.h" 1 3 4

#define _ASM_X86_TYPES_H 

# 1 "/usr/include/asm-generic/types.h" 1 3 4

#define _ASM_GENERIC_TYPES_H 




# 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4
# 9 "/usr/include/asm-generic/int-ll64.h" 3 4
#define _ASM_GENERIC_INT_LL64_H 

# 1 "/usr/include/asm/bitsperlong.h" 1 3 4

#define __ASM_X86_BITSPERLONG_H 




#define __BITS_PER_LONG 32


# 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4

#define __ASM_GENERIC_BITS_PER_LONG 
# 11 "/usr/include/asm/bitsperlong.h" 2 3 4
# 12 "/usr/include/asm-generic/int-ll64.h" 2 3 4







typedef __signed__ char __s8;
typedef unsigned char __u8;

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;


__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
# 8 "/usr/include/asm-generic/types.h" 2 3 4



typedef unsigned short umode_t;
# 5 "/usr/include/asm/types.h" 2 3 4
# 5 "/usr/include/linux/types.h" 2 3 4



# 1 "/usr/include/linux/posix_types.h" 1 3 4

#define _LINUX_POSIX_TYPES_H 

# 1 "/usr/include/linux/stddef.h" 1 3 4

#define _LINUX_STDDEF_H 



#undef NULL



#define NULL ((void *)0)
# 5 "/usr/include/linux/posix_types.h" 2 3 4
# 21 "/usr/include/linux/posix_types.h" 3 4
#undef __NFDBITS
#define __NFDBITS (8 * sizeof(unsigned long))

#undef __FD_SETSIZE
#define __FD_SETSIZE 1024

#undef __FDSET_LONGS
#define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS)

#undef __FDELT
#define __FDELT(d) ((d) / __NFDBITS)

#undef __FDMASK
#define __FDMASK(d) (1UL << ((d) % __NFDBITS))

typedef struct {
 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
} __kernel_fd_set;


typedef void (*__kernel_sighandler_t)(int);


typedef int __kernel_key_t;
typedef int __kernel_mqd_t;

# 1 "/usr/include/asm/posix_types.h" 1 3 4

# 1 "/usr/include/asm/posix_types_32.h" 1 3 4

#define _ASM_X86_POSIX_TYPES_32_H 







typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
typedef long __kernel_off_t;
typedef int __kernel_pid_t;
typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;

typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef unsigned short __kernel_old_dev_t;


typedef long long __kernel_loff_t;


typedef struct {
 int val[2];
} __kernel_fsid_t;
# 3 "/usr/include/asm/posix_types.h" 2 3 4
# 48 "/usr/include/linux/posix_types.h" 2 3 4
# 9 "/usr/include/linux/types.h" 2 3 4
# 19 "/usr/include/linux/types.h" 3 4
#define __bitwise__ 




#define __bitwise 


typedef __u16 __le16;
typedef __u16 __be16;
typedef __u32 __le32;
typedef __u32 __be32;
typedef __u64 __le64;
typedef __u64 __be64;

typedef __u16 __sum16;
typedef __u32 __wsum;
# 46 "/usr/include/linux/types.h" 3 4
#define __aligned_u64 __u64 __attribute__((aligned(8)))
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
# 6 "/usr/include/asm/sigcontext.h" 2 3 4

#define FP_XSTATE_MAGIC1 0x46505853U
#define FP_XSTATE_MAGIC2 0x46505845U
#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)
# 23 "/usr/include/asm/sigcontext.h" 3 4
struct _fpx_sw_bytes {
 __u32 magic1;
 __u32 extended_size;


 __u64 xstate_bv;




 __u32 xstate_size;




 __u32 padding[7];
};
# 56 "/usr/include/asm/sigcontext.h" 3 4
struct _fpreg {
 unsigned short significand[4];
 unsigned short exponent;
};

struct _fpxreg {
 unsigned short significand[4];
 unsigned short exponent;
 unsigned short padding[3];
};

struct _xmmreg {
 unsigned long element[4];
};

struct _fpstate {

 unsigned long cw;
 unsigned long sw;
 unsigned long tag;
 unsigned long ipoff;
 unsigned long cssel;
 unsigned long dataoff;
 unsigned long datasel;
 struct _fpreg _st[8];
 unsigned short status;
 unsigned short magic;


 unsigned long _fxsr_env[6];
 unsigned long mxcsr;
 unsigned long reserved;
 struct _fpxreg _fxsr_st[8];
 struct _xmmreg _xmm[8];
 unsigned long padding1[44];

 union {
  unsigned long padding2[12];
  struct _fpx_sw_bytes sw_reserved;

 };
};

#define X86_FXSR_MAGIC 0x0000




struct sigcontext {
 unsigned short gs, __gsh;
 unsigned short fs, __fsh;
 unsigned short es, __esh;
 unsigned short ds, __dsh;
 unsigned long edi;
 unsigned long esi;
 unsigned long ebp;
 unsigned long esp;
 unsigned long ebx;
 unsigned long edx;
 unsigned long ecx;
 unsigned long eax;
 unsigned long trapno;
 unsigned long err;
 unsigned long eip;
 unsigned short cs, __csh;
 unsigned long eflags;
 unsigned long esp_at_signal;
 unsigned short ss, __ssh;
 struct _fpstate *fpstate;
 unsigned long oldmask;
 unsigned long cr2;
};
# 190 "/usr/include/asm/sigcontext.h" 3 4
struct _xsave_hdr {
 __u64 xstate_bv;
 __u64 reserved1[2];
 __u64 reserved2[5];
};

struct _ymmh_state {

 __u32 ymmh_space[64];
};







struct _xstate {
 struct _fpstate fpstate;
 struct _xsave_hdr xstate_hdr;
 struct _ymmh_state ymmh;

};
# 29 "/usr/include/bits/sigcontext.h" 2 3 4
# 340 "/usr/include/signal.h" 2 3 4


extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__));





#define __need_size_t 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 408 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_NULL
# 350 "/usr/include/signal.h" 2 3 4




extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__));

# 1 "/usr/include/bits/sigstack.h" 1 3 4
# 26 "/usr/include/bits/sigstack.h" 3 4
struct sigstack
  {
    void *ss_sp;
    int ss_onstack;
  };



enum
{
  SS_ONSTACK = 1,
#define SS_ONSTACK SS_ONSTACK
  SS_DISABLE
#define SS_DISABLE SS_DISABLE
};


#define MINSIGSTKSZ 2048


#define SIGSTKSZ 8192



typedef struct sigaltstack
  {
    void *ss_sp;
    int ss_flags;
    size_t ss_size;
  } stack_t;
# 357 "/usr/include/signal.h" 2 3 4


# 1 "/usr/include/sys/ucontext.h" 1 3 4
# 20 "/usr/include/sys/ucontext.h" 3 4
#define _SYS_UCONTEXT_H 1


# 1 "/usr/include/signal.h" 1 3 4
# 24 "/usr/include/sys/ucontext.h" 2 3 4



# 1 "/usr/include/bits/sigcontext.h" 1 3 4
# 28 "/usr/include/sys/ucontext.h" 2 3 4



typedef int greg_t;


#define NGREG 19


typedef greg_t gregset_t[19];



enum
{
  REG_GS = 0,
#define REG_GS REG_GS
  REG_FS,
#define REG_FS REG_FS
  REG_ES,
#define REG_ES REG_ES
  REG_DS,
#define REG_DS REG_DS
  REG_EDI,
#define REG_EDI REG_EDI
  REG_ESI,
#define REG_ESI REG_ESI
  REG_EBP,
#define REG_EBP REG_EBP
  REG_ESP,
#define REG_ESP REG_ESP
  REG_EBX,
#define REG_EBX REG_EBX
  REG_EDX,
#define REG_EDX REG_EDX
  REG_ECX,
#define REG_ECX REG_ECX
  REG_EAX,
#define REG_EAX REG_EAX
  REG_TRAPNO,
#define REG_TRAPNO REG_TRAPNO
  REG_ERR,
#define REG_ERR REG_ERR
  REG_EIP,
#define REG_EIP REG_EIP
  REG_CS,
#define REG_CS REG_CS
  REG_EFL,
#define REG_EFL REG_EFL
  REG_UESP,
#define REG_UESP REG_UESP
  REG_SS
#define REG_SS REG_SS
};



struct _libc_fpreg
{
  unsigned short int significand[4];
  unsigned short int exponent;
};

struct _libc_fpstate
{
  unsigned long int cw;
  unsigned long int sw;
  unsigned long int tag;
  unsigned long int ipoff;
  unsigned long int cssel;
  unsigned long int dataoff;
  unsigned long int datasel;
  struct _libc_fpreg _st[8];
  unsigned long int status;
};


typedef struct _libc_fpstate *fpregset_t;


typedef struct
  {
    gregset_t gregs;


    fpregset_t fpregs;
    unsigned long int oldmask;
    unsigned long int cr2;
  } mcontext_t;


typedef struct ucontext
  {
    unsigned long int uc_flags;
    struct ucontext *uc_link;
    stack_t uc_stack;
    mcontext_t uc_mcontext;
    __sigset_t uc_sigmask;
    struct _libc_fpstate __fpregs_mem;
  } ucontext_t;
# 360 "/usr/include/signal.h" 2 3 4





extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
     __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__));



extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
   struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__));







extern int sighold (int __sig) __attribute__ ((__nothrow__));


extern int sigrelse (int __sig) __attribute__ ((__nothrow__));


extern int sigignore (int __sig) __attribute__ ((__nothrow__));


extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__));






# 1 "/usr/include/bits/sigthread.h" 1 3 4
# 21 "/usr/include/bits/sigthread.h" 3 4
#define _BITS_SIGTHREAD_H 1
# 31 "/usr/include/bits/sigthread.h" 3 4
extern int pthread_sigmask (int __how,
       __const __sigset_t *__restrict __newmask,
       __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__));


extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__));



extern int pthread_sigqueue (pthread_t __threadid, int __signo,
        const union sigval __value) __attribute__ ((__nothrow__));
# 396 "/usr/include/signal.h" 2 3 4






extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__));

extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__));




# 1 "/usr/include/sys/signal.h" 2 3 4
# 39 "/usr/include/directfb/direct/conf.h" 2


typedef enum {
     DCFL_NONE,
     DCFL_ASSERT,
     DCFL_ASSUME
} DirectConfigFatalLevel;

typedef enum {
     DCTS_OTHER,
     DCTS_FIFO,
     DCTS_RR
} DirectConfigThreadScheduler;

struct __D_DirectConfig {
     DirectMessageType quiet;
     _Bool debug;
     _Bool trace;

     char *memcpy;


     char **disable_module;
     char *module_dir;

     _Bool sighandler;
     sigset_t dont_catch;

     DirectLog *log;

     DirectConfigFatalLevel fatal;

     _Bool debugmem;

     _Bool thread_block_signals;

     _Bool fatal_break;

     int thread_priority;
     DirectConfigThreadScheduler thread_scheduler;
     int thread_stack_size;
     int thread_priority_scale;
};

extern DirectConfig *direct_config;

extern const char *direct_config_usage;


DirectResult direct_config_set( const char *name, const char *value );
# 39 "/usr/include/directfb/direct/debug.h" 2
# 1 "/usr/include/directfb/direct/log.h" 1
# 30 "/usr/include/directfb/direct/log.h"
#define __DIRECT__LOG_H__ 





typedef enum {
     DLT_STDERR,
     DLT_FILE,
     DLT_UDP
} DirectLogType;
# 51 "/usr/include/directfb/direct/log.h"
DirectResult direct_log_create ( DirectLogType type,
                                     const char *param,
                                     DirectLog **ret_log );




DirectResult direct_log_destroy ( DirectLog *log );







DirectResult direct_log_printf ( DirectLog *log,
                                     const char *format, ... ) __attribute__((__format__ (__printf__, 2, 2 +1)));




DirectResult direct_log_set_default( DirectLog *log );




void direct_log_lock ( DirectLog *log );




void direct_log_unlock ( DirectLog *log );




DirectLog *direct_log_default( void );
# 40 "/usr/include/directfb/direct/debug.h" 2

# 1 "/usr/include/directfb/direct/system.h" 1
# 30 "/usr/include/directfb/direct/system.h"
#define __DIRECT__SYSTEM_H__ 



pid_t direct_gettid( void );
long direct_pagesize( void );

unsigned long direct_page_align( unsigned long value );
# 42 "/usr/include/directfb/direct/debug.h" 2
# 1 "/usr/include/directfb/direct/thread.h" 1
# 30 "/usr/include/directfb/direct/thread.h"
#define __DIRECT__THREAD_H__ 






typedef enum {
     DTT_DEFAULT = 0,
     DTT_CLEANUP = -5,
     DTT_INPUT = -10,
     DTT_OUTPUT = -12,
     DTT_MESSAGING = -15,
     DTT_CRITICAL = -20
} DirectThreadType;

typedef void * (*DirectThreadMainFunc)( DirectThread *thread, void *arg );

typedef void (*DirectThreadInitFunc)( DirectThread *thread, void *arg );





DirectThreadInitHandler *direct_thread_add_init_handler ( DirectThreadInitFunc func,
                                                            void *arg );




void direct_thread_remove_init_handler( DirectThreadInitHandler *handler );





DirectThread *direct_thread_create ( DirectThreadType thread_type,
                                         DirectThreadMainFunc thread_main,
                                         void *arg,
                                         const char *name );




DirectThread *direct_thread_self ( void );




const char *direct_thread_get_name ( DirectThread *thread );




pid_t direct_thread_get_tid ( DirectThread *thread );




const char *direct_thread_self_name ( void );




void direct_thread_set_name ( const char *name );




DirectResult direct_thread_wait ( DirectThread *thread,
                                         int timeout_ms );




void direct_thread_notify ( DirectThread *thread );

void direct_thread_lock ( DirectThread *thread );
void direct_thread_unlock ( DirectThread *thread );




void direct_thread_terminate ( DirectThread *thread );




void direct_thread_cancel ( DirectThread *thread );




_Bool direct_thread_is_canceled( DirectThread *thread );




void direct_thread_detach ( DirectThread *thread );




_Bool direct_thread_is_detached( DirectThread *thread );






void direct_thread_testcancel ( DirectThread *thread );




void direct_thread_join ( DirectThread *thread );




_Bool direct_thread_is_joined ( DirectThread *thread );





void direct_thread_destroy ( DirectThread *thread );





const char *direct_thread_type_name ( DirectThreadType type );
const char *direct_thread_scheduler_name( DirectConfigThreadScheduler scheduler );
const char *direct_thread_policy_name ( int policy );
# 43 "/usr/include/directfb/direct/debug.h" 2
# 1 "/usr/include/directfb/direct/trace.h" 1
# 30 "/usr/include/directfb/direct/trace.h"
#define __DIRECT__TRACE_H__ 
# 43 "/usr/include/directfb/direct/trace.h"
const char *direct_trace_lookup_file ( void *address,
                                        void **ret_base );






const char *direct_trace_lookup_symbol( const char *filename,
                                        long offset );




static inline const char *
direct_trace_lookup_symbol_at( void *address )
{
     void *base;
     const char *filename;

     filename = direct_trace_lookup_file( address, &base );

     return direct_trace_lookup_symbol( filename, (unsigned long) address - (unsigned long) base );
}
# 75 "/usr/include/directfb/direct/trace.h"
void direct_trace_print_stack( DirectTraceBuffer *buffer );




void direct_trace_print_stacks( void );




int direct_trace_debug_indent( void );




DirectTraceBuffer *direct_trace_copy_buffer( DirectTraceBuffer *buffer );




void direct_trace_free_buffer( DirectTraceBuffer *buffer );
# 44 "/usr/include/directfb/direct/debug.h" 2



typedef struct {
     unsigned int age;
     _Bool enabled;
     _Bool registered;

     const char *name;
     const char *description;

     int name_len;
} DirectDebugDomain;

void direct_debug_config_domain( const char *name, _Bool enable );

_Bool direct_debug_check_domain( DirectDebugDomain *domain );




#define D_DEBUG_DOMAIN(identifier,name,description) static DirectDebugDomain identifier __attribute__((unused)) = { 0, false, false, name, description, sizeof(name) - 1 }



void direct_debug_at_always( DirectDebugDomain *domain,
                             const char *format, ... ) __attribute__((__format__ (__printf__, 2, 2 +1)));

#define d_debug_at(domain,x...) direct_debug_at_always( &domain, x )




void direct_debug( const char *format, ... ) __attribute__((__format__ (__printf__, 1, 1 +1)));

void direct_debug_at( DirectDebugDomain *domain,
                      const char *format, ... ) __attribute__((__format__ (__printf__, 2, 2 +1)));

void direct_debug_enter( DirectDebugDomain *domain,
                 const char *func,
                         const char *file,
                         int line,
                         const char *format, ... ) __attribute__((__format__ (__printf__, 5, 5 +1)));

void direct_debug_exit( DirectDebugDomain *domain,
                const char *func,
                        const char *file,
                        int line,
                        const char *format, ... ) __attribute__((__format__ (__printf__, 5, 5 +1)));

void direct_break( const char *func,
                   const char *file,
                   int line,
                   const char *format, ... ) __attribute__((__format__ (__printf__, 4, 4 +1)));

void direct_assertion( const char *exp,
                       const char *func,
                       const char *file,
                       int line );

void direct_assumption( const char *exp,
                        const char *func,
                        const char *file,
                        int line );
# 202 "/usr/include/directfb/direct/debug.h"
#define D_DEBUG_ENABLED (0)



#define D_DEBUG(x...) do {} while (0)



#define D_DEBUG_AT(d,x...) do {} while (0)



#define D_DEBUG_ENTER(d,x...) do {} while (0)



#define D_DEBUG_EXIT(d,x...) do {} while (0)



#define D_ASSERT(exp) do {} while (0)



#define D_ASSUME(exp) do {} while (0)



#define D_DEBUG_CHECK(d) false



#define D_BREAK(x...) do {} while (0)
# 251 "/usr/include/directfb/direct/debug.h"
#define D_MAGIC(spell) ( (((spell)[sizeof(spell)*8/9] << 24) | ((spell)[sizeof(spell)*7/9] << 16) | ((spell)[sizeof(spell)*6/9] << 8) | ((spell)[sizeof(spell)*5/9] )) ^ (((spell)[sizeof(spell)*4/9] << 24) | ((spell)[sizeof(spell)*3/9] << 16) | ((spell)[sizeof(spell)*2/9] << 8) | ((spell)[sizeof(spell)*1/9] )) )
# 261 "/usr/include/directfb/direct/debug.h"
#define D_MAGIC_SET(o,m) do { D_ASSERT( (o) != NULL ); D_ASSUME( (o)->magic != D_MAGIC(#m) ); (o)->magic = D_MAGIC(#m); } while (0)






#define D_MAGIC_SET_ONLY(o,m) do { D_ASSERT( (o) != NULL ); (o)->magic = D_MAGIC(#m); } while (0)





#define D_MAGIC_ASSERT(o,m) do { D_ASSERT( (o) != NULL ); D_ASSERT( (o)->magic == D_MAGIC(#m) ); } while (0)




#define D_MAGIC_ASSUME(o,m) do { D_ASSUME( (o) != NULL ); if (o) D_ASSUME( (o)->magic == D_MAGIC(#m) ); } while (0)





#define D_MAGIC_ASSERT_IF(o,m) do { if (o) D_ASSERT( (o)->magic == D_MAGIC(#m) ); } while (0)




#define D_MAGIC_CLEAR(o) do { D_ASSERT( (o) != NULL ); D_ASSUME( (o)->magic != 0 ); (o)->magic = 0; } while (0)
# 33 "/usr/include/directfb/direct/interface.h" 2
# 1 "/usr/include/directfb/direct/mem.h" 1
# 30 "/usr/include/directfb/direct/mem.h"
#define __DIRECT__MEM_H__ 

# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#define _STDDEF_H 
#define _STDDEF_H_ 

#define _ANSI_STDDEF_H 

#define __STDDEF_H__ 
# 139 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#define _PTRDIFF_T 
#define _T_PTRDIFF_ 
#define _T_PTRDIFF 
#define __PTRDIFF_T 
#define _PTRDIFF_T_ 
#define _BSD_PTRDIFF_T_ 
#define ___int_ptrdiff_t_h 
#define _GCC_PTRDIFF_T 



typedef int ptrdiff_t;
# 161 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 263 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#define __wchar_t__ 
#define __WCHAR_T__ 
#define _WCHAR_T 
#define _T_WCHAR_ 
#define _T_WCHAR 
#define __WCHAR_T 
#define _WCHAR_T_ 
#define _BSD_WCHAR_T_ 
#define _WCHAR_T_DEFINED_ 
#define _WCHAR_T_DEFINED 
#define _WCHAR_T_H 
#define ___int_wchar_t_h 
#define __INT_WCHAR_T_H 
#define _GCC_WCHAR_T 
#define _WCHAR_T_DECLARED 
# 290 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef _BSD_WCHAR_T_
# 324 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
typedef long int wchar_t;
# 343 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_wchar_t
# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef NULL




#define NULL ((void *)0)





#undef __need_NULL




#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
# 33 "/usr/include/directfb/direct/mem.h" 2



void direct_print_memleaks( void );


void direct_free ( const char *file, int line,
                      const char *func, const char *what, void *mem );

void *direct_malloc ( const char *file, int line,
                      const char *func, size_t bytes );

void *direct_calloc ( const char *file, int line,
                      const char *func, size_t count, size_t bytes);

void *direct_realloc( const char *file, int line,
                      const char *func, const char *what, void *mem,
                      size_t bytes );

char *direct_strdup ( const char *file, int line,
                      const char *func, const char *string );
# 71 "/usr/include/directfb/direct/mem.h"
# 1 "/usr/include/stdlib.h" 1 3 4
# 28 "/usr/include/stdlib.h" 3 4
#define __need_size_t 

#define __need_wchar_t 
#define __need_NULL 

# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 161 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 343 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_wchar_t
# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef NULL




#define NULL ((void *)0)





#undef __need_NULL




#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
# 34 "/usr/include/stdlib.h" 2 3 4




#define _STDLIB_H 1



# 1 "/usr/include/bits/waitflags.h" 1 3 4
# 26 "/usr/include/bits/waitflags.h" 3 4
#define WNOHANG 1
#define WUNTRACED 2


#define WSTOPPED 2
#define WEXITED 4
#define WCONTINUED 8
#define WNOWAIT 0x01000000

#define __WNOTHREAD 0x20000000

#define __WALL 0x40000000
#define __WCLONE 0x80000000
# 43 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/bits/waitstatus.h" 1 3 4
# 29 "/usr/include/bits/waitstatus.h" 3 4
#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)


#define __WTERMSIG(status) ((status) & 0x7f)


#define __WSTOPSIG(status) __WEXITSTATUS(status)


#define __WIFEXITED(status) (__WTERMSIG(status) == 0)


#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)



#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)




#define __WIFCONTINUED(status) ((status) == __W_CONTINUED)



#define __WCOREDUMP(status) ((status) & __WCOREFLAG)


#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig))
#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
#define __W_CONTINUED 0xffff
#define __WCOREFLAG 0x80






union wait
  {
    int w_status;
    struct
      {

 unsigned int __w_termsig:7;
 unsigned int __w_coredump:1;
 unsigned int __w_retcode:8;
 unsigned int:16;







      } __wait_terminated;
    struct
      {

 unsigned int __w_stopval:8;
 unsigned int __w_stopsig:8;
 unsigned int:16;






      } __wait_stopped;
  };

#define w_termsig __wait_terminated.__w_termsig
#define w_coredump __wait_terminated.__w_coredump
#define w_retcode __wait_terminated.__w_retcode
#define w_stopsig __wait_stopped.__w_stopsig
#define w_stopval __wait_stopped.__w_stopval
# 44 "/usr/include/stdlib.h" 2 3 4







#define __WAIT_INT(status) (__extension__ (((union { __typeof(status) __in; int __i; }) { .__in = (status) }).__i))
# 68 "/usr/include/stdlib.h" 3 4
typedef union
  {
    union wait *__uptr;
    int *__iptr;
  } __WAIT_STATUS __attribute__ ((__transparent_union__));
#define __WAIT_STATUS_DEFN int *
# 85 "/usr/include/stdlib.h" 3 4
#define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status))
#define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status))
#define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status))
#define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status))
#define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status))
#define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status))

#define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status))





typedef struct
  {
    int quot;
    int rem;
  } div_t;



typedef struct
  {
    long int quot;
    long int rem;
  } ldiv_t;
#define __ldiv_t_defined 1






__extension__ typedef struct
  {
    long long int quot;
    long long int rem;
  } lldiv_t;
#define __lldiv_t_defined 1





#define RAND_MAX 2147483647




#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0



#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ;




extern double atof (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern int atoi (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern long int atol (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





__extension__ extern long long int atoll (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





extern double strtod (__const char *__restrict __nptr,
        char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern float strtof (__const char *__restrict __nptr,
       char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern long double strtold (__const char *__restrict __nptr,
       char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern long int strtol (__const char *__restrict __nptr,
   char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern unsigned long int strtoul (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int strtoq (__const char *__restrict __nptr,
        char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
           char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





__extension__
extern long long int strtoll (__const char *__restrict __nptr,
         char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

# 236 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/xlocale.h" 1 3 4
# 22 "/usr/include/xlocale.h" 3 4
#define _XLOCALE_H 1





typedef struct __locale_struct
{

  struct __locale_data *__locales[13];


  const unsigned short int *__ctype_b;
  const int *__ctype_tolower;
  const int *__ctype_toupper;


  const char *__names[13];
} *__locale_t;


typedef __locale_t locale_t;
# 237 "/usr/include/stdlib.h" 2 3 4



extern long int strtol_l (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base,
     __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

extern unsigned long int strtoul_l (__const char *__restrict __nptr,
        char **__restrict __endptr,
        int __base, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

__extension__
extern long long int strtoll_l (__const char *__restrict __nptr,
    char **__restrict __endptr, int __base,
    __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

__extension__
extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
       char **__restrict __endptr,
       int __base, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ;

extern double strtod_l (__const char *__restrict __nptr,
   char **__restrict __endptr, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;

extern float strtof_l (__const char *__restrict __nptr,
         char **__restrict __endptr, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;

extern long double strtold_l (__const char *__restrict __nptr,
         char **__restrict __endptr,
         __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ;
# 311 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;


extern long int a64l (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
# 327 "/usr/include/stdlib.h" 3 4
extern long int random (void) __attribute__ ((__nothrow__));


extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));





extern char *initstate (unsigned int __seed, char *__statebuf,
   size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));



extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







struct random_data
  {
    int32_t *fptr;
    int32_t *rptr;
    int32_t *state;
    int rand_type;
    int rand_deg;
    int rand_sep;
    int32_t *end_ptr;
  };

extern int random_r (struct random_data *__restrict __buf,
       int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int srandom_r (unsigned int __seed, struct random_data *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
   size_t __statelen,
   struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));

extern int setstate_r (char *__restrict __statebuf,
         struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern int rand (void) __attribute__ ((__nothrow__));

extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));




extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));







extern double drand48 (void) __attribute__ ((__nothrow__));
extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int lrand48 (void) __attribute__ ((__nothrow__));
extern long int nrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int mrand48 (void) __attribute__ ((__nothrow__));
extern long int jrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





struct drand48_data
  {
    unsigned short int __x[3];
    unsigned short int __old_x[3];
    unsigned short int __c;
    unsigned short int __init;
    unsigned long long int __a;
  };


extern int drand48_r (struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int lrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int mrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int seed48_r (unsigned short int __seed16v[3],
       struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int lcong48_r (unsigned short int __param[7],
        struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






#define __malloc_and_calloc_defined 


extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;

extern void *calloc (size_t __nmemb, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;










extern void *realloc (void *__ptr, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));

extern void free (void *__ptr) __attribute__ ((__nothrow__));




extern void cfree (void *__ptr) __attribute__ ((__nothrow__));



# 1 "/usr/include/alloca.h" 1 3 4
# 20 "/usr/include/alloca.h" 3 4
#define _ALLOCA_H 1



#define __need_size_t 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 161 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 343 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_wchar_t
# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef NULL




#define NULL ((void *)0)





#undef __need_NULL




#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
# 26 "/usr/include/alloca.h" 2 3 4




#undef alloca


extern void *alloca (size_t __size) __attribute__ ((__nothrow__));


#define alloca(size) __builtin_alloca (size)



# 498 "/usr/include/stdlib.h" 2 3 4





extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;




extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));



extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 528 "/usr/include/stdlib.h" 3 4
extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));







extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));







extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));






extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern char *__secure_getenv (__const char *__name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int setenv (__const char *__name, __const char *__value, int __replace)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));


extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern int clearenv (void) __attribute__ ((__nothrow__));
# 606 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 620 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 630 "/usr/include/stdlib.h" 3 4
extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 642 "/usr/include/stdlib.h" 3 4
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
# 652 "/usr/include/stdlib.h" 3 4
extern int mkstemps64 (char *__template, int __suffixlen)
     __attribute__ ((__nonnull__ (1))) ;
# 663 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 674 "/usr/include/stdlib.h" 3 4
extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 684 "/usr/include/stdlib.h" 3 4
extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 694 "/usr/include/stdlib.h" 3 4
extern int mkostemps (char *__template, int __suffixlen, int __flags)
     __attribute__ ((__nonnull__ (1))) ;
# 706 "/usr/include/stdlib.h" 3 4
extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
     __attribute__ ((__nonnull__ (1))) ;









extern int system (__const char *__command) ;






extern char *canonicalize_file_name (__const char *__name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 734 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
         char *__restrict __resolved) __attribute__ ((__nothrow__)) ;





#define __COMPAR_FN_T 
typedef int (*__compar_fn_t) (__const void *, __const void *);


typedef __compar_fn_t comparison_fn_t;



typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);





extern void *bsearch (__const void *__key, __const void *__base,
        size_t __nmemb, size_t __size, __compar_fn_t __compar)
     __attribute__ ((__nonnull__ (1, 2, 5))) ;



extern void qsort (void *__base, size_t __nmemb, size_t __size,
     __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));

extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
       __compar_d_fn_t __compar, void *__arg)
  __attribute__ ((__nonnull__ (1, 4)));




extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;



__extension__ extern long long int llabs (long long int __x)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;







extern div_t div (int __numer, int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;




__extension__ extern lldiv_t lldiv (long long int __numer,
        long long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;

# 808 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *gcvt (double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern char *qecvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));

extern int qecvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));







extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int mbtowc (wchar_t *__restrict __pwc,
     __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;



extern size_t mbstowcs (wchar_t *__restrict __pwcs,
   __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));

extern size_t wcstombs (char *__restrict __s,
   __const wchar_t *__restrict __pwcs, size_t __n)
     __attribute__ ((__nothrow__));








extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 896 "/usr/include/stdlib.h" 3 4
extern int getsubopt (char **__restrict __optionp,
        char *__const *__restrict __tokens,
        char **__restrict __valuep)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ;





extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







extern int posix_openpt (int __oflag) ;







extern int grantpt (int __fd) __attribute__ ((__nothrow__));



extern int unlockpt (int __fd) __attribute__ ((__nothrow__));




extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) ;






extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));


extern int getpt (void);






extern int getloadavg (double __loadavg[], int __nelem)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 962 "/usr/include/stdlib.h" 3 4
#undef __need_malloc_and_calloc


# 72 "/usr/include/directfb/direct/mem.h" 2
# 1 "/usr/include/string.h" 1 3 4
# 25 "/usr/include/string.h" 3 4
#define _STRING_H 1






#define __need_size_t 
#define __need_NULL 
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 1 3 4
# 161 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
# 234 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_size_t
# 343 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef __need_wchar_t
# 397 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stddef.h" 3 4
#undef NULL




#define NULL ((void *)0)





#undef __need_NULL




#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
# 35 "/usr/include/string.h" 2 3 4









extern void *memcpy (void *__restrict __dest,
       __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
        int __c, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 95 "/usr/include/string.h" 3 4
extern void *memchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


# 109 "/usr/include/string.h" 3 4
extern void *rawmemchr (__const void *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 120 "/usr/include/string.h" 3 4
extern void *memrchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));






extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
        size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcoll (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern size_t strxfrm (char *__restrict __dest,
         __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

# 165 "/usr/include/string.h" 3 4
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));

extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
    __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));





extern char *strdup (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));






extern char *strndup (__const char *__string, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));




#define strdupa(s) (__extension__ ({ __const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))
# 199 "/usr/include/string.h" 3 4
#define strndupa(s,n) (__extension__ ({ __const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); }))
# 210 "/usr/include/string.h" 3 4

# 235 "/usr/include/string.h" 3 4
extern char *strchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 262 "/usr/include/string.h" 3 4
extern char *strrchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


# 276 "/usr/include/string.h" 3 4
extern char *strchrnul (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));






extern size_t strcspn (__const char *__s, __const char *__reject)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern size_t strspn (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 314 "/usr/include/string.h" 3 4
extern char *strpbrk (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 342 "/usr/include/string.h" 3 4
extern char *strstr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));




extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));




extern char *__strtok_r (char *__restrict __s,
    __const char *__restrict __delim,
    char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
         char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
# 373 "/usr/include/string.h" 3 4
extern char *strcasestr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));







extern void *memmem (__const void *__haystack, size_t __haystacklen,
       __const void *__needle, size_t __needlelen)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));



extern void *__mempcpy (void *__restrict __dest,
   __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern void *mempcpy (void *__restrict __dest,
        __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern size_t strlen (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern size_t strnlen (__const char *__string, size_t __maxlen)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern char *strerror (int __errnum) __attribute__ ((__nothrow__));

# 438 "/usr/include/string.h" 3 4
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));





extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__));





extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern void bcopy (__const void *__src, void *__dest, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 489 "/usr/include/string.h" 3 4
extern char *index (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 517 "/usr/include/string.h" 3 4
extern char *rindex (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));




extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

__extension__ extern int ffsll (long long int __ll)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern int strcasecmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));





extern int strcasecmp_l (__const char *__s1, __const char *__s2,
    __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));

extern int strncasecmp_l (__const char *__s1, __const char *__s2,
     size_t __n, __locale_t __loc)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));





extern char *strsep (char **__restrict __stringp,
       __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));




extern char *strsignal (int __sig) __attribute__ ((__nothrow__));


extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));



extern char *__stpncpy (char *__restrict __dest,
   __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));




extern int strverscmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 606 "/usr/include/string.h" 3 4
extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 646 "/usr/include/string.h" 3 4

# 73 "/usr/include/directfb/direct/mem.h" 2

#define D_FREE free
#define D_MALLOC malloc
#define D_CALLOC calloc
#define D_REALLOC realloc
#define D_STRDUP strdup
# 34 "/usr/include/directfb/direct/interface.h" 2




#define DECLARE_INTERFACE(IFACE) typedef struct _ ##IFACE IFACE;





#define DEFINE_INTERFACE(IFACE,IDATA...) struct _ ##IFACE { void *priv; int magic; DirectResult (*AddRef)( IFACE *thiz ); DirectResult (*Release)( IFACE *thiz ); IDATA };
# 58 "/usr/include/directfb/direct/interface.h"
typedef struct _IAny IAny;




struct _IAny { void *priv; int magic; DirectResult (*AddRef)( IAny *thiz ); DirectResult (*Release)( IAny *thiz ); };




typedef DirectResult (*DirectInterfaceGenericProbeFunc)( void *ctx, ... );




typedef DirectResult (*DirectInterfaceGenericConstructFunc)( void *interface, ... );




typedef struct {
     const char * (*GetType)(void);
     const char * (*GetImplementation)(void);
     DirectResult (*Allocate)( void **interface );

     DirectInterfaceGenericProbeFunc Probe;
     DirectInterfaceGenericConstructFunc Construct;
} DirectInterfaceFuncs;




typedef DirectResult (*DirectInterfaceProbeFunc)( DirectInterfaceFuncs *impl, void *ctx );
# 99 "/usr/include/directfb/direct/interface.h"
DirectResult DirectGetInterface( DirectInterfaceFuncs **funcs,
                                 const char *type,
                                 const char *implementation,
                                 DirectInterfaceProbeFunc probe,
                                 void *probe_ctx );






DirectResult DirectProbeInterface( DirectInterfaceFuncs *funcs, void *ctx );





void DirectRegisterInterface( DirectInterfaceFuncs *funcs );

void DirectUnregisterInterface( DirectInterfaceFuncs *funcs );

void direct_print_interface_leaks(void);


void direct_dbg_interface_add ( const char *func,
                                  const char *file,
                                  int line,
                                  const char *what,
                                  const void *interface,
                                  const char *name );

void direct_dbg_interface_remove( const char *func,
                                  const char *file,
                                  int line,
                                  const char *what,
                                  const void *interface );
# 148 "/usr/include/directfb/direct/interface.h"
#define DIRECT_DBG_INTERFACE_ADD(func,file,line,what,interface,name) do {} while (0)
#define DIRECT_DBG_INTERFACE_REMOVE(func,file,line,what,interface) do {} while (0)





#define DIRECT_ALLOCATE_INTERFACE(p,i) do { (p) = (__typeof__(p))D_CALLOC( 1, sizeof(i) ); D_MAGIC_SET( (IAny*)(p), DirectInterface ); DIRECT_DBG_INTERFACE_ADD( __FUNCTION__, __FILE__, __LINE__, #p, p, #i ); } while (0)
# 165 "/usr/include/directfb/direct/interface.h"
#define DIRECT_ALLOCATE_INTERFACE_DATA(p,i) i ##_data *data; D_MAGIC_ASSERT( (IAny*)(p), DirectInterface ); if (!(p)->priv) (p)->priv = D_CALLOC( 1, sizeof(i ##_data) ); data = (i ##_data*)((p)->priv);
# 176 "/usr/include/directfb/direct/interface.h"
#define DIRECT_DEALLOCATE_INTERFACE(p) DIRECT_DBG_INTERFACE_REMOVE( __FUNCTION__, __FILE__, __LINE__, #p, p ); if ((p)->priv) { D_FREE( (p)->priv ); (p)->priv = NULL; } D_MAGIC_CLEAR( (IAny*)(p) ); D_FREE( (p) );
# 189 "/usr/include/directfb/direct/interface.h"
#define DIRECT_INTERFACE_GET_DATA(i) i ##_data *data; if (!thiz) return DR_THIZNULL; D_MAGIC_ASSERT( (IAny*)thiz, DirectInterface ); data = (i ##_data*) thiz->priv; if (!data) return DR_DEAD;
# 203 "/usr/include/directfb/direct/interface.h"
#define DIRECT_INTERFACE_GET_DATA_FROM(interface,data,prefix) do { D_MAGIC_ASSERT( (IAny*)(interface), DirectInterface ); (data) = (prefix ##_data*) (interface)->priv; if (!(data)) return DR_DEAD; } while (0)
# 45 "/usr/include/directfb/directfb.h" 2




extern const unsigned int directfb_major_version;
extern const unsigned int directfb_minor_version;
extern const unsigned int directfb_micro_version;
extern const unsigned int directfb_binary_age;
extern const unsigned int directfb_interface_age;





const char * DirectFBCheckVersion( unsigned int required_major,
                                   unsigned int required_minor,
                                   unsigned int required_micro );





typedef struct _IDirectFB IDirectFB;





typedef struct _IDirectFBSurface IDirectFBSurface;




typedef struct _IDirectFBPalette IDirectFBPalette;




typedef struct _IDirectFBInputDevice IDirectFBInputDevice;




typedef struct _IDirectFBDisplayLayer IDirectFBDisplayLayer;





typedef struct _IDirectFBWindow IDirectFBWindow;




typedef struct _IDirectFBEventBuffer IDirectFBEventBuffer;




typedef struct _IDirectFBFont IDirectFBFont;




typedef struct _IDirectFBImageProvider IDirectFBImageProvider;




typedef struct _IDirectFBVideoProvider IDirectFBVideoProvider;




typedef struct _IDirectFBDataBuffer IDirectFBDataBuffer;




typedef struct _IDirectFBScreen IDirectFBScreen;




typedef struct _IDirectFBGL IDirectFBGL;
# 139 "/usr/include/directfb/directfb.h"
typedef enum {



     DFB_OK = DR_OK,
     DFB_FAILURE = DR_FAILURE,
     DFB_INIT = DR_INIT,
     DFB_BUG = DR_BUG,
     DFB_DEAD = DR_DEAD,
     DFB_UNSUPPORTED = DR_UNSUPPORTED,
     DFB_UNIMPLEMENTED = DR_UNIMPLEMENTED,
     DFB_ACCESSDENIED = DR_ACCESSDENIED,
     DFB_INVAREA = DR_INVAREA,
     DFB_INVARG = DR_INVARG,
     DFB_NOSYSTEMMEMORY = DR_NOLOCALMEMORY,
     DFB_NOSHAREDMEMORY = DR_NOSHAREDMEMORY,
     DFB_LOCKED = DR_LOCKED,
     DFB_BUFFEREMPTY = DR_BUFFEREMPTY,
     DFB_FILENOTFOUND = DR_FILENOTFOUND,
     DFB_IO = DR_IO,
     DFB_BUSY = DR_BUSY,
     DFB_NOIMPL = DR_NOIMPL,
     DFB_TIMEOUT = DR_TIMEOUT,
     DFB_THIZNULL = DR_THIZNULL,
     DFB_IDNOTFOUND = DR_IDNOTFOUND,
     DFB_DESTROYED = DR_DESTROYED,
     DFB_FUSION = DR_FUSION,
     DFB_BUFFERTOOLARGE = DR_BUFFERTOOLARGE,
     DFB_INTERRUPTED = DR_INTERRUPTED,
     DFB_NOCONTEXT = DR_NOCONTEXT,
     DFB_TEMPUNAVAIL = DR_TEMPUNAVAIL,
     DFB_LIMITEXCEEDED = DR_LIMITEXCEEDED,
     DFB_NOSUCHMETHOD = DR_NOSUCHMETHOD,
     DFB_NOSUCHINSTANCE = DR_NOSUCHINSTANCE,
     DFB_ITEMNOTFOUND = DR_ITEMNOTFOUND,
     DFB_VERSIONMISMATCH = DR_VERSIONMISMATCH,
     DFB_EOF = DR_EOF,
     DFB_SUSPENDED = DR_SUSPENDED,
     DFB_INCOMPLETE = DR_INCOMPLETE,
     DFB_NOCORE = DR_NOCORE,




     DFB__RESULT_OFFSET = ((((unsigned)('D')&0x7f) * 0x02000000) + (((unsigned)('F')&0x7f) * 0x00040000) + (((unsigned)('B')&0x7f) * 0x00000800)),

     DFB_NOVIDEOMEMORY,
     DFB_MISSINGFONT,
     DFB_MISSINGIMAGE,
} DFBResult;




typedef enum {
     DFB_FALSE = 0,
     DFB_TRUE = !DFB_FALSE
} DFBBoolean;




typedef struct {
     int x;
     int y;
} DFBPoint;




typedef struct {
     int x;
     int w;
} DFBSpan;




typedef struct {
     int w;
     int h;
} DFBDimension;




typedef struct {
     int x;
     int y;
     int w;
     int h;
} DFBRectangle;






typedef struct {
     float x;
     float y;
     float w;
     float h;
} DFBLocation;






typedef struct {
     int x1;
     int y1;
     int x2;
     int y2;
} DFBRegion;






typedef struct {
     int l;
     int t;
     int r;
     int b;
} DFBInsets;




typedef struct {
     int x1;
     int y1;
     int x2;
     int y2;
     int x3;
     int y3;
} DFBTriangle;




typedef struct {
     int x1;
     int y1;
     int w1;
     int x2;
     int y2;
     int w2;
} DFBTrapezoid;




typedef struct {
     u8 a;
     u8 r;
     u8 g;
     u8 b;
} DFBColor;




typedef struct {
     u8 index;
     u8 r;
     u8 g;
     u8 b;
} DFBColorKey;




typedef struct {
     u8 a;
     u8 y;
     u8 u;
     u8 v;
} DFBColorYUV;




#define DFB_POINT_EQUAL(a,b) ((a).x == (b).x && (a).y == (b).y)





#define DFB_RECTANGLE_EQUAL(a,b) ((a).x == (b).x && (a).y == (b).y && (a).w == (b).w && (a).h == (b).h)







#define DFB_LOCATION_EQUAL(a,b) ((a).x == (b).x && (a).y == (b).y && (a).w == (b).w && (a).h == (b).h)







#define DFB_REGION_EQUAL(a,b) ((a).x1 == (b).x1 && (a).y1 == (b).y1 && (a).x2 == (b).x2 && (a).y2 == (b).y2)







#define DFB_COLOR_EQUAL(x,y) ((x).a == (y).a && (x).r == (y).r && (x).g == (y).g && (x).b == (y).b)







#define DFB_COLORKEY_EQUAL(x,y) ((x).index == (y).index && (x).r == (y).r && (x).g == (y).g && (x).b == (y).b)
# 372 "/usr/include/directfb/directfb.h"
DFBResult DirectFBError(
                             const char *msg,
                             DFBResult result
                       );




DFBResult DirectFBErrorFatal(
                             const char *msg,
                             DFBResult result
                            );




const char *DirectFBErrorString(
                         DFBResult result
                      );






const char *DirectFBUsageString( void );






DFBResult DirectFBInit(
                         int *argc,
                         char *(*argv[])
                      );






DFBResult DirectFBSetOption(
                         const char *name,
                         const char *value
                      );




DFBResult DirectFBCreate(
                          IDirectFB **interface

                        );


typedef unsigned int DFBScreenID;
typedef unsigned int DFBDisplayLayerID;
typedef unsigned int DFBDisplayLayerSourceID;
typedef unsigned int DFBWindowID;
typedef unsigned int DFBInputDeviceID;
typedef unsigned int DFBTextEncodingID;

typedef u32 DFBDisplayLayerIDs;


typedef unsigned int DFBColorID;




#define DCID_PRIMARY 0
#define DCID_OUTLINE 1




#define DFB_COLOR_IDS_MAX 8





#define DFB_DISPLAYLAYER_IDS_MAX 32




#define DFB_DISPLAYLAYER_IDS_ADD(ids,id) (ids) |= (1 << (id))




#define DFB_DISPLAYLAYER_IDS_REMOVE(ids,id) (ids) &= ~(1 << (id))




#define DFB_DISPLAYLAYER_IDS_HAVE(ids,id) ((ids) & (1 << (id)))




#define DFB_DISPLAYLAYER_IDS_EMPTY(ids) (ids) = 0




#define DTEID_UTF8 0
#define DTEID_OTHER 1





typedef enum {
     DFSCL_NORMAL = 0x00000000,




     DFSCL_FULLSCREEN,



     DFSCL_EXCLUSIVE






} DFBCooperativeLevel;




typedef enum {
     DLCAPS_NONE = 0x00000000,

     DLCAPS_SURFACE = 0x00000001,



     DLCAPS_OPACITY = 0x00000002,

     DLCAPS_ALPHACHANNEL = 0x00000004,

     DLCAPS_SCREEN_LOCATION = 0x00000008,





     DLCAPS_FLICKER_FILTERING = 0x00000010,

     DLCAPS_DEINTERLACING = 0x00000020,


     DLCAPS_SRC_COLORKEY = 0x00000040,
     DLCAPS_DST_COLORKEY = 0x00000080,


     DLCAPS_BRIGHTNESS = 0x00000100,
     DLCAPS_CONTRAST = 0x00000200,
     DLCAPS_HUE = 0x00000400,
     DLCAPS_SATURATION = 0x00000800,
     DLCAPS_LEVELS = 0x00001000,

     DLCAPS_FIELD_PARITY = 0x00002000,
     DLCAPS_WINDOWS = 0x00004000,
     DLCAPS_SOURCES = 0x00008000,
     DLCAPS_ALPHA_RAMP = 0x00010000,





     DLCAPS_PREMULTIPLIED = 0x00020000,

     DLCAPS_SCREEN_POSITION = 0x00100000,

     DLCAPS_SCREEN_SIZE = 0x00200000,





     DLCAPS_CLIP_REGIONS = 0x00400000,

     DLCAPS_ALL = 0x0073FFFF
} DFBDisplayLayerCapabilities;




typedef enum {
     DSCCAPS_NONE = 0x00000000,

     DSCCAPS_VSYNC = 0x00000001,

     DSCCAPS_POWER_MANAGEMENT = 0x00000002,

     DSCCAPS_MIXERS = 0x00000010,
     DSCCAPS_ENCODERS = 0x00000020,
     DSCCAPS_OUTPUTS = 0x00000040,

     DSCCAPS_ALL = 0x00000073
} DFBScreenCapabilities;




typedef enum {
     DLOP_NONE = 0x00000000,
     DLOP_ALPHACHANNEL = 0x00000001,


     DLOP_FLICKER_FILTERING = 0x00000002,
     DLOP_DEINTERLACING = 0x00000004,

     DLOP_SRC_COLORKEY = 0x00000008,
     DLOP_DST_COLORKEY = 0x00000010,
     DLOP_OPACITY = 0x00000020,

     DLOP_FIELD_PARITY = 0x00000040
} DFBDisplayLayerOptions;




typedef enum {
     DLBM_UNKNOWN = 0x00000000,

     DLBM_FRONTONLY = 0x00000001,
     DLBM_BACKVIDEO = 0x00000002,
     DLBM_BACKSYSTEM = 0x00000004,
     DLBM_TRIPLE = 0x00000008,
     DLBM_WINDOWS = 0x00000010

} DFBDisplayLayerBufferMode;




typedef enum {
     DSDESC_NONE = 0x00000000,

     DSDESC_CAPS = 0x00000001,
     DSDESC_WIDTH = 0x00000002,
     DSDESC_HEIGHT = 0x00000004,
     DSDESC_PIXELFORMAT = 0x00000008,
     DSDESC_PREALLOCATED = 0x00000010,






     DSDESC_PALETTE = 0x00000020,



     DSDESC_RESOURCE_ID = 0x00000100,



     DSDESC_HINTS = 0x00000200,


     DSDESC_ALL = 0x0000033F
} DFBSurfaceDescriptionFlags;




typedef enum {
     DPDESC_CAPS = 0x00000001,
     DPDESC_SIZE = 0x00000002,
     DPDESC_ENTRIES = 0x00000004


} DFBPaletteDescriptionFlags;




typedef enum {
     DSCAPS_NONE = 0x00000000,

     DSCAPS_PRIMARY = 0x00000001,
     DSCAPS_SYSTEMONLY = 0x00000002,

     DSCAPS_VIDEOONLY = 0x00000004,

     DSCAPS_DOUBLE = 0x00000010,
     DSCAPS_SUBSURFACE = 0x00000020,

     DSCAPS_INTERLACED = 0x00000040,



     DSCAPS_SEPARATED = 0x00000080,



     DSCAPS_STATIC_ALLOC = 0x00000100,





     DSCAPS_TRIPLE = 0x00000200,

     DSCAPS_PREMULTIPLIED = 0x00001000,

     DSCAPS_DEPTH = 0x00010000,

     DSCAPS_SHARED = 0x00100000,

     DSCAPS_ROTATED = 0x01000000,

     DSCAPS_ALL = 0x011113F7,


     DSCAPS_FLIPPING = DSCAPS_DOUBLE | DSCAPS_TRIPLE

} DFBSurfaceCapabilities;




typedef enum {
     DPCAPS_NONE = 0x00000000
} DFBPaletteCapabilities;




typedef enum {
     DSDRAW_NOFX = 0x00000000,
     DSDRAW_BLEND = 0x00000001,
     DSDRAW_DST_COLORKEY = 0x00000002,

     DSDRAW_SRC_PREMULTIPLY = 0x00000004,

     DSDRAW_DST_PREMULTIPLY = 0x00000008,
     DSDRAW_DEMULTIPLY = 0x00000010,

     DSDRAW_XOR = 0x00000020

} DFBSurfaceDrawingFlags;




typedef enum {
     DSBLIT_NOFX = 0x00000000,
     DSBLIT_BLEND_ALPHACHANNEL = 0x00000001,

     DSBLIT_BLEND_COLORALPHA = 0x00000002,

     DSBLIT_COLORIZE = 0x00000004,

     DSBLIT_SRC_COLORKEY = 0x00000008,
     DSBLIT_DST_COLORKEY = 0x00000010,

     DSBLIT_SRC_PREMULTIPLY = 0x00000020,

     DSBLIT_DST_PREMULTIPLY = 0x00000040,
     DSBLIT_DEMULTIPLY = 0x00000080,

     DSBLIT_DEINTERLACE = 0x00000100,


     DSBLIT_SRC_PREMULTCOLOR = 0x00000200,
     DSBLIT_XOR = 0x00000400,

     DSBLIT_INDEX_TRANSLATION = 0x00000800,

     DSBLIT_ROTATE90 = 0x00002000,
     DSBLIT_ROTATE180 = 0x00001000,
     DSBLIT_ROTATE270 = 0x00004000,
     DSBLIT_COLORKEY_PROTECT = 0x00010000,
     DSBLIT_SRC_MASK_ALPHA = 0x00100000,

     DSBLIT_SRC_MASK_COLOR = 0x00200000,

     DSBLIT_SOURCE2 = 0x00400000,
     DSBLIT_FLIP_HORIZONTAL = 0x01000000,
     DSBLIT_FLIP_VERTICAL = 0x02000000,
} DFBSurfaceBlittingFlags;




typedef enum {
     DSRO_NONE = 0x00000000,

     DSRO_SMOOTH_UPSCALE = 0x00000001,
     DSRO_SMOOTH_DOWNSCALE = 0x00000002,
     DSRO_MATRIX = 0x00000004,
     DSRO_ANTIALIAS = 0x00000008,

     DSRO_ALL = 0x0000000F
} DFBSurfaceRenderOptions;




typedef enum {
     DFXL_NONE = 0x00000000,

     DFXL_FILLRECTANGLE = 0x00000001,
     DFXL_DRAWRECTANGLE = 0x00000002,
     DFXL_DRAWLINE = 0x00000004,
     DFXL_FILLTRIANGLE = 0x00000008,
     DFXL_FILLTRAPEZOID = 0x00000010,

     DFXL_BLIT = 0x00010000,
     DFXL_STRETCHBLIT = 0x00020000,
     DFXL_TEXTRIANGLES = 0x00040000,
     DFXL_BLIT2 = 0x00080000,

     DFXL_DRAWSTRING = 0x01000000,


     DFXL_ALL = 0x010F001F,
     DFXL_ALL_DRAW = 0x0000001F,
     DFXL_ALL_BLIT = 0x010F0000,
} DFBAccelerationMask;





#define DFB_DRAWING_FUNCTION(a) ((a) & 0x0000FFFF)




#define DFB_BLITTING_FUNCTION(a) ((a) & 0xFFFF0000)





typedef enum {
     DLTF_NONE = 0x00000000,

     DLTF_GRAPHICS = 0x00000001,
     DLTF_VIDEO = 0x00000002,
     DLTF_STILL_PICTURE = 0x00000004,
     DLTF_BACKGROUND = 0x00000008,

     DLTF_ALL = 0x0000000F
} DFBDisplayLayerTypeFlags;





typedef enum {
     DIDTF_NONE = 0x00000000,

     DIDTF_KEYBOARD = 0x00000001,
     DIDTF_MOUSE = 0x00000002,
     DIDTF_JOYSTICK = 0x00000004,
     DIDTF_REMOTE = 0x00000008,
     DIDTF_VIRTUAL = 0x00000010,

     DIDTF_ALL = 0x0000001F
} DFBInputDeviceTypeFlags;




typedef enum {
     DICAPS_KEYS = 0x00000001,
     DICAPS_AXES = 0x00000002,
     DICAPS_BUTTONS = 0x00000004,

     DICAPS_ALL = 0x00000007
} DFBInputDeviceCapabilities;




typedef enum {
     DIBI_LEFT = 0x00000000,
     DIBI_RIGHT = 0x00000001,
     DIBI_MIDDLE = 0x00000002,

     DIBI_FIRST = DIBI_LEFT,

     DIBI_LAST = 0x0000001F
} DFBInputDeviceButtonIdentifier;
# 877 "/usr/include/directfb/directfb.h"
typedef enum {
     DIAI_X = 0x00000000,
     DIAI_Y = 0x00000001,
     DIAI_Z = 0x00000002,

     DIAI_FIRST = DIAI_X,

     DIAI_LAST = 0x0000001F
} DFBInputDeviceAxisIdentifier;




typedef enum {
     DWDESC_CAPS = 0x00000001,
     DWDESC_WIDTH = 0x00000002,
     DWDESC_HEIGHT = 0x00000004,
     DWDESC_PIXELFORMAT = 0x00000008,
     DWDESC_POSX = 0x00000010,
     DWDESC_POSY = 0x00000020,
     DWDESC_SURFACE_CAPS = 0x00000040,

     DWDESC_PARENT = 0x00000080,
     DWDESC_OPTIONS = 0x00000100,
     DWDESC_STACKING = 0x00000200,

     DWDESC_TOPLEVEL_ID = 0x00000400,

     DWDESC_RESOURCE_ID = 0x00001000,
} DFBWindowDescriptionFlags;




typedef enum {
     DBDESC_FILE = 0x00000001,

     DBDESC_MEMORY = 0x00000002

} DFBDataBufferDescriptionFlags;




typedef enum {
     DWCAPS_NONE = 0x00000000,

     DWCAPS_ALPHACHANNEL = 0x00000001,

     DWCAPS_DOUBLEBUFFER = 0x00000002,







     DWCAPS_INPUTONLY = 0x00000004,


     DWCAPS_NODECORATION = 0x00000008,

     DWCAPS_SUBWINDOW = 0x00000010,

     DWCAPS_COLOR = 0x00000020,





     DWCAPS_NOFOCUS = 0x00000100,


     DWCAPS_ALL = 0x0000013F
} DFBWindowCapabilities;




typedef enum {
     DWOP_NONE = 0x00000000,
     DWOP_COLORKEYING = 0x00000001,
     DWOP_ALPHACHANNEL = 0x00000002,

     DWOP_OPAQUE_REGION = 0x00000004,

     DWOP_SHAPED = 0x00000008,


     DWOP_KEEP_POSITION = 0x00000010,

     DWOP_KEEP_SIZE = 0x00000020,

     DWOP_KEEP_STACKING = 0x00000040,

     DWOP_GHOST = 0x00001000,


     DWOP_INDESTRUCTIBLE = 0x00002000,

     DWOP_INPUTONLY = 0x00004000,



     DWOP_SCALE = 0x00010000,


     DWOP_KEEP_ABOVE = 0x00100000,
     DWOP_KEEP_UNDER = 0x00200000,
     DWOP_FOLLOW_BOUNDS = 0x00400000,

     DWOP_ALL = 0x0071707F
} DFBWindowOptions;




typedef enum {
     DWSC_MIDDLE = 0x00000000,

     DWSC_UPPER = 0x00000001,




     DWSC_LOWER = 0x00000002




} DFBWindowStackingClass;
# 1019 "/usr/include/directfb/directfb.h"
typedef enum {
     DFFA_NONE = 0x00000000,
     DFFA_NOKERNING = 0x00000001,
     DFFA_NOHINTING = 0x00000002,
     DFFA_MONOCHROME = 0x00000004,
     DFFA_NOCHARMAP = 0x00000008,

     DFFA_FIXEDCLIP = 0x00000010,
     DFFA_NOBITMAP = 0x00000020,


     DFFA_OUTLINED = 0x00000040,
     DFFA_AUTOHINTING = 0x00000080,

     DFFA_SOFTHINTING = 0x00000100



} DFBFontAttributes;




typedef enum {
     DFDESC_ATTRIBUTES = 0x00000001,
     DFDESC_HEIGHT = 0x00000002,
     DFDESC_WIDTH = 0x00000004,
     DFDESC_INDEX = 0x00000008,
     DFDESC_FIXEDADVANCE = 0x00000010,


     DFDESC_FRACT_HEIGHT = 0x00000020,
     DFDESC_FRACT_WIDTH = 0x00000040,
     DFDESC_OUTLINE_WIDTH = 0x00000080,
     DFDESC_OUTLINE_OPACITY = 0x00000100,
     DFDESC_ROTATION = 0x00000200,
} DFBFontDescriptionFlags;
# 1079 "/usr/include/directfb/directfb.h"
typedef struct {
     DFBFontDescriptionFlags flags;

     DFBFontAttributes attributes;
     int height;
     int width;
     unsigned int index;
     int fixed_advance;

     int fract_height;
     int fract_width;

     int outline_width;
     int outline_opacity;

     int rotation;
} DFBFontDescription;

#define DFB_DEGREES(deg) ((int)((deg)/360.0*(1<<24)))
#define DFB_RADIANS(rad) ((int)((rad)/(2.0*M_PI)*(1<<24)))
# 1119 "/usr/include/directfb/directfb.h"
#define DFB_SURFACE_PIXELFORMAT(index,color_bits,alpha_bits,has_alpha,row_bits,row_bytes,align,mul_f,mul_d,has_lut,inv_alpha) ( (((index ) & 0x7F) ) | (((color_bits) & 0x1F) << 7) | (((alpha_bits) & 0x0F) << 12) | (((has_alpha ) ? 1 :0) << 16) | (((row_bits ) & 0x07) << 17) | (((row_bytes ) & 0x07) << 20) | (((align ) & 0x07) << 23) | (((mul_f ) & 0x03) << 26) | (((mul_d ) & 0x03) << 28) | (((has_lut ) ? 1 :0) << 30) | (((inv_alpha ) ? 1 :0) << 31) )
# 1137 "/usr/include/directfb/directfb.h"
typedef enum {
     DSPF_UNKNOWN = 0x00000000,


     DSPF_ARGB1555 = ( (((0 ) & 0x7F) ) | (((15) & 0x1F) << 7) | (((1) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGB16 = ( (((1 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGB24 = ( (((2 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((3 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGB32 = ( (((3 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_ARGB = ( (((4 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_A8 = ( (((5 ) & 0x7F) ) | (((0) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_YUY2 = ( (((6 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGB332 = ( (((7 ) & 0x7F) ) | (((8) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_UYVY = ( (((8 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_I420 = ( (((9 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_YV12 = ( (((10 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_LUT8 = ( (((11 ) & 0x7F) ) | (((8) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((1 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_ALUT44 = ( (((12 ) & 0x7F) ) | (((4) & 0x1F) << 7) | (((4) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((1 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_AiRGB = ( (((13 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((1 ) ? 1 :0) << 31) ),


     DSPF_A1 = ( (((14 ) & 0x7F) ) | (((0) & 0x1F) << 7) | (((1) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((1 ) & 0x07) << 17) | (((0 ) & 0x07) << 20) | (((7 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_NV12 = ( (((15 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_NV16 = ( (((16 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((1 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_ARGB2554 = ( (((17 ) & 0x7F) ) | (((14) & 0x1F) << 7) | (((2) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_ARGB4444 = ( (((18 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((4) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGBA4444 = ( (((19 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((4) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_NV21 = ( (((20 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((2 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_AYUV = ( (((21 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_A4 = ( (((22 ) & 0x7F) ) | (((0) & 0x1F) << 7) | (((4) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((4 ) & 0x07) << 17) | (((0 ) & 0x07) << 20) | (((1 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_ARGB1666 = ( (((23 ) & 0x7F) ) | (((18) & 0x1F) << 7) | (((1) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((3 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_ARGB6666 = ( (((24 ) & 0x7F) ) | (((18) & 0x1F) << 7) | (((6) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((3 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGB18 = ( (((25 ) & 0x7F) ) | (((18) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((3 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_LUT2 = ( (((26 ) & 0x7F) ) | (((2) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((2 ) & 0x07) << 17) | (((0 ) & 0x07) << 20) | (((3 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((1 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGB444 = ( (((27 ) & 0x7F) ) | (((12) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGB555 = ( (((28 ) & 0x7F) ) | (((15) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_BGR555 = ( (((29 ) & 0x7F) ) | (((15) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_RGBA5551 = ( (((30 ) & 0x7F) ) | (((15) & 0x1F) << 7) | (((1) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((2 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),



     DSPF_YUV444P = ( (((31 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((2 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_ARGB8565 = ( (((32 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((3 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_AVYU = ( (((33 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((8) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((4 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_VYU = ( (((34 ) & 0x7F) ) | (((24) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((3 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_A1_LSB = ( (((35 ) & 0x7F) ) | (((0) & 0x1F) << 7) | (((1) & 0x0F) << 12) | (((1 ) ? 1 :0) << 16) | (((1 ) & 0x07) << 17) | (((0 ) & 0x07) << 20) | (((7 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((0 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),


     DSPF_YV16 = ( (((36 ) & 0x7F) ) | (((16) & 0x1F) << 7) | (((0) & 0x0F) << 12) | (((0 ) ? 1 :0) << 16) | (((0 ) & 0x07) << 17) | (((1 ) & 0x07) << 20) | (((0 ) & 0x07) << 23) | (((0 ) & 0x03) << 26) | (((1 ) & 0x03) << 28) | (((0 ) ? 1 :0) << 30) | (((0 ) ? 1 :0) << 31) ),

} DFBSurfacePixelFormat;


#define DFB_NUM_PIXELFORMATS 37


#define DFB_PIXELFORMAT_INDEX(fmt) (((fmt) & 0x0000007F) )

#define DFB_COLOR_BITS_PER_PIXEL(fmt) (((fmt) & 0x00000F80) >> 7)

#define DFB_ALPHA_BITS_PER_PIXEL(fmt) (((fmt) & 0x0000F000) >> 12)

#define DFB_PIXELFORMAT_HAS_ALPHA(fmt) (((fmt) & 0x00010000) != 0)

#define DFB_BITS_PER_PIXEL(fmt) (((fmt) & 0x007E0000) >> 17)

#define DFB_BYTES_PER_PIXEL(fmt) (((fmt) & 0x00700000) >> 20)

#define DFB_BYTES_PER_LINE(fmt,width) (((((fmt) & 0x007E0000) >> 17) * (width) + 7) >> 3)

#define DFB_PIXELFORMAT_ALIGNMENT(fmt) (((fmt) & 0x03800000) >> 23)

#define DFB_PLANE_MULTIPLY(fmt,height) ((((((fmt) & 0x3C000000) >> 26) + 4) * (height)) >> 2)

#define DFB_PIXELFORMAT_IS_INDEXED(fmt) (((fmt) & 0x40000000) != 0)

#define DFB_PLANAR_PIXELFORMAT(fmt) (((fmt) & 0x3C000000) != 0)

#define DFB_PIXELFORMAT_INV_ALPHA(fmt) (((fmt) & 0x80000000) != 0)




typedef enum {
     DSHF_NONE = 0x00000000,

     DSHF_LAYER = 0x00000001,
     DSHF_WINDOW = 0x00000002,
     DSHF_CURSOR = 0x00000004,
     DSHF_FONT = 0x00000008,

     DSHF_ALL = 0x0000000F
} DFBSurfaceHintFlags;




typedef struct {
     DFBSurfaceDescriptionFlags flags;

     DFBSurfaceCapabilities caps;
     int width;
     int height;
     DFBSurfacePixelFormat pixelformat;

     struct {
          void *data;
          int pitch;
     } preallocated[2];

     struct {
          const DFBColor *entries;
          unsigned int size;
     } palette;

     unsigned long resource_id;


     DFBSurfaceHintFlags hints;
} DFBSurfaceDescription;




typedef struct {
     DFBPaletteDescriptionFlags flags;

     DFBPaletteCapabilities caps;
     unsigned int size;
     const DFBColor *entries;

} DFBPaletteDescription;


#define DFB_DISPLAY_LAYER_DESC_NAME_LENGTH 32




typedef struct {
     DFBDisplayLayerTypeFlags type;
     DFBDisplayLayerCapabilities caps;

     char name[32];

     int level;
     int regions;



     int sources;
     int clip_regions;

     DFBSurfaceCapabilities surface_caps;
     unsigned int surface_accessor;
} DFBDisplayLayerDescription;




typedef enum {
     DDLSCAPS_NONE = 0x00000000,

     DDLSCAPS_SURFACE = 0x00000001,

     DDLSCAPS_ALL = 0x00000001
} DFBDisplayLayerSourceCaps;

#define DFB_DISPLAY_LAYER_SOURCE_DESC_NAME_LENGTH 24




typedef struct {
     DFBDisplayLayerSourceID source_id;

     char name[24];

     DFBDisplayLayerSourceCaps caps;
} DFBDisplayLayerSourceDescription;


#define DFB_SCREEN_DESC_NAME_LENGTH 32




typedef struct {
     DFBScreenCapabilities caps;


     char name[32];

     int mixers;

     int encoders;

     int outputs;

} DFBScreenDescription;


#define DFB_INPUT_DEVICE_DESC_NAME_LENGTH 32
#define DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH 40




typedef struct {
     DFBInputDeviceTypeFlags type;

     DFBInputDeviceCapabilities caps;



     int min_keycode;




     int max_keycode;




     DFBInputDeviceAxisIdentifier max_axis;

     DFBInputDeviceButtonIdentifier max_button;


     char name[32];

     char vendor[40];

     int vendor_id;
     int product_id;
} DFBInputDeviceDescription;

typedef enum {
     DIAIF_NONE = 0x00000000,

     DIAIF_ABS_MIN = 0x00000001,
     DIAIF_ABS_MAX = 0x00000002,

     DIAIF_ALL = 0x00000003
} DFBInputDeviceAxisInfoFlags;

typedef struct {
     DFBInputDeviceAxisInfoFlags flags;
     int abs_min;
     int abs_max;
} DFBInputDeviceAxisInfo;

#define DFB_GRAPHICS_DRIVER_INFO_NAME_LENGTH 40
#define DFB_GRAPHICS_DRIVER_INFO_VENDOR_LENGTH 60

typedef struct {
     int major;
     int minor;

     char name[40];
     char vendor[60];
} DFBGraphicsDriverInfo;

#define DFB_GRAPHICS_DEVICE_DESC_NAME_LENGTH 48
#define DFB_GRAPHICS_DEVICE_DESC_VENDOR_LENGTH 64




typedef struct {
     DFBAccelerationMask acceleration_mask;

     DFBSurfaceBlittingFlags blitting_flags;
     DFBSurfaceDrawingFlags drawing_flags;

     unsigned int video_memory;

     char name[48];
     char vendor[64];

     DFBGraphicsDriverInfo driver;
} DFBGraphicsDeviceDescription;




typedef struct {
     DFBWindowDescriptionFlags flags;

     DFBWindowCapabilities caps;
     int width;
     int height;
     DFBSurfacePixelFormat pixelformat;
     int posx;
     int posy;
     DFBSurfaceCapabilities surface_caps;
     DFBWindowID parent_id;
     DFBWindowOptions options;
     DFBWindowStackingClass stacking;

     unsigned long resource_id;

     DFBWindowID toplevel_id;
} DFBWindowDescription;




typedef struct {
     DFBDataBufferDescriptionFlags flags;

     const char *file;

     struct {
          const void *data;
          unsigned int length;
     } memory;
} DFBDataBufferDescription;




typedef enum {
     DFENUM_OK = 0x00000000,
     DFENUM_CANCEL = 0x00000001
} DFBEnumerationResult;




typedef DFBEnumerationResult (*DFBVideoModeCallback) (
     int width,
     int height,
     int bpp,
     void *callbackdata
);





typedef DFBEnumerationResult (*DFBScreenCallback) (
     DFBScreenID screen_id,
     DFBScreenDescription desc,
     void *callbackdata
);





typedef DFBEnumerationResult (*DFBDisplayLayerCallback) (
     DFBDisplayLayerID layer_id,
     DFBDisplayLayerDescription desc,
     void *callbackdata
);





typedef DFBEnumerationResult (*DFBInputDeviceCallback) (
     DFBInputDeviceID device_id,
     DFBInputDeviceDescription desc,
     void *callbackdata
);







typedef int (*DFBGetDataCallback) (
     void *buffer,
     unsigned int length,
     void *callbackdata
);




typedef enum {
     DVCAPS_BASIC = 0x00000000,
     DVCAPS_SEEK = 0x00000001,
     DVCAPS_SCALE = 0x00000002,
     DVCAPS_INTERLACED = 0x00000004,
     DVCAPS_SPEED = 0x00000008,
     DVCAPS_BRIGHTNESS = 0x00000010,
     DVCAPS_CONTRAST = 0x00000020,
     DVCAPS_HUE = 0x00000040,
     DVCAPS_SATURATION = 0x00000080,
     DVCAPS_INTERACTIVE = 0x00000100,
     DVCAPS_VOLUME = 0x00000200,
     DVCAPS_EVENT = 0x00000400,
     DVCAPS_ATTRIBUTES = 0x00000800,
     DVCAPS_AUDIO_SEL = 0x00001000,
} DFBVideoProviderCapabilities;




typedef enum {
     DVSTATE_UNKNOWN = 0x00000000,
     DVSTATE_PLAY = 0x00000001,
     DVSTATE_STOP = 0x00000002,
     DVSTATE_FINISHED = 0x00000003,
     DVSTATE_BUFFERING = 0x00000004

} DFBVideoProviderStatus;




typedef enum {
     DVPLAY_NOFX = 0x00000000,
     DVPLAY_REWIND = 0x00000001,
     DVPLAY_LOOPING = 0x00000002


} DFBVideoProviderPlaybackFlags;




typedef enum {
     DVAUDIOUNIT_NONE = 0x00000000,
     DVAUDIOUNIT_ONE = 0x00000001,
     DVAUDIOUNIT_TWO = 0x00000002,
     DVAUDIOUNIT_THREE = 0x00000004,
     DVAUDIOUNIT_FOUR = 0x00000008,
     DVAUDIOUNIT_ALL = 0x0000000F,
} DFBVideoProviderAudioUnits;





typedef enum {
     DCAF_NONE = 0x00000000,
     DCAF_BRIGHTNESS = 0x00000001,
     DCAF_CONTRAST = 0x00000002,
     DCAF_HUE = 0x00000004,
     DCAF_SATURATION = 0x00000008,
     DCAF_ALL = 0x0000000F
} DFBColorAdjustmentFlags;







typedef struct {
     DFBColorAdjustmentFlags flags;

     u16 brightness;
     u16 contrast;
     u16 hue;
     u16 saturation;
} DFBColorAdjustment;
# 1724 "/usr/include/directfb/directfb.h"
struct
# 2070 "/usr/include/directfb/directfb.h"
 _IDirectFB
# 1724 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFB *thiz ); DirectResult (*Release)( IDirectFB *thiz ); DFBResult (*SetCooperativeLevel) ( IDirectFB *thiz, DFBCooperativeLevel level ); DFBResult (*SetVideoMode) ( IDirectFB *thiz, int width, int height, int bpp ); DFBResult (*GetDeviceDescription) ( IDirectFB *thiz, DFBGraphicsDeviceDescription *ret_desc ); DFBResult (*EnumVideoModes) ( IDirectFB *thiz, DFBVideoModeCallback callback, void *callbackdata ); DFBResult (*CreateSurface) ( IDirectFB *thiz, const DFBSurfaceDescription *desc, IDirectFBSurface **ret_interface ); DFBResult (*CreatePalette) ( IDirectFB *thiz, const DFBPaletteDescription *desc, IDirectFBPalette **ret_interface ); DFBResult (*EnumScreens) ( IDirectFB *thiz, DFBScreenCallback callback, void *callbackdata ); DFBResult (*GetScreen) ( IDirectFB *thiz, DFBScreenID screen_id, IDirectFBScreen **ret_interface ); DFBResult (*EnumDisplayLayers) ( IDirectFB *thiz, DFBDisplayLayerCallback callback, void *callbackdata ); DFBResult (*GetDisplayLayer) ( IDirectFB *thiz, DFBDisplayLayerID layer_id, IDirectFBDisplayLayer **ret_interface ); DFBResult (*EnumInputDevices) ( IDirectFB *thiz, DFBInputDeviceCallback callback, void *callbackdata ); DFBResult (*GetInputDevice) ( IDirectFB *thiz, DFBInputDeviceID device_id, IDirectFBInputDevice **ret_interface ); DFBResult (*CreateEventBuffer) ( IDirectFB *thiz, IDirectFBEventBuffer **ret_buffer ); DFBResult (*CreateInputEventBuffer) ( IDirectFB *thiz, DFBInputDeviceCapabilities caps, DFBBoolean global, IDirectFBEventBuffer **ret_buffer ); DFBResult (*CreateImageProvider) ( IDirectFB *thiz, const char *filename, IDirectFBImageProvider **ret_interface ); DFBResult (*CreateVideoProvider) ( IDirectFB *thiz, const char *filename, IDirectFBVideoProvider **ret_interface ); DFBResult (*CreateFont) ( IDirectFB *thiz, const char *filename, const DFBFontDescription *desc, IDirectFBFont **ret_interface ); DFBResult (*CreateDataBuffer) ( IDirectFB *thiz, const DFBDataBufferDescription *desc, IDirectFBDataBuffer **ret_interface ); DFBResult (*SetClipboardData) ( IDirectFB *thiz, const char *mime_type, const void *data, unsigned int size, struct timeval *ret_timestamp ); DFBResult (*GetClipboardData) ( IDirectFB *thiz, char **ret_mimetype, void **ret_data, unsigned int *ret_size ); DFBResult (*GetClipboardTimeStamp) ( IDirectFB *thiz, struct timeval *ret_timestamp ); DFBResult (*Suspend) ( IDirectFB *thiz ); DFBResult (*Resume) ( IDirectFB *thiz ); DFBResult (*WaitIdle) ( IDirectFB *thiz ); DFBResult (*WaitForSync) ( IDirectFB *thiz ); DFBResult (*GetInterface) ( IDirectFB *thiz, const char *type, const char *implementation, void *arg, void **ret_interface ); };
# 2073 "/usr/include/directfb/directfb.h"
#define DLID_PRIMARY 0x0000


#define DLSID_SURFACE 0x0000


#define DSCID_PRIMARY 0x0000


#define DIDID_KEYBOARD 0x0000
#define DIDID_MOUSE 0x0001
#define DIDID_JOYSTICK 0x0002
#define DIDID_REMOTE 0x0003
#define DIDID_ANY 0x0010





typedef enum {
     DLSCL_SHARED = 0,
     DLSCL_EXCLUSIVE,

     DLSCL_ADMINISTRATIVE

} DFBDisplayLayerCooperativeLevel;





typedef enum {
     DLBM_DONTCARE = 0,

     DLBM_COLOR,

     DLBM_IMAGE,
     DLBM_TILE
} DFBDisplayLayerBackgroundMode;




typedef enum {
     DLCONF_NONE = 0x00000000,

     DLCONF_WIDTH = 0x00000001,
     DLCONF_HEIGHT = 0x00000002,
     DLCONF_PIXELFORMAT = 0x00000004,
     DLCONF_BUFFERMODE = 0x00000008,
     DLCONF_OPTIONS = 0x00000010,
     DLCONF_SOURCE = 0x00000020,
     DLCONF_SURFACE_CAPS = 0x00000040,

     DLCONF_ALL = 0x0000007F
} DFBDisplayLayerConfigFlags;




typedef struct {
     DFBDisplayLayerConfigFlags flags;

     int width;
     int height;
     DFBSurfacePixelFormat pixelformat;
     DFBDisplayLayerBufferMode buffermode;
     DFBDisplayLayerOptions options;
     DFBDisplayLayerSourceID source;

     DFBSurfaceCapabilities surface_caps;

} DFBDisplayLayerConfig;




typedef enum {
     DSPM_ON = 0,
     DSPM_STANDBY,
     DSPM_SUSPEND,
     DSPM_OFF
} DFBScreenPowerMode;





typedef enum {
     DSMCAPS_NONE = 0x00000000,

     DSMCAPS_FULL = 0x00000001,
     DSMCAPS_SUB_LEVEL = 0x00000002,
     DSMCAPS_SUB_LAYERS = 0x00000004,
     DSMCAPS_BACKGROUND = 0x00000008
} DFBScreenMixerCapabilities;


#define DFB_SCREEN_MIXER_DESC_NAME_LENGTH 24




typedef struct {
     DFBScreenMixerCapabilities caps;

     DFBDisplayLayerIDs layers;


     int sub_num;

     DFBDisplayLayerIDs sub_layers;


     char name[24];
} DFBScreenMixerDescription;




typedef enum {
     DSMCONF_NONE = 0x00000000,

     DSMCONF_TREE = 0x00000001,
     DSMCONF_LEVEL = 0x00000002,
     DSMCONF_LAYERS = 0x00000004,

     DSMCONF_BACKGROUND = 0x00000010,

     DSMCONF_ALL = 0x00000017
} DFBScreenMixerConfigFlags;




typedef enum {
     DSMT_UNKNOWN = 0x00000000,

     DSMT_FULL = 0x00000001,
     DSMT_SUB_LEVEL = 0x00000002,
     DSMT_SUB_LAYERS = 0x00000003
} DFBScreenMixerTree;




typedef struct {
     DFBScreenMixerConfigFlags flags;

     DFBScreenMixerTree tree;

     int level;
     DFBDisplayLayerIDs layers;

     DFBColor background;
} DFBScreenMixerConfig;





typedef enum {
     DSOCAPS_NONE = 0x00000000,

     DSOCAPS_CONNECTORS = 0x00000001,

     DSOCAPS_ENCODER_SEL = 0x00000010,
     DSOCAPS_SIGNAL_SEL = 0x00000020,
     DSOCAPS_CONNECTOR_SEL = 0x00000040,
     DSOCAPS_SLOW_BLANKING = 0x00000080,
     DSOCAPS_RESOLUTION = 0x00000100,
     DSOCAPS_ALL = 0x000001F1
} DFBScreenOutputCapabilities;




typedef enum {
     DSOC_UNKNOWN = 0x00000000,

     DSOC_VGA = 0x00000001,
     DSOC_SCART = 0x00000002,
     DSOC_YC = 0x00000004,
     DSOC_CVBS = 0x00000008,
     DSOC_SCART2 = 0x00000010,
     DSOC_COMPONENT = 0x00000020,
     DSOC_HDMI = 0x00000040,
     DSOC_656 = 0x00000080,
} DFBScreenOutputConnectors;




typedef enum {
     DSOS_NONE = 0x00000000,

     DSOS_VGA = 0x00000001,
     DSOS_YC = 0x00000002,
     DSOS_CVBS = 0x00000004,
     DSOS_RGB = 0x00000008,
     DSOS_YCBCR = 0x00000010,
     DSOS_HDMI = 0x00000020,
     DSOS_656 = 0x00000040
} DFBScreenOutputSignals;





typedef enum {
     DSOSB_OFF = 0x00000000,
     DSOSB_16x9 = 0x00000001,
     DSOSB_4x3 = 0x00000002,
     DSOSB_FOLLOW = 0x00000004,
     DSOSB_MONITOR = 0x00000008
} DFBScreenOutputSlowBlankingSignals;





typedef enum {
    DSOR_UNKNOWN = 0x00000000,
    DSOR_640_480 = 0x00000001,
    DSOR_720_480 = 0x00000002,
    DSOR_720_576 = 0x00000004,
    DSOR_800_600 = 0x00000008,
    DSOR_1024_768 = 0x00000010,
    DSOR_1152_864 = 0x00000020,
    DSOR_1280_720 = 0x00000040,
    DSOR_1280_768 = 0x00000080,
    DSOR_1280_960 = 0x00000100,
    DSOR_1280_1024 = 0x00000200,
    DSOR_1400_1050 = 0x00000400,
    DSOR_1600_1200 = 0x00000800,
    DSOR_1920_1080 = 0x00001000,
    DSOR_ALL = 0x00001FFF
} DFBScreenOutputResolution;


#define DFB_SCREEN_OUTPUT_DESC_NAME_LENGTH 24




typedef struct {
     DFBScreenOutputCapabilities caps;

     DFBScreenOutputConnectors all_connectors;
     DFBScreenOutputSignals all_signals;
     DFBScreenOutputResolution all_resolutions;

     char name[24];
} DFBScreenOutputDescription;




typedef enum {
     DSOCONF_NONE = 0x00000000,

     DSOCONF_ENCODER = 0x00000001,
     DSOCONF_SIGNALS = 0x00000002,
     DSOCONF_CONNECTORS = 0x00000004,
     DSOCONF_SLOW_BLANKING= 0x00000008,
     DSOCONF_RESOLUTION = 0x00000010,

     DSOCONF_ALL = 0x0000001F
} DFBScreenOutputConfigFlags;




typedef struct {
     DFBScreenOutputConfigFlags flags;

     int encoder;
     DFBScreenOutputSignals out_signals;
     DFBScreenOutputConnectors out_connectors;
     DFBScreenOutputSlowBlankingSignals slow_blanking;
     DFBScreenOutputResolution resolution;
} DFBScreenOutputConfig;





typedef enum {
     DSECAPS_NONE = 0x00000000,

     DSECAPS_TV_STANDARDS = 0x00000001,
     DSECAPS_TEST_PICTURE = 0x00000002,
     DSECAPS_MIXER_SEL = 0x00000004,
     DSECAPS_OUT_SIGNALS = 0x00000008,
     DSECAPS_SCANMODE = 0x00000010,
     DSECAPS_FREQUENCY = 0x00000020,

     DSECAPS_BRIGHTNESS = 0x00000100,
     DSECAPS_CONTRAST = 0x00000200,
     DSECAPS_HUE = 0x00000400,
     DSECAPS_SATURATION = 0x00000800,

     DSECAPS_CONNECTORS = 0x00001000,
     DSECAPS_SLOW_BLANKING = 0x00002000,
     DSECAPS_RESOLUTION = 0x00004000,

     DSECAPS_ALL = 0x00007f3f
} DFBScreenEncoderCapabilities;




typedef enum {
     DSET_UNKNOWN = 0x00000000,

     DSET_CRTC = 0x00000001,
     DSET_TV = 0x00000002,
     DSET_DIGITAL = 0x00000004
} DFBScreenEncoderType;




typedef enum {
     DSETV_UNKNOWN = 0x00000000,

     DSETV_PAL = 0x00000001,
     DSETV_NTSC = 0x00000002,
     DSETV_SECAM = 0x00000004,
     DSETV_PAL_60 = 0x00000008,
     DSETV_PAL_BG = 0x00000010,
     DSETV_PAL_I = 0x00000020,
     DSETV_PAL_M = 0x00000040,
     DSETV_PAL_N = 0x00000080,
     DSETV_PAL_NC = 0x00000100,
     DSETV_NTSC_M_JPN = 0x00000200,
     DSETV_DIGITAL = 0x00000400,
     DSETV_NTSC_443 = 0x00000800,
     DSETV_ALL = 0x00000FFF
} DFBScreenEncoderTVStandards;




typedef enum {
     DSESM_UNKNOWN = 0x00000000,

     DSESM_INTERLACED = 0x00000001,
     DSESM_PROGRESSIVE = 0x00000002
} DFBScreenEncoderScanMode;




typedef enum {
     DSEF_UNKNOWN = 0x00000000,

     DSEF_25HZ = 0x00000001,
     DSEF_29_97HZ = 0x00000002,
     DSEF_50HZ = 0x00000004,
     DSEF_59_94HZ = 0x00000008,
     DSEF_60HZ = 0x00000010,
     DSEF_75HZ = 0x00000020,
     DSEF_30HZ = 0x00000040,
     DSEF_24HZ = 0x00000080,
     DSEF_23_976HZ = 0x00000100,
} DFBScreenEncoderFrequency;

#define DFB_SCREEN_ENCODER_DESC_NAME_LENGTH 24




typedef struct {
     DFBScreenEncoderCapabilities caps;
     DFBScreenEncoderType type;

     DFBScreenEncoderTVStandards tv_standards;
     DFBScreenOutputSignals out_signals;
     DFBScreenOutputConnectors all_connectors;
     DFBScreenOutputResolution all_resolutions;

     char name[24];
} DFBScreenEncoderDescription;




typedef enum {
     DSECONF_NONE = 0x00000000,

     DSECONF_TV_STANDARD = 0x00000001,
     DSECONF_TEST_PICTURE = 0x00000002,
     DSECONF_MIXER = 0x00000004,
     DSECONF_OUT_SIGNALS = 0x00000008,
     DSECONF_SCANMODE = 0x00000010,
     DSECONF_TEST_COLOR = 0x00000020,
     DSECONF_ADJUSTMENT = 0x00000040,
     DSECONF_FREQUENCY = 0x00000080,

     DSECONF_CONNECTORS = 0x00000100,
     DSECONF_SLOW_BLANKING = 0x00000200,
     DSECONF_RESOLUTION = 0x00000400,

     DSECONF_ALL = 0x000007FF
} DFBScreenEncoderConfigFlags;




typedef enum {
     DSETP_OFF = 0x00000000,

     DSETP_MULTI = 0x00000001,
     DSETP_SINGLE = 0x00000002,

     DSETP_WHITE = 0x00000010,
     DSETP_YELLOW = 0x00000020,
     DSETP_CYAN = 0x00000030,
     DSETP_GREEN = 0x00000040,
     DSETP_MAGENTA = 0x00000050,
     DSETP_RED = 0x00000060,
     DSETP_BLUE = 0x00000070,
     DSETP_BLACK = 0x00000080
} DFBScreenEncoderTestPicture;




typedef struct {
     DFBScreenEncoderConfigFlags flags;

     DFBScreenEncoderTVStandards tv_standard;
     DFBScreenEncoderTestPicture test_picture;
     int mixer;
     DFBScreenOutputSignals out_signals;
     DFBScreenOutputConnectors out_connectors;
     DFBScreenOutputSlowBlankingSignals slow_blanking;

     DFBScreenEncoderScanMode scanmode;

     DFBColor test_color;

     DFBColorAdjustment adjustment;

     DFBScreenEncoderFrequency frequency;
     DFBScreenOutputResolution resolution;
} DFBScreenEncoderConfig;
# 2530 "/usr/include/directfb/directfb.h"
struct
# 2746 "/usr/include/directfb/directfb.h"
 _IDirectFBScreen
# 2530 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBScreen *thiz ); DirectResult (*Release)( IDirectFBScreen *thiz ); DFBResult (*GetID) ( IDirectFBScreen *thiz, DFBScreenID *ret_screen_id ); DFBResult (*GetDescription) ( IDirectFBScreen *thiz, DFBScreenDescription *ret_desc ); DFBResult (*GetSize) ( IDirectFBScreen *thiz, int *ret_width, int *ret_height ); DFBResult (*EnumDisplayLayers) ( IDirectFBScreen *thiz, DFBDisplayLayerCallback callback, void *callbackdata ); DFBResult (*SetPowerMode) ( IDirectFBScreen *thiz, DFBScreenPowerMode mode ); DFBResult (*WaitForSync) ( IDirectFBScreen *thiz ); DFBResult (*GetMixerDescriptions) ( IDirectFBScreen *thiz, DFBScreenMixerDescription *ret_descriptions ); DFBResult (*GetMixerConfiguration) ( IDirectFBScreen *thiz, int mixer, DFBScreenMixerConfig *ret_config ); DFBResult (*TestMixerConfiguration) ( IDirectFBScreen *thiz, int mixer, const DFBScreenMixerConfig *config, DFBScreenMixerConfigFlags *ret_failed ); DFBResult (*SetMixerConfiguration) ( IDirectFBScreen *thiz, int mixer, const DFBScreenMixerConfig *config ); DFBResult (*GetEncoderDescriptions) ( IDirectFBScreen *thiz, DFBScreenEncoderDescription *ret_descriptions ); DFBResult (*GetEncoderConfiguration) ( IDirectFBScreen *thiz, int encoder, DFBScreenEncoderConfig *ret_config ); DFBResult (*TestEncoderConfiguration) ( IDirectFBScreen *thiz, int encoder, const DFBScreenEncoderConfig *config, DFBScreenEncoderConfigFlags *ret_failed ); DFBResult (*SetEncoderConfiguration) ( IDirectFBScreen *thiz, int encoder, const DFBScreenEncoderConfig *config ); DFBResult (*GetOutputDescriptions) ( IDirectFBScreen *thiz, DFBScreenOutputDescription *ret_descriptions ); DFBResult (*GetOutputConfiguration) ( IDirectFBScreen *thiz, int output, DFBScreenOutputConfig *ret_config ); DFBResult (*TestOutputConfiguration) ( IDirectFBScreen *thiz, int output, const DFBScreenOutputConfig *config, DFBScreenOutputConfigFlags *ret_failed ); DFBResult (*SetOutputConfiguration) ( IDirectFBScreen *thiz, int output, const DFBScreenOutputConfig *config ); DFBResult (*GetVSyncCount) ( IDirectFBScreen *thiz, unsigned long *ret_count ); };
# 2756 "/usr/include/directfb/directfb.h"
struct
# 3236 "/usr/include/directfb/directfb.h"
 _IDirectFBDisplayLayer
# 2756 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBDisplayLayer *thiz ); DirectResult (*Release)( IDirectFBDisplayLayer *thiz ); DFBResult (*GetID) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerID *ret_layer_id ); DFBResult (*GetDescription) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerDescription *ret_desc ); DFBResult (*GetSourceDescriptions) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerSourceDescription *ret_descriptions ); DFBResult (*GetCurrentOutputField) ( IDirectFBDisplayLayer *thiz, int *ret_field ); DFBResult (*GetSurface) ( IDirectFBDisplayLayer *thiz, IDirectFBSurface **ret_interface ); DFBResult (*GetScreen) ( IDirectFBDisplayLayer *thiz, IDirectFBScreen **ret_interface ); DFBResult (*SetCooperativeLevel) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerCooperativeLevel level ); DFBResult (*GetConfiguration) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerConfig *ret_config ); DFBResult (*TestConfiguration) ( IDirectFBDisplayLayer *thiz, const DFBDisplayLayerConfig *config, DFBDisplayLayerConfigFlags *ret_failed ); DFBResult (*SetConfiguration) ( IDirectFBDisplayLayer *thiz, const DFBDisplayLayerConfig *config ); DFBResult (*SetScreenLocation) ( IDirectFBDisplayLayer *thiz, float x, float y, float width, float height ); DFBResult (*SetScreenPosition) ( IDirectFBDisplayLayer *thiz, int x, int y ); DFBResult (*SetScreenRectangle) ( IDirectFBDisplayLayer *thiz, int x, int y, int width, int height ); DFBResult (*SetOpacity) ( IDirectFBDisplayLayer *thiz, u8 opacity ); DFBResult (*SetSourceRectangle) ( IDirectFBDisplayLayer *thiz, int x, int y, int width, int height ); DFBResult (*SetFieldParity) ( IDirectFBDisplayLayer *thiz, int field ); DFBResult (*SetClipRegions) ( IDirectFBDisplayLayer *thiz, const DFBRegion *regions, int num_regions, DFBBoolean positive ); DFBResult (*SetSrcColorKey) ( IDirectFBDisplayLayer *thiz, u8 r, u8 g, u8 b ); DFBResult (*SetDstColorKey) ( IDirectFBDisplayLayer *thiz, u8 r, u8 g, u8 b ); DFBResult (*GetLevel) ( IDirectFBDisplayLayer *thiz, int *ret_level ); DFBResult (*SetLevel) ( IDirectFBDisplayLayer *thiz, int level ); DFBResult (*SetBackgroundMode) ( IDirectFBDisplayLayer *thiz, DFBDisplayLayerBackgroundMode mode ); DFBResult (*SetBackgroundImage) ( IDirectFBDisplayLayer *thiz, IDirectFBSurface *surface ); DFBResult (*SetBackgroundColor) ( IDirectFBDisplayLayer *thiz, u8 r, u8 g, u8 b, u8 a ); DFBResult (*GetColorAdjustment) ( IDirectFBDisplayLayer *thiz, DFBColorAdjustment *ret_adj ); DFBResult (*SetColorAdjustment) ( IDirectFBDisplayLayer *thiz, const DFBColorAdjustment *adj ); DFBResult (*CreateWindow) ( IDirectFBDisplayLayer *thiz, const DFBWindowDescription *desc, IDirectFBWindow **ret_interface ); DFBResult (*GetWindow) ( IDirectFBDisplayLayer *thiz, DFBWindowID window_id, IDirectFBWindow **ret_interface ); DFBResult (*EnableCursor) ( IDirectFBDisplayLayer *thiz, int enable ); DFBResult (*GetCursorPosition) ( IDirectFBDisplayLayer *thiz, int *ret_x, int *ret_y ); DFBResult (*WarpCursor) ( IDirectFBDisplayLayer *thiz, int x, int y ); DFBResult (*SetCursorAcceleration) ( IDirectFBDisplayLayer *thiz, int numerator, int denominator, int threshold ); DFBResult (*SetCursorShape) ( IDirectFBDisplayLayer *thiz, IDirectFBSurface *shape, int hot_x, int hot_y ); DFBResult (*SetCursorOpacity) ( IDirectFBDisplayLayer *thiz, u8 opacity ); DFBResult (*WaitForSync) ( IDirectFBDisplayLayer *thiz ); DFBResult (*SwitchContext) ( IDirectFBDisplayLayer *thiz, DFBBoolean exclusive ); DFBResult (*SetRotation) ( IDirectFBDisplayLayer *thiz, int rotation ); DFBResult (*GetRotation) ( IDirectFBDisplayLayer *thiz, int *ret_rotation ); DFBResult (*GetWindowByResourceID) ( IDirectFBDisplayLayer *thiz, unsigned long resource_id, IDirectFBWindow **ret_interface ); };
# 3242 "/usr/include/directfb/directfb.h"
typedef enum {
     DSFLIP_NONE = 0x00000000,

     DSFLIP_WAIT = 0x00000001,

     DSFLIP_BLIT = 0x00000002,



     DSFLIP_ONSYNC = 0x00000004,



     DSFLIP_PIPELINE = 0x00000008,

     DSFLIP_ONCE = 0x00000010,

     DSFLIP_QUEUE = 0x00000100,
     DSFLIP_FLUSH = 0x00000200,

     DSFLIP_WAITFORSYNC = DSFLIP_WAIT | DSFLIP_ONSYNC
} DFBSurfaceFlipFlags;




typedef enum {
     DSTF_LEFT = 0x00000000,
     DSTF_CENTER = 0x00000001,
     DSTF_RIGHT = 0x00000002,

     DSTF_TOP = 0x00000004,

     DSTF_BOTTOM = 0x00000008,


     DSTF_OUTLINE = 0x00000010,

     DSTF_TOPLEFT = DSTF_TOP | DSTF_LEFT,
     DSTF_TOPCENTER = DSTF_TOP | DSTF_CENTER,
     DSTF_TOPRIGHT = DSTF_TOP | DSTF_RIGHT,

     DSTF_BOTTOMLEFT = DSTF_BOTTOM | DSTF_LEFT,
     DSTF_BOTTOMCENTER = DSTF_BOTTOM | DSTF_CENTER,
     DSTF_BOTTOMRIGHT = DSTF_BOTTOM | DSTF_RIGHT
} DFBSurfaceTextFlags;





typedef enum {
     DSLF_READ = 0x00000001,

     DSLF_WRITE = 0x00000002




} DFBSurfaceLockFlags;




typedef enum {



     DSPD_NONE = 0,
     DSPD_CLEAR = 1,
     DSPD_SRC = 2,
     DSPD_SRC_OVER = 3,
     DSPD_DST_OVER = 4,
     DSPD_SRC_IN = 5,
     DSPD_DST_IN = 6,
     DSPD_SRC_OUT = 7,
     DSPD_DST_OUT = 8,
     DSPD_SRC_ATOP = 9,
     DSPD_DST_ATOP = 10,
     DSPD_ADD = 11,
     DSPD_XOR = 12,
     DSPD_DST = 13,
} DFBSurfacePorterDuffRule;




typedef enum {
# 3342 "/usr/include/directfb/directfb.h"
     DSBF_UNKNOWN = 0,
     DSBF_ZERO = 1,
     DSBF_ONE = 2,
     DSBF_SRCCOLOR = 3,
     DSBF_INVSRCCOLOR = 4,
     DSBF_SRCALPHA = 5,
     DSBF_INVSRCALPHA = 6,
     DSBF_DESTALPHA = 7,
     DSBF_INVDESTALPHA = 8,
     DSBF_DESTCOLOR = 9,
     DSBF_INVDESTCOLOR = 10,
     DSBF_SRCALPHASAT = 11,
} DFBSurfaceBlendFunction;




typedef struct {
     float x;
     float y;
     float z;
     float w;

     float s;
     float t;
} DFBVertex;




typedef enum {
     DTTF_LIST,
     DTTF_STRIP,
     DTTF_FAN
} DFBTriangleFormation;




typedef enum {
     DSMF_NONE = 0x00000000,

     DSMF_STENCIL = 0x00000001,

     DSMF_ALL = 0x00000001,
} DFBSurfaceMaskFlags;
# 3396 "/usr/include/directfb/directfb.h"
struct
# 4256 "/usr/include/directfb/directfb.h"
 _IDirectFBSurface
# 3396 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBSurface *thiz ); DirectResult (*Release)( IDirectFBSurface *thiz ); DFBResult (*GetCapabilities) ( IDirectFBSurface *thiz, DFBSurfaceCapabilities *ret_caps ); DFBResult (*GetPosition) ( IDirectFBSurface *thiz, int *ret_x, int *ret_y ); DFBResult (*GetSize) ( IDirectFBSurface *thiz, int *ret_width, int *ret_height ); DFBResult (*GetVisibleRectangle) ( IDirectFBSurface *thiz, DFBRectangle *ret_rect ); DFBResult (*GetPixelFormat) ( IDirectFBSurface *thiz, DFBSurfacePixelFormat *ret_format ); DFBResult (*GetAccelerationMask) ( IDirectFBSurface *thiz, IDirectFBSurface *source, DFBAccelerationMask *ret_mask ); DFBResult (*GetPalette) ( IDirectFBSurface *thiz, IDirectFBPalette **ret_interface ); DFBResult (*SetPalette) ( IDirectFBSurface *thiz, IDirectFBPalette *palette ); DFBResult (*SetAlphaRamp) ( IDirectFBSurface *thiz, u8 a0, u8 a1, u8 a2, u8 a3 ); DFBResult (*Lock) ( IDirectFBSurface *thiz, DFBSurfaceLockFlags flags, void **ret_ptr, int *ret_pitch ); DFBResult (*GetFramebufferOffset) ( IDirectFBSurface *thiz, int *offset ); DFBResult (*Unlock) ( IDirectFBSurface *thiz ); DFBResult (*Flip) ( IDirectFBSurface *thiz, const DFBRegion *region, DFBSurfaceFlipFlags flags ); DFBResult (*SetField) ( IDirectFBSurface *thiz, int field ); DFBResult (*Clear) ( IDirectFBSurface *thiz, u8 r, u8 g, u8 b, u8 a ); DFBResult (*SetClip) ( IDirectFBSurface *thiz, const DFBRegion *clip ); DFBResult (*GetClip) ( IDirectFBSurface *thiz, DFBRegion *ret_clip ); DFBResult (*SetColor) ( IDirectFBSurface *thiz, u8 r, u8 g, u8 b, u8 a ); DFBResult (*SetColorIndex) ( IDirectFBSurface *thiz, unsigned int index ); DFBResult (*SetSrcBlendFunction) ( IDirectFBSurface *thiz, DFBSurfaceBlendFunction function ); DFBResult (*SetDstBlendFunction) ( IDirectFBSurface *thiz, DFBSurfaceBlendFunction function ); DFBResult (*SetPorterDuff) ( IDirectFBSurface *thiz, DFBSurfacePorterDuffRule rule ); DFBResult (*SetSrcColorKey) ( IDirectFBSurface *thiz, u8 r, u8 g, u8 b ); DFBResult (*SetSrcColorKeyIndex) ( IDirectFBSurface *thiz, unsigned int index ); DFBResult (*SetDstColorKey) ( IDirectFBSurface *thiz, u8 r, u8 g, u8 b ); DFBResult (*SetDstColorKeyIndex) ( IDirectFBSurface *thiz, unsigned int index ); DFBResult (*SetBlittingFlags) ( IDirectFBSurface *thiz, DFBSurfaceBlittingFlags flags ); DFBResult (*Blit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rect, int x, int y ); DFBResult (*TileBlit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rect, int x, int y ); DFBResult (*BatchBlit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rects, const DFBPoint *dest_points, int num ); DFBResult (*StretchBlit) ( IDirectFBSurface *thiz, IDirectFBSurface *source, const DFBRectangle *source_rect, const DFBRectangle *destination_rect ); DFBResult (*TextureTriangles) ( IDirectFBSurface *thiz, IDirectFBSurface *texture, const DFBVertex *vertices, const int *indices, int num, DFBTriangleFormation formation ); DFBResult (*SetDrawingFlags) ( IDirectFBSurface *thiz, DFBSurfaceDrawingFlags flags ); DFBResult (*FillRectangle) ( IDirectFBSurface *thiz, int x, int y, int w, int h ); DFBResult (*DrawRectangle) ( IDirectFBSurface *thiz, int x, int y, int w, int h ); DFBResult (*DrawLine) ( IDirectFBSurface *thiz, int x1, int y1, int x2, int y2 ); DFBResult (*DrawLines) ( IDirectFBSurface *thiz, const DFBRegion *lines, unsigned int num_lines ); DFBResult (*FillTriangle) ( IDirectFBSurface *thiz, int x1, int y1, int x2, int y2, int x3, int y3 ); DFBResult (*FillRectangles) ( IDirectFBSurface *thiz, const DFBRectangle *rects, unsigned int num ); DFBResult (*FillSpans) ( IDirectFBSurface *thiz, int y, const DFBSpan *spans, unsigned int num ); DFBResult (*FillTriangles) ( IDirectFBSurface *thiz, const DFBTriangle *tris, unsigned int num ); DFBResult (*SetFont) ( IDirectFBSurface *thiz, IDirectFBFont *font ); DFBResult (*GetFont) ( IDirectFBSurface *thiz, IDirectFBFont **ret_font ); DFBResult (*DrawString) ( IDirectFBSurface *thiz, const char *text, int bytes, int x, int y, DFBSurfaceTextFlags flags ); DFBResult (*DrawGlyph) ( IDirectFBSurface *thiz, unsigned int character, int x, int y, DFBSurfaceTextFlags flags ); DFBResult (*SetEncoding) ( IDirectFBSurface *thiz, DFBTextEncodingID encoding ); DFBResult (*GetSubSurface) ( IDirectFBSurface *thiz, const DFBRectangle *rect, IDirectFBSurface **ret_interface ); DFBResult (*GetGL) ( IDirectFBSurface *thiz, IDirectFBGL **ret_interface ); DFBResult (*Dump) ( IDirectFBSurface *thiz, const char *directory, const char *prefix ); DFBResult (*DisableAcceleration) ( IDirectFBSurface *thiz, DFBAccelerationMask mask ); DFBResult (*ReleaseSource) ( IDirectFBSurface *thiz ); DFBResult (*SetIndexTranslation) ( IDirectFBSurface *thiz, const int *indices, int num_indices ); DFBResult (*SetRenderOptions) ( IDirectFBSurface *thiz, DFBSurfaceRenderOptions options ); DFBResult (*SetMatrix) ( IDirectFBSurface *thiz, const s32 *matrix ); DFBResult (*SetSourceMask) ( IDirectFBSurface *thiz, IDirectFBSurface *mask, int x, int y, DFBSurfaceMaskFlags flags ); DFBResult (*MakeSubSurface) ( IDirectFBSurface *thiz, IDirectFBSurface *from, const DFBRectangle *rect ); DFBResult (*Write) ( IDirectFBSurface *thiz, const DFBRectangle *rect, const void *ptr, int pitch ); DFBResult (*Read) ( IDirectFBSurface *thiz, const DFBRectangle *rect, void *ptr, int pitch ); DFBResult (*SetColors) ( IDirectFBSurface *thiz, const DFBColorID *ids, const DFBColor *colors, unsigned int num ); DFBResult (*BatchBlit2) ( IDirectFBSurface *thiz, IDirectFBSurface *source, IDirectFBSurface *source2, const DFBRectangle *source_rects, const DFBPoint *dest_points, const DFBPoint *source2_points, int num ); DFBResult (*GetPhysicalAddress) ( IDirectFBSurface *thiz, unsigned long *addr ); DFBResult (*FillTrapezoids) ( IDirectFBSurface *thiz, const DFBTrapezoid *traps, unsigned int num ); };
# 4266 "/usr/include/directfb/directfb.h"
struct
# 4382 "/usr/include/directfb/directfb.h"
 _IDirectFBPalette
# 4266 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBPalette *thiz ); DirectResult (*Release)( IDirectFBPalette *thiz ); DFBResult (*GetCapabilities) ( IDirectFBPalette *thiz, DFBPaletteCapabilities *ret_caps ); DFBResult (*GetSize) ( IDirectFBPalette *thiz, unsigned int *ret_size ); DFBResult (*SetEntries) ( IDirectFBPalette *thiz, const DFBColor *entries, unsigned int num_entries, unsigned int offset ); DFBResult (*GetEntries) ( IDirectFBPalette *thiz, DFBColor *ret_entries, unsigned int num_entries, unsigned int offset ); DFBResult (*FindBestMatch) ( IDirectFBPalette *thiz, u8 r, u8 g, u8 b, u8 a, unsigned int *ret_index ); DFBResult (*CreateCopy) ( IDirectFBPalette *thiz, IDirectFBPalette **ret_interface ); DFBResult (*SetEntriesYUV) ( IDirectFBPalette *thiz, const DFBColorYUV *entries, unsigned int num_entries, unsigned int offset ); DFBResult (*GetEntriesYUV) ( IDirectFBPalette *thiz, DFBColorYUV *ret_entries, unsigned int num_entries, unsigned int offset ); DFBResult (*FindBestMatchYUV) ( IDirectFBPalette *thiz, u8 y, u8 u, u8 v, u8 a, unsigned int *ret_index ); };
# 4388 "/usr/include/directfb/directfb.h"
typedef enum {
     DIKS_UP = 0x00000000,
     DIKS_DOWN = 0x00000001
} DFBInputDeviceKeyState;




typedef enum {
     DIBS_UP = 0x00000000,
     DIBS_DOWN = 0x00000001
} DFBInputDeviceButtonState;




typedef enum {
     DIBM_LEFT = 0x00000001,
     DIBM_RIGHT = 0x00000002,
     DIBM_MIDDLE = 0x00000004
} DFBInputDeviceButtonMask;




typedef enum {
     DIMM_SHIFT = (1 << DIMKI_SHIFT),
     DIMM_CONTROL = (1 << DIMKI_CONTROL),
     DIMM_ALT = (1 << DIMKI_ALT),
     DIMM_ALTGR = (1 << DIMKI_ALTGR),
     DIMM_META = (1 << DIMKI_META),
     DIMM_SUPER = (1 << DIMKI_SUPER),
     DIMM_HYPER = (1 << DIMKI_HYPER)
} DFBInputDeviceModifierMask;
# 4431 "/usr/include/directfb/directfb.h"
struct
# 4585 "/usr/include/directfb/directfb.h"
 _IDirectFBInputDevice
# 4431 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBInputDevice *thiz ); DirectResult (*Release)( IDirectFBInputDevice *thiz ); DFBResult (*GetID) ( IDirectFBInputDevice *thiz, DFBInputDeviceID *ret_device_id ); DFBResult (*GetDescription) ( IDirectFBInputDevice *thiz, DFBInputDeviceDescription *ret_desc ); DFBResult (*GetKeymapEntry) ( IDirectFBInputDevice *thiz, int keycode, DFBInputDeviceKeymapEntry *ret_entry ); DFBResult (*SetKeymapEntry) ( IDirectFBInputDevice *thiz, int keycode, DFBInputDeviceKeymapEntry *entry ); DFBResult (*LoadKeymap) ( IDirectFBInputDevice *thiz, char *filename ); DFBResult (*CreateEventBuffer) ( IDirectFBInputDevice *thiz, IDirectFBEventBuffer **ret_buffer ); DFBResult (*AttachEventBuffer) ( IDirectFBInputDevice *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*DetachEventBuffer) ( IDirectFBInputDevice *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*GetKeyState) ( IDirectFBInputDevice *thiz, DFBInputDeviceKeyIdentifier key_id, DFBInputDeviceKeyState *ret_state ); DFBResult (*GetModifiers) ( IDirectFBInputDevice *thiz, DFBInputDeviceModifierMask *ret_modifiers ); DFBResult (*GetLockState) ( IDirectFBInputDevice *thiz, DFBInputDeviceLockState *ret_locks ); DFBResult (*GetButtons) ( IDirectFBInputDevice *thiz, DFBInputDeviceButtonMask *ret_buttons ); DFBResult (*GetButtonState) ( IDirectFBInputDevice *thiz, DFBInputDeviceButtonIdentifier button, DFBInputDeviceButtonState *ret_state ); DFBResult (*GetAxis) ( IDirectFBInputDevice *thiz, DFBInputDeviceAxisIdentifier axis, int *ret_pos ); DFBResult (*GetXY) ( IDirectFBInputDevice *thiz, int *ret_x, int *ret_y ); };
# 4591 "/usr/include/directfb/directfb.h"
typedef enum {
     DFEC_NONE = 0x00,
     DFEC_INPUT = 0x01,
     DFEC_WINDOW = 0x02,
     DFEC_USER = 0x03,
     DFEC_UNIVERSAL = 0x04,
     DFEC_VIDEOPROVIDER = 0x05
} DFBEventClass;




typedef enum {
     DIET_UNKNOWN = 0,
     DIET_KEYPRESS,
     DIET_KEYRELEASE,
     DIET_BUTTONPRESS,
     DIET_BUTTONRELEASE,
     DIET_AXISMOTION
} DFBInputEventType;




typedef enum {
     DIEF_NONE = 0x0000,
     DIEF_TIMESTAMP = 0x0001,
     DIEF_AXISABS = 0x0002,
     DIEF_AXISREL = 0x0004,

     DIEF_KEYCODE = 0x0008,

     DIEF_KEYID = 0x0010,

     DIEF_KEYSYMBOL = 0x0020,

     DIEF_MODIFIERS = 0x0040,

     DIEF_LOCKS = 0x0080,

     DIEF_BUTTONS = 0x0100,

     DIEF_GLOBAL = 0x0200,





     DIEF_REPEAT = 0x0400,
     DIEF_FOLLOW = 0x0800,

     DIEF_MIN = 0x1000,
     DIEF_MAX = 0x2000,
} DFBInputEventFlags;




typedef struct {
     DFBEventClass clazz;

     DFBInputEventType type;
     DFBInputDeviceID device_id;
     DFBInputEventFlags flags;



     struct timeval timestamp;


     int key_code;



     DFBInputDeviceKeyIdentifier key_id;

     DFBInputDeviceKeySymbol key_symbol;



     DFBInputDeviceModifierMask modifiers;

     DFBInputDeviceLockState locks;



     DFBInputDeviceButtonIdentifier button;

     DFBInputDeviceButtonMask buttons;



     DFBInputDeviceAxisIdentifier axis;


     int axisabs;

     int axisrel;



     int min;
     int max;
} DFBInputEvent;




typedef enum {
     DWET_NONE = 0x00000000,

     DWET_POSITION = 0x00000001,


     DWET_SIZE = 0x00000002,


     DWET_CLOSE = 0x00000004,

     DWET_DESTROYED = 0x00000008,


     DWET_GOTFOCUS = 0x00000010,
     DWET_LOSTFOCUS = 0x00000020,

     DWET_KEYDOWN = 0x00000100,

     DWET_KEYUP = 0x00000200,


     DWET_BUTTONDOWN = 0x00010000,

     DWET_BUTTONUP = 0x00020000,

     DWET_MOTION = 0x00040000,

     DWET_ENTER = 0x00080000,

     DWET_LEAVE = 0x00100000,

     DWET_WHEEL = 0x00200000,


     DWET_POSITION_SIZE = DWET_POSITION | DWET_SIZE,



     DWET_UPDATE = 0x01000000,

     DWET_ALL = 0x013F033F
} DFBWindowEventType;




typedef enum {
     DWEF_NONE = 0x00000000,

     DWEF_RETURNED = 0x00000001,
     DWEF_RELATIVE = 0x00000002,
     DWEF_REPEAT = 0x00000010,

     DWEF_ALL = 0x00000013
} DFBWindowEventFlags;




typedef enum {
     DVPET_NONE = 0x00000000,
     DVPET_STARTED = 0x00000001,
     DVPET_STOPPED = 0x00000002,
     DVPET_SPEEDCHANGE = 0x00000004,
     DVPET_STREAMCHANGE = 0x00000008,
     DVPET_FATALERROR = 0x00000010,
     DVPET_FINISHED = 0x00000020,
     DVPET_SURFACECHANGE = 0x00000040,
     DVPET_FRAMEDECODED = 0x00000080,
     DVPET_FRAMEDISPLAYED = 0x00000100,
     DVPET_DATAEXHAUSTED = 0x00000200,
     DVPET_VIDEOACTION = 0x00000400,
     DVPET_DATALOW = 0x00000800,
     DVPET_DATAHIGH = 0x00001000,
     DVPET_BUFFERTIMELOW = 0x00002000,
     DVPET_BUFFERTIMEHIGH = 0x00004000,
     DVPET_ALL = 0x00007FFF
} DFBVideoProviderEventType;




typedef struct {
     DFBEventClass clazz;

     DFBWindowEventType type;


     DFBWindowEventFlags flags;

     DFBWindowID window_id;



     int x;


     int y;





     int cx;
     int cy;


     int step;


     int w;
     int h;


     int key_code;



     DFBInputDeviceKeyIdentifier key_id;

     DFBInputDeviceKeySymbol key_symbol;


     DFBInputDeviceModifierMask modifiers;
     DFBInputDeviceLockState locks;


     DFBInputDeviceButtonIdentifier button;


     DFBInputDeviceButtonMask buttons;


     struct timeval timestamp;
} DFBWindowEvent;




typedef enum {
     DVPEDST_UNKNOWN = 0x00000000,
     DVPEDST_AUDIO = 0x00000001,
     DVPEDST_VIDEO = 0x00000002,
     DVPEDST_DATA = 0x00000004,
     DVPEDST_ALL = 0x00000007,

} DFBVideoProviderEventDataSubType;




typedef struct {
     DFBEventClass clazz;

     DFBVideoProviderEventType type;
     DFBVideoProviderEventDataSubType data_type;

     int data[4];

} DFBVideoProviderEvent;




typedef struct {
     DFBEventClass clazz;

     unsigned int type;
     void *data;
} DFBUserEvent;




typedef struct {
     DFBEventClass clazz;
     unsigned int size;




} DFBUniversalEvent;




typedef union {
     DFBEventClass clazz;
     DFBInputEvent input;
     DFBWindowEvent window;
     DFBUserEvent user;
     DFBUniversalEvent universal;
     DFBVideoProviderEvent videoprovider;
} DFBEvent;

#define DFB_EVENT(e) ((DFBEvent *) (e))




typedef struct {
     unsigned int num_events;

     unsigned int DFEC_INPUT;
     unsigned int DFEC_WINDOW;
     unsigned int DFEC_USER;
     unsigned int DFEC_UNIVERSAL;
     unsigned int DFEC_VIDEOPROVIDER;

     unsigned int DIET_KEYPRESS;
     unsigned int DIET_KEYRELEASE;
     unsigned int DIET_BUTTONPRESS;
     unsigned int DIET_BUTTONRELEASE;
     unsigned int DIET_AXISMOTION;

     unsigned int DWET_POSITION;
     unsigned int DWET_SIZE;
     unsigned int DWET_CLOSE;
     unsigned int DWET_DESTROYED;
     unsigned int DWET_GOTFOCUS;
     unsigned int DWET_LOSTFOCUS;
     unsigned int DWET_KEYDOWN;
     unsigned int DWET_KEYUP;
     unsigned int DWET_BUTTONDOWN;
     unsigned int DWET_BUTTONUP;
     unsigned int DWET_MOTION;
     unsigned int DWET_ENTER;
     unsigned int DWET_LEAVE;
     unsigned int DWET_WHEEL;
     unsigned int DWET_POSITION_SIZE;

     unsigned int DVPET_STARTED;
     unsigned int DVPET_STOPPED;
     unsigned int DVPET_SPEEDCHANGE;
     unsigned int DVPET_STREAMCHANGE;
     unsigned int DVPET_FATALERROR;
     unsigned int DVPET_FINISHED;
     unsigned int DVPET_SURFACECHANGE;
     unsigned int DVPET_FRAMEDECODED;
     unsigned int DVPET_FRAMEDISPLAYED;
     unsigned int DVPET_DATAEXHAUSTED;
     unsigned int DVPET_DATALOW;
     unsigned int DVPET_VIDEOACTION;
     unsigned int DVPET_DATAHIGH;
     unsigned int DVPET_BUFFERTIMELOW;
     unsigned int DVPET_BUFFERTIMEHIGH;
} DFBEventBufferStats;
# 4956 "/usr/include/directfb/directfb.h"
struct
# 5082 "/usr/include/directfb/directfb.h"
 _IDirectFBEventBuffer
# 4956 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBEventBuffer *thiz ); DirectResult (*Release)( IDirectFBEventBuffer *thiz ); DFBResult (*Reset) ( IDirectFBEventBuffer *thiz ); DFBResult (*WaitForEvent) ( IDirectFBEventBuffer *thiz ); DFBResult (*WaitForEventWithTimeout) ( IDirectFBEventBuffer *thiz, unsigned int seconds, unsigned int milli_seconds ); DFBResult (*GetEvent) ( IDirectFBEventBuffer *thiz, DFBEvent *ret_event ); DFBResult (*PeekEvent) ( IDirectFBEventBuffer *thiz, DFBEvent *ret_event ); DFBResult (*HasEvent) ( IDirectFBEventBuffer *thiz ); DFBResult (*PostEvent) ( IDirectFBEventBuffer *thiz, const DFBEvent *event ); DFBResult (*WakeUp) ( IDirectFBEventBuffer *thiz ); DFBResult (*CreateFileDescriptor) ( IDirectFBEventBuffer *thiz, int *ret_fd ); DFBResult (*EnableStatistics) ( IDirectFBEventBuffer *thiz, DFBBoolean enable ); DFBResult (*GetStatistics) ( IDirectFBEventBuffer *thiz, DFBEventBufferStats *ret_stats ); };
# 5087 "/usr/include/directfb/directfb.h"
typedef enum {
     DWKS_ALL = 0x00000000,
     DWKS_NONE = 0x00000001,
     DWKS_LIST = 0x00000002
} DFBWindowKeySelection;

typedef enum {
     DWGM_DEFAULT = 0x00000000,
     DWGM_FOLLOW = 0x00000001,
     DWGM_RECTANGLE = 0x00000002,
     DWGM_LOCATION = 0x00000003
} DFBWindowGeometryMode;

typedef struct {
     DFBWindowGeometryMode mode;

     DFBRectangle rectangle;
     DFBLocation location;
} DFBWindowGeometry;

typedef enum {
     DWCF_NONE = 0x00000000,

     DWCF_RELATIVE = 0x00000001,
     DWCF_EXPLICIT = 0x00000002,
     DWCF_UNCLIPPED = 0x00000004,
     DWCF_TRAPPED = 0x00000008,
     DWCF_FIXED = 0x00000010,
     DWCF_INVISIBLE = 0x00000020,

     DWCF_ALL = 0x0000003F
} DFBWindowCursorFlags;
# 5127 "/usr/include/directfb/directfb.h"
struct
# 5750 "/usr/include/directfb/directfb.h"
 _IDirectFBWindow
# 5127 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBWindow *thiz ); DirectResult (*Release)( IDirectFBWindow *thiz ); DFBResult (*GetID) ( IDirectFBWindow *thiz, DFBWindowID *ret_window_id ); DFBResult (*GetPosition) ( IDirectFBWindow *thiz, int *ret_x, int *ret_y ); DFBResult (*GetSize) ( IDirectFBWindow *thiz, int *ret_width, int *ret_height ); DFBResult (*Close) ( IDirectFBWindow *thiz ); DFBResult (*Destroy) ( IDirectFBWindow *thiz ); DFBResult (*GetSurface) ( IDirectFBWindow *thiz, IDirectFBSurface **ret_surface ); DFBResult (*ResizeSurface) ( IDirectFBWindow *thiz, int width, int height ); DFBResult (*CreateEventBuffer) ( IDirectFBWindow *thiz, IDirectFBEventBuffer **ret_buffer ); DFBResult (*AttachEventBuffer) ( IDirectFBWindow *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*DetachEventBuffer) ( IDirectFBWindow *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*EnableEvents) ( IDirectFBWindow *thiz, DFBWindowEventType mask ); DFBResult (*DisableEvents) ( IDirectFBWindow *thiz, DFBWindowEventType mask ); DFBResult (*SetOptions) ( IDirectFBWindow *thiz, DFBWindowOptions options ); DFBResult (*GetOptions) ( IDirectFBWindow *thiz, DFBWindowOptions *ret_options ); DFBResult (*SetColor) ( IDirectFBWindow *thiz, u8 r, u8 g, u8 b, u8 a ); DFBResult (*SetColorKey) ( IDirectFBWindow *thiz, u8 r, u8 g, u8 b ); DFBResult (*SetColorKeyIndex) ( IDirectFBWindow *thiz, unsigned int index ); DFBResult (*SetOpacity) ( IDirectFBWindow *thiz, u8 opacity ); DFBResult (*SetOpaqueRegion) ( IDirectFBWindow *thiz, int x1, int y1, int x2, int y2 ); DFBResult (*GetOpacity) ( IDirectFBWindow *thiz, u8 *ret_opacity ); DFBResult (*SetCursorShape) ( IDirectFBWindow *thiz, IDirectFBSurface *shape, int hot_x, int hot_y ); DFBResult (*Move) ( IDirectFBWindow *thiz, int dx, int dy ); DFBResult (*MoveTo) ( IDirectFBWindow *thiz, int x, int y ); DFBResult (*Resize) ( IDirectFBWindow *thiz, int width, int height ); DFBResult (*SetBounds) ( IDirectFBWindow *thiz, int x, int y, int width, int height ); DFBResult (*SetStackingClass) ( IDirectFBWindow *thiz, DFBWindowStackingClass stacking_class ); DFBResult (*Raise) ( IDirectFBWindow *thiz ); DFBResult (*Lower) ( IDirectFBWindow *thiz ); DFBResult (*RaiseToTop) ( IDirectFBWindow *thiz ); DFBResult (*LowerToBottom) ( IDirectFBWindow *thiz ); DFBResult (*PutAtop) ( IDirectFBWindow *thiz, IDirectFBWindow *lower ); DFBResult (*PutBelow) ( IDirectFBWindow *thiz, IDirectFBWindow *upper ); DFBResult (*Bind) ( IDirectFBWindow *thiz, IDirectFBWindow *window, int x, int y ); DFBResult (*Unbind) ( IDirectFBWindow *thiz, IDirectFBWindow *window ); DFBResult (*RequestFocus) ( IDirectFBWindow *thiz ); DFBResult (*GrabKeyboard) ( IDirectFBWindow *thiz ); DFBResult (*UngrabKeyboard) ( IDirectFBWindow *thiz ); DFBResult (*GrabPointer) ( IDirectFBWindow *thiz ); DFBResult (*UngrabPointer) ( IDirectFBWindow *thiz ); DFBResult (*GrabKey) ( IDirectFBWindow *thiz, DFBInputDeviceKeySymbol symbol, DFBInputDeviceModifierMask modifiers ); DFBResult (*UngrabKey) ( IDirectFBWindow *thiz, DFBInputDeviceKeySymbol symbol, DFBInputDeviceModifierMask modifiers ); DFBResult (*SetKeySelection) ( IDirectFBWindow *thiz, DFBWindowKeySelection selection, const DFBInputDeviceKeySymbol *keys, unsigned int num_keys ); DFBResult (*GrabUnselectedKeys) ( IDirectFBWindow *thiz ); DFBResult (*UngrabUnselectedKeys) ( IDirectFBWindow *thiz ); DFBResult (*SetSrcGeometry) ( IDirectFBWindow *thiz, const DFBWindowGeometry *geometry ); DFBResult (*SetDstGeometry) ( IDirectFBWindow *thiz, const DFBWindowGeometry *geometry ); DFBResult (*SetProperty) ( IDirectFBWindow *thiz, const char *key, void *value, void **ret_old_value ); DFBResult (*GetProperty) ( IDirectFBWindow *thiz, const char *key, void **ret_value ); DFBResult (*RemoveProperty) ( IDirectFBWindow *thiz, const char *key, void **ret_value ); DFBResult (*SetRotation) ( IDirectFBWindow *thiz, int rotation ); DFBResult (*SetAssociation) ( IDirectFBWindow *thiz, DFBWindowID window_id ); DFBResult (*SetApplicationID) ( IDirectFBWindow *thiz, unsigned long application_id ); DFBResult (*GetApplicationID) ( IDirectFBWindow *thiz, unsigned long *ret_application_id ); DFBResult (*BeginUpdates) ( IDirectFBWindow *thiz, const DFBRegion *update ); DFBResult (*SendEvent) ( IDirectFBWindow *thiz, const DFBWindowEvent *event ); DFBResult (*SetCursorFlags) ( IDirectFBWindow *thiz, DFBWindowCursorFlags flags ); DFBResult (*SetCursorResolution) ( IDirectFBWindow *thiz, const DFBDimension *resolution ); DFBResult (*SetCursorPosition) ( IDirectFBWindow *thiz, int x, int y ); };
# 5756 "/usr/include/directfb/directfb.h"
typedef DFBEnumerationResult (*DFBTextEncodingCallback) (
     DFBTextEncodingID encoding_id,
     const char *name,
     void *context
);
# 5769 "/usr/include/directfb/directfb.h"
struct
# 6013 "/usr/include/directfb/directfb.h"
 _IDirectFBFont
# 5769 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBFont *thiz ); DirectResult (*Release)( IDirectFBFont *thiz ); DFBResult (*GetAscender) ( IDirectFBFont *thiz, int *ret_ascender ); DFBResult (*GetDescender) ( IDirectFBFont *thiz, int *ret_descender ); DFBResult (*GetHeight) ( IDirectFBFont *thiz, int *ret_height ); DFBResult (*GetMaxAdvance) ( IDirectFBFont *thiz, int *ret_maxadvance ); DFBResult (*GetKerning) ( IDirectFBFont *thiz, unsigned int prev, unsigned int current, int *ret_kern_x, int *ret_kern_y ); DFBResult (*GetStringWidth) ( IDirectFBFont *thiz, const char *text, int bytes, int *ret_width ); DFBResult (*GetStringExtents) ( IDirectFBFont *thiz, const char *text, int bytes, DFBRectangle *ret_logical_rect, DFBRectangle *ret_ink_rect ); DFBResult (*GetGlyphExtents) ( IDirectFBFont *thiz, unsigned int character, DFBRectangle *ret_rect, int *ret_advance ); DFBResult (*GetStringBreak) ( IDirectFBFont *thiz, const char *text, int bytes, int max_width, int *ret_width, int *ret_str_length, const char **ret_next_line ); DFBResult (*SetEncoding) ( IDirectFBFont *thiz, DFBTextEncodingID encoding ); DFBResult (*EnumEncodings) ( IDirectFBFont *thiz, DFBTextEncodingCallback callback, void *context ); DFBResult (*FindEncoding) ( IDirectFBFont *thiz, const char *name, DFBTextEncodingID *ret_encoding ); DFBResult (*Dispose) ( IDirectFBFont *thiz ); DFBResult (*GetLineSpacingVector) ( IDirectFBFont *thiz, int *ret_xspacing, int *ret_yspacing ); DFBResult (*GetGlyphExtentsXY) ( IDirectFBFont *thiz, unsigned int character, DFBRectangle *ret_rect, int *ret_xadvance, int *ret_yadvance ); };
# 6018 "/usr/include/directfb/directfb.h"
typedef enum {
     DICAPS_NONE = 0x00000000,
     DICAPS_ALPHACHANNEL = 0x00000001,

     DICAPS_COLORKEY = 0x00000002


} DFBImageCapabilities;





typedef struct {
     DFBImageCapabilities caps;

     u8 colorkey_r;
     u8 colorkey_g;
     u8 colorkey_b;
} DFBImageDescription;


typedef enum {
        DIRCR_OK,
        DIRCR_ABORT
} DIRenderCallbackResult;




typedef DIRenderCallbackResult (*DIRenderCallback)(DFBRectangle *rect, void *ctx);
# 6057 "/usr/include/directfb/directfb.h"
struct
# 6131 "/usr/include/directfb/directfb.h"
 _IDirectFBImageProvider
# 6057 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBImageProvider *thiz ); DirectResult (*Release)( IDirectFBImageProvider *thiz ); DFBResult (*GetSurfaceDescription) ( IDirectFBImageProvider *thiz, DFBSurfaceDescription *ret_dsc ); DFBResult (*GetImageDescription) ( IDirectFBImageProvider *thiz, DFBImageDescription *ret_dsc ); DFBResult (*RenderTo) ( IDirectFBImageProvider *thiz, IDirectFBSurface *destination, const DFBRectangle *destination_rect ); DFBResult (*SetRenderCallback) ( IDirectFBImageProvider *thiz, DIRenderCallback callback, void *callback_data ); DFBResult (*WriteBack) ( IDirectFBImageProvider *thiz, IDirectFBSurface *surface, const DFBRectangle *src_rect, const char *filename ); };
# 6136 "/usr/include/directfb/directfb.h"
typedef enum {
     DVSCAPS_NONE = 0x00000000,
     DVSCAPS_VIDEO = 0x00000001,
     DVSCAPS_AUDIO = 0x00000002

} DFBStreamCapabilities;

#define DFB_STREAM_DESC_ENCODING_LENGTH 30

#define DFB_STREAM_DESC_TITLE_LENGTH 255

#define DFB_STREAM_DESC_AUTHOR_LENGTH 255

#define DFB_STREAM_DESC_ALBUM_LENGTH 255

#define DFB_STREAM_DESC_GENRE_LENGTH 32

#define DFB_STREAM_DESC_COMMENT_LENGTH 255




typedef struct {
     DFBStreamCapabilities caps;

     struct {
          char encoding[30];
          double framerate;
          double aspect;
          int bitrate;
       int afd;
       int width;
       int height;
     } video;

     struct {
          char encoding[30];
          int samplerate;
          int channels;
          int bitrate;
     } audio;

     char title[255];
     char author[255];
     char album[255];
     short year;
     char genre[32];
     char comment[255];
} DFBStreamDescription;




typedef enum {
     DSF_ES = 0x00000000,
     DSF_PES = 0x00000001,
} DFBStreamFormat;




typedef struct {
     struct {
          char encoding[30];
          DFBStreamFormat format;
     } video;

     struct {
          char encoding[30];
          DFBStreamFormat format;
     } audio;
} DFBStreamAttributes;




typedef struct {
     DFBStreamCapabilities valid;

     struct {
         unsigned int buffer_size;
         unsigned int minimum_level;
         unsigned int maximum_level;
         unsigned int current_level;
     } video;

     struct {
         unsigned int buffer_size;
         unsigned int minimum_level;
         unsigned int maximum_level;
         unsigned int current_level;
     } audio;
} DFBBufferOccupancy;




typedef struct {
     DFBStreamCapabilities selection;

     struct {
          unsigned int minimum_level;
          unsigned int maximum_level;
          unsigned int minimum_time;
          unsigned int maximum_time;
     } video;

     struct {
          unsigned int minimum_level;
          unsigned int maximum_level;
          unsigned int minimum_time;
          unsigned int maximum_time;
     } audio;
} DFBBufferThresholds;




typedef void (*DVFrameCallback)(void *ctx);
# 6264 "/usr/include/directfb/directfb.h"
struct
# 6558 "/usr/include/directfb/directfb.h"
 _IDirectFBVideoProvider
# 6264 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBVideoProvider *thiz ); DirectResult (*Release)( IDirectFBVideoProvider *thiz ); DFBResult (*GetCapabilities) ( IDirectFBVideoProvider *thiz, DFBVideoProviderCapabilities *ret_caps ); DFBResult (*GetSurfaceDescription) ( IDirectFBVideoProvider *thiz, DFBSurfaceDescription *ret_dsc ); DFBResult (*GetStreamDescription) ( IDirectFBVideoProvider *thiz, DFBStreamDescription *ret_dsc ); DFBResult (*PlayTo) ( IDirectFBVideoProvider *thiz, IDirectFBSurface *destination, const DFBRectangle *destination_rect, DVFrameCallback callback, void *ctx ); DFBResult (*Stop) ( IDirectFBVideoProvider *thiz ); DFBResult (*GetStatus) ( IDirectFBVideoProvider *thiz, DFBVideoProviderStatus *ret_status ); DFBResult (*SeekTo) ( IDirectFBVideoProvider *thiz, double seconds ); DFBResult (*GetPos) ( IDirectFBVideoProvider *thiz, double *ret_seconds ); DFBResult (*GetLength) ( IDirectFBVideoProvider *thiz, double *ret_seconds ); DFBResult (*GetColorAdjustment) ( IDirectFBVideoProvider *thiz, DFBColorAdjustment *ret_adj ); DFBResult (*SetColorAdjustment) ( IDirectFBVideoProvider *thiz, const DFBColorAdjustment *adj ); DFBResult (*SendEvent) ( IDirectFBVideoProvider *thiz, const DFBEvent *event ); DFBResult (*SetPlaybackFlags) ( IDirectFBVideoProvider *thiz, DFBVideoProviderPlaybackFlags flags ); DFBResult (*SetSpeed) ( IDirectFBVideoProvider *thiz, double multiplier ); DFBResult (*GetSpeed) ( IDirectFBVideoProvider *thiz, double *ret_multiplier ); DFBResult (*SetVolume) ( IDirectFBVideoProvider *thiz, float level ); DFBResult (*GetVolume) ( IDirectFBVideoProvider *thiz, float *ret_level ); DFBResult (*SetStreamAttributes) ( IDirectFBVideoProvider *thiz, DFBStreamAttributes attr ); DFBResult (*SetAudioOutputs) ( IDirectFBVideoProvider *thiz, DFBVideoProviderAudioUnits *audioUnits ); DFBResult (*GetAudioOutputs) ( IDirectFBVideoProvider *thiz, DFBVideoProviderAudioUnits *audioUnits ); DFBResult (*SetAudioDelay) ( IDirectFBVideoProvider *thiz, long delay ); DFBResult (*CreateEventBuffer) ( IDirectFBVideoProvider *thiz, IDirectFBEventBuffer **ret_buffer ); DFBResult (*AttachEventBuffer) ( IDirectFBVideoProvider *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*EnableEvents) ( IDirectFBVideoProvider *thiz, DFBVideoProviderEventType mask ); DFBResult (*DisableEvents) ( IDirectFBVideoProvider *thiz, DFBVideoProviderEventType mask ); DFBResult (*DetachEventBuffer) ( IDirectFBVideoProvider *thiz, IDirectFBEventBuffer *buffer ); DFBResult (*GetBufferOccupancy) ( IDirectFBVideoProvider *thiz, DFBBufferOccupancy *ret_occ ); DFBResult (*SetBufferThresholds) ( IDirectFBVideoProvider *thiz, DFBBufferThresholds thresh ); DFBResult (*GetBufferThresholds) ( IDirectFBVideoProvider *thiz, DFBBufferThresholds *ret_thresh ); };
# 6567 "/usr/include/directfb/directfb.h"
struct
# 6745 "/usr/include/directfb/directfb.h"
 _IDirectFBDataBuffer
# 6567 "/usr/include/directfb/directfb.h"
 { void *priv; int magic; DirectResult (*AddRef)( IDirectFBDataBuffer *thiz ); DirectResult (*Release)( IDirectFBDataBuffer *thiz ); DFBResult (*Flush) ( IDirectFBDataBuffer *thiz ); DFBResult (*Finish) ( IDirectFBDataBuffer *thiz ); DFBResult (*SeekTo) ( IDirectFBDataBuffer *thiz, unsigned int offset ); DFBResult (*GetPosition) ( IDirectFBDataBuffer *thiz, unsigned int *ret_offset ); DFBResult (*GetLength) ( IDirectFBDataBuffer *thiz, unsigned int *ret_length ); DFBResult (*WaitForData) ( IDirectFBDataBuffer *thiz, unsigned int length ); DFBResult (*WaitForDataWithTimeout) ( IDirectFBDataBuffer *thiz, unsigned int length, unsigned int seconds, unsigned int milli_seconds ); DFBResult (*GetData) ( IDirectFBDataBuffer *thiz, unsigned int length, void *ret_data, unsigned int *ret_read ); DFBResult (*PeekData) ( IDirectFBDataBuffer *thiz, unsigned int length, int offset, void *ret_data, unsigned int *ret_read ); DFBResult (*HasData) ( IDirectFBDataBuffer *thiz ); DFBResult (*PutData) ( IDirectFBDataBuffer *thiz, const void *data, unsigned int length ); DFBResult (*CreateImageProvider) ( IDirectFBDataBuffer *thiz, IDirectFBImageProvider **interface ); DFBResult (*CreateVideoProvider) ( IDirectFBDataBuffer *thiz, IDirectFBVideoProvider **interface ); DFBResult (*CreateFont) ( IDirectFBDataBuffer *thiz, const DFBFontDescription *desc, IDirectFBFont **interface ); };

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpadded"
#define _LINUX_FB_H 


# 1 "/usr/include/inttypes.h" 1 3 4
# 24 "/usr/include/inttypes.h" 3 4
#define _INTTYPES_H 1
# 35 "/usr/include/inttypes.h" 3 4
typedef long int __gwchar_t;





#define ____gwchar_t_defined 1
# 53 "/usr/include/inttypes.h" 3 4
#define __PRI64_PREFIX "ll"
#define __PRIPTR_PREFIX 





#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
#define PRId64 __PRI64_PREFIX "d"

#define PRIdLEAST8 "d"
#define PRIdLEAST16 "d"
#define PRIdLEAST32 "d"
#define PRIdLEAST64 __PRI64_PREFIX "d"

#define PRIdFAST8 "d"
#define PRIdFAST16 __PRIPTR_PREFIX "d"
#define PRIdFAST32 __PRIPTR_PREFIX "d"
#define PRIdFAST64 __PRI64_PREFIX "d"


#define PRIi8 "i"
#define PRIi16 "i"
#define PRIi32 "i"
#define PRIi64 __PRI64_PREFIX "i"

#define PRIiLEAST8 "i"
#define PRIiLEAST16 "i"
#define PRIiLEAST32 "i"
#define PRIiLEAST64 __PRI64_PREFIX "i"

#define PRIiFAST8 "i"
#define PRIiFAST16 __PRIPTR_PREFIX "i"
#define PRIiFAST32 __PRIPTR_PREFIX "i"
#define PRIiFAST64 __PRI64_PREFIX "i"


#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
#define PRIo64 __PRI64_PREFIX "o"

#define PRIoLEAST8 "o"
#define PRIoLEAST16 "o"
#define PRIoLEAST32 "o"
#define PRIoLEAST64 __PRI64_PREFIX "o"

#define PRIoFAST8 "o"
#define PRIoFAST16 __PRIPTR_PREFIX "o"
#define PRIoFAST32 __PRIPTR_PREFIX "o"
#define PRIoFAST64 __PRI64_PREFIX "o"


#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
#define PRIu64 __PRI64_PREFIX "u"

#define PRIuLEAST8 "u"
#define PRIuLEAST16 "u"
#define PRIuLEAST32 "u"
#define PRIuLEAST64 __PRI64_PREFIX "u"

#define PRIuFAST8 "u"
#define PRIuFAST16 __PRIPTR_PREFIX "u"
#define PRIuFAST32 __PRIPTR_PREFIX "u"
#define PRIuFAST64 __PRI64_PREFIX "u"


#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
#define PRIx64 __PRI64_PREFIX "x"

#define PRIxLEAST8 "x"
#define PRIxLEAST16 "x"
#define PRIxLEAST32 "x"
#define PRIxLEAST64 __PRI64_PREFIX "x"

#define PRIxFAST8 "x"
#define PRIxFAST16 __PRIPTR_PREFIX "x"
#define PRIxFAST32 __PRIPTR_PREFIX "x"
#define PRIxFAST64 __PRI64_PREFIX "x"


#define PRIX8 "X"
#define PRIX16 "X"
#define PRIX32 "X"
#define PRIX64 __PRI64_PREFIX "X"

#define PRIXLEAST8 "X"
#define PRIXLEAST16 "X"
#define PRIXLEAST32 "X"
#define PRIXLEAST64 __PRI64_PREFIX "X"

#define PRIXFAST8 "X"
#define PRIXFAST16 __PRIPTR_PREFIX "X"
#define PRIXFAST32 __PRIPTR_PREFIX "X"
#define PRIXFAST64 __PRI64_PREFIX "X"



#define PRIdMAX __PRI64_PREFIX "d"
#define PRIiMAX __PRI64_PREFIX "i"
#define PRIoMAX __PRI64_PREFIX "o"
#define PRIuMAX __PRI64_PREFIX "u"
#define PRIxMAX __PRI64_PREFIX "x"
#define PRIXMAX __PRI64_PREFIX "X"



#define PRIdPTR __PRIPTR_PREFIX "d"
#define PRIiPTR __PRIPTR_PREFIX "i"
#define PRIoPTR __PRIPTR_PREFIX "o"
#define PRIuPTR __PRIPTR_PREFIX "u"
#define PRIxPTR __PRIPTR_PREFIX "x"
#define PRIXPTR __PRIPTR_PREFIX "X"





#define SCNd8 "hhd"
#define SCNd16 "hd"
#define SCNd32 "d"
#define SCNd64 __PRI64_PREFIX "d"

#define SCNdLEAST8 "hhd"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "d"
#define SCNdLEAST64 __PRI64_PREFIX "d"

#define SCNdFAST8 "hhd"
#define SCNdFAST16 __PRIPTR_PREFIX "d"
#define SCNdFAST32 __PRIPTR_PREFIX "d"
#define SCNdFAST64 __PRI64_PREFIX "d"


#define SCNi8 "hhi"
#define SCNi16 "hi"
#define SCNi32 "i"
#define SCNi64 __PRI64_PREFIX "i"

#define SCNiLEAST8 "hhi"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "i"
#define SCNiLEAST64 __PRI64_PREFIX "i"

#define SCNiFAST8 "hhi"
#define SCNiFAST16 __PRIPTR_PREFIX "i"
#define SCNiFAST32 __PRIPTR_PREFIX "i"
#define SCNiFAST64 __PRI64_PREFIX "i"


#define SCNu8 "hhu"
#define SCNu16 "hu"
#define SCNu32 "u"
#define SCNu64 __PRI64_PREFIX "u"

#define SCNuLEAST8 "hhu"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "u"
#define SCNuLEAST64 __PRI64_PREFIX "u"

#define SCNuFAST8 "hhu"
#define SCNuFAST16 __PRIPTR_PREFIX "u"
#define SCNuFAST32 __PRIPTR_PREFIX "u"
#define SCNuFAST64 __PRI64_PREFIX "u"


#define SCNo8 "hho"
#define SCNo16 "ho"
#define SCNo32 "o"
#define SCNo64 __PRI64_PREFIX "o"

#define SCNoLEAST8 "hho"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "o"
#define SCNoLEAST64 __PRI64_PREFIX "o"

#define SCNoFAST8 "hho"
#define SCNoFAST16 __PRIPTR_PREFIX "o"
#define SCNoFAST32 __PRIPTR_PREFIX "o"
#define SCNoFAST64 __PRI64_PREFIX "o"


#define SCNx8 "hhx"
#define SCNx16 "hx"
#define SCNx32 "x"
#define SCNx64 __PRI64_PREFIX "x"

#define SCNxLEAST8 "hhx"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "x"
#define SCNxLEAST64 __PRI64_PREFIX "x"

#define SCNxFAST8 "hhx"
#define SCNxFAST16 __PRIPTR_PREFIX "x"
#define SCNxFAST32 __PRIPTR_PREFIX "x"
#define SCNxFAST64 __PRI64_PREFIX "x"



#define SCNdMAX __PRI64_PREFIX "d"
#define SCNiMAX __PRI64_PREFIX "i"
#define SCNoMAX __PRI64_PREFIX "o"
#define SCNuMAX __PRI64_PREFIX "u"
#define SCNxMAX __PRI64_PREFIX "x"


#define SCNdPTR __PRIPTR_PREFIX "d"
#define SCNiPTR __PRIPTR_PREFIX "i"
#define SCNoPTR __PRIPTR_PREFIX "o"
#define SCNuPTR __PRIPTR_PREFIX "u"
#define SCNxPTR __PRIPTR_PREFIX "x"





# 288 "/usr/include/inttypes.h" 3 4
typedef struct
  {
    long long int quot;
    long long int rem;
  } imaxdiv_t;





extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
      __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern intmax_t strtoimax (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base) __attribute__ ((__nothrow__));


extern uintmax_t strtoumax (__const char *__restrict __nptr,
       char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__));


extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr,
      __gwchar_t **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__));


extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
       __gwchar_t ** __restrict __endptr, int __base)
     __attribute__ ((__nothrow__));
# 442 "/usr/include/inttypes.h" 3 4

# 8 "lib/fb" 2
typedef uint32_t __u32;
typedef uint16_t __u16;
typedef uint8_t __u8;



#define FB_MAJOR 29
#define FB_MAX 32



#define FBIOGET_VSCREENINFO 0x4600
#define FBIOPUT_VSCREENINFO 0x4601
#define FBIOGET_FSCREENINFO 0x4602
#define FBIOGETCMAP 0x4604
#define FBIOPUTCMAP 0x4605
#define FBIOPAN_DISPLAY 0x4606
#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor)




#define FBIOGET_CON2FBMAP 0x460F
#define FBIOPUT_CON2FBMAP 0x4610
#define FBIOBLANK 0x4611
#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
#define FBIO_ALLOC 0x4613
#define FBIO_FREE 0x4614
#define FBIOGET_GLYPH 0x4615
#define FBIOGET_HWCINFO 0x4616
#define FBIOPUT_MODEINFO 0x4617
#define FBIOGET_DISPINFO 0x4618


#define FB_TYPE_PACKED_PIXELS 0
#define FB_TYPE_PLANES 1
#define FB_TYPE_INTERLEAVED_PLANES 2
#define FB_TYPE_TEXT 3
#define FB_TYPE_VGA_PLANES 4

#define FB_AUX_TEXT_MDA 0
#define FB_AUX_TEXT_CGA 1
#define FB_AUX_TEXT_S3_MMIO 2
#define FB_AUX_TEXT_MGA_STEP16 3
#define FB_AUX_TEXT_MGA_STEP8 4

#define FB_AUX_VGA_PLANES_VGA4 0
#define FB_AUX_VGA_PLANES_CFB4 1
#define FB_AUX_VGA_PLANES_CFB8 2

#define FB_VISUAL_MONO01 0
#define FB_VISUAL_MONO10 1
#define FB_VISUAL_TRUECOLOR 2
#define FB_VISUAL_PSEUDOCOLOR 3
#define FB_VISUAL_DIRECTCOLOR 4
#define FB_VISUAL_STATIC_PSEUDOCOLOR 5

#define FB_ACCEL_NONE 0
#define FB_ACCEL_ATARIBLITT 1
#define FB_ACCEL_AMIGABLITT 2
#define FB_ACCEL_S3_TRIO64 3
#define FB_ACCEL_NCR_77C32BLT 4
#define FB_ACCEL_S3_VIRGE 5
#define FB_ACCEL_ATI_MACH64GX 6
#define FB_ACCEL_DEC_TGA 7
#define FB_ACCEL_ATI_MACH64CT 8
#define FB_ACCEL_ATI_MACH64VT 9
#define FB_ACCEL_ATI_MACH64GT 10
#define FB_ACCEL_SUN_CREATOR 11
#define FB_ACCEL_SUN_CGSIX 12
#define FB_ACCEL_SUN_LEO 13
#define FB_ACCEL_IMS_TWINTURBO 14
#define FB_ACCEL_3DLABS_PERMEDIA2 15
#define FB_ACCEL_MATROX_MGA2064W 16
#define FB_ACCEL_MATROX_MGA1064SG 17
#define FB_ACCEL_MATROX_MGA2164W 18
#define FB_ACCEL_MATROX_MGA2164W_AGP 19
#define FB_ACCEL_MATROX_MGAG100 20
#define FB_ACCEL_MATROX_MGAG200 21
#define FB_ACCEL_SUN_CG14 22
#define FB_ACCEL_SUN_BWTWO 23
#define FB_ACCEL_SUN_CGTHREE 24
#define FB_ACCEL_SUN_TCX 25
#define FB_ACCEL_MATROX_MGAG400 26
#define FB_ACCEL_NV3 27
#define FB_ACCEL_NV4 28
#define FB_ACCEL_NV5 29
#define FB_ACCEL_CT_6555x 30
#define FB_ACCEL_3DFX_BANSHEE 31
#define FB_ACCEL_ATI_RAGE128 32
#define FB_ACCEL_IGS_CYBER2000 33
#define FB_ACCEL_IGS_CYBER2010 34
#define FB_ACCEL_IGS_CYBER5000 35
#define FB_ACCEL_SIS_GLAMOUR 36
#define FB_ACCEL_3DLABS_PERMEDIA3 37
#define FB_ACCEL_ATI_RADEON 38
#define FB_ACCEL_I810 39
#define FB_ACCEL_SIS_GLAMOUR_2 40
#define FB_ACCEL_SIS_XABRE 41
#define FB_ACCEL_I830 42
#define FB_ACCEL_NV_10 43
#define FB_ACCEL_NV_20 44
#define FB_ACCEL_NV_30 45
#define FB_ACCEL_NV_40 46
#define FB_ACCEL_XGI_VOLARI_V 47
#define FB_ACCEL_XGI_VOLARI_Z 48
#define FB_ACCEL_NEOMAGIC_NM2070 90
#define FB_ACCEL_NEOMAGIC_NM2090 91
#define FB_ACCEL_NEOMAGIC_NM2093 92
#define FB_ACCEL_NEOMAGIC_NM2097 93
#define FB_ACCEL_NEOMAGIC_NM2160 94
#define FB_ACCEL_NEOMAGIC_NM2200 95
#define FB_ACCEL_NEOMAGIC_NM2230 96
#define FB_ACCEL_NEOMAGIC_NM2360 97
#define FB_ACCEL_NEOMAGIC_NM2380 98

#define FB_ACCEL_SAVAGE4 0x80
#define FB_ACCEL_SAVAGE3D 0x81
#define FB_ACCEL_SAVAGE3D_MV 0x82
#define FB_ACCEL_SAVAGE2000 0x83
#define FB_ACCEL_SAVAGE_MX_MV 0x84
#define FB_ACCEL_SAVAGE_MX 0x85
#define FB_ACCEL_SAVAGE_IX_MV 0x86
#define FB_ACCEL_SAVAGE_IX 0x87
#define FB_ACCEL_PROSAVAGE_PM 0x88
#define FB_ACCEL_PROSAVAGE_KM 0x89
#define FB_ACCEL_S3TWISTER_P 0x8a
#define FB_ACCEL_S3TWISTER_K 0x8b
#define FB_ACCEL_SUPERSAVAGE 0x8c
#define FB_ACCEL_PROSAVAGE_DDR 0x8d
#define FB_ACCEL_PROSAVAGE_DDRK 0x8e

struct fb_fix_screeninfo {
 char id[16];
 unsigned long smem_start;

 __u32 smem_len;
 __u32 type;
 __u32 type_aux;
 __u32 visual;
 __u16 xpanstep;
 __u16 ypanstep;
 __u16 ywrapstep;
 __u32 line_length;
 unsigned long mmio_start;

 __u32 mmio_len;
 __u32 accel;

 __u16 reserved[3];
};







struct fb_bitfield {
 __u32 offset;
 __u32 length;
 __u32 msb_right;

};

#define FB_NONSTD_HAM 1

#define FB_ACTIVATE_NOW 0
#define FB_ACTIVATE_NXTOPEN 1
#define FB_ACTIVATE_TEST 2
#define FB_ACTIVATE_MASK 15

#define FB_ACTIVATE_VBL 16
#define FB_CHANGE_CMAP_VBL 32
#define FB_ACTIVATE_ALL 64
#define FB_ACTIVATE_FORCE 128
#define FB_ACTIVATE_INV_MODE 256

#define FB_ACCELF_TEXT 1

#define FB_SYNC_HOR_HIGH_ACT 1
#define FB_SYNC_VERT_HIGH_ACT 2
#define FB_SYNC_EXT 4
#define FB_SYNC_COMP_HIGH_ACT 8
#define FB_SYNC_BROADCAST 16


#define FB_SYNC_ON_GREEN 32

#define FB_VMODE_NONINTERLACED 0
#define FB_VMODE_INTERLACED 1
#define FB_VMODE_DOUBLE 2
#define FB_VMODE_MASK 255

#define FB_VMODE_YWRAP 256
#define FB_VMODE_SMOOTH_XPAN 512
#define FB_VMODE_CONUPDATE 512




#define FB_ROTATE_UR 0
#define FB_ROTATE_CW 1
#define FB_ROTATE_UD 2
#define FB_ROTATE_CCW 3

#define PICOS2KHZ(a) (1000000000UL/(a))
#define KHZ2PICOS(a) (1000000000UL/(a))

struct fb_var_screeninfo {
 __u32 xres;
 __u32 yres;
 __u32 xres_virtual;
 __u32 yres_virtual;
 __u32 xoffset;
 __u32 yoffset;

 __u32 bits_per_pixel;
 __u32 grayscale;

 struct fb_bitfield red;
 struct fb_bitfield green;
 struct fb_bitfield blue;
 struct fb_bitfield transp;

 __u32 nonstd;

 __u32 activate;

 __u32 height;
 __u32 width;

 __u32 accel_flags;


 __u32 pixclock;
 __u32 left_margin;
 __u32 right_margin;
 __u32 upper_margin;
 __u32 lower_margin;
 __u32 hsync_len;
 __u32 vsync_len;
 __u32 sync;
 __u32 vmode;
 __u32 rotate;
 __u32 reserved[5];
};

struct fb_cmap {
 __u32 start;
 __u32 len;
 __u16 *red;
 __u16 *green;
 __u16 *blue;
 __u16 *transp;
};

struct fb_con2fbmap {
 __u32 console;
 __u32 framebuffer;
};


#define VESA_NO_BLANKING 0
#define VESA_VSYNC_SUSPEND 1
#define VESA_HSYNC_SUSPEND 2
#define VESA_POWERDOWN 3


enum {

 FB_BLANK_UNBLANK = 0,


 FB_BLANK_NORMAL = 0 + 1,


 FB_BLANK_VSYNC_SUSPEND = 1 + 1,


 FB_BLANK_HSYNC_SUSPEND = 2 + 1,


 FB_BLANK_POWERDOWN = 3 + 1
};

#define FB_VBLANK_VBLANKING 0x001
#define FB_VBLANK_HBLANKING 0x002
#define FB_VBLANK_HAVE_VBLANK 0x004
#define FB_VBLANK_HAVE_HBLANK 0x008
#define FB_VBLANK_HAVE_COUNT 0x010
#define FB_VBLANK_HAVE_VCOUNT 0x020
#define FB_VBLANK_HAVE_HCOUNT 0x040
#define FB_VBLANK_VSYNCING 0x080
#define FB_VBLANK_HAVE_VSYNC 0x100

struct fb_vblank {
 __u32 flags;
 __u32 count;
 __u32 vcount;
 __u32 hcount;
 __u32 reserved[4];
};


#define ROP_COPY 0
#define ROP_XOR 1

struct fb_copyarea {
 __u32 dx;
 __u32 dy;
 __u32 width;
 __u32 height;
 __u32 sx;
 __u32 sy;
};

struct fb_fillrect {
 __u32 dx;
 __u32 dy;
 __u32 width;
 __u32 height;
 __u32 color;
 __u32 rop;
};

struct fb_image {
 __u32 dx;
 __u32 dy;
 __u32 width;
 __u32 height;
 __u32 fg_color;
 __u32 bg_color;
 __u8 depth;
 const char *data;
 struct fb_cmap cmap;
};





#define FB_CUR_SETIMAGE 0x01
#define FB_CUR_SETPOS 0x02
#define FB_CUR_SETHOT 0x04
#define FB_CUR_SETCMAP 0x08
#define FB_CUR_SETSHAPE 0x10
#define FB_CUR_SETSIZE 0x20
#define FB_CUR_SETALL 0xFF

struct fbcurpos {
 __u16 x, y;
};

struct fb_cursor {
 __u16 set;
 __u16 enable;
 __u16 rop;
 const char *mask;
 struct fbcurpos hot;
 struct fb_image image;
};
# 378 "lib/fb"
#pragma GCC diagnostic pop
# 1 "lib/einkfb" 1

#define _EINKFB_H 

#define EINK_1BPP 1
#define EINK_2BPP 2
#define EINK_4BPP 4
#define EINK_8BPP 8
#define EINK_BPP_MAX EINK_8BPP

#define EINK_WHITE 0x00
#define EINK_BLACK 0xFF



#define eink_white(b) EINK_WHITE
#define eink_black(b) EINK_BLACK



#define eink_pixels(b,p) (p)

#define EINK_ORIENT_LANDSCAPE 1
#define EINK_ORIENT_PORTRAIT 0

#define BPP_SIZE(r,b) (((r)*(b))/8)
#define BPP_MAX(b) (1 << (b))

#define U_IN_RANGE(n,m,M) ((((n) == 0) && ((m) == 0)) || (((n) > (m)) && ((n) <= (M))))
#define IN_RANGE(n,m,M) (((n) >= (m)) && ((n) <= (M)))

#define ORIENTATION(x,y) (((y) > (x)) ? EINK_ORIENT_PORTRAIT : EINK_ORIENT_LANDSCAPE)

struct raw_image_t
{
    int xres,
        yres,
        bpp;

    unsigned char start[];
};
typedef struct raw_image_t raw_image_t;

struct image_t
{
    int xres,
        xlen,
        yres,
        bpp;

    unsigned char *start;
};
typedef struct image_t image_t;

#define INIT_IMAGE_T() { 0, 0, 0, 0, NULL }

enum splash_screen_type
{
# 67 "lib/einkfb"
    splash_screen_logo = 5,
# 85 "lib/einkfb"
    splash_screen_power_off_clear_screen = 16,


    splash_screen_shim_picture = 18,

    splash_screen_lowbatt,
    splash_screen_reboot,

    splash_screen_update_initial,
    splash_screen_update_success,
    splash_screen_update_failure,
    splash_screen_update_failure_no_wait,

    splash_screen_repair_needed,
    splash_screen_boot,

    splash_screen_invalid = -1
};
typedef enum splash_screen_type splash_screen_type;



#define splash_screen_usb_recovery_util ((splash_screen_type)8)

struct power_override_t
{
    u_int cmd;
    u_long arg;
};
typedef struct power_override_t power_override_t;

enum fx_type
{


    fx_mask = 11,
    fx_buf_is_mask = 14,

    fx_none = -1,



    fx_flash = 20,
    fx_invert = 21,

    fx_update_partial = 0,
    fx_update_full = 1
};
typedef enum fx_type fx_type;



#define UPDATE_AREA_FX(f) ((fx_mask == (f)) || (fx_buf_is_mask == (f)))






#define UPDATE_AREA_PART(f) ((fx_none == (f)) || (fx_update_partial == (f)))



#define UPDATE_AREA_FULL(f) (UPDATE_AREA_FX(f) || (fx_update_full == (f)))



#define UPDATE_AREA_MODE(f) (UPDATE_AREA_FULL(f) ? fx_update_full : fx_update_partial)





#define UPDATE_PART(f) (fx_update_partial == (f))

#define UPDATE_FULL(f) (fx_update_full == (f))

#define UPDATE_MODE(f) (UPDATE_FULL(f) ? fx_update_full : fx_update_partial)



struct rect_t
{




    int x1, y1, x2, y2;
};
typedef struct rect_t rect_t;

#define INIT_RECT_T() { 0, 0, 0, 0 }
#define MAX_EXCLUDE_RECTS 8

struct fx_t
{
    fx_type update_mode,
                which_fx;

    int num_exclude_rects;
    rect_t exclude_rects[8];
};
typedef struct fx_t fx_t;

#define INIT_FX_T() { fx_update_partial, fx_none, 0, { INIT_RECT_T(), INIT_RECT_T(), INIT_RECT_T(), INIT_RECT_T(), INIT_RECT_T(), INIT_RECT_T(), INIT_RECT_T(), INIT_RECT_T()} }
# 200 "lib/einkfb"
struct update_area_t
{




    int x1, y1,
                x2, y2;

    fx_type which_fx;

    __u8 *buffer;
};
typedef struct update_area_t update_area_t;

#define INIT_UPDATE_AREA_T() { 0, 0, 0, 0, fx_none, NULL }

struct progressbar_xy_t
{
    int x, y;
};
typedef struct progressbar_xy_t progressbar_xy_t;

enum screen_saver_t
{
    screen_saver_invalid = 0,
    screen_saver_valid
};
typedef enum screen_saver_t screen_saver_t;

enum orientation_t
{
    orientation_portrait,
    orientation_portrait_upside_down,
    orientation_landscape,
    orientation_landscape_upside_down
};
typedef enum orientation_t orientation_t;

#define num_orientations (orientation_landscape_upside_down + 1)

#define ORIENTATION_PORTRAIT(o) ((orientation_portrait == (o)) || (orientation_portrait_upside_down == (o)))


#define ORIENTATION_LANDSCAPE(o) ((orientation_landscape == (o)) || (orientation_landscape_upside_down == (o)))


#define ORIENTATION_SAME(o1,o2) ((ORIENTATION_PORTRAIT(o1) && ORIENTATION_PORTRAIT(o2)) || (ORIENTATION_LANDSCAPE(o1) && ORIENTATION_LANDSCAPE(o2)))



enum einkfb_events_t
{
    einkfb_event_update_display = 0,
    einkfb_event_update_display_area,

    einkfb_event_blank_display,
    einkfb_event_rotate_display,

    einkfb_event_null = -1
};
typedef enum einkfb_events_t einkfb_events_t;

struct einkfb_event_t
{
    einkfb_events_t event;

    fx_type update_mode;





    int x1, y1,
                    x2, y2;

    orientation_t orientation;
};
typedef struct einkfb_event_t einkfb_event_t;

enum reboot_behavior_t
{
    reboot_screen_asis,
    reboot_screen_clear,
    reboot_screen_splash
};
typedef enum reboot_behavior_t reboot_behavior_t;

enum progressbar_badge_t
{
    progressbar_badge_success,
    progressbar_badge_failure,

    progressbar_badge_none
};
typedef enum progressbar_badge_t progressbar_badge_t;

enum sleep_behavior_t
{
    sleep_behavior_allow_sleep,
    sleep_behavior_prevent_sleep
};
typedef enum sleep_behavior_t sleep_behavior_t;

#define EINK_FRAME_BUFFER "/dev/fb/0"

#define SIZEOF_EINK_EVENT sizeof(einkfb_event_t)
#define EINK_EVENTS "/dev/misc/eink_events"

#define EINK_ROTATE_FILE "/sys/devices/platform/eink_fb.0/send_fake_rotate"
#define EINK_ROTATE_FILE_LEN 1
#define ORIENT_PORTRAIT orientation_portrait
#define ORIENT_PORTRAIT_UPSIDE_DOWN orientation_portrait_upside_down
#define ORIENT_LANDSCAPE orientation_landscape
#define ORIENT_LANDSCAPE_UPSIDE_DOWN orientation_landscape_upside_down
#define ORIENT_ASIS (-1)

#define EINK_USID_FILE "/var/local/eink/usid"

#define EINK_CLEAR_SCREEN 0
#define EINK_CLEAR_BUFFER 1

#define FBIO_EINK_SCREEN_CLEAR FBIO_EINK_CLEAR_SCREEN, EINK_CLEAR_SCREEN
#define FBIO_EINK_BUFFER_CLEAR FBIO_EINK_CLEAR_SCREEN, EINK_CLEAR_BUFFER

#define FBIO_MIN_SCREEN splash_screen_powering_off
#define FBIO_MAX_SCREEN num_splash_screens
#define FBIO_SCREEN_IN_RANGE(s) ((FBIO_MIN_SCREEN <= (s)) && (FBIO_MAX_SCREEN > (s)))


#define FBIO_MAGIC_NUMBER 'F'



#define FBIO_EINK_UPDATE_DISPLAY _IO(FBIO_MAGIC_NUMBER, 0xdb)
#define FBIO_EINK_UPDATE_DISPLAY_AREA _IO(FBIO_MAGIC_NUMBER, 0xdd)

#define FBIO_EINK_RESTORE_DISPLAY _IO(FBIO_MAGIC_NUMBER, 0xef)

#define FBIO_EINK_SET_REBOOT_BEHAVIOR _IO(FBIO_MAGIC_NUMBER, 0xe9)
#define FBIO_EINK_GET_REBOOT_BEHAVIOR _IO(FBIO_MAGIC_NUMBER, 0xed)

#define FBIO_EINK_SET_DISPLAY_ORIENTATION _IO(FBIO_MAGIC_NUMBER, 0xf0)
#define FBIO_EINK_GET_DISPLAY_ORIENTATION _IO(FBIO_MAGIC_NUMBER, 0xf1)

#define FBIO_EINK_SET_SLEEP_BEHAVIOR _IO(FBIO_MAGIC_NUMBER, 0xf2)
#define FBIO_EINK_GET_SLEEP_BEHAVIOR _IO(FBIO_MAGIC_NUMBER, 0xf3)



#define FBIO_EINK_UPDATE_DISPLAY_FX _IO(FBIO_MAGIC_NUMBER, 0xe4)
#define FBIO_EINK_SPLASH_SCREEN _IO(FBIO_MAGIC_NUMBER, 0xdc)
#define FBIO_EINK_SPLASH_SCREEN_SLEEP _IO(FBIO_MAGIC_NUMBER, 0xe0)
#define FBIO_EINK_OFF_CLEAR_SCREEN _IO(FBIO_MAGIC_NUMBER, 0xdf)
#define FBIO_EINK_CLEAR_SCREEN _IO(FBIO_MAGIC_NUMBER, 0xe1)
#define FBIO_EINK_POWER_OVERRIDE _IO(FBIO_MAGIC_NUMBER, 0xe3)

#define FBIO_EINK_PROGRESSBAR _IO(FBIO_MAGIC_NUMBER, 0xea)
#define FBIO_EINK_PROGRESSBAR_SET_XY _IO(FBIO_MAGIC_NUMBER, 0xeb)
#define FBIO_EINK_PROGRESSBAR_BADGE _IO(FBIO_MAGIC_NUMBER, 0xec)
#define FBIO_EINK_PROGRESSBAR_BACKGROUND _IO(FBIO_MAGIC_NUMBER, 0xf4)
# 369 "lib/einkfb"
#define PROC_EINK_UPDATE_DISPLAY_CLS 0
#define PROC_EINK_UPDATE_DISPLAY_PART 1
#define PROC_EINK_UPDATE_DISPLAY_FULL 2
#define PROC_EINK_UPDATE_DISPLAY_AREA 3

#define PROC_EINK_UPDATE_DISPLAY_SCRN 5
#define PROC_EINK_UPDATE_DISPLAY_OVRD 6
#define PROC_EINK_UPDATE_DISPLAY_FX 7


#define PROC_EINK_SET_REBOOT_BEHAVIOR 10
#define PROC_EINK_SET_PROGRESSBAR_XY 11
#define PROC_EINK_UPDATE_DISPLAY_SCRN_SLP 12
#define PROC_EINK_PROGRESSBAR_BADGE 13
#define PROC_EINK_SET_DISPLAY_ORIENTATION 14
#define PROC_EINK_RESTORE_DISPLAY 15
#define PROC_EINK_SET_SLEEP_BEHAVIOR 16
#define PROC_EINK_PROGRESSBAR_BACKGROUND 17
#define PROC_EINK_UPDATE_DISPLAY_WHICH 18


#define PROC_EINK_GRAYSCALE_TEST 101



extern int fiona_eink_ioctl_stub(unsigned int cmd, unsigned long arg);

#define eink_sys_ioctl(cmd,arg) (get_fb_ioctl() ? (*get_fb_ioctl())((unsigned int)cmd, (unsigned long)arg) : fiona_eink_ioctl_stub((unsigned int)cmd, (unsigned long)arg))
# 1 "lib/swapvalues" 1
#define swapvalues(a,b) {*(a)^=*(b);*(b)^=*(a);*(a)^=*(b);}
typedef struct
{
 unsigned int xx;
 unsigned int yy;
} point_t;
typedef struct
{
 unsigned int xx;
 unsigned int yy;
 unsigned int xxx;
 unsigned int yyy;
} area_t;
typedef struct
{
unsigned int :18;
 unsigned int fg :4;
 unsigned int bg :4;
 unsigned int current :4;
 unsigned int nofg :1;
 unsigned int nobg :1;
} colors_t;
typedef struct
{
 char* path;
 unsigned int size;
 int ascender;
 int descender;
 int height;
} font_t;
typedef void(*timeoutfunction_t)();
typedef struct
{
 IDirectFB* directfb;
 IDirectFBSurface* eink;
 unsigned int* blitbuffer;
 int framebufferfd;
 char* framebuffer;
 area_t repaint;
 colors_t clr;
 IDirectFBFont* font;
 font_t fnt;
 unsigned int cursorvisible;
 point_t crs;
 struct
 {
  struct pollfd pfds[3];
  unsigned char shift;
  unsigned char Aa;
  unsigned char sym;
  unsigned char alt;
  int lastkeycode;
 } input;
 timeoutfunction_t timeoutfunction;
} fbtk_t;
fbtk_t fbtk;

void timeoutfunction(timeoutfunction_t _timeoutfunction);
void updatearea(unsigned int xx,unsigned int yy,unsigned int xxx,unsigned int yyy);
void repaint();
void repaintflash();
void repaintarea(unsigned int xx,unsigned int yy,unsigned int xxx,unsigned int yyy);
void _setcolor(unsigned char color);
void fgonly();
void bgonly();
void setfg(unsigned char color);
void setbg(unsigned char color);
void setcolors(colors_t clr);
void line(unsigned int xx,unsigned int yy,unsigned int xxx,unsigned int yyy);
void rectangle(unsigned int xx,unsigned int yy,unsigned int ww,unsigned int hh);
void point(unsigned int xx,unsigned int yy);
void renderimage(unsigned int xx,unsigned int yy,unsigned int ww,unsigned int hh,char* path);
void _fbinit();

 void
timeoutfunction(_timeoutfunction)
 timeoutfunction_t _timeoutfunction;
{
 fbtk.timeoutfunction = _timeoutfunction;
}
 void
updatearea(xx,yy,xxx,yyy)
 unsigned int xx;
 unsigned int yy;
 unsigned int xxx;
 unsigned int yyy;
{
 update_area_t data;
 data.x1 = xx;
 data.y1 = 40 + yy;
 data.x2 = 2 + xxx;
 if(599 < data.x2) data.x2 = 599;
 data.y2 = 42 + yyy;
 if(799 < data.y2) data.y2 = 799;
 data.which_fx = fx_update_partial;
 data.buffer = ((void *)0);
 ioctl(fbtk.framebufferfd,(((0U) << (((0 +8)+8)+14)) | ((('F')) << (0 +8)) | (((0xdd)) << 0) | ((0) << ((0 +8)+8))),&data);
}
 void
repaint()
{
 char* fb;
 unsigned int* blb;
 unsigned int xx,yy,xxx,yyy,aa,bb,cc;
 if(
   (-1u == fbtk.repaint.xx) || (-1u == fbtk.repaint.yy)
   || (0 == fbtk.repaint.xxx) || (0 == fbtk.repaint.yyy)
  )
  return;
 fb = fbtk.framebuffer;
 blb = fbtk.blitbuffer;
 xx = fbtk.repaint.xx; yy = fbtk.repaint.yy;
 xxx = fbtk.repaint.xxx; yyy = fbtk.repaint.yyy;
 aa = xx + (yy * 600);
 bb = xxx + (yy * 600);
 cc = yy;
 for(;;)
 {
  if( ! (aa % 2) )
   fb[aa / 2] = ((~blb[aa]) & 0xf0) | (fb[aa / 2] & 0x0f);
  else
   fb[aa / 2] = (((~blb[aa]) & 0xf0) >> 4) | (fb[aa / 2] & 0xf0);
  if(bb == aa)
  {
   if(yyy == cc)break;
   ++cc;
   aa = (xx + (cc * 600)) - 1;
   bb = xxx + (cc * 600);
  }
  ++aa;
 }
 updatearea(xx,yy,xxx,yyy);
 fbtk.repaint.xx = -1u; fbtk.repaint.yy = -1u;
 fbtk.repaint.xxx = 0; fbtk.repaint.yyy = 0;
}
 void
repaintflash()
{
 unsigned int xx,yy,xxx,yyy;
 if(
   (-1u == fbtk.repaint.xx) || (-1u == fbtk.repaint.yy)
   || (0 == fbtk.repaint.xxx) || (0 == fbtk.repaint.yyy)
  )
  return;
 xx = fbtk.repaint.xx; yy = fbtk.repaint.yy;
 xxx = fbtk.repaint.xxx; yyy = fbtk.repaint.yyy;
 xx += xx % 2;
 xx /= 2;
 xxx -= (1 + xxx) % 2;
 xxx /= 2;
 for(;;)
 {
  memset(
    &fbtk.framebuffer[(300 * yy) + xx]
    ,0xff
    ,1 + (xxx - xx)
    );
  if(fbtk.repaint.xx % 2)
   fbtk.framebuffer[(300 * yy) + (xx - 1)] |= 0xf;
  if((1 + fbtk.repaint.xxx) % 2)
   fbtk.framebuffer[(300 * yy) + (1 + xxx)] |= 0xf0;
  if(yyy == yy)break;
  ++yy;
 }
 updatearea(
   fbtk.repaint.xx
   ,fbtk.repaint.yy
   ,fbtk.repaint.xxx
   ,fbtk.repaint.yyy
   );
 usleep(4e5);
 repaint();
}
 void
repaintarea(xx,yy,xxx,yyy)
 unsigned int xx;
 unsigned int yy;
 unsigned int xxx;
 unsigned int yyy;
{
 if(xx > xxx) {*(&xx)^=*(&xxx);*(&xxx)^=*(&xx);*(&xx)^=*(&xxx);};
 if(yy > yyy) {*(&yy)^=*(&yyy);*(&yyy)^=*(&yy);*(&yy)^=*(&yyy);};
 if(xx < fbtk.repaint.xx) fbtk.repaint.xx = xx;
 if(yy < fbtk.repaint.yy) fbtk.repaint.yy = yy;
 if(xxx > fbtk.repaint.xxx) fbtk.repaint.xxx = xxx;
 if(yyy > fbtk.repaint.yyy) fbtk.repaint.yyy = yyy;
}
 void
_setcolor(color)
 unsigned char color;
{
 if(fbtk.clr.current == color) return;
 fbtk.clr.current = color;
 color = (color << 4) | color;
 fbtk.eink->SetColor(fbtk.eink,color,color,color,0xff);
}
 void
fgonly()
{
 fbtk.clr.nofg = 0;
 fbtk.clr.nobg = 1;
}
 void
bgonly()
{
 fbtk.clr.nofg = 1;
 fbtk.clr.nobg = 0;
}
 void
setfg(color)
 unsigned char color;
{
 fbtk.clr.nofg = 0;
 fbtk.clr.fg = color;
}
 void
setbg(color)
 unsigned char color;
{
 fbtk.clr.nobg = 0;
 fbtk.clr.bg = color;
}
 void
setcolors(clr)
 colors_t clr;
{
 unsigned char current;
 current = fbtk.clr.current;
 fbtk.clr = clr;
 fbtk.clr.current = current;
}
 void
line(xx,yy,xxx,yyy)
 unsigned int xx;
 unsigned int yy;
 unsigned int xxx;
 unsigned int yyy;
{
 if(fbtk.clr.nofg) return;
 _setcolor(fbtk.clr.fg);
 fbtk.eink->DrawLine(fbtk.eink,xx,yy,xxx,yyy);
 repaintarea(xx,yy,xxx,yyy);
}
 void
rectangle(xx,yy,ww,hh)
 unsigned int xx;
 unsigned int yy;
 unsigned int ww;
 unsigned int hh;
{
 if(( ! ww ) || ( ! hh )) return;
 if(fbtk.clr.nofg & fbtk.clr.nobg) return;
 if( ! fbtk.clr.nobg )
 {
  _setcolor(fbtk.clr.bg);
  fbtk.eink->FillRectangle(fbtk.eink,xx,yy,ww,hh);
 }
 if( ! fbtk.clr.nofg )
  if(
    fbtk.clr.nobg
    || ( ! (fbtk.clr.bg == fbtk.clr.fg) )
   )
  {
   _setcolor(fbtk.clr.fg);
   fbtk.eink->DrawRectangle(fbtk.eink,xx,yy,ww,hh);
  }
 repaintarea(xx,yy,xx + (ww - 1),yy + (hh - 1));
}
 void
point(xx,yy)
 unsigned int xx;
 unsigned int yy;
{
 if(fbtk.clr.nofg) return;
 fgonly();
 rectangle(xx,yy,1,1);
}
 void
renderimage(xx,yy,ww,hh,path)
 unsigned int xx;
 unsigned int yy;
 unsigned int ww;
 unsigned int hh;
 char* path;
{
 IDirectFBImageProvider* provider;
 DFBRectangle rect;
 if(( ! ww ) || ( ! hh )) return;
 fbtk.directfb->CreateImageProvider(
   fbtk.directfb
   ,path
   ,&provider
   );
 rect.x = xx;
 rect.y = yy;
 rect.w = ww;
 rect.h = hh;
 provider->RenderTo(provider,fbtk.eink,&rect);
 provider->Release(provider);
 repaintarea(xx,yy,xx + (ww - 1),yy + (hh - 1));
}
 void
fbstore(buffer)
 void* buffer;
{
 memcpy(buffer,fbtk.framebuffer,300 * 760);
}
 void
fbstore_(buffer)
 void* buffer;
{
 memcpy(fbtk.framebuffer,buffer,300 * 760);
 updatearea(0,0,599,759);
}
#define fbinit() {DirectFBInit(&argc,&argv);_fbinit();}
 void
_fbinit()
{
 static unsigned int blitbuffer[600 * 760];
 DFBSurfaceDescription einkdsc;
 fbtk.framebufferfd = open("/dev/fb0",02);
 fbtk.framebuffer
  = mmap(
    ((void *)0)
    ,300 * 800
    ,0x2,0x01
    ,fbtk.framebufferfd
    ,0
    );
 fbtk.framebuffer = &fbtk.framebuffer[300 * 40];
 fbstore(blitbuffer);
 DirectFBSetOption("no-vt",((void *)0));
 DirectFBSetOption("disable-module","linux_input");
 DirectFBSetOption("quiet",((void *)0));
 DirectFBCreate(&fbtk.directfb);
 fbtk.directfb->SetCooperativeLevel(
   fbtk.directfb
   ,DFSCL_FULLSCREEN
   );
 einkdsc.flags
  = DSDESC_CAPS|DSDESC_WIDTH|DSDESC_HEIGHT
  |DSDESC_PIXELFORMAT|DSDESC_PREALLOCATED;
 einkdsc.caps = 0;
 einkdsc.width = 600;
 einkdsc.height = 760;
 einkdsc.pixelformat = DSPF_ARGB;
 einkdsc.preallocated[0].data = blitbuffer;
 einkdsc.preallocated[0].pitch = 600 * 4;
 einkdsc.preallocated[1].data = blitbuffer;
 einkdsc.preallocated[1].pitch = 600 * 4;
 fbtk.directfb->CreateSurface(
   fbtk.directfb
   ,&einkdsc
   ,&fbtk.eink
   );
 fbtk.blitbuffer = blitbuffer;
 fbstore_(fbtk.blitbuffer);
 memset(fbtk.blitbuffer,0,sizeof(fbtk.blitbuffer));
 fbtk.repaint.xx = -1u; fbtk.repaint.yy = -1u;
 fbtk.input.pfds[0].fd = open("/dev/input/event0",02,0);
 fbtk.input.pfds[0].events = 0x001;
 fbtk.input.pfds[1].fd = open("/dev/input/event1",02,0);
 fbtk.input.pfds[1].events = 0x001;
 fbtk.input.pfds[2].fd = open("/dev/input/event2",02,0);
 fbtk.input.pfds[2].events = 0x001;
}

# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdarg.h" 1 3 4
# 31 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdarg.h" 3 4
#define _STDARG_H 
#define _ANSI_STDARG_H_ 

#undef __need___va_list
# 47 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdarg.h" 3 4
#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v,l) __builtin_va_arg(v,l)

#define va_copy(d,s) __builtin_va_copy(d,s)

#define __va_copy(d,s) __builtin_va_copy(d,s)
# 108 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include/stdarg.h" 3 4
#define _VA_LIST_ 


#define _VA_LIST 





#define _VA_LIST_T_H 


#define __va_list__ 



void setfont(char* fontpath,unsigned size);
unsigned xyglyph(unsigned xx,unsigned yy,unsigned character);
void _rendercursor(unsigned xx,unsigned yy);
void _cursor();
void cursorvisible();
void cursorvisible_();
void setcursor(unsigned xx,unsigned yy);
void glyph(unsigned character);
unsigned _xyprintf(unsigned xx,unsigned yy,char* format,va_list arguments);

 void
setfont(fontpath,size)
 char* fontpath;
 unsigned size;
{
 DFBFontDescription fdsc;
 if(((void *)0) == fontpath) return;
 if( ! (((void *)0) == fbtk.fnt.path) )
  if(fbtk.fnt.size == size)
   if( ! strcmp(fbtk.fnt.path,fontpath) )
    return;
 fbtk.fnt.path = fontpath;
 fbtk.fnt.size = size;
 fdsc.flags = DFDESC_HEIGHT;
 fdsc.height = size;
 for(;;)
 {
  if( ! (((void *)0) == fbtk.font) ) fbtk.font->Release(fbtk.font);
  fbtk.directfb->CreateFont(
    fbtk.directfb
    ,fontpath
    ,&fdsc
    ,&fbtk.font
    );
  fbtk.font->GetAscender(fbtk.font,&fbtk.fnt.ascender);
  fbtk.font->GetDescender(fbtk.font,&fbtk.fnt.descender);
  if(size > (unsigned) (fbtk.fnt.ascender - fbtk.fnt.descender))break;
  --fdsc.height;
 }
 fbtk.font->GetHeight(fbtk.font,&fbtk.fnt.height);
 fbtk.eink->SetFont(fbtk.eink,fbtk.font);
}
 unsigned
xyglyph(xx,yy,character)
 unsigned xx;
 unsigned yy;
 unsigned character;
{
 int advance;
 if(fbtk.clr.nofg) return 0;
 fbtk.font->GetGlyphExtents(fbtk.font,character,((void *)0),&advance);
 if( ! fbtk.clr.nobg )
 {
  _setcolor(fbtk.clr.bg);
  fbtk.eink->FillRectangle(
    fbtk.eink
    ,xx
    ,yy
    ,advance
    ,(fbtk.fnt.ascender - fbtk.fnt.descender)
    );
 }
 _setcolor(fbtk.clr.fg);
 fbtk.eink->DrawGlyph(fbtk.eink,character,xx,yy,DSTF_TOPLEFT);
 repaintarea(
   xx
   ,yy
   ,xx + (advance - 1)
   ,yy + ((fbtk.fnt.ascender - fbtk.fnt.descender) - 1)
   );
 return (unsigned) advance;
}
 void
_rendercursor(xx,yy)
 unsigned xx;
 unsigned yy;
{
 point(xx - 1,yy + 0);
 point(xx - 0,yy + 0);
 point(xx + 1,yy + 0);
 point(xx + 2,yy + 0);
 point(xx + 3,yy + 0);
 point(xx - 0,yy + 1);
 point(xx + 1,yy + 1);
 point(xx + 2,yy + 1);
 point(xx + 1,yy + 2);
}
 void
_cursor()
{
 static unsigned _cursorvisible = 0;
 static unsigned _cursorxx = 0;
 static unsigned _cursoryy = 0;
 colors_t clr;
 if(_cursorvisible == fbtk.cursorvisible)
 {
  if( ! _cursorvisible ) return;
  if(_cursorxx == fbtk.crs.xx)
   if(_cursoryy == fbtk.crs.yy)
    return;
 }
 clr = fbtk.clr;
 setfg(fbtk.clr.bg);
 if(_cursorvisible) if(_cursorxx) if(_cursoryy)
  _rendercursor(_cursorxx,_cursoryy);
 if(fbtk.clr.bg < 8) setfg(15); else setfg(0);
 if(fbtk.cursorvisible) if(fbtk.crs.xx) if(fbtk.crs.yy)
  _rendercursor(fbtk.crs.xx,fbtk.crs.yy);
 _cursorvisible = fbtk.cursorvisible;
 _cursorxx = fbtk.crs.xx;
 _cursoryy = fbtk.crs.yy;
 setcolors(clr);
}
 void
cursorvisible()
{
 fbtk.cursorvisible = 1;
 _cursor();
}
 void
cursorvisible_()
{
 fbtk.cursorvisible = 0;
 _cursor();
}
 void
setcursor(xx,yy)
 unsigned xx;
 unsigned yy;
{
 fbtk.crs.xx = xx;
 fbtk.crs.yy = yy;
 _cursor();
}
 void
glyph(character)
 unsigned character;
{
 fbtk.crs.xx
  += xyglyph(fbtk.crs.xx,fbtk.crs.yy,character);
 _cursor();
}
 unsigned
wwprintf(char* format,...)
{
 unsigned width,length,aa;
 va_list arguments;
 char buffer[1024];
 __builtin_va_start(arguments,format);
 length = vsnprintf(buffer,sizeof(buffer),format,arguments);
 __builtin_va_end(arguments);
 aa = 0;
 width = 0;
 for(;;)
 {
  int advance;
  if(length == aa)break;
  fbtk.font->GetGlyphExtents(
    fbtk.font
    ,buffer[aa]
    ,((void *)0)
    ,&advance
    );
  width += advance;
  ++aa;
 }
 return width;
}
 unsigned
_xyprintf(xx,yy,format,arguments)
 unsigned xx;
 unsigned yy;
 char* format;
 va_list arguments;
{
 char buffer[1024];
 unsigned length,aa,xxx;
 if(fbtk.clr.nofg) return 0;
 length = vsnprintf(buffer,sizeof(buffer),format,arguments);
 aa = 0;
 xxx = xx;
 for(;;)
 {
  if(length == aa)break;
  xxx += xyglyph(xxx,yy,buffer[aa]);
  ++aa;
 }
 return xxx - xx;
}
 unsigned
xyprintf(unsigned xx,unsigned yy,char* format,...)
{
 unsigned result;
 va_list arguments;
 __builtin_va_start(arguments,format);
 result = _xyprintf(xx,yy,format,arguments);
 __builtin_va_end(arguments);
 return result;
}
 unsigned
cprintf(char* format,...)
{
 unsigned result;
 va_list arguments;
 __builtin_va_start(arguments,format);
 result = _xyprintf(fbtk.crs.xx,fbtk.crs.yy,format,arguments);
 __builtin_va_end(arguments);
 return result;
}

# 1 "/usr/include/ctype.h" 1 3 4
# 25 "/usr/include/ctype.h" 3 4
#define _CTYPE_H 1





# 45 "/usr/include/ctype.h" 3 4
#define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))


enum
{
  _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
  _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
  _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
  _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
  _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
  _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
  _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
  _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
  _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
  _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
  _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
  _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
};
# 81 "/usr/include/ctype.h" 3 4
extern __const unsigned short int **__ctype_b_loc (void)
     __attribute__ ((__nothrow__)) __attribute__ ((__const));
extern __const __int32_t **__ctype_tolower_loc (void)
     __attribute__ ((__nothrow__)) __attribute__ ((__const));
extern __const __int32_t **__ctype_toupper_loc (void)
     __attribute__ ((__nothrow__)) __attribute__ ((__const));

#define __isctype(c,type) ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)


#define __isascii(c) (((c) & ~0x7f) == 0)
#define __toascii(c) ((c) & 0x7f)

#define __exctype(name) extern int name (int) __THROW







extern int isalnum (int) __attribute__ ((__nothrow__));
extern int isalpha (int) __attribute__ ((__nothrow__));
extern int iscntrl (int) __attribute__ ((__nothrow__));
extern int isdigit (int) __attribute__ ((__nothrow__));
extern int islower (int) __attribute__ ((__nothrow__));
extern int isgraph (int) __attribute__ ((__nothrow__));
extern int isprint (int) __attribute__ ((__nothrow__));
extern int ispunct (int) __attribute__ ((__nothrow__));
extern int isspace (int) __attribute__ ((__nothrow__));
extern int isupper (int) __attribute__ ((__nothrow__));
extern int isxdigit (int) __attribute__ ((__nothrow__));



extern int tolower (int __c) __attribute__ ((__nothrow__));


extern int toupper (int __c) __attribute__ ((__nothrow__));








extern int isblank (int) __attribute__ ((__nothrow__));






extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__));






extern int isascii (int __c) __attribute__ ((__nothrow__));



extern int toascii (int __c) __attribute__ ((__nothrow__));



extern int _toupper (int) __attribute__ ((__nothrow__));
extern int _tolower (int) __attribute__ ((__nothrow__));



#define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; }))
# 173 "/usr/include/ctype.h" 3 4
#define isalnum(c) __isctype((c), _ISalnum)
#define isalpha(c) __isctype((c), _ISalpha)
#define iscntrl(c) __isctype((c), _IScntrl)
#define isdigit(c) __isctype((c), _ISdigit)
#define islower(c) __isctype((c), _ISlower)
#define isgraph(c) __isctype((c), _ISgraph)
#define isprint(c) __isctype((c), _ISprint)
#define ispunct(c) __isctype((c), _ISpunct)
#define isspace(c) __isctype((c), _ISspace)
#define isupper(c) __isctype((c), _ISupper)
#define isxdigit(c) __isctype((c), _ISxdigit)


#define isblank(c) __isctype((c), _ISblank)
# 209 "/usr/include/ctype.h" 3 4
#define isascii(c) __isascii (c)
#define toascii(c) __toascii (c)

#define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)])
#define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)])
# 237 "/usr/include/ctype.h" 3 4
#define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)


#define __exctype_l(name) extern int name (int, __locale_t) __THROW






extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__));

extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__));



extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));


extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
# 281 "/usr/include/ctype.h" 3 4
#define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l))
#define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l))
#define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l))
#define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l))
#define __islower_l(c,l) __isctype_l((c), _ISlower, (l))
#define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l))
#define __isprint_l(c,l) __isctype_l((c), _ISprint, (l))
#define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l))
#define __isspace_l(c,l) __isctype_l((c), _ISspace, (l))
#define __isupper_l(c,l) __isctype_l((c), _ISupper, (l))
#define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l))

#define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))


#define __isascii_l(c,l) ((l), __isascii (c))
#define __toascii_l(c,l) ((l), __toascii (c))


#define isalnum_l(c,l) __isalnum_l ((c), (l))
#define isalpha_l(c,l) __isalpha_l ((c), (l))
#define iscntrl_l(c,l) __iscntrl_l ((c), (l))
#define isdigit_l(c,l) __isdigit_l ((c), (l))
#define islower_l(c,l) __islower_l ((c), (l))
#define isgraph_l(c,l) __isgraph_l ((c), (l))
#define isprint_l(c,l) __isprint_l ((c), (l))
#define ispunct_l(c,l) __ispunct_l ((c), (l))
#define isspace_l(c,l) __isspace_l ((c), (l))
#define isupper_l(c,l) __isupper_l ((c), (l))
#define isxdigit_l(c,l) __isxdigit_l ((c), (l))

#define isblank_l(c,l) __isblank_l ((c), (l))


#define isascii_l(c,l) __isascii_l ((c), (l))
#define toascii_l(c,l) __toascii_l ((c), (l))







# 1 "/usr/include/math.h" 1 3 4
# 26 "/usr/include/math.h" 3 4
#define _MATH_H 1







# 1 "/usr/include/bits/huge_val.h" 1 3 4
# 29 "/usr/include/bits/huge_val.h" 3 4
#define HUGE_VAL (__builtin_huge_val())
# 35 "/usr/include/math.h" 2 3 4

# 1 "/usr/include/bits/huge_valf.h" 1 3 4
# 29 "/usr/include/bits/huge_valf.h" 3 4
#define HUGE_VALF (__builtin_huge_valf())
# 37 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_vall.h" 1 3 4
# 27 "/usr/include/bits/huge_vall.h" 3 4
#define HUGE_VALL (__builtin_huge_vall())
# 38 "/usr/include/math.h" 2 3 4


# 1 "/usr/include/bits/inf.h" 1 3 4
# 27 "/usr/include/bits/inf.h" 3 4
#define INFINITY (__builtin_inff())
# 41 "/usr/include/math.h" 2 3 4


# 1 "/usr/include/bits/nan.h" 1 3 4
# 29 "/usr/include/bits/nan.h" 3 4
#define NAN (__builtin_nanf (""))
# 44 "/usr/include/math.h" 2 3 4



# 1 "/usr/include/bits/mathdef.h" 1 3 4
# 24 "/usr/include/bits/mathdef.h" 3 4
#define _MATH_H_MATHDEF 1
# 36 "/usr/include/bits/mathdef.h" 3 4
typedef long double float_t;

typedef long double double_t;




#define FP_ILOGB0 (-2147483647 - 1)
#define FP_ILOGBNAN (-2147483647 - 1)
# 48 "/usr/include/math.h" 2 3 4






#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args)

#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args)


#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib)

#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)


#define __MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW


#define _Mdouble_ double
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
#define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__));

extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__));

extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__));

extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__));


extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__));

extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__));

extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__));




extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__));

extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__));

extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__));




extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__))
                                                           ;





extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__));

extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__));

extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__));







extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__));


extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__));


extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__));


extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__));


extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__));


extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__));




extern double exp10 (double __x) __attribute__ ((__nothrow__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__));

extern double pow10 (double __x) __attribute__ ((__nothrow__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__));





extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__));


extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__));


extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__));






extern double exp2 (double __x) __attribute__ ((__nothrow__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__));


extern double log2 (double __x) __attribute__ ((__nothrow__)); extern double __log2 (double __x) __attribute__ ((__nothrow__));








extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__));


extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__));





extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__));






extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__));








extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__));




extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__));



extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__));





extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));






extern double nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__));
extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__));
extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__));
extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__));
extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__));
extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__));






extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__));
extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__));
extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__));






extern double tgamma (double) __attribute__ ((__nothrow__)); extern double __tgamma (double) __attribute__ ((__nothrow__));





extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__));






extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__));







extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__));


extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__));



extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__));



extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__));




extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__));



extern double nearbyint (double __x) __attribute__ ((__nothrow__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__));



extern double round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern double trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__));






extern long int lrint (double __x) __attribute__ ((__nothrow__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__));
extern long long int llrint (double __x) __attribute__ ((__nothrow__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__));



extern long int lround (double __x) __attribute__ ((__nothrow__)); extern long int __lround (double __x) __attribute__ ((__nothrow__));
extern long long int llround (double __x) __attribute__ ((__nothrow__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__));



extern double fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__));


extern double fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__));


extern double fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__));



extern int __fpclassify (double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));


extern int __signbit (double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));



extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__));








extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__));
# 72 "/usr/include/math.h" 2 3 4
#undef _Mdouble_
#undef _Mdouble_BEGIN_NAMESPACE
#undef _Mdouble_END_NAMESPACE
#undef __MATH_PRECNAME
# 84 "/usr/include/math.h" 3 4
#define _Mfloat_ float

#define _Mdouble_ _Mfloat_

#define __MATH_PRECNAME(name,r) name ##f ##r



#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
#define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__));

extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__));

extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__));

extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__));


extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__));

extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__));

extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__));




extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__));

extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__));

extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__));




extern void
 sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
 (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)); extern void
 __sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
 (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__))
                                                           ;





extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__));

extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__));

extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__));







extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__));


extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__));


extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__));


extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__));


extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__));


extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__));




extern float exp10f (float __x) __attribute__ ((__nothrow__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__));

extern float pow10f (float __x) __attribute__ ((__nothrow__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__));





extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__));


extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__));


extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__));






extern float exp2f (float __x) __attribute__ ((__nothrow__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__));


extern float log2f (float __x) __attribute__ ((__nothrow__)); extern float __log2f (float __x) __attribute__ ((__nothrow__));








extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__));


extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__));





extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__));






extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__));








extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__));




extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__));



extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__));





extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));






extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__));
extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__));
extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__));
extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__));
extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__));
extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__));






extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__));
extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__));
extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__));






extern float tgammaf (float) __attribute__ ((__nothrow__)); extern float __tgammaf (float) __attribute__ ((__nothrow__));





extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__));






extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__));







extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__));


extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__));



extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__));



extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__));




extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__));



extern float nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__));



extern float roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern float truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__));






extern long int lrintf (float __x) __attribute__ ((__nothrow__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__));
extern long long int llrintf (float __x) __attribute__ ((__nothrow__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__));



extern long int lroundf (float __x) __attribute__ ((__nothrow__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__));
extern long long int llroundf (float __x) __attribute__ ((__nothrow__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__));



extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__));


extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__));


extern float fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__));



extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));


extern int __signbitf (float __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));



extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__));








extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__));
# 95 "/usr/include/math.h" 2 3 4
#undef _Mdouble_
#undef _Mdouble_BEGIN_NAMESPACE
#undef _Mdouble_END_NAMESPACE
#undef __MATH_PRECNAME
# 131 "/usr/include/math.h" 3 4
#define _Mlong_double_ long double

#define _Mdouble_ _Mlong_double_

#define __MATH_PRECNAME(name,r) name ##l ##r



#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
#define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__));

extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__));

extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__));

extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__));


extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__));

extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__));

extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__));




extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__));

extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__));

extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__));




extern void
 sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
 (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)); extern void
 __sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
 (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__))
                                                           ;





extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__));

extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__));

extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__));







extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__));


extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__));


extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__));


extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__));


extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__));


extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__));




extern long double exp10l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__));

extern long double pow10l (long double __x) __attribute__ ((__nothrow__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__));





extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__));


extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__));


extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__));






extern long double exp2l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__));


extern long double log2l (long double __x) __attribute__ ((__nothrow__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__));








extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__));


extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__));





extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__));






extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__));








extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__));




extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__));



extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__));





extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));






extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__));





extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));


extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__));
extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__));
extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__));
extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__));
extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__));
extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__));






extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__));
extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__));
extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__));






extern long double tgammal (long double) __attribute__ ((__nothrow__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__));





extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__));






extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__));







extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__));


extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));

extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__));



extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__));



extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__));




extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__));



extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__));



extern long double roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));



extern long double truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__));




extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__));






extern long int lrintl (long double __x) __attribute__ ((__nothrow__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__));
extern long long int llrintl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__));



extern long int lroundl (long double __x) __attribute__ ((__nothrow__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__));
extern long long int llroundl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__));



extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__));


extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__));


extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__));



extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));


extern int __signbitl (long double __value) __attribute__ ((__nothrow__))
     __attribute__ ((__const__));



extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__));








extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__));
# 142 "/usr/include/math.h" 2 3 4
#undef _Mdouble_
#undef _Mdouble_BEGIN_NAMESPACE
#undef _Mdouble_END_NAMESPACE
#undef __MATH_PRECNAME




#undef __MATHDECL_1
#undef __MATHDECL
#undef __MATHCALL




extern int signgam;
# 198 "/usr/include/math.h" 3 4
enum
  {
    FP_NAN,
#define FP_NAN FP_NAN
    FP_INFINITE,
#define FP_INFINITE FP_INFINITE
    FP_ZERO,
#define FP_ZERO FP_ZERO
    FP_SUBNORMAL,
#define FP_SUBNORMAL FP_SUBNORMAL
    FP_NORMAL
#define FP_NORMAL FP_NORMAL
  };






#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : sizeof (x) == sizeof (double) ? __fpclassify (x) : __fpclassifyl (x))
# 229 "/usr/include/math.h" 3 4
#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) : sizeof (x) == sizeof (double) ? __signbit (x) : __signbitl (x))
# 241 "/usr/include/math.h" 3 4
#define isfinite(x) (sizeof (x) == sizeof (float) ? __finitef (x) : sizeof (x) == sizeof (double) ? __finite (x) : __finitel (x))







#define isnormal(x) (fpclassify (x) == FP_NORMAL)







#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) : sizeof (x) == sizeof (double) ? __isnan (x) : __isnanl (x))
# 269 "/usr/include/math.h" 3 4
#define isinf(x) (sizeof (x) == sizeof (float) ? __isinff (x) : sizeof (x) == sizeof (double) ? __isinf (x) : __isinfl (x))







#define MATH_ERRNO 1
#define MATH_ERREXCEPT 2





#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)






typedef enum
{
  _IEEE_ = -1,
  _SVID_,
  _XOPEN_,
  _POSIX_,
  _ISOC_
} _LIB_VERSION_TYPE;




extern _LIB_VERSION_TYPE _LIB_VERSION;
# 316 "/usr/include/math.h" 3 4
struct exception

  {
    int type;
    char *name;
    double arg1;
    double arg2;
    double retval;
  };




extern int matherr (struct exception *__exc);


#define X_TLOSS 1.41484755040568800000e+16


#define DOMAIN 1
#define SING 2
#define OVERFLOW 3
#define UNDERFLOW 4
#define TLOSS 5
#define PLOSS 6


#define HUGE 3.40282347e+38F
# 357 "/usr/include/math.h" 3 4
#define M_E 2.7182818284590452354
#define M_LOG2E 1.4426950408889634074
#define M_LOG10E 0.43429448190325182765
#define M_LN2 0.69314718055994530942
#define M_LN10 2.30258509299404568402
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
#define M_1_PI 0.31830988618379067154
#define M_2_PI 0.63661977236758134308
#define M_2_SQRTPI 1.12837916709551257390
#define M_SQRT2 1.41421356237309504880
#define M_SQRT1_2 0.70710678118654752440






#define M_El 2.7182818284590452353602874713526625L
#define M_LOG2El 1.4426950408889634073599246810018921L
#define M_LOG10El 0.4342944819032518276511289189166051L
#define M_LN2l 0.6931471805599453094172321214581766L
#define M_LN10l 2.3025850929940456840179914546843642L
#define M_PIl 3.1415926535897932384626433832795029L
#define M_PI_2l 1.5707963267948966192313216916397514L
#define M_PI_4l 0.7853981633974483096156608458198757L
#define M_1_PIl 0.3183098861837906715377675267450287L
#define M_2_PIl 0.6366197723675813430755350534900574L
#define M_2_SQRTPIl 1.1283791670955125738961589031215452L
#define M_SQRT2l 1.4142135623730950488016887242096981L
#define M_SQRT1_2l 0.7071067811865475244008443621048490L
# 406 "/usr/include/math.h" 3 4
#define isgreater(x,y) __builtin_isgreater(x, y)
#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y)
#define isless(x,y) __builtin_isless(x, y)
#define islessequal(x,y) __builtin_islessequal(x, y)
#define islessgreater(x,y) __builtin_islessgreater(x, y)
#define isunordered(u,v) __builtin_isunordered(u, v)
# 472 "/usr/include/math.h" 3 4

# 1 "/usr/include/linux/input.h" 1 3 4

#define _INPUT_H 
# 21 "/usr/include/linux/input.h" 3 4
struct input_event {
 struct timeval time;
 __u16 type;
 __u16 code;
 __s32 value;
};





#define EV_VERSION 0x010001





struct input_id {
 __u16 bustype;
 __u16 vendor;
 __u16 product;
 __u16 version;
};
# 64 "/usr/include/linux/input.h" 3 4
struct input_absinfo {
 __s32 value;
 __s32 minimum;
 __s32 maximum;
 __s32 fuzz;
 __s32 flat;
 __s32 resolution;
};
# 88 "/usr/include/linux/input.h" 3 4
struct input_keymap_entry {
#define INPUT_KEYMAP_BY_INDEX (1 << 0)
 __u8 flags;
 __u8 len;
 __u16 index;
 __u32 keycode;
 __u8 scancode[32];
};

#define EVIOCGVERSION _IOR('E', 0x01, int)
#define EVIOCGID _IOR('E', 0x02, struct input_id)
#define EVIOCGREP _IOR('E', 0x03, unsigned int[2])
#define EVIOCSREP _IOW('E', 0x03, unsigned int[2])

#define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2])
#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry)
#define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2])
#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry)

#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len)
#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len)
#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len)
#define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len)

#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len)
#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len)
#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len)
#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len)

#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len)
#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo)
#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo)

#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect))
#define EVIOCRMFF _IOW('E', 0x81, int)
#define EVIOCGEFFECTS _IOR('E', 0x84, int)

#define EVIOCGRAB _IOW('E', 0x90, int)





#define INPUT_PROP_POINTER 0x00
#define INPUT_PROP_DIRECT 0x01
#define INPUT_PROP_BUTTONPAD 0x02
#define INPUT_PROP_SEMI_MT 0x03

#define INPUT_PROP_MAX 0x1f
#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)





#define EV_SYN 0x00
#define EV_KEY 0x01
#define EV_REL 0x02
#define EV_ABS 0x03
#define EV_MSC 0x04
#define EV_SW 0x05
#define EV_LED 0x11
#define EV_SND 0x12
#define EV_REP 0x14
#define EV_FF 0x15
#define EV_PWR 0x16
#define EV_FF_STATUS 0x17
#define EV_MAX 0x1f
#define EV_CNT (EV_MAX+1)





#define SYN_REPORT 0
#define SYN_CONFIG 1
#define SYN_MT_REPORT 2
#define SYN_DROPPED 3
# 178 "/usr/include/linux/input.h" 3 4
#define KEY_RESERVED 0
#define KEY_ESC 1
#define KEY_1 2
#define KEY_2 3
#define KEY_3 4
#define KEY_4 5
#define KEY_5 6
#define KEY_6 7
#define KEY_7 8
#define KEY_8 9
#define KEY_9 10
#define KEY_0 11
#define KEY_MINUS 12
#define KEY_EQUAL 13
#define KEY_BACKSPACE 14
#define KEY_TAB 15
#define KEY_Q 16
#define KEY_W 17
#define KEY_E 18
#define KEY_R 19
#define KEY_T 20
#define KEY_Y 21
#define KEY_U 22
#define KEY_I 23
#define KEY_O 24
#define KEY_P 25
#define KEY_LEFTBRACE 26
#define KEY_RIGHTBRACE 27
#define KEY_ENTER 28
#define KEY_LEFTCTRL 29
#define KEY_A 30
#define KEY_S 31
#define KEY_D 32
#define KEY_F 33
#define KEY_G 34
#define KEY_H 35
#define KEY_J 36
#define KEY_K 37
#define KEY_L 38
#define KEY_SEMICOLON 39
#define KEY_APOSTROPHE 40
#define KEY_GRAVE 41
#define KEY_LEFTSHIFT 42
#define KEY_BACKSLASH 43
#define KEY_Z 44
#define KEY_X 45
#define KEY_C 46
#define KEY_V 47
#define KEY_B 48
#define KEY_N 49
#define KEY_M 50
#define KEY_COMMA 51
#define KEY_DOT 52
#define KEY_SLASH 53
#define KEY_RIGHTSHIFT 54
#define KEY_KPASTERISK 55
#define KEY_LEFTALT 56
#define KEY_SPACE 57
#define KEY_CAPSLOCK 58
#define KEY_F1 59
#define KEY_F2 60
#define KEY_F3 61
#define KEY_F4 62
#define KEY_F5 63
#define KEY_F6 64
#define KEY_F7 65
#define KEY_F8 66
#define KEY_F9 67
#define KEY_F10 68
#define KEY_NUMLOCK 69
#define KEY_SCROLLLOCK 70
#define KEY_KP7 71
#define KEY_KP8 72
#define KEY_KP9 73
#define KEY_KPMINUS 74
#define KEY_KP4 75
#define KEY_KP5 76
#define KEY_KP6 77
#define KEY_KPPLUS 78
#define KEY_KP1 79
#define KEY_KP2 80
#define KEY_KP3 81
#define KEY_KP0 82
#define KEY_KPDOT 83

#define KEY_ZENKAKUHANKAKU 85
#define KEY_102ND 86
#define KEY_F11 87
#define KEY_F12 88
#define KEY_RO 89
#define KEY_KATAKANA 90
#define KEY_HIRAGANA 91
#define KEY_HENKAN 92
#define KEY_KATAKANAHIRAGANA 93
#define KEY_MUHENKAN 94
#define KEY_KPJPCOMMA 95
#define KEY_KPENTER 96
#define KEY_RIGHTCTRL 97
#define KEY_KPSLASH 98
#define KEY_SYSRQ 99
#define KEY_RIGHTALT 100
#define KEY_LINEFEED 101
#define KEY_HOME 102
#define KEY_UP 103
#define KEY_PAGEUP 104
#define KEY_LEFT 105
#define KEY_RIGHT 106
#define KEY_END 107
#define KEY_DOWN 108
#define KEY_PAGEDOWN 109
#define KEY_INSERT 110
#define KEY_DELETE 111
#define KEY_MACRO 112
#define KEY_MUTE 113
#define KEY_VOLUMEDOWN 114
#define KEY_VOLUMEUP 115
#define KEY_POWER 116
#define KEY_KPEQUAL 117
#define KEY_KPPLUSMINUS 118
#define KEY_PAUSE 119
#define KEY_SCALE 120

#define KEY_KPCOMMA 121
#define KEY_HANGEUL 122
#define KEY_HANGUEL KEY_HANGEUL
#define KEY_HANJA 123
#define KEY_YEN 124
#define KEY_LEFTMETA 125
#define KEY_RIGHTMETA 126
#define KEY_COMPOSE 127

#define KEY_STOP 128
#define KEY_AGAIN 129
#define KEY_PROPS 130
#define KEY_UNDO 131
#define KEY_FRONT 132
#define KEY_COPY 133
#define KEY_OPEN 134
#define KEY_PASTE 135
#define KEY_FIND 136
#define KEY_CUT 137
#define KEY_HELP 138
#define KEY_MENU 139
#define KEY_CALC 140
#define KEY_SETUP 141
#define KEY_SLEEP 142
#define KEY_WAKEUP 143
#define KEY_FILE 144
#define KEY_SENDFILE 145
#define KEY_DELETEFILE 146
#define KEY_XFER 147
#define KEY_PROG1 148
#define KEY_PROG2 149
#define KEY_WWW 150
#define KEY_MSDOS 151
#define KEY_COFFEE 152
#define KEY_SCREENLOCK KEY_COFFEE
#define KEY_DIRECTION 153
#define KEY_CYCLEWINDOWS 154
#define KEY_MAIL 155
#define KEY_BOOKMARKS 156
#define KEY_COMPUTER 157
#define KEY_BACK 158
#define KEY_FORWARD 159
#define KEY_CLOSECD 160
#define KEY_EJECTCD 161
#define KEY_EJECTCLOSECD 162
#define KEY_NEXTSONG 163
#define KEY_PLAYPAUSE 164
#define KEY_PREVIOUSSONG 165
#define KEY_STOPCD 166
#define KEY_RECORD 167
#define KEY_REWIND 168
#define KEY_PHONE 169
#define KEY_ISO 170
#define KEY_CONFIG 171
#define KEY_HOMEPAGE 172
#define KEY_REFRESH 173
#define KEY_EXIT 174
#define KEY_MOVE 175
#define KEY_EDIT 176
#define KEY_SCROLLUP 177
#define KEY_SCROLLDOWN 178
#define KEY_KPLEFTPAREN 179
#define KEY_KPRIGHTPAREN 180
#define KEY_NEW 181
#define KEY_REDO 182

#define KEY_F13 183
#define KEY_F14 184
#define KEY_F15 185
#define KEY_F16 186
#define KEY_F17 187
#define KEY_F18 188
#define KEY_F19 189
#define KEY_F20 190
#define KEY_F21 191
#define KEY_F22 192
#define KEY_F23 193
#define KEY_F24 194

#define KEY_PLAYCD 200
#define KEY_PAUSECD 201
#define KEY_PROG3 202
#define KEY_PROG4 203
#define KEY_DASHBOARD 204
#define KEY_SUSPEND 205
#define KEY_CLOSE 206
#define KEY_PLAY 207
#define KEY_FASTFORWARD 208
#define KEY_BASSBOOST 209
#define KEY_PRINT 210
#define KEY_HP 211
#define KEY_CAMERA 212
#define KEY_SOUND 213
#define KEY_QUESTION 214
#define KEY_EMAIL 215
#define KEY_CHAT 216
#define KEY_SEARCH 217
#define KEY_CONNECT 218
#define KEY_FINANCE 219
#define KEY_SPORT 220
#define KEY_SHOP 221
#define KEY_ALTERASE 222
#define KEY_CANCEL 223
#define KEY_BRIGHTNESSDOWN 224
#define KEY_BRIGHTNESSUP 225
#define KEY_MEDIA 226

#define KEY_SWITCHVIDEOMODE 227

#define KEY_KBDILLUMTOGGLE 228
#define KEY_KBDILLUMDOWN 229
#define KEY_KBDILLUMUP 230

#define KEY_SEND 231
#define KEY_REPLY 232
#define KEY_FORWARDMAIL 233
#define KEY_SAVE 234
#define KEY_DOCUMENTS 235

#define KEY_BATTERY 236

#define KEY_BLUETOOTH 237
#define KEY_WLAN 238
#define KEY_UWB 239

#define KEY_UNKNOWN 240

#define KEY_VIDEO_NEXT 241
#define KEY_VIDEO_PREV 242
#define KEY_BRIGHTNESS_CYCLE 243
#define KEY_BRIGHTNESS_ZERO 244
#define KEY_DISPLAY_OFF 245

#define KEY_WIMAX 246
#define KEY_RFKILL 247



#define BTN_MISC 0x100
#define BTN_0 0x100
#define BTN_1 0x101
#define BTN_2 0x102
#define BTN_3 0x103
#define BTN_4 0x104
#define BTN_5 0x105
#define BTN_6 0x106
#define BTN_7 0x107
#define BTN_8 0x108
#define BTN_9 0x109

#define BTN_MOUSE 0x110
#define BTN_LEFT 0x110
#define BTN_RIGHT 0x111
#define BTN_MIDDLE 0x112
#define BTN_SIDE 0x113
#define BTN_EXTRA 0x114
#define BTN_FORWARD 0x115
#define BTN_BACK 0x116
#define BTN_TASK 0x117

#define BTN_JOYSTICK 0x120
#define BTN_TRIGGER 0x120
#define BTN_THUMB 0x121
#define BTN_THUMB2 0x122
#define BTN_TOP 0x123
#define BTN_TOP2 0x124
#define BTN_PINKIE 0x125
#define BTN_BASE 0x126
#define BTN_BASE2 0x127
#define BTN_BASE3 0x128
#define BTN_BASE4 0x129
#define BTN_BASE5 0x12a
#define BTN_BASE6 0x12b
#define BTN_DEAD 0x12f

#define BTN_GAMEPAD 0x130
#define BTN_A 0x130
#define BTN_B 0x131
#define BTN_C 0x132
#define BTN_X 0x133
#define BTN_Y 0x134
#define BTN_Z 0x135
#define BTN_TL 0x136
#define BTN_TR 0x137
#define BTN_TL2 0x138
#define BTN_TR2 0x139
#define BTN_SELECT 0x13a
#define BTN_START 0x13b
#define BTN_MODE 0x13c
#define BTN_THUMBL 0x13d
#define BTN_THUMBR 0x13e

#define BTN_DIGI 0x140
#define BTN_TOOL_PEN 0x140
#define BTN_TOOL_RUBBER 0x141
#define BTN_TOOL_BRUSH 0x142
#define BTN_TOOL_PENCIL 0x143
#define BTN_TOOL_AIRBRUSH 0x144
#define BTN_TOOL_FINGER 0x145
#define BTN_TOOL_MOUSE 0x146
#define BTN_TOOL_LENS 0x147
#define BTN_TOUCH 0x14a
#define BTN_STYLUS 0x14b
#define BTN_STYLUS2 0x14c
#define BTN_TOOL_DOUBLETAP 0x14d
#define BTN_TOOL_TRIPLETAP 0x14e
#define BTN_TOOL_QUADTAP 0x14f

#define BTN_WHEEL 0x150
#define BTN_GEAR_DOWN 0x150
#define BTN_GEAR_UP 0x151

#define KEY_OK 0x160
#define KEY_SELECT 0x161
#define KEY_GOTO 0x162
#define KEY_CLEAR 0x163
#define KEY_POWER2 0x164
#define KEY_OPTION 0x165
#define KEY_INFO 0x166
#define KEY_TIME 0x167
#define KEY_VENDOR 0x168
#define KEY_ARCHIVE 0x169
#define KEY_PROGRAM 0x16a
#define KEY_CHANNEL 0x16b
#define KEY_FAVORITES 0x16c
#define KEY_EPG 0x16d
#define KEY_PVR 0x16e
#define KEY_MHP 0x16f
#define KEY_LANGUAGE 0x170
#define KEY_TITLE 0x171
#define KEY_SUBTITLE 0x172
#define KEY_ANGLE 0x173
#define KEY_ZOOM 0x174
#define KEY_MODE 0x175
#define KEY_KEYBOARD 0x176
#define KEY_SCREEN 0x177
#define KEY_PC 0x178
#define KEY_TV 0x179
#define KEY_TV2 0x17a
#define KEY_VCR 0x17b
#define KEY_VCR2 0x17c
#define KEY_SAT 0x17d
#define KEY_SAT2 0x17e
#define KEY_CD 0x17f
#define KEY_TAPE 0x180
#define KEY_RADIO 0x181
#define KEY_TUNER 0x182
#define KEY_PLAYER 0x183
#define KEY_TEXT 0x184
#define KEY_DVD 0x185
#define KEY_AUX 0x186
#define KEY_MP3 0x187
#define KEY_AUDIO 0x188
#define KEY_VIDEO 0x189
#define KEY_DIRECTORY 0x18a
#define KEY_LIST 0x18b
#define KEY_MEMO 0x18c
#define KEY_CALENDAR 0x18d
#define KEY_RED 0x18e
#define KEY_GREEN 0x18f
#define KEY_YELLOW 0x190
#define KEY_BLUE 0x191
#define KEY_CHANNELUP 0x192
#define KEY_CHANNELDOWN 0x193
#define KEY_FIRST 0x194
#define KEY_LAST 0x195
#define KEY_AB 0x196
#define KEY_NEXT 0x197
#define KEY_RESTART 0x198
#define KEY_SLOW 0x199
#define KEY_SHUFFLE 0x19a
#define KEY_BREAK 0x19b
#define KEY_PREVIOUS 0x19c
#define KEY_DIGITS 0x19d
#define KEY_TEEN 0x19e
#define KEY_TWEN 0x19f
#define KEY_VIDEOPHONE 0x1a0
#define KEY_GAMES 0x1a1
#define KEY_ZOOMIN 0x1a2
#define KEY_ZOOMOUT 0x1a3
#define KEY_ZOOMRESET 0x1a4
#define KEY_WORDPROCESSOR 0x1a5
#define KEY_EDITOR 0x1a6
#define KEY_SPREADSHEET 0x1a7
#define KEY_GRAPHICSEDITOR 0x1a8
#define KEY_PRESENTATION 0x1a9
#define KEY_DATABASE 0x1aa
#define KEY_NEWS 0x1ab
#define KEY_VOICEMAIL 0x1ac
#define KEY_ADDRESSBOOK 0x1ad
#define KEY_MESSENGER 0x1ae
#define KEY_DISPLAYTOGGLE 0x1af
#define KEY_SPELLCHECK 0x1b0
#define KEY_LOGOFF 0x1b1

#define KEY_DOLLAR 0x1b2
#define KEY_EURO 0x1b3

#define KEY_FRAMEBACK 0x1b4
#define KEY_FRAMEFORWARD 0x1b5
#define KEY_CONTEXT_MENU 0x1b6
#define KEY_MEDIA_REPEAT 0x1b7
#define KEY_10CHANNELSUP 0x1b8
#define KEY_10CHANNELSDOWN 0x1b9
#define KEY_IMAGES 0x1ba

#define KEY_DEL_EOL 0x1c0
#define KEY_DEL_EOS 0x1c1
#define KEY_INS_LINE 0x1c2
#define KEY_DEL_LINE 0x1c3

#define KEY_FN 0x1d0
#define KEY_FN_ESC 0x1d1
#define KEY_FN_F1 0x1d2
#define KEY_FN_F2 0x1d3
#define KEY_FN_F3 0x1d4
#define KEY_FN_F4 0x1d5
#define KEY_FN_F5 0x1d6
#define KEY_FN_F6 0x1d7
#define KEY_FN_F7 0x1d8
#define KEY_FN_F8 0x1d9
#define KEY_FN_F9 0x1da
#define KEY_FN_F10 0x1db
#define KEY_FN_F11 0x1dc
#define KEY_FN_F12 0x1dd
#define KEY_FN_1 0x1de
#define KEY_FN_2 0x1df
#define KEY_FN_D 0x1e0
#define KEY_FN_E 0x1e1
#define KEY_FN_F 0x1e2
#define KEY_FN_S 0x1e3
#define KEY_FN_B 0x1e4

#define KEY_BRL_DOT1 0x1f1
#define KEY_BRL_DOT2 0x1f2
#define KEY_BRL_DOT3 0x1f3
#define KEY_BRL_DOT4 0x1f4
#define KEY_BRL_DOT5 0x1f5
#define KEY_BRL_DOT6 0x1f6
#define KEY_BRL_DOT7 0x1f7
#define KEY_BRL_DOT8 0x1f8
#define KEY_BRL_DOT9 0x1f9
#define KEY_BRL_DOT10 0x1fa

#define KEY_NUMERIC_0 0x200
#define KEY_NUMERIC_1 0x201
#define KEY_NUMERIC_2 0x202
#define KEY_NUMERIC_3 0x203
#define KEY_NUMERIC_4 0x204
#define KEY_NUMERIC_5 0x205
#define KEY_NUMERIC_6 0x206
#define KEY_NUMERIC_7 0x207
#define KEY_NUMERIC_8 0x208
#define KEY_NUMERIC_9 0x209
#define KEY_NUMERIC_STAR 0x20a
#define KEY_NUMERIC_POUND 0x20b

#define KEY_CAMERA_FOCUS 0x210
#define KEY_WPS_BUTTON 0x211

#define KEY_TOUCHPAD_TOGGLE 0x212
#define KEY_TOUCHPAD_ON 0x213
#define KEY_TOUCHPAD_OFF 0x214

#define KEY_CAMERA_ZOOMIN 0x215
#define KEY_CAMERA_ZOOMOUT 0x216
#define KEY_CAMERA_UP 0x217
#define KEY_CAMERA_DOWN 0x218
#define KEY_CAMERA_LEFT 0x219
#define KEY_CAMERA_RIGHT 0x21a

#define BTN_TRIGGER_HAPPY 0x2c0
#define BTN_TRIGGER_HAPPY1 0x2c0
#define BTN_TRIGGER_HAPPY2 0x2c1
#define BTN_TRIGGER_HAPPY3 0x2c2
#define BTN_TRIGGER_HAPPY4 0x2c3
#define BTN_TRIGGER_HAPPY5 0x2c4
#define BTN_TRIGGER_HAPPY6 0x2c5
#define BTN_TRIGGER_HAPPY7 0x2c6
#define BTN_TRIGGER_HAPPY8 0x2c7
#define BTN_TRIGGER_HAPPY9 0x2c8
#define BTN_TRIGGER_HAPPY10 0x2c9
#define BTN_TRIGGER_HAPPY11 0x2ca
#define BTN_TRIGGER_HAPPY12 0x2cb
#define BTN_TRIGGER_HAPPY13 0x2cc
#define BTN_TRIGGER_HAPPY14 0x2cd
#define BTN_TRIGGER_HAPPY15 0x2ce
#define BTN_TRIGGER_HAPPY16 0x2cf
#define BTN_TRIGGER_HAPPY17 0x2d0
#define BTN_TRIGGER_HAPPY18 0x2d1
#define BTN_TRIGGER_HAPPY19 0x2d2
#define BTN_TRIGGER_HAPPY20 0x2d3
#define BTN_TRIGGER_HAPPY21 0x2d4
#define BTN_TRIGGER_HAPPY22 0x2d5
#define BTN_TRIGGER_HAPPY23 0x2d6
#define BTN_TRIGGER_HAPPY24 0x2d7
#define BTN_TRIGGER_HAPPY25 0x2d8
#define BTN_TRIGGER_HAPPY26 0x2d9
#define BTN_TRIGGER_HAPPY27 0x2da
#define BTN_TRIGGER_HAPPY28 0x2db
#define BTN_TRIGGER_HAPPY29 0x2dc
#define BTN_TRIGGER_HAPPY30 0x2dd
#define BTN_TRIGGER_HAPPY31 0x2de
#define BTN_TRIGGER_HAPPY32 0x2df
#define BTN_TRIGGER_HAPPY33 0x2e0
#define BTN_TRIGGER_HAPPY34 0x2e1
#define BTN_TRIGGER_HAPPY35 0x2e2
#define BTN_TRIGGER_HAPPY36 0x2e3
#define BTN_TRIGGER_HAPPY37 0x2e4
#define BTN_TRIGGER_HAPPY38 0x2e5
#define BTN_TRIGGER_HAPPY39 0x2e6
#define BTN_TRIGGER_HAPPY40 0x2e7


#define KEY_MIN_INTERESTING KEY_MUTE
#define KEY_MAX 0x2ff
#define KEY_CNT (KEY_MAX+1)





#define REL_X 0x00
#define REL_Y 0x01
#define REL_Z 0x02
#define REL_RX 0x03
#define REL_RY 0x04
#define REL_RZ 0x05
#define REL_HWHEEL 0x06
#define REL_DIAL 0x07
#define REL_WHEEL 0x08
#define REL_MISC 0x09
#define REL_MAX 0x0f
#define REL_CNT (REL_MAX+1)





#define ABS_X 0x00
#define ABS_Y 0x01
#define ABS_Z 0x02
#define ABS_RX 0x03
#define ABS_RY 0x04
#define ABS_RZ 0x05
#define ABS_THROTTLE 0x06
#define ABS_RUDDER 0x07
#define ABS_WHEEL 0x08
#define ABS_GAS 0x09
#define ABS_BRAKE 0x0a
#define ABS_HAT0X 0x10
#define ABS_HAT0Y 0x11
#define ABS_HAT1X 0x12
#define ABS_HAT1Y 0x13
#define ABS_HAT2X 0x14
#define ABS_HAT2Y 0x15
#define ABS_HAT3X 0x16
#define ABS_HAT3Y 0x17
#define ABS_PRESSURE 0x18
#define ABS_DISTANCE 0x19
#define ABS_TILT_X 0x1a
#define ABS_TILT_Y 0x1b
#define ABS_TOOL_WIDTH 0x1c

#define ABS_VOLUME 0x20

#define ABS_MISC 0x28

#define ABS_MT_SLOT 0x2f
#define ABS_MT_TOUCH_MAJOR 0x30
#define ABS_MT_TOUCH_MINOR 0x31
#define ABS_MT_WIDTH_MAJOR 0x32
#define ABS_MT_WIDTH_MINOR 0x33
#define ABS_MT_ORIENTATION 0x34
#define ABS_MT_POSITION_X 0x35
#define ABS_MT_POSITION_Y 0x36
#define ABS_MT_TOOL_TYPE 0x37
#define ABS_MT_BLOB_ID 0x38
#define ABS_MT_TRACKING_ID 0x39
#define ABS_MT_PRESSURE 0x3a
#define ABS_MT_DISTANCE 0x3b


#define ABS_MAX 0x3f
#define ABS_CNT (ABS_MAX+1)





#define SW_LID 0x00
#define SW_TABLET_MODE 0x01
#define SW_HEADPHONE_INSERT 0x02
#define SW_RFKILL_ALL 0x03

#define SW_RADIO SW_RFKILL_ALL
#define SW_MICROPHONE_INSERT 0x04
#define SW_DOCK 0x05
#define SW_LINEOUT_INSERT 0x06
#define SW_JACK_PHYSICAL_INSERT 0x07
#define SW_VIDEOOUT_INSERT 0x08
#define SW_CAMERA_LENS_COVER 0x09
#define SW_KEYPAD_SLIDE 0x0a
#define SW_FRONT_PROXIMITY 0x0b
#define SW_ROTATE_LOCK 0x0c
#define SW_MAX 0x0f
#define SW_CNT (SW_MAX+1)





#define MSC_SERIAL 0x00
#define MSC_PULSELED 0x01
#define MSC_GESTURE 0x02
#define MSC_RAW 0x03
#define MSC_SCAN 0x04
#define MSC_MAX 0x07
#define MSC_CNT (MSC_MAX+1)





#define LED_NUML 0x00
#define LED_CAPSL 0x01
#define LED_SCROLLL 0x02
#define LED_COMPOSE 0x03
#define LED_KANA 0x04
#define LED_SLEEP 0x05
#define LED_SUSPEND 0x06
#define LED_MUTE 0x07
#define LED_MISC 0x08
#define LED_MAIL 0x09
#define LED_CHARGING 0x0a
#define LED_MAX 0x0f
#define LED_CNT (LED_MAX+1)





#define REP_DELAY 0x00
#define REP_PERIOD 0x01
#define REP_MAX 0x01
#define REP_CNT (REP_MAX+1)





#define SND_CLICK 0x00
#define SND_BELL 0x01
#define SND_TONE 0x02
#define SND_MAX 0x07
#define SND_CNT (SND_MAX+1)





#define ID_BUS 0
#define ID_VENDOR 1
#define ID_PRODUCT 2
#define ID_VERSION 3

#define BUS_PCI 0x01
#define BUS_ISAPNP 0x02
#define BUS_USB 0x03
#define BUS_HIL 0x04
#define BUS_BLUETOOTH 0x05
#define BUS_VIRTUAL 0x06

#define BUS_ISA 0x10
#define BUS_I8042 0x11
#define BUS_XTKBD 0x12
#define BUS_RS232 0x13
#define BUS_GAMEPORT 0x14
#define BUS_PARPORT 0x15
#define BUS_AMIGA 0x16
#define BUS_ADB 0x17
#define BUS_I2C 0x18
#define BUS_HOST 0x19
#define BUS_GSC 0x1A
#define BUS_ATARI 0x1B
#define BUS_SPI 0x1C




#define MT_TOOL_FINGER 0
#define MT_TOOL_PEN 1
#define MT_TOOL_MAX 1




#define FF_STATUS_STOPPED 0x00
#define FF_STATUS_PLAYING 0x01
#define FF_STATUS_MAX 0x01
# 916 "/usr/include/linux/input.h" 3 4
struct ff_replay {
 __u16 length;
 __u16 delay;
};






struct ff_trigger {
 __u16 button;
 __u16 interval;
};
# 943 "/usr/include/linux/input.h" 3 4
struct ff_envelope {
 __u16 attack_length;
 __u16 attack_level;
 __u16 fade_length;
 __u16 fade_level;
};






struct ff_constant_effect {
 __s16 level;
 struct ff_envelope envelope;
};







struct ff_ramp_effect {
 __s16 start_level;
 __s16 end_level;
 struct ff_envelope envelope;
};
# 982 "/usr/include/linux/input.h" 3 4
struct ff_condition_effect {
 __u16 right_saturation;
 __u16 left_saturation;

 __s16 right_coeff;
 __s16 left_coeff;

 __u16 deadband;
 __s16 center;
};
# 1011 "/usr/include/linux/input.h" 3 4
struct ff_periodic_effect {
 __u16 waveform;
 __u16 period;
 __s16 magnitude;
 __s16 offset;
 __u16 phase;

 struct ff_envelope envelope;

 __u32 custom_len;
 __s16 *custom_data;
};
# 1032 "/usr/include/linux/input.h" 3 4
struct ff_rumble_effect {
 __u16 strong_magnitude;
 __u16 weak_magnitude;
};
# 1060 "/usr/include/linux/input.h" 3 4
struct ff_effect {
 __u16 type;
 __s16 id;
 __u16 direction;
 struct ff_trigger trigger;
 struct ff_replay replay;

 union {
  struct ff_constant_effect constant;
  struct ff_ramp_effect ramp;
  struct ff_periodic_effect periodic;
  struct ff_condition_effect condition[2];
  struct ff_rumble_effect rumble;
 } u;
};





#define FF_RUMBLE 0x50
#define FF_PERIODIC 0x51
#define FF_CONSTANT 0x52
#define FF_SPRING 0x53
#define FF_FRICTION 0x54
#define FF_DAMPER 0x55
#define FF_INERTIA 0x56
#define FF_RAMP 0x57

#define FF_EFFECT_MIN FF_RUMBLE
#define FF_EFFECT_MAX FF_RAMP





#define FF_SQUARE 0x58
#define FF_TRIANGLE 0x59
#define FF_SINE 0x5a
#define FF_SAW_UP 0x5b
#define FF_SAW_DOWN 0x5c
#define FF_CUSTOM 0x5d

#define FF_WAVEFORM_MIN FF_SQUARE
#define FF_WAVEFORM_MAX FF_CUSTOM





#define FF_GAIN 0x60
#define FF_AUTOCENTER 0x61

#define FF_MAX 0x7f
#define FF_CNT (FF_MAX+1)

void _modifierpress(unsigned char* value);
void _modifierpress_(unsigned char* value);
unsigned int _modifiernextkeypress(unsigned char* value);
void _release(int code);
unsigned int _charfromcode(int code);
unsigned int keypadfromkey(unsigned int key);
void inputexclusive();
void inputexclusive_();
unsigned int getkeydown();
unsigned int waitkeydown(int timeoutms);
 void
_modifierpress(value)
 unsigned char* value;
{
 switch(*value)
 {
  case 0: ++*value; break;
  case 2: ++*value; break;
  case 4: ++*value; break;
 }
}
 void
_modifierpress_(value)
 unsigned char* value;
{
 switch(*value)
 {
  case 1: ++*value; break;
  case 3: ++*value; break;
  case 5: *value = 0; break;
 }
}
 unsigned int
_modifiernextkeypress(value)
 unsigned char* value;
{
 if(*value % 2) return 1;
 switch(*value)
 {
  case 2: *value = 0; return 1;
  case 4: return 1;
 }
 return 0;
}
 void
_release(code)
 int code;
{
 switch(code)
 {
  case 0x2a:
   _modifierpress_(&fbtk.input.shift);
   break;
  case 0x38:
   if(fbtk.input.alt) fbtk.input.alt = 0;
   break;
  case 0xbe:
   _modifierpress_(&fbtk.input.Aa);
   break;
  case 0x7e:
   _modifierpress_(&fbtk.input.sym);
 }
}
 unsigned int
_charfromcode(code)
 int code;
{
 unsigned int result;
 switch(code)
 {
  case 0x2a: _modifierpress(&fbtk.input.shift); return 'S';
  case 0xbe: _modifierpress(&fbtk.input.Aa); return 'A';
  case 0x7e: _modifierpress(&fbtk.input.sym); return 'Y';
  case 0x38: fbtk.input.alt = 1; return 'T';

  case 0x39: result = ' '; break;
  case 0x66: result = 'H'; break;
  case 0x9e: result = 'B'; break;

  case 0x2c: result = 'z'; break;
  case 0x2d: result = 'x'; break;
  case 0x2e: result = 'c'; break;
  case 0x2f: result = 'v'; break;
  case 0x30: result = 'b'; break;
  case 0x31: result = 'n'; break;
  case 0x32: result = 'm'; break;
  case 0x34: result = '.'; break;
  case 0x1c: result = '\n'; break;

  case 0x1e: result = 'a'; break;
  case 0x1f: result = 's'; break;
  case 0x20: result = 'd'; break;
  case 0x21: result = 'f'; break;
  case 0x22: result = 'g'; break;
  case 0x23: result = 'h'; break;
  case 0x24: result = 'j'; break;
  case 0x25: result = 'k'; break;
  case 0x26: result = 'l'; break;
  case 0x0e: result = '\b'; break;

  case 0x10: result = 'q'; break;
  case 0x11: result = 'w'; break;
  case 0x12: result = 'e'; break;
  case 0x13: result = 'r'; break;
  case 0x14: result = 't'; break;
  case 0x15: result = 'y'; break;
  case 0x16: result = 'u'; break;
  case 0x17: result = 'i'; break;
  case 0x18: result = 'o'; break;
  case 0x19: result = 'p'; break;
  case 0x8b: result = 'M'; break;

  case 0x6d: result = 'N'; break;
  case 0x68: result = 'P'; break;

  case 0x2: result = 0x10000|'q'; break;
  case 0x3: result = 0x10000|'w'; break;
  case 0x4: result = 0x10000|'e'; break;
  case 0x5: result = 0x10000|'r'; break;
  case 0x6: result = 0x10000|'t'; break;
  case 0x7: result = 0x10000|'y'; break;
  case 0x8: result = 0x10000|'u'; break;
  case 0x9: result = 0x10000|'i'; break;
  case 0xa: result = 0x10000|'o'; break;
  case 0xb: result = 0x10000|'p'; break;

  case 0x72: result = '-'; break;
  case 0x73: result = '+'; break;

  case 0x6c: result = '^'; break;
  case 0x69: result = '>'; break;
  case 0xc2: result = '*'; break;
  case 0x6a: result = '<'; break;
  case 0x67: result = ','; break;
  default: return 0;
 }
 if(fbtk.input.alt) result |= 0x10000;
 if(_modifiernextkeypress(&fbtk.input.shift)) result |= 0x20000;
 if(_modifiernextkeypress(&fbtk.input.Aa)) result |= 0x40000;
 if(_modifiernextkeypress(&fbtk.input.sym)) result |= 0x80000;
 return result;
}
 unsigned int
keypadfromkey(key)
 unsigned int key;
{
 switch((char) key)
 {
  case ' ': return '0';

  case 'm': return '1';
  case 'n': return '2';
  case 'b': return '3';

  case 'j': return '4';
  case 'h': return '5';
  case 'g': return '6';

  case 'u': return '7';
  case 'y': return '8';
  case 't': return '9';

  case 'v': return '+';
  case 'f': return '-';
  case 'r': return '*';

  case 'c': return '/';
  case 'd': return '^';
  case 'e': return ')';

  case 'k': return ' ';
  case 'i': return '(';
 }
 return key;
}
 void
inputexclusive()
{
 ioctl(fbtk.input.pfds[0].fd,(((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))),1);
 ioctl(fbtk.input.pfds[1].fd,(((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))),1);
 ioctl(fbtk.input.pfds[2].fd,(((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))),1);
}
 void
inputexclusive_()
{
 ioctl(fbtk.input.pfds[0].fd,(((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))),0);
 ioctl(fbtk.input.pfds[1].fd,(((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))),0);
 ioctl(fbtk.input.pfds[2].fd,(((1U) << (((0 +8)+8)+14)) | ((('E')) << (0 +8)) | (((0x90)) << 0) | ((((sizeof(int)))) << ((0 +8)+8))),0);
}
 unsigned int
getkeydown()
{
 struct input_event event;
 unsigned int keycode;
 if( ! poll((fbtk.input.pfds),(sizeof(fbtk.input.pfds)/sizeof((fbtk.input.pfds)[0])),0) ) return 0;
 if(fbtk.input.pfds[0].revents)
  read(fbtk.input.pfds[0].fd,&event,sizeof(event));
 else if(fbtk.input.pfds[1].revents)
  read(fbtk.input.pfds[1].fd,&event,sizeof(event));
 else if(fbtk.input.pfds[2].revents)
  read(fbtk.input.pfds[2].fd,&event,sizeof(event));
 if(0x0 == event.value)
 {
  _release(event.code);
  return 0;
 }
 if(0x2 & event.value)
  switch(event.code)
  {
   case 0x2a: case 0xbe: case 0x7e: case 0x38:
    return 0;
  }
 keycode = _charfromcode(event.code);
 fbtk.input.lastkeycode = keycode;
 printf(
   "v. 0x%.2x c. 0x%.2x/0x%.4x (%c)\n"
   ,event.value
   ,event.code
   ,keycode
   ,(char) keycode
   );
 return keycode;
}
 unsigned int
waitkeydown(timeoutms)
 int timeoutms;
{
 poll((fbtk.input.pfds),(sizeof(fbtk.input.pfds)/sizeof((fbtk.input.pfds)[0])),timeoutms);
 return getkeydown();
}

# 1 "/usr/include/poll.h" 1 3 4


# 1 "/usr/include/sys/wait.h" 1 3 4
# 25 "/usr/include/sys/wait.h" 3 4
#define _SYS_WAIT_H 1






# 1 "/usr/include/sys/resource.h" 1 3 4
# 20 "/usr/include/sys/resource.h" 3 4
#define _SYS_RESOURCE_H 1




# 1 "/usr/include/bits/resource.h" 1 3 4
# 33 "/usr/include/bits/resource.h" 3 4
enum __rlimit_resource
{

  RLIMIT_CPU = 0,
#define RLIMIT_CPU RLIMIT_CPU


  RLIMIT_FSIZE = 1,
#define RLIMIT_FSIZE RLIMIT_FSIZE


  RLIMIT_DATA = 2,
#define RLIMIT_DATA RLIMIT_DATA


  RLIMIT_STACK = 3,
#define RLIMIT_STACK RLIMIT_STACK


  RLIMIT_CORE = 4,
#define RLIMIT_CORE RLIMIT_CORE





  __RLIMIT_RSS = 5,
#define RLIMIT_RSS __RLIMIT_RSS


  RLIMIT_NOFILE = 7,
  __RLIMIT_OFILE = RLIMIT_NOFILE,
#define RLIMIT_NOFILE RLIMIT_NOFILE
#define RLIMIT_OFILE __RLIMIT_OFILE


  RLIMIT_AS = 9,
#define RLIMIT_AS RLIMIT_AS


  __RLIMIT_NPROC = 6,
#define RLIMIT_NPROC __RLIMIT_NPROC


  __RLIMIT_MEMLOCK = 8,
#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK


  __RLIMIT_LOCKS = 10,
#define RLIMIT_LOCKS __RLIMIT_LOCKS


  __RLIMIT_SIGPENDING = 11,
#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING


  __RLIMIT_MSGQUEUE = 12,
#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE




  __RLIMIT_NICE = 13,
#define RLIMIT_NICE __RLIMIT_NICE



  __RLIMIT_RTPRIO = 14,
#define RLIMIT_RTPRIO __RLIMIT_RTPRIO

  __RLIMIT_NLIMITS = 15,
  __RLIM_NLIMITS = __RLIMIT_NLIMITS
#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
#define RLIM_NLIMITS __RLIM_NLIMITS
};



#define RLIM_INFINITY ((unsigned long int)(~0UL))





#define RLIM64_INFINITY 0xffffffffffffffffuLL



#define RLIM_SAVED_MAX RLIM_INFINITY
#define RLIM_SAVED_CUR RLIM_INFINITY




typedef __rlim_t rlim_t;




typedef __rlim64_t rlim64_t;


struct rlimit
  {

    rlim_t rlim_cur;

    rlim_t rlim_max;
  };


struct rlimit64
  {

    rlim64_t rlim_cur;

    rlim64_t rlim_max;
 };



enum __rusage_who
{

  RUSAGE_SELF = 0,
#define RUSAGE_SELF RUSAGE_SELF


  RUSAGE_CHILDREN = -1
#define RUSAGE_CHILDREN RUSAGE_CHILDREN


  ,

  RUSAGE_THREAD = 1
#define RUSAGE_THREAD RUSAGE_THREAD

#define RUSAGE_LWP RUSAGE_THREAD

};

#define __need_timeval 
# 1 "/usr/include/bits/time.h" 1 3 4
# 68 "/usr/include/bits/time.h" 3 4
#undef __need_timeval
# 176 "/usr/include/bits/resource.h" 2 3 4


struct rusage
  {

    struct timeval ru_utime;

    struct timeval ru_stime;

    long int ru_maxrss;


    long int ru_ixrss;

    long int ru_idrss;

    long int ru_isrss;


    long int ru_minflt;

    long int ru_majflt;

    long int ru_nswap;


    long int ru_inblock;

    long int ru_oublock;

    long int ru_msgsnd;

    long int ru_msgrcv;

    long int ru_nsignals;



    long int ru_nvcsw;


    long int ru_nivcsw;
  };


#define PRIO_MIN -20
#define PRIO_MAX 20



enum __priority_which
{
  PRIO_PROCESS = 0,
#define PRIO_PROCESS PRIO_PROCESS
  PRIO_PGRP = 1,
#define PRIO_PGRP PRIO_PGRP
  PRIO_USER = 2
#define PRIO_USER PRIO_USER
};







extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
      __const struct rlimit *__new_limit,
      struct rlimit *__old_limit) __attribute__ ((__nothrow__));
# 256 "/usr/include/bits/resource.h" 3 4
extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
        __const struct rlimit64 *__new_limit,
        struct rlimit64 *__old_limit) __attribute__ ((__nothrow__));




# 26 "/usr/include/sys/resource.h" 2 3 4













typedef enum __rlimit_resource __rlimit_resource_t;
typedef enum __rusage_who __rusage_who_t;
typedef enum __priority_which __priority_which_t;
# 51 "/usr/include/sys/resource.h" 3 4
extern int getrlimit (__rlimit_resource_t __resource,
        struct rlimit *__rlimits) __attribute__ ((__nothrow__));
# 62 "/usr/include/sys/resource.h" 3 4
extern int getrlimit64 (__rlimit_resource_t __resource,
   struct rlimit64 *__rlimits) __attribute__ ((__nothrow__));






extern int setrlimit (__rlimit_resource_t __resource,
        __const struct rlimit *__rlimits) __attribute__ ((__nothrow__));
# 82 "/usr/include/sys/resource.h" 3 4
extern int setrlimit64 (__rlimit_resource_t __resource,
   __const struct rlimit64 *__rlimits) __attribute__ ((__nothrow__));




extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__));





extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__));



extern int setpriority (__priority_which_t __which, id_t __who, int __prio)
     __attribute__ ((__nothrow__));


# 33 "/usr/include/sys/wait.h" 2 3 4
# 94 "/usr/include/sys/wait.h" 3 4
#define WCOREFLAG __WCOREFLAG
#define WCOREDUMP(status) __WCOREDUMP (__WAIT_INT (status))
#define W_EXITCODE(ret,sig) __W_EXITCODE (ret, sig)
#define W_STOPCODE(sig) __W_STOPCODE (sig)




typedef enum
{
  P_ALL,
  P_PID,
  P_PGID
} idtype_t;
# 116 "/usr/include/sys/wait.h" 3 4
extern __pid_t wait (__WAIT_STATUS __stat_loc);



#define WAIT_ANY (-1)
#define WAIT_MYPGRP 0
# 139 "/usr/include/sys/wait.h" 3 4
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);


#define __need_siginfo_t 
# 1 "/usr/include/bits/siginfo.h" 1 3 4
# 25 "/usr/include/bits/siginfo.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 19 "/usr/include/bits/wordsize.h" 3 4
#define __WORDSIZE 32
# 26 "/usr/include/bits/siginfo.h" 2 3 4
# 144 "/usr/include/sys/wait.h" 2 3 4
# 155 "/usr/include/sys/wait.h" 3 4
extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
     int __options);





struct rusage;






extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,
        struct rusage * __usage) __attribute__ ((__nothrow__));




extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
        struct rusage *__usage) __attribute__ ((__nothrow__));




char fbbuffer[300 * 800];
unsigned int percent = 0;
unsigned int restore = 0;
unsigned int paused = 0;
unsigned int ffwd = 0;
 void
repaintpercent()
{
 bgonly(); setbg(15);
 rectangle(0,756,600,4);
 setbg(0);
 rectangle(0,756,6 * percent,4);
 repaint();
}
 void
sendevent(mplayer,cmdpipe,key)
 pid_t mplayer;
 int cmdpipe;
 int key;
{
 repaintpercent();
 if( ! (0x10000 & key) ) return;
 switch((char) key)
 {
  case '\b':
   if(restore) fbstore_(fbbuffer);
   write(cmdpipe,("pt_step -1\n"),sizeof("pt_step -1\n") - 1);
   break;
  case 'l':
   write(cmdpipe,("pause\n"),sizeof("pause\n") - 1);
   paused = ! paused;
   break;
  case 'k':
   if(ffwd)
   {
    write(cmdpipe,("speed_set 1.0\n"),sizeof("speed_set 1.0\n") - 1);
    ffwd = 0;
   }
   else
   {
    write(cmdpipe,("speed_set 100.0\n"),sizeof("speed_set 100.0\n") - 1);
    ffwd = 1;
   }
   break;
  case 'j':
   if(restore) fbstore_(fbbuffer);
   write(cmdpipe,("pt_step 1\n"),sizeof("pt_step 1\n") - 1);
   break;
  case 'h':
   kill(mplayer,9);
 }
}
 void
updatestatus(statuspipe)
 int statuspipe;
{
 char* datum;
 unsigned int aa;
 char buffer[8192];
 buffer[read(statuspipe,(buffer),sizeof(buffer) - 1)] = 0;
 datum = buffer;
 if(
   ! strncmp(
    "ANS_PERCENT_POSITION="
    ,datum
    ,(sizeof("ANS_PERCENT_POSITION=")/sizeof(("ANS_PERCENT_POSITION=")[0])) - 1
    )
  )
 {
  datum = &datum[(sizeof("ANS_PERCENT_POSITION=")/sizeof(("ANS_PERCENT_POSITION=")[0])) - 1];
  percent = strtoul(datum,((void *)0),10);
  repaintpercent();
 }
 if( ! restore ) fbstore(fbbuffer);
 aa = 0;
 for(;;)
 {
  if( ! datum[aa] ) return;
  if('P' == datum[aa])
   if(!(strncmp( "Playing ",&datum[aa],(sizeof("Playing ")/sizeof(("Playing ")[0])) - 1)))break;
  ++aa;
 }
 aa += (sizeof("Playing ")/sizeof(("Playing ")[0])) - 1;
 datum = &datum[aa];
 aa = 0;
 for(;;)
 {
  if('\n' == datum[aa])break;
  ++aa;
 }
 datum[aa - 1] = 0;
 setfont("/usr/java/lib/fonts/Helvetica_LT_75_Bold.ttf",20);
 setfg(0); setbg(15);
 xyprintf((599 - 5) - wwprintf("%s",datum),733,"%s",datum);
 repaint();
 restore = 5;
}
 void
inputloop(mplayer,cmdpipe,statuspipe)
 pid_t mplayer;
 int cmdpipe;
 int statuspipe;
{
 struct pollfd pfd[4];
 memcpy(pfd,(fbtk.input.pfds),sizeof(fbtk.input.pfds));
 pfd[3].fd = statuspipe; pfd[3].events = 0x001;
 for(;;)
 {
  if( ! poll(pfd,4,1000) )
  {
   if(restore)
   {
    if(1 == restore) fbstore_(fbbuffer);
    --restore;
   }
   if( ! paused ) write(cmdpipe,("get_percent_pos\n"),sizeof("get_percent_pos\n") - 1);
   if( ! vfork() )
    execlp(
      "lipc-set-prop"
      ,"lipc-set-prop"
      ,"com.lab126.powerd"
      ,"abortSuspend"
      ,"1"
      ,((void *)0)
      );
   wait(((void *)0));
   if(1)continue;
  }
  if(waitpid(mplayer,((void *)0),1) == mplayer) exit(0);
  if(pfd[3].revents) updatestatus(statuspipe);
  if(pfd[0].revents|pfd[1].revents|pfd[2].revents)
   sendevent(mplayer,cmdpipe,getkeydown());
 }
}
int main(int __attribute__ ((unused)) argc,char __attribute__ ((unused))* argv[])
{
 char* mplayerargs[2048];
 int cmdpipe[2];
 int statuspipe[2];
 pid_t mplayer;
 int fd,aa;
 daemon(1,0);
 {DirectFBInit(&argc,&argv);_fbinit();};
 fd = open("/tmp/mplayer.pid",00,0644);
 if(0 < read(fd,&mplayer,sizeof(mplayer))) kill(mplayer,2);
 close(fd);
 mplayerargs[0] = "/mnt/us/system/mplayer";
 mplayerargs[1] = "-slave";
 mplayerargs[2] = "-quiet";
 aa = 1;
 for(;;)
 {
  if(argc == aa)break;
  mplayerargs[2 + aa] = argv[aa];
  ++aa;
 }
 mplayerargs[2 + aa] = ((void *)0);
 pipe(cmdpipe); pipe(statuspipe);
 mplayer = fork();
 if( ! mplayer )
 {
  close(cmdpipe[1]);
  close(statuspipe[0]);
  close(0); dup(cmdpipe[0]);
  close(1); dup(statuspipe[1]);
  execv(mplayerargs[0],mplayerargs);
 }
 close(cmdpipe[0]);
 close(statuspipe[1]);
 fd = open("/tmp/mplayer.pid",01|01000|0100,0644);
 write(fd,&mplayer,sizeof(mplayer));
 close(fd);
 inputloop(mplayer,cmdpipe[1],statuspipe[0]);
 return 0;
}
