Segmentation fault in cc1 Environment: System: Linux zjuk.sics.se 2.6.9-22.0.2.EL #1 Thu Jan 5 17:03:08 EST 2006 x86_64 x86_64 x86_64 GNU/Linux Architecture: x86_64 host: x86_64-unknown-linux-gnu build: x86_64-unknown-linux-gnu target: x86_64-unknown-linux-gnu configured with: /src/sicstus/install/src/gcc-4.1.1/configure --prefix=/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3 --enable-languages=c,c++ bash-3.00$ ( cd Emulator/x86_64-linux-glibc2.3 && /src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/bin/gcc -g -O2 -pipe -DDBG=1 -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -ffloat-store -ffloat-store -mieee-fp -Werror -Ispio -g3 -gdwarf-2 -Wmissing-declarations -Wstrict-prototypes -Wunused -Wall -Wdisabled-optimization -Wmissing-prototypes -Wnested-externs -Wpointer-arith -W -Wno-sign-compare -Wno-sequence-point -fno-common -fomit-frame-pointer -ftrapv -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fPIC -I. -I.. -c ../alloc.c -o alloc.o ) {standard input}: Assembler messages: {standard input}:12257: Warning: end of file not at end of a line; newline inserted {standard input}:12732: Error: unrecognized symbol type "fun" gcc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See <URL:http://gcc.gnu.org/bugs.html> for instructions. bash-3.00$ ( cd Emulator/x86_64-linux-glibc2.3 && /src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/bin/gcc -v -save-temps -g -O2 -pipe -DDBG=1 -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -ffloat-store -ffloat-store -mieee-fp -Werror -Ispio -g3 -gdwarf-2 -Wmissing-declarations -Wstrict-prototypes -Wunused -Wall -Wdisabled-optimization -Wmissing-prototypes -Wnested-externs -Wpointer-arith -W -Wno-sign-compare -Wno-sequence-point -fno-common -fomit-frame-pointer -ftrapv -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fPIC -I. -I.. -c ../alloc.c -o alloc.o ) gcc: warning: -pipe ignored because -save-temps specified Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /src/sicstus/install/src/gcc-4.1.1/configure --prefix=/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3 --enable-languages=c,c++ Thread model: posix gcc version 4.1.1 /src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/libexec/gcc/x86_64-unknown-linux-gnu/4.1.1/cc1 -E -quiet -v -Ispio -I. -I.. -dD -DDBG=1 -D_REENTRANT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 ../alloc.c -mieee-fp -mtune=k8 -Werror -Wmissing-declarations -Wstrict-prototypes -Wunused -Wall -Wdisabled-optimization -Wmissing-prototypes -Wnested-externs -Wpointer-arith -W -Wno-sign-compare -Wno-sequence-point -fno-strict-aliasing -ffloat-store -ffloat-store -fno-common -fomit-frame-pointer -ftrapv -fvisibility=hidden -fPIC -fworking-directory -O2 -fpch-preprocess -o alloc.i ignoring nonexistent directory "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../x86_64-unknown-linux-gnu/include" ignoring nonexistent directory "spio" #include "..." search starts here: #include <...> search starts here: . .. /usr/local/include /src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/include /src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include /usr/include End of search list. /src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/libexec/gcc/x86_64-unknown-linux-gnu/4.1.1/cc1 -fpreprocessed alloc.i -quiet -dumpbase alloc.c -mieee-fp -mtune=k8 -auxbase-strip alloc.o -g -g3 -gdwarf-2 -O2 -Werror -Wmissing-declarations -Wstrict-prototypes -Wunused -Wall -Wdisabled-optimization -Wmissing-prototypes -Wnested-externs -Wpointer-arith -W -Wno-sign-compare -Wno-sequence-point -version -fno-strict-aliasing -ffloat-store -ffloat-store -fno-common -fomit-frame-pointer -ftrapv -fvisibility=hidden -fPIC -o alloc.s GNU C version 4.1.1 (x86_64-unknown-linux-gnu) compiled by GNU C version 3.4.6 20060404 (Red Hat 3.4.6-3). GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128161 Compiler executable checksum: dd3eea1b248f080bf8a836853cbc4eab gcc: Internal error: Segmentation fault (program cc1) Please submit a full bug report. See <URL:http://gcc.gnu.org/bugs.html> for instructions. How-To-Repeat: # 1 "../alloc.c" # 1 "/home/perm/sicstus/sicstus4zjuk/Emulator/x86_64-linux-glibc2.3//" # 1 "<built-in>" #define __STDC__ 1 # 1 "<built-in>" #define __STDC_HOSTED__ 1 # 1 "<built-in>" #define __GNUC__ 4 # 1 "<built-in>" #define __GNUC_MINOR__ 1 # 1 "<built-in>" #define __GNUC_PATCHLEVEL__ 1 # 1 "<built-in>" #define __SIZE_TYPE__ long unsigned int # 1 "<built-in>" #define __PTRDIFF_TYPE__ long int # 1 "<built-in>" #define __WCHAR_TYPE__ int # 1 "<built-in>" #define __WINT_TYPE__ unsigned int # 1 "<built-in>" #define __INTMAX_TYPE__ long int # 1 "<built-in>" #define __UINTMAX_TYPE__ long unsigned int # 1 "<built-in>" #define __GXX_ABI_VERSION 1002 # 1 "<built-in>" #define __SCHAR_MAX__ 127 # 1 "<built-in>" #define __SHRT_MAX__ 32767 # 1 "<built-in>" #define __INT_MAX__ 2147483647 # 1 "<built-in>" #define __LONG_MAX__ 9223372036854775807L # 1 "<built-in>" #define __LONG_LONG_MAX__ 9223372036854775807LL # 1 "<built-in>" #define __WCHAR_MAX__ 2147483647 # 1 "<built-in>" #define __CHAR_BIT__ 8 # 1 "<built-in>" #define __INTMAX_MAX__ 9223372036854775807L # 1 "<built-in>" #define __FLT_EVAL_METHOD__ 0 # 1 "<built-in>" #define __FLT_RADIX__ 2 # 1 "<built-in>" #define __FLT_MANT_DIG__ 24 # 1 "<built-in>" #define __FLT_DIG__ 6 # 1 "<built-in>" #define __FLT_MIN_EXP__ (-125) # 1 "<built-in>" #define __FLT_MIN_10_EXP__ (-37) # 1 "<built-in>" #define __FLT_MAX_EXP__ 128 # 1 "<built-in>" #define __FLT_MAX_10_EXP__ 38 # 1 "<built-in>" #define __FLT_MAX__ 3.40282347e+38F # 1 "<built-in>" #define __FLT_MIN__ 1.17549435e-38F # 1 "<built-in>" #define __FLT_EPSILON__ 1.19209290e-7F # 1 "<built-in>" #define __FLT_DENORM_MIN__ 1.40129846e-45F # 1 "<built-in>" #define __FLT_HAS_INFINITY__ 1 # 1 "<built-in>" #define __FLT_HAS_QUIET_NAN__ 1 # 1 "<built-in>" #define __DBL_MANT_DIG__ 53 # 1 "<built-in>" #define __DBL_DIG__ 15 # 1 "<built-in>" #define __DBL_MIN_EXP__ (-1021) # 1 "<built-in>" #define __DBL_MIN_10_EXP__ (-307) # 1 "<built-in>" #define __DBL_MAX_EXP__ 1024 # 1 "<built-in>" #define __DBL_MAX_10_EXP__ 308 # 1 "<built-in>" #define __DBL_MAX__ 1.7976931348623157e+308 # 1 "<built-in>" #define __DBL_MIN__ 2.2250738585072014e-308 # 1 "<built-in>" #define __DBL_EPSILON__ 2.2204460492503131e-16 # 1 "<built-in>" #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 # 1 "<built-in>" #define __DBL_HAS_INFINITY__ 1 # 1 "<built-in>" #define __DBL_HAS_QUIET_NAN__ 1 # 1 "<built-in>" #define __LDBL_MANT_DIG__ 64 # 1 "<built-in>" #define __LDBL_DIG__ 18 # 1 "<built-in>" #define __LDBL_MIN_EXP__ (-16381) # 1 "<built-in>" #define __LDBL_MIN_10_EXP__ (-4931) # 1 "<built-in>" #define __LDBL_MAX_EXP__ 16384 # 1 "<built-in>" #define __LDBL_MAX_10_EXP__ 4932 # 1 "<built-in>" #define __DECIMAL_DIG__ 21 # 1 "<built-in>" #define __LDBL_MAX__ 1.18973149535723176502e+4932L # 1 "<built-in>" #define __LDBL_MIN__ 3.36210314311209350626e-4932L # 1 "<built-in>" #define __LDBL_EPSILON__ 1.08420217248550443401e-19L # 1 "<built-in>" #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L # 1 "<built-in>" #define __LDBL_HAS_INFINITY__ 1 # 1 "<built-in>" #define __LDBL_HAS_QUIET_NAN__ 1 # 1 "<built-in>" #define __REGISTER_PREFIX__ # 1 "<built-in>" #define __USER_LABEL_PREFIX__ # 1 "<built-in>" #define __VERSION__ "4.1.1" # 1 "<built-in>" #define _LP64 1 # 1 "<built-in>" #define __LP64__ 1 # 1 "<built-in>" #define __OPTIMIZE__ 1 # 1 "<built-in>" #define __FINITE_MATH_ONLY__ 0 # 1 "<built-in>" #define __amd64 1 # 1 "<built-in>" #define __amd64__ 1 # 1 "<built-in>" #define __x86_64 1 # 1 "<built-in>" #define __x86_64__ 1 # 1 "<built-in>" #define __tune_k8__ 1 # 1 "<built-in>" #define __MMX__ 1 # 1 "<built-in>" #define __SSE__ 1 # 1 "<built-in>" #define __SSE2__ 1 # 1 "<built-in>" #define __SSE_MATH__ 1 # 1 "<built-in>" #define __SSE2_MATH__ 1 # 1 "<built-in>" #define __k8 1 # 1 "<built-in>" #define __k8__ 1 # 1 "<built-in>" #define __gnu_linux__ 1 # 1 "<built-in>" #define __linux 1 # 1 "<built-in>" #define __linux__ 1 # 1 "<built-in>" #define linux 1 # 1 "<built-in>" #define __unix 1 # 1 "<built-in>" #define __unix__ 1 # 1 "<built-in>" #define unix 1 # 1 "<built-in>" #define __PIC__ 1 # 1 "<built-in>" #define __pic__ 1 # 1 "<built-in>" #define __ELF__ 1 # 1 "<command line>" #define DBG 1 # 1 "<command line>" #define _REENTRANT 1 # 1 "<command line>" #define _GNU_SOURCE 1 # 1 "<command line>" #define _FILE_OFFSET_BITS 64 # 1 "<command line>" #define _FORTIFY_SOURCE 2 # 1 "../alloc.c" # 1 "./config.h" 1 # 20 "./config.h" #define SP_PUBLIC_CONFIG_INCLUDED 1 #define SICSTUS_MAJOR_VERSION 4 #define SICSTUS_MINOR_VERSION 0 #define SICSTUS_REVISION_VERSION 0 #define SICSTUS_BETA_VERSION 6 #define SICSTUS_VERSION_STRING "4.0.0beta6" # 48 "./config.h" #define SICSTUS_VERSION (((((SICSTUS_MAJOR_VERSION)*100)+(SICSTUS_MINOR_VERSION))*100)+(SICSTUS_REVISION_VERSION)) #define SP_NO_MULTI_SP_FEATURE 0 #define SICSTUS_SPIO 1 #define SP_REPLACED_STD_IO 1 # 71 "./config.h" #define SP_INHIBIT_IMPLICIT_APIPROCINIT 0 #define SPCDECL #define SP_USE_GCC_VISIBILITY 1 #define SP_SIG_IGN ((SP_SigFun*)SIG_IGN) #define SP_SIG_DFL ((SP_SigFun*)SIG_DFL) #define SP_SIG_ERR ((SP_SigFun*)SIG_ERR) #define SP_SIGINT SIGINT #define SP_SIGQUIT SIGQUIT #define SP_SIGBREAK SIGBREAK #define TERMINATIONDATE 20070419 # 113 "./config.h" #define SP_CONFIG_H_INCLUDED 1 # 123 "./config.h" #define SP_REGVER SP_REGVER_undefined #define SP_RTSYS_DIRNAME "sp-4.0.0beta6" #define SP_EMULATOR_DIRNAME "sicstus-4.0.0beta6" #define LICENSE_PRODUCT "sicstus4.0_linux" #define SP_DISPATCH_API 1 #define PtrSPFuncs 1 #define SP_FOREIGN_SPENV 1 #define SP_MACOSX_FROM_OS_WCX_FILE_IS_NFC 0 #define ENABLE_MULTI_SP 1 #define ENABLE_C_GETX1 1 #define SPFliVersion 0x03020302 #define BIPS_VERSION 1040000 # 167 "./config.h" #define SP_URL_OBJECTS 1 #define SYSTEM_NAME "x86_64-linux-glibc2.3" #define HARDWARE_NAME "x86_64" #define NODE_NAME "" #define HOST_TYPE "x86_64-linux-glibc2.3" #define SHSFX "so" #define SHPRE "lib" #define FLI_SHSFX "so" #define FLI_APPLY_ASM_SYSV_ABI_X86_64 1 #define FLI_APPLY_ASM_APPLE_ABI_PPC32 0 #define RTKERNEL_BASENAME_SANS_SUFFIX_STRING "libsprt4-0-0-beta6" #define RTKERNEL_BASENAME_WITH_DSO_SUFFIX_STRING "libsprt4-0-0-beta6.so" #define RTKERNEL_INSTANCE_TEMPLATE_STRING "libsprt4-0-0-beta6-instance-XX" #define GAUGE 1 #define BDD 1 #define ENABLE_CLPFD 1 #define ENABLE_CLPFD_MULTI_SP 1 #define ENABLE_DEINITIALIZE 1 #define THREADED 2 # 231 "./config.h" #define W_IS_SELF_STORAGE 1 #define WAM_USE_W_IS_SELF_STORAGE 0 #define ENABLE_WAM_ASM_PEEP 0 #define PREFETCHING 1 #define WAM_SHADOW_REGS 0 #define WORKER_TERM_EARLY 0 #define USE_OLD_CTagToXXX_DEFS 1 #define MT 0 # 261 "./config.h" #define DS_CAN_LICENSE_DIALOG 0 #define SAV_META_INFO 1 #define SP_SAVE_USE_FILE 0 #define SP_QREAD_USE_FILE 0 #define SP_URL_USE_FILE 0 #define SP_TRU64 0 #define SP_WIN32 0 #define SETITIMER_EARLY 0 #define HAVE_ARPA_INET_H 1 #define HAVE_ALLOCA_H 1 #define HAVE_ASSERT_H 1 #define HAVE_CONIO_H 0 #define HAVE_CTYPE_H 1 #define HAVE_DIRECT_H 0 #define HAVE_ERRNO_H 1 #define HAVE_FCNTL_H 1 #define HAVE_FEATURES_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_IO_H 0 #define HAVE_MALLOC_H 1 #define HAVE_NETDB_H 1 #define HAVE_NETINET_IN_H 1 #define HAVE_SIGNAL_H 1 #define HAVE_STROPTS_H 1 #define HAVE_STRINGS_H 1 #define HAVE_SYS_FILE_H 1 #define HAVE_SYS_FILIO_H 0 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_SOCKET_H 1 #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_WAIT_H 1 #define HAVE_SYS_TIMES_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_UN_H 1 #define HAVE_SYS_UTSNAME_H 1 #define HAVE_UCONTEXT_H 1 #define HAVE_UNISTD_H 1 #define HAVE_WINSOCK_H 0 #define HAVE_PROCINFO_H 0 #define HAVE_PROCESS_H 0 #define HAVE_SYS_LDR_H 0 #define HAVE_SYS_MMAN_H 1 #define HAVE_TIME_H 1 #define HAVE_THREAD_H 0 #define HAVE_PTHREAD_H 1 #define HAVE_DIRECT_H 0 #define HAVE_DLFCN_H 1 #define HAVE_DIRENT_H 1 #define HAVE_WCTYPE_H 1 #define HAVE_WCHAR_H 1 #define HAVE_LOADER_H 0 #define HAVE_MATH_H 1 #define HAVE_IEEEFP_H 0 #define HAVE_FLOAT_H 1 #define HAVE_LIMITS_H 1 #define HAVE_PWD_H 1 #define HAVE_GRP_H 1 #define HAVE_OBJLIST_H 0 #define HAVE_ELF_H 0 #define HAVE_LIBPOSIX4 0 #define HAVE_LIBPTHREAD 1 #define SOLARIS_THREADS 0 #define POSIX_THREADS (HAVE_LIBPTHREAD && ! SOLARIS_THREADS) #define HAVE_NATIVE_THREADS (SOLARIS_THREADS || HAVE_LIBPTHREAD || SP_WIN32) #define BTREE_USE_MEMMAN 1 #define HAVE_SIGINFO_T 1 #define HAVE_IN_ADDR_T 1 #define HAVE_SOCKLEN_T 1 #define HAVE_INTPTR_T 1 #define SP_SIZEOF_SHORT 2 #define SP_SIZEOF_INT 4 #define SP_SIZEOF_LONG 8 #define SP_SIZEOF_VOID_P 8 #define SP_SIZEOF_LONG_LONG 8 #define SP_SIZEOF___INT64 0 #define HAVE_ABORT 1 #define HAVE_ACCESS 1 #define HAVE_AIX_GETARGS 0 #define HAVE_CHDIR 1 #define HAVE_COMPLIANT_SNPRINTF 1 #define HAVE_CLOSEFROM 0 #define HAVE_DIRFD 1 #define HAVE__EXIT 1 #define HAVE__FILENO 0 #define HAVE_FCNTL 1 #define HAVE___FUNCTION__ 0 #define SP__FUNCTION__ __FUNCTION__ # 402 "./config.h" #define HAVE_GET_CURRENT_DIR_NAME 1 #define HAVE_GETCWD 1 #define HAVE_GETEUID 1 #define HAVE_GETEXECNAME 0 #define HAVE_GETGROUPS 1 #define HAVE_GETITIMER 1 #define HAVE_GETLONGPATHNAME 0 #define HAVE_LONG_AND_SHORT_PATHNAMES 0 #define HAVE_GETMODULEFILENAMEA 0 #define HAVE_GETPAGESIZE 1 #define HAVE_GETPROCESSTIMES 0 #define HAVE_GETTHREADTIMES 0 #define HAVE_GETRUSAGE 1 #define HAVE_GETRLIMIT 1 #define HAVE_IOCTL 1 #define HAVE_ISATTY 1 #define HAVE__ISATTY 0 #define HAVE_ISWLOWER 1 #define HAVE_MEMMOVE 1 #define HAVE_MMAP 0 #define HAVE_PAUSE 1 #define HAVE_POPEN 1 #define HAVE_PTHREAD_MUTEXATTR_SETTYPE 1 #define HAVE_PUTENV 1 #define HAVE__PUTENV 0 #define HAVE_REGOPENKEYEXA 0 #define HAVE_SETITIMER 1 #define HAVE_SETENV 1 #define HAVE_SETENVIRONMENTVARIABLE 0 #define HAVE__STRDUP 0 #define HAVE_GETENV 1 #define HAVE_GETHOSTNAME 1 #define HAVE_PUTENV 1 #define HAVE_RAISE 1 #define HAVE_SIGACTION 1 #define HAVE_SIGNAL 1 #define HAVE_SNPRINTF 1 #define HAVE__SNPRINTF 0 #define HAVE_STAT 1 #define HAVE_STRERROR 1 #define HAVE_SYSCONF 1 #define HAVE_UNAME 1 #define HAVE_UNSETENV 1 #define HAVE_VSNPRINTF 1 #define HAVE__VSNPRINTF 0 #define HAVE_WAITID 1 #define HAVE_TIMES 1 #define HAVE_TRUNC 1 #define HAVE_DEBUGBREAK 0 #define HAVE_DLADDR 1 #define HAVE_DLGETNAME 0 #define HAVE_DLMODINFO 0 #define HAVE_LDR_INQ_MODULE 0 #define HAVE_LOADQUERY 0 #define HAVE_LOADLIBRARYA 0 #define HAVE_LOCALTIME_R 1 #define HAVE_CANONICALIZE_FILE_NAME 1 #define HAVE__RLD_OBJ_HEAD 0 #define HAVE__HEAPMIN 0 #define HAVE_PROC_SELF_FD 1 #define HAVE_LINUX_PROC_SELF_EXE 1 # 485 "./config.h" #define CASE_INSENSITIVE_GETENV 0 #define POSIX_SIGNALS 1 #define HAVE_STRUCTURED_EXCEPTION_HANDLING 0 #define RETSIGTYPE void # 512 "./config.h" #define SP_ISFINITE isfinite #define SP_ISNAN isnan #define SP_ISNAN_FINITE_IN_MATH_H 1 #define SP_ISNAN_FINITE_IN_FLOAT_H 0 #define SP_ISNAN_FINITE_IN_IEEEFP_H 0 #define NAN_COMPARE_FAILS 1 #define ACCURATE_QUOTIENT 1 #define JASPER_PUSH_LOCAL_REFS 0 #define CANONICAL_NAN 1 #define MEM_ALLOC MM_USE_MMAP #define MSVC_STRING_POOLING_BUG 0 #define CANNOT_SET_APP_PATHS 0 #define SP_BIGENDIAN 0 #define LogSizeOfWord 3 #define SP_AIX 0 #define SP_DARWIN 0 #define SP_HPUX 0 # 576 "./config.h" # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 1 3 4 #define _GCC_LIMITS_H_ # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/syslimits.h" 1 3 4 #define _GCC_NEXT_LIMITS_H # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 1 3 4 # 122 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 # 24 "/usr/include/limits.h" 3 4 #define _LIBC_LIMITS_H_ 1 # 1 "/usr/include/features.h" 1 3 4 # 20 "/usr/include/features.h" 3 4 #define _FEATURES_H 1 # 90 "/usr/include/features.h" 3 4 #undef __USE_ISOC99 #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_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_BSD #undef __USE_SVID #undef __USE_MISC #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 # 128 "/usr/include/features.h" 3 4 #define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # 145 "/usr/include/features.h" 3 4 #undef _ISOC99_SOURCE #define _ISOC99_SOURCE 1 #undef _POSIX_SOURCE #define _POSIX_SOURCE 1 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199506L #undef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 #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 # 179 "/usr/include/features.h" 3 4 #define __USE_ISOC99 1 # 195 "/usr/include/features.h" 3 4 #define __USE_POSIX 1 #define __USE_POSIX2 1 #define __USE_POSIX199309 1 #define __USE_POSIX199506 1 #define __USE_XOPEN 1 #define __USE_XOPEN_EXTENDED 1 #define __USE_UNIX98 1 #undef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE 1 #define __USE_XOPEN2K 1 #undef __USE_ISOC99 #define __USE_ISOC99 1 # 234 "/usr/include/features.h" 3 4 #define __USE_LARGEFILE 1 #define __USE_LARGEFILE64 1 #define __USE_FILE_OFFSET64 1 #define __USE_MISC 1 #define __USE_BSD 1 #define __USE_SVID 1 #define __USE_GNU 1 #define __USE_REENTRANT 1 # 276 "/usr/include/features.h" 3 4 #define __USE_FORTIFY_LEVEL 2 # 285 "/usr/include/features.h" 3 4 #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__ 3 #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 # 20 "/usr/include/sys/cdefs.h" 3 4 #define _SYS_CDEFS_H 1 # 35 "/usr/include/sys/cdefs.h" 3 4 #undef __P #undef __PMT # 46 "/usr/include/sys/cdefs.h" 3 4 #define __THROW __attribute__ ((__nothrow__)) #define __NTH(fct) __attribute__ ((__nothrow__)) fct # 73 "/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 # 113 "/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 __flexarr [] # 165 "/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 # 195 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_malloc__ __attribute__ ((__malloc__)) # 204 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_pure__ __attribute__ ((__pure__)) # 213 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_used__ __attribute__ ((__used__)) #define __attribute_noinline__ __attribute__ ((__noinline__)) #define __attribute_deprecated__ __attribute__ ((__deprecated__)) # 234 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) # 244 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) # 253 "/usr/include/sys/cdefs.h" 3 4 #define __nonnull(params) __attribute__ ((__nonnull__ params)) # 275 "/usr/include/sys/cdefs.h" 3 4 #define __restrict_arr __restrict # 320 "/usr/include/features.h" 2 3 4 # 334 "/usr/include/features.h" 3 4 #define __USE_EXTERN_INLINES 1 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 10 "/usr/include/gnu/stubs.h" 3 4 #define __stub___kernel_cosl #define __stub___kernel_rem_pio2l #define __stub___kernel_sinl #define __stub___kernel_tanl #define __stub_bdflush #define __stub_chflags #define __stub_fattach #define __stub_fchflags #define __stub_fdetach #define __stub_feupdateenv #define __stub_getmsg #define __stub_gtty #define __stub_lchmod #define __stub_lutimes #define __stub_putmsg #define __stub_revoke #define __stub_setlogin #define __stub_sstk #define __stub_stty # 343 "/usr/include/features.h" 2 3 4 # 27 "/usr/include/limits.h" 2 3 4 #define MB_LEN_MAX 16 # 132 "/usr/include/limits.h" 3 4 #define LLONG_MIN (-LLONG_MAX-1) #define LLONG_MAX __LONG_LONG_MAX__ #define ULLONG_MAX (LLONG_MAX * 2ULL + 1) # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 # 26 "/usr/include/bits/posix1_lim.h" 3 4 #define _BITS_POSIX1_LIM_H 1 #define _POSIX_AIO_LISTIO_MAX 2 #define _POSIX_AIO_MAX 1 #define _POSIX_ARG_MAX 4096 #define _POSIX_CHILD_MAX 25 #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_HOST_NAME_MAX 255 #define _POSIX_LINK_MAX 8 #define _POSIX_LOGIN_NAME_MAX 9 #define _POSIX_MAX_CANON 255 #define _POSIX_MAX_INPUT 255 #define _POSIX_MQ_OPEN_MAX 8 #define _POSIX_MQ_PRIO_MAX 32 #define _POSIX_NAME_MAX 14 #define _POSIX_NGROUPS_MAX 8 #define _POSIX_OPEN_MAX 20 #define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX #define _POSIX_PATH_MAX 256 #define _POSIX_PIPE_BUF 512 #define _POSIX_RE_DUP_MAX 255 #define _POSIX_RTSIG_MAX 8 #define _POSIX_SEM_NSEMS_MAX 256 #define _POSIX_SEM_VALUE_MAX 32767 #define _POSIX_SIGQUEUE_MAX 32 #define _POSIX_SSIZE_MAX 32767 #define _POSIX_STREAM_MAX 8 #define _POSIX_SYMLINK_MAX 255 #define _POSIX_SYMLOOP_MAX 8 #define _POSIX_TIMER_MAX 32 #define _POSIX_TTY_NAME_MAX 9 #define _POSIX_TZNAME_MAX 6 #define _POSIX_QLIMIT 1 #define _POSIX_HIWAT _POSIX_PIPE_BUF #define _POSIX_UIO_MAXIOV 16 #define _POSIX_CLOCKRES_MIN 20000000 # 1 "/usr/include/bits/local_lim.h" 1 3 4 # 26 "/usr/include/bits/local_lim.h" 3 4 #define __undef_NR_OPEN #define __undef_LINK_MAX #define __undef_OPEN_MAX # 1 "/usr/include/linux/limits.h" 1 3 4 #define _LINUX_LIMITS_H #define NR_OPEN 1024 #define NGROUPS_MAX 65536 #define ARG_MAX 131072 #define CHILD_MAX 999 #define OPEN_MAX 256 #define LINK_MAX 127 #define MAX_CANON 255 #define MAX_INPUT 255 #define NAME_MAX 255 #define PATH_MAX 4096 #define PIPE_BUF 4096 #define XATTR_NAME_MAX 255 #define XATTR_SIZE_MAX 65536 #define XATTR_LIST_MAX 65536 #define RTSIG_MAX 32 # 37 "/usr/include/bits/local_lim.h" 2 3 4 #undef NR_OPEN #undef __undef_NR_OPEN #undef LINK_MAX #undef __undef_LINK_MAX #undef OPEN_MAX #undef __undef_OPEN_MAX #define _POSIX_THREAD_KEYS_MAX 128 #define PTHREAD_KEYS_MAX 1024 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS #define _POSIX_THREAD_THREADS_MAX 64 #define PTHREAD_THREADS_MAX 16384 #define AIO_PRIO_DELTA_MAX 20 #define PTHREAD_STACK_MIN 16384 #define TIMER_MAX 256 #define DELAYTIMER_MAX 2147483647 #define TTY_NAME_MAX 32 #define LOGIN_NAME_MAX 256 #define HOST_NAME_MAX 64 #define MQ_PRIO_MAX 32768 # 154 "/usr/include/bits/posix1_lim.h" 2 3 4 #define SSIZE_MAX LONG_MAX # 145 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 # 24 "/usr/include/bits/posix2_lim.h" 3 4 #define _BITS_POSIX2_LIM_H 1 #define _POSIX2_BC_BASE_MAX 99 #define _POSIX2_BC_DIM_MAX 2048 #define _POSIX2_BC_SCALE_MAX 99 #define _POSIX2_BC_STRING_MAX 1000 #define _POSIX2_COLL_WEIGHTS_MAX 2 #define _POSIX2_EXPR_NEST_MAX 32 #define _POSIX2_LINE_MAX 2048 #define _POSIX2_RE_DUP_MAX 255 #define _POSIX2_CHARCLASS_NAME_MAX 14 #define BC_BASE_MAX _POSIX2_BC_BASE_MAX #define BC_DIM_MAX _POSIX2_BC_DIM_MAX #define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX #define BC_STRING_MAX _POSIX2_BC_STRING_MAX #define COLL_WEIGHTS_MAX 255 #define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX #define LINE_MAX _POSIX2_LINE_MAX #define CHARCLASS_NAME_MAX 2048 #define RE_DUP_MAX (0x7fff) # 149 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 # 31 "/usr/include/bits/xopen_lim.h" 3 4 #define _XOPEN_LIM_H 1 #define __need_IOV_MAX # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 40 "/usr/include/bits/stdio_lim.h" 3 4 #define IOV_MAX 1024 # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 # 66 "/usr/include/bits/xopen_lim.h" 3 4 #define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV #define NL_ARGMAX _POSIX_ARG_MAX #define NL_LANGMAX _POSIX2_LINE_MAX #define NL_MSGMAX INT_MAX #define NL_NMAX INT_MAX #define NL_SETMAX INT_MAX #define NL_TEXTMAX INT_MAX #define NZERO 20 # 110 "/usr/include/bits/xopen_lim.h" 3 4 #define WORD_BIT 32 # 133 "/usr/include/bits/xopen_lim.h" 3 4 #define LONG_BIT 64 # 153 "/usr/include/limits.h" 2 3 4 # 123 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 2 3 4 # 8 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/syslimits.h" 2 3 4 #undef _GCC_NEXT_LIMITS_H # 12 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 2 3 4 #define _LIMITS_H___ #undef CHAR_BIT #define CHAR_BIT __CHAR_BIT__ #undef SCHAR_MIN #define SCHAR_MIN (-SCHAR_MAX - 1) #undef SCHAR_MAX #define SCHAR_MAX __SCHAR_MAX__ #undef UCHAR_MAX #define UCHAR_MAX (SCHAR_MAX * 2 + 1) # 50 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 3 4 #undef CHAR_MIN #define CHAR_MIN SCHAR_MIN #undef CHAR_MAX #define CHAR_MAX SCHAR_MAX #undef SHRT_MIN #define SHRT_MIN (-SHRT_MAX - 1) #undef SHRT_MAX #define SHRT_MAX __SHRT_MAX__ #undef USHRT_MAX #define USHRT_MAX (SHRT_MAX * 2 + 1) #undef INT_MIN #define INT_MIN (-INT_MAX - 1) #undef INT_MAX #define INT_MAX __INT_MAX__ #undef UINT_MAX #define UINT_MAX (INT_MAX * 2U + 1U) #undef LONG_MIN #define LONG_MIN (-LONG_MAX - 1L) #undef LONG_MAX #define LONG_MAX __LONG_MAX__ #undef ULONG_MAX #define ULONG_MAX (LONG_MAX * 2UL + 1UL) # 105 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 3 4 #undef LONG_LONG_MIN #define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) #undef LONG_LONG_MAX #define LONG_LONG_MAX __LONG_LONG_MAX__ #undef ULONG_LONG_MAX #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) # 577 "./config.h" 2 typedef short SP_int16; typedef unsigned short SP_uint16; #define SP_int16 SP_int16 #define SP_int16_max ((SP_int16)0x7fff) #define SP_int16_min ((-SP_int16_max) - 1) #define SP_uint16 SP_uint16 typedef int SP_int32; #define SP_int32 SP_int32 #define SP_int32_max_raw (0x7fffffff) #define SP_int32_max ((SP_int32)SP_int32_max_raw) #define SP_int32_min ((-SP_int32_max) - 1) typedef unsigned int SP_uint32; #define SP_uint32 SP_uint32 #define SP_uint32_max_raw (0xffffffff) #define SP_uint32_max ((SP_uint32)SP_uint32_max_raw) #define SP_uint32_min ((SP_uint32)0) # 638 "./config.h" typedef long SP_int64; typedef unsigned long SP_uint64; #define SP_int64 SP_int64 # 659 "./config.h" #define SP_uint64 SP_uint64 # 669 "./config.h" #define SP_int64_max LLONG_MAX #define SP_int64_min LLONG_MIN # 783 "./config.h" typedef SP_int64 SP_largest_int; #define SP_largest_int SP_largest_int # 797 "./config.h" #define ENABLE_MEM_STATS 0 #define ENABLE_SPACE_OUT 0 #define SP_MALLOC_RETURNS_NULL 1 #define SP_STRCAT_INTRINSIC_BROKEN 0 # 4 "../alloc.c" 2 # 1 "../datadefs.h" 1 #define INCLUDED_DATADEFS_H # 16 "../datadefs.h" #define INCLUDED_FROM_RUNTIME 1 #define LOCAL_INCLUDES 1 # 32 "../datadefs.h" #define SICSTUS_HIDDEN_API 1 #define SP_MAXCHAR_INCLUSIVE 0x7FFFFFFF #define SP_MINCHAR_INCLUSIVE 0x00000000 # 1 "./config.h" 1 # 46 "../datadefs.h" 2 #define VOLATILE volatile #define PROTO(argl) argl #define CONST const #define INLINE __inline__ # 71 "../datadefs.h" #define REG_FORCE register #define REGISTER register #define CastQSortFunc(F) (F) # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stdarg.h" 1 3 4 # 34 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4 #define _STDARG_H #define _ANSI_STDARG_H_ #undef __need___va_list #define __GNUC_VA_LIST typedef __builtin_va_list __gnuc_va_list; #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) # 105 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4 typedef __gnuc_va_list va_list; #define _VA_LIST_ #define _VA_LIST #define _VA_LIST_DEFINED #define _VA_LIST_T_H #define __va_list__ # 81 "../datadefs.h" 2 # 1 "/usr/include/sys/types.h" 1 3 4 # 25 "/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 #define __WORDSIZE 64 #define __WORDSIZE_COMPAT32 1 # 29 "/usr/include/bits/types.h" 2 3 4 #define __need_size_t # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 189 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/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 long unsigned int size_t; # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 409 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_NULL # 32 "/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; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef long int __quad_t; typedef unsigned long int __u_quad_t; # 102 "/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 # 118 "/usr/include/bits/types.h" 3 4 #define __SQUAD_TYPE long int #define __UQUAD_TYPE unsigned long int #define __SWORD_TYPE long int #define __UWORD_TYPE unsigned long int #define __SLONG32_TYPE int #define __ULONG32_TYPE unsigned int #define __S64_TYPE long int #define __U64_TYPE unsigned long int # 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 __S32_TYPE #define __BLKSIZE_T_TYPE __SLONGWORD_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __FD_SETSIZE 1024 # 130 "/usr/include/bits/types.h" 2 3 4 #define __STD_TYPE __extension__ typedef __extension__ typedef unsigned long int __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef unsigned long int __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned long int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef long int __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 unsigned long int __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 int __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef long int __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef unsigned long int __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef unsigned long int __fsfilcnt64_t; __extension__ typedef long int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef long int __intptr_t; __extension__ typedef unsigned int __socklen_t; #undef __STD_TYPE # 32 "/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 __ino64_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 __off64_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 # 125 "/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 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 409 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/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; # 184 "/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 # 214 "/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 # 26 "/usr/include/bits/select.h" 3 4 #define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0) #define __FD_SET(d,s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) #define __FD_CLR(d,s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) #define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 21 "/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 # 62 "/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 * sizeof (__fd_mask)) #define __FDELT(d) ((d) / __NFDBITS) #define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) typedef struct { __fd_mask fds_bits[1024 / (8 * 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); # 217 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 21 "/usr/include/sys/sysmacros.h" 3 4 #define _SYS_SYSMACROS_H 1 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } #define major(dev) gnu_dev_major (dev) #define minor(dev) gnu_dev_minor (dev) #define makedev(maj,min) gnu_dev_makedev (maj, min) # 220 "/usr/include/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; #define __blksize_t_defined # 244 "/usr/include/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt_t; #define __blkcnt_t_defined typedef __fsblkcnt64_t fsblkcnt_t; #define __fsblkcnt_t_defined typedef __fsfilcnt64_t fsfilcnt_t; #define __fsfilcnt_t_defined 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 __need_schedparam # 1 "/usr/include/bits/sched.h" 1 3 4 # 81 "/usr/include/bits/sched.h" 3 4 #define __defined_schedparam 1 struct __sched_param { int __sched_priority; }; #undef __need_schedparam # 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 struct _pthread_fastlock { long int __status; int __spinlock; }; typedef struct _pthread_descr_struct *_pthread_descr; #define _PTHREAD_DESCR_DEFINED typedef struct __pthread_attr_s { int __detachstate; int __schedpolicy; struct __sched_param __schedparam; int __inheritsched; int __scope; size_t __guardsize; int __stackaddr_set; void *__stackaddr; size_t __stacksize; } pthread_attr_t; __extension__ typedef long long __pthread_cond_align_t; typedef struct { struct _pthread_fastlock __c_lock; _pthread_descr __c_waiting; char __padding[48 - sizeof (struct _pthread_fastlock) - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)]; __pthread_cond_align_t __align; } pthread_cond_t; typedef struct { int __dummy; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef struct { int __m_reserved; int __m_count; _pthread_descr __m_owner; int __m_kind; struct _pthread_fastlock __m_lock; } pthread_mutex_t; typedef struct { int __mutexkind; } pthread_mutexattr_t; typedef int pthread_once_t; typedef struct _pthread_rwlock_t { struct _pthread_fastlock __rw_lock; int __rw_readers; _pthread_descr __rw_writer; _pthread_descr __rw_read_waiting; _pthread_descr __rw_write_waiting; int __rw_kind; int __rw_pshared; } pthread_rwlock_t; typedef struct { int __lockkind; int __pshared; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef struct { struct _pthread_fastlock __ba_lock; int __ba_required; int __ba_present; _pthread_descr __ba_waiting; } pthread_barrier_t; typedef struct { int __pshared; } pthread_barrierattr_t; typedef unsigned long int pthread_t; # 267 "/usr/include/sys/types.h" 2 3 4 # 84 "../datadefs.h" 2 # 1 "/usr/include/pthread.h" 1 3 4 # 16 "/usr/include/pthread.h" 3 4 #define _PTHREAD_H 1 # 1 "/usr/include/sched.h" 1 3 4 # 21 "/usr/include/sched.h" 3 4 #define _SCHED_H 1 #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 # 125 "/usr/include/time.h" 3 4 #undef __need_timespec # 30 "/usr/include/sched.h" 2 3 4 # 1 "/usr/include/bits/sched.h" 1 3 4 # 29 "/usr/include/bits/sched.h" 3 4 #define SCHED_OTHER 0 #define SCHED_FIFO 1 #define SCHED_RR 2 #define CSIGNAL 0x000000ff #define CLONE_VM 0x00000100 #define CLONE_FS 0x00000200 #define CLONE_FILES 0x00000400 #define CLONE_SIGHAND 0x00000800 #define CLONE_PTRACE 0x00002000 #define CLONE_VFORK 0x00004000 #define CLONE_PARENT 0x00008000 #define CLONE_THREAD 0x00010000 #define CLONE_NEWNS 0x00020000 #define CLONE_SYSVSEM 0x00040000 #define CLONE_SETTLS 0x00080000 #define CLONE_PARENT_SETTID 0x00100000 #define CLONE_CHILD_CLEARTID 0x00200000 #define CLONE_DETACHED 0x00400000 #define CLONE_UNTRACED 0x00800000 #define CLONE_CHILD_SETTID 0x01000000 #define CLONE_STOPPED 0x02000000 struct sched_param { int __sched_priority; }; extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg) __attribute__ ((__nothrow__)); # 92 "/usr/include/bits/sched.h" 3 4 #define __cpu_set_t_defined #define __CPU_SETSIZE 1024 #define __NCPUBITS (8 * sizeof (__cpu_mask)) typedef unsigned long int __cpu_mask; #define __CPUELT(cpu) ((cpu) / __NCPUBITS) #define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS)) typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; #define __CPU_ZERO(cpusetp) do { unsigned int __i; cpu_set_t *__arr = (cpusetp); for (__i = 0; __i < sizeof (cpu_set_t) / sizeof (__cpu_mask); ++__i) __arr->__bits[__i] = 0; } while (0) #define __CPU_SET(cpu,cpusetp) ((cpusetp)->__bits[__CPUELT (cpu)] |= __CPUMASK (cpu)) #define __CPU_CLR(cpu,cpusetp) ((cpusetp)->__bits[__CPUELT (cpu)] &= ~__CPUMASK (cpu)) #define __CPU_ISSET(cpu,cpusetp) (((cpusetp)->__bits[__CPUELT (cpu)] & __CPUMASK (cpu)) != 0) # 33 "/usr/include/sched.h" 2 3 4 #define sched_priority __sched_priority extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) __attribute__ ((__nothrow__)); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__)); extern int sched_setscheduler (__pid_t __pid, int __policy, __const struct sched_param *__param) __attribute__ ((__nothrow__)); extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__)); extern int sched_yield (void) __attribute__ ((__nothrow__)); extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__)); extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__)); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__)); #define CPU_SETSIZE __CPU_SETSIZE #define CPU_SET(cpu,cpusetp) __CPU_SET (cpu, cpusetp) #define CPU_CLR(cpu,cpusetp) __CPU_CLR (cpu, cpusetp) #define CPU_ISSET(cpu,cpusetp) __CPU_ISSET (cpu, cpusetp) #define CPU_ZERO(cpusetp) __CPU_ZERO (cpusetp) extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); # 21 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 # 27 "/usr/include/time.h" 3 4 #define _TIME_H 1 #define __need_size_t #define __need_NULL # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 398 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 39 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 26 "/usr/include/bits/time.h" 3 4 #define _BITS_TIME_H 1 #define CLOCKS_PER_SEC 1000000l # 46 "/usr/include/bits/time.h" 3 4 #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 1 #define CLOCK_PROCESS_CPUTIME_ID 2 #define CLOCK_THREAD_CPUTIME_ID 3 #define TIMER_ABSTIME 1 # 43 "/usr/include/time.h" 2 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 # 125 "/usr/include/time.h" 3 4 #undef __need_timespec struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; __const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; # 178 "/usr/include/time.h" 3 4 extern clock_t clock (void) __attribute__ ((__nothrow__)); extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); extern double difftime (time_t __time1, time_t __time0) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern char *strptime (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp) __attribute__ ((__nothrow__)); # 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; # 214 "/usr/include/time.h" 2 3 4 extern size_t strftime_l (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) __attribute__ ((__nothrow__)); extern char *strptime_l (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __attribute__ ((__nothrow__)); extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) __attribute__ ((__nothrow__)); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); #define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # 309 "/usr/include/time.h" 3 4 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 324 "/usr/include/time.h" 3 4 extern int nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) __attribute__ ((__nothrow__)); extern int clock_nanosleep (clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __attribute__ ((__nothrow__)); extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); # 386 "/usr/include/time.h" 3 4 extern int getdate_err; # 395 "/usr/include/time.h" 3 4 extern struct tm *getdate (__const char *__string); # 409 "/usr/include/time.h" 3 4 extern int getdate_r (__const char *__restrict __string, struct tm *__restrict __resbufp); # 22 "/usr/include/pthread.h" 2 3 4 #define __need_sigset_t # 1 "/usr/include/signal.h" 1 3 4 # 31 "/usr/include/signal.h" 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 34 "/usr/include/signal.h" 2 3 4 # 52 "/usr/include/signal.h" 3 4 #undef __need_sigset_t # 400 "/usr/include/signal.h" 3 4 # 25 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 26 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/bits/initspin.h" 1 3 4 # 23 "/usr/include/bits/initspin.h" 3 4 #define __LT_SPINLOCK_INIT 0 #define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } #define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } #define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } # 27 "/usr/include/pthread.h" 2 3 4 #define PTHREAD_MUTEX_INITIALIZER {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, __LOCK_INITIALIZER} #define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __LOCK_INITIALIZER} #define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __LOCK_INITIALIZER} #define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __LOCK_INITIALIZER} #define PTHREAD_COND_INITIALIZER {__LOCK_INITIALIZER, 0, "", 0} #define PTHREAD_RWLOCK_INITIALIZER { __LOCK_INITIALIZER, 0, NULL, NULL, NULL, PTHREAD_RWLOCK_DEFAULT_NP, PTHREAD_PROCESS_PRIVATE } #define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { __LOCK_INITIALIZER, 0, NULL, NULL, NULL, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_PROCESS_PRIVATE } enum { PTHREAD_CREATE_JOINABLE, #define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_DETACHED #define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED }; enum { PTHREAD_INHERIT_SCHED, #define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED PTHREAD_EXPLICIT_SCHED #define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_PROCESS #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_ADAPTIVE_NP }; enum { PTHREAD_PROCESS_PRIVATE, #define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_SHARED #define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED }; enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_WRITER_NP }; #define PTHREAD_ONCE_INIT 0 #define PTHREAD_BARRIER_SERIAL_THREAD -1 struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, #define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_DISABLE #define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, #define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_ASYNCHRONOUS #define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS }; #define PTHREAD_CANCELED ((void *) -1) extern int pthread_create (pthread_t *__restrict __threadp, __const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __attribute__ ((__nothrow__)); extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__)); extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); extern int pthread_join (pthread_t __th, void **__thread_return); extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__)); extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_attr_destroy (pthread_attr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __attribute__ ((__nothrow__)); extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, int *__detachstate) __attribute__ ((__nothrow__)); extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict __param) __attribute__ ((__nothrow__)); extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __attribute__ ((__nothrow__)); extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __attribute__ ((__nothrow__)); extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict __attr, int *__restrict __policy) __attribute__ ((__nothrow__)); extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __attribute__ ((__nothrow__)); extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __attribute__ ((__nothrow__)); extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __attribute__ ((__nothrow__)); extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, int *__restrict __scope) __attribute__ ((__nothrow__)); extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __attribute__ ((__nothrow__)); extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __guardsize) __attribute__ ((__nothrow__)); extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __attribute__ ((__nothrow__)); extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __attribute__ ((__nothrow__)); extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __attribute__ ((__nothrow__)); extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__)); extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __attribute__ ((__nothrow__)); extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__)); extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_setschedparam (pthread_t __target_thread, int __policy, __const struct sched_param *__param) __attribute__ ((__nothrow__)); extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __attribute__ ((__nothrow__)); extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__)); extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__)); extern int pthread_yield (void) __attribute__ ((__nothrow__)); extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex, __const pthread_mutexattr_t *__restrict __mutex_attr) __attribute__ ((__nothrow__)); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)); extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)); extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)); extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)); extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __attribute__ ((__nothrow__)); extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __attribute__ ((__nothrow__)); extern int pthread_cond_init (pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict __cond_attr) __attribute__ ((__nothrow__)); extern int pthread_cond_destroy (pthread_cond_t *__cond) __attribute__ ((__nothrow__)); extern int pthread_cond_signal (pthread_cond_t *__cond) __attribute__ ((__nothrow__)); extern int pthread_cond_broadcast (pthread_cond_t *__cond) __attribute__ ((__nothrow__)); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex); extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime); extern int pthread_condattr_init (pthread_condattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_condattr_getpshared (__const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)); extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)); extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __const pthread_rwlockattr_t *__restrict __attr) __attribute__ ((__nothrow__)); extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)); extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)); extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)); extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)); extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr, int *__pref) __attribute__ ((__nothrow__)); extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) __attribute__ ((__nothrow__)); # 510 "/usr/include/pthread.h" 3 4 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) __attribute__ ((__nothrow__)); extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)); extern int pthread_spin_lock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)); extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)); extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)); extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, __const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __attribute__ ((__nothrow__)); extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__)); extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__)); extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__)); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) __attribute__ ((__nothrow__)); extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__)); # 557 "/usr/include/pthread.h" 3 4 extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) __attribute__ ((__nothrow__)); extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__)); extern int pthread_setspecific (pthread_key_t __key, __const void *__pointer) __attribute__ ((__nothrow__)); extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__)); # 580 "/usr/include/pthread.h" 3 4 extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)); extern int pthread_setcancelstate (int __state, int *__oldstate); extern int pthread_setcanceltype (int __type, int *__oldtype); extern int pthread_cancel (pthread_t __cancelthread); extern void pthread_testcancel (void); # 610 "/usr/include/pthread.h" 3 4 #define pthread_cleanup_push(routine,arg) { struct _pthread_cleanup_buffer _buffer; _pthread_cleanup_push (&_buffer, (routine), (arg)); extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer, void (*__routine) (void *), void *__arg) __attribute__ ((__nothrow__)); #define pthread_cleanup_pop(execute) _pthread_cleanup_pop (&_buffer, (execute)); } extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, int __execute) __attribute__ ((__nothrow__)); #define pthread_cleanup_push_defer_np(routine,arg) { struct _pthread_cleanup_buffer _buffer; _pthread_cleanup_push_defer (&_buffer, (routine), (arg)); extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, void (*__routine) (void *), void *__arg) __attribute__ ((__nothrow__)); #define pthread_cleanup_pop_restore_np(execute) _pthread_cleanup_pop_restore (&_buffer, (execute)); } extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, int __execute) __attribute__ ((__nothrow__)); extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) __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__)); # 660 "/usr/include/pthread.h" 2 3 4 # 675 "/usr/include/pthread.h" 3 4 extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __attribute__ ((__nothrow__)); extern void pthread_kill_other_threads_np (void) __attribute__ ((__nothrow__)); # 92 "../datadefs.h" 2 # 103 "../datadefs.h" typedef void* SP_THREAD_ID_T; # 124 "../datadefs.h" typedef pthread_mutex_t SP_CRITICAL_SECTION; # 1 "./config.h" 1 # 133 "../datadefs.h" 2 # 1 "/usr/include/sys/param.h" 1 3 4 # 20 "/usr/include/sys/param.h" 3 4 #define _SYS_PARAM_H 1 # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 1 3 4 # 23 "/usr/include/sys/param.h" 2 3 4 # 1 "/usr/include/linux/param.h" 1 3 4 #define _LINUX_PARAM_H # 1 "/usr/include/asm/param.h" 1 3 4 #define __ASM_STUB_PARAM_H__ # 1 "/usr/include/asm-x86_64/param.h" 1 3 4 #define _ASMx86_64_PARAM_H #define HZ 100 #define EXEC_PAGESIZE 4096 #define NGROUPS 32 #define NOGROUP (-1) #define MAXHOSTNAMELEN 64 # 5 "/usr/include/asm/param.h" 2 3 4 # 5 "/usr/include/linux/param.h" 2 3 4 # 25 "/usr/include/sys/param.h" 2 3 4 #define NBBY CHAR_BIT #define MAXSYMLINKS 20 #define CANBSIZ MAX_CANON #define NCARGS ARG_MAX #define MAXPATHLEN PATH_MAX #define NOFILE 256 #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) #define howmany(x,y) (((x) + ((y) - 1)) / (y)) #define roundup(x,y) (__builtin_constant_p (y) && powerof2 (y) ? (((x) + (y) - 1) & ~((y) - 1)) : ((((x) + ((y) - 1)) / (y)) * (y))) #define powerof2(x) ((((x) - 1) & (x)) == 0) #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #define DEV_BSIZE 512 # 139 "../datadefs.h" 2 # 180 "../datadefs.h" # 1 "/usr/include/unistd.h" 1 3 4 # 24 "/usr/include/unistd.h" 3 4 #define _UNISTD_H 1 #define _POSIX_VERSION 200112L #define _POSIX2_VERSION 200112L #define _POSIX2_C_BIND 200112L #define _POSIX2_C_DEV 200112L #define _POSIX2_SW_DEV 200112L #define _POSIX2_LOCALEDEF 200112L #define _XOPEN_VERSION 500 #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 # 171 "/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 _POSIX_OPT_H 1 #define _POSIX_JOB_CONTROL 1 #define _POSIX_SAVED_IDS 1 #define _POSIX_PRIORITY_SCHEDULING 200112L #define _POSIX_SYNCHRONIZED_IO 200112L #define _POSIX_FSYNC 200112L #define _POSIX_MAPPED_FILES 200112L #define _POSIX_MEMLOCK 200112L #define _POSIX_MEMLOCK_RANGE 200112L #define _POSIX_MEMORY_PROTECTION 200112L #define _POSIX_CHOWN_RESTRICTED 1 #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 200112L #define _POSIX_REENTRANT_FUNCTIONS 1 #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L #define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L #define _POSIX_THREAD_ATTR_STACKSIZE 200112L #define _POSIX_THREAD_ATTR_STACKADDR 200112L #define _POSIX_SEMAPHORES 200112L #define _POSIX_REALTIME_SIGNALS 200112L #define _POSIX_ASYNCHRONOUS_IO 200112L #define _POSIX_ASYNC_IO 1 #define _LFS_ASYNCHRONOUS_IO 1 #define _POSIX_PRIORITIZED_IO 200112L #define _LFS64_ASYNCHRONOUS_IO 1 #define _LFS_LARGEFILE 1 #define _LFS64_LARGEFILE 1 #define _LFS64_STDIO 1 #define _POSIX_SHARED_MEMORY_OBJECTS 200112L #define _POSIX_CPUTIME 0 #define _POSIX_THREAD_CPUTIME 0 #define _POSIX_REGEXP 1 #define _POSIX_READER_WRITER_LOCKS 200112L #define _POSIX_SHELL 1 #define _POSIX_TIMEOUTS 200112L #define _POSIX_SPIN_LOCKS 200112L #define _POSIX_SPAWN 200112L #define _POSIX_TIMERS 200112L #define _POSIX_BARRIERS 200112L #define _POSIX_MESSAGE_PASSING 200112L #define _POSIX_THREAD_PROCESS_SHARED -1 #define _POSIX_MONOTONIC_CLOCK 0 #define _POSIX_CLOCK_SELECTION -1 #define _POSIX_ADVISORY_INFO 200112L #define _POSIX_IPV6 200112L #define _POSIX_RAW_SOCKETS 200112L #define _POSIX2_CHAR_TERM 200112L #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 #define _POSIX_THREAD_PRIO_INHERIT -1 #define _POSIX_THREAD_PRIO_PROTECT -1 # 172 "/usr/include/unistd.h" 2 3 4 # 1 "/usr/include/bits/environments.h" 1 3 4 # 23 "/usr/include/bits/environments.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 #define __WORDSIZE 64 #define __WORDSIZE_COMPAT32 1 # 24 "/usr/include/bits/environments.h" 2 3 4 # 53 "/usr/include/bits/environments.h" 3 4 #define _POSIX_V6_LPBIG_OFFBIG -1 #define _XBS5_LPBIG_OFFBIG -1 #define _POSIX_V6_LP64_OFF64 1 #define _XBS5_LP64_OFF64 1 # 82 "/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" # 176 "/usr/include/unistd.h" 2 3 4 #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 # 193 "/usr/include/unistd.h" 3 4 #define __need_size_t #define __need_NULL # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 398 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 196 "/usr/include/unistd.h" 2 3 4 # 236 "/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))); #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 # 290 "/usr/include/unistd.h" 3 4 extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) __asm__ ("" "lseek64") __attribute__ ((__nothrow__)); 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); # 340 "/usr/include/unistd.h" 3 4 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64"); extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64"); # 356 "/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__)); # 378 "/usr/include/unistd.h" 3 4 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__)); # 390 "/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); # 414 "/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 chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int fchdir (int __fd) __attribute__ ((__nothrow__)); # 448 "/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))); extern int dup (int __fd) __attribute__ ((__nothrow__)); extern int dup2 (int __fd, int __fd2) __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))); extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) __attribute__ ((__nothrow__)); extern int execv (__const char *__path, char *__const __argv[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execle (__const char *__path, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execl (__const char *__path, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execvp (__const char *__file, char *__const __argv[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execlp (__const char *__file, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); 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 }; enum { _CS_PATH, #define _CS_PATH _CS_PATH _CS_V6_WIDTH_RESTRICTED_ENVS, #define _CS_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_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 }; # 531 "/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__)) __attribute__ ((__const__)); 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__)); # 567 "/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__)); # 593 "/usr/include/unistd.h" 3 4 extern int setpgrp (void) __attribute__ ((__nothrow__)); # 610 "/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 *__euid, __uid_t *__ruid, __uid_t *__suid); extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid); extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid); extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid); 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 symlink (__const char *__from, __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); 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__)); # 175 "/usr/include/getopt.h" 3 4 #undef __need_getopt # 784 "/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))); # 869 "/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__)); # 898 "/usr/include/unistd.h" 3 4 extern int truncate (__const char *__file, __off64_t __length) __asm__ ("" "truncate64") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int truncate64 (__const char *__file, __off64_t __length) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 919 "/usr/include/unistd.h" 3 4 extern int ftruncate (int __fd, __off64_t __length) __asm__ ("" "ftruncate64") __attribute__ ((__nothrow__)); extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__)); # 936 "/usr/include/unistd.h" 3 4 extern int brk (void *__addr) __attribute__ ((__nothrow__)); extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__)); # 957 "/usr/include/unistd.h" 3 4 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__)); # 974 "/usr/include/unistd.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, __off64_t __len) __asm__ ("" "lockf64"); extern int lockf64 (int __fd, int __cmd, __off64_t __len); # 1000 "/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; })) # 1011 "/usr/include/unistd.h" 3 4 extern int fdatasync (int __fildes) __attribute__ ((__nothrow__)); 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__)); # 181 "../datadefs.h" 2 # 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 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 265 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/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 # 292 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef _BSD_WCHAR_T_ # 326 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef int wchar_t; # 345 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_wchar_t # 398 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 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 __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; } __u; __u.__in = (status); __u.__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))); # 239 "/usr/include/stdlib.h" 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))); extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); #define __strtol_internal_defined 1 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); #define __strtoul_internal_defined 1 __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); #define __strtoll_internal_defined 1 __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); #define __strtoull_internal_defined 1 extern __inline double __attribute__ ((__nothrow__)) strtod (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int __attribute__ ((__nothrow__)) strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int __attribute__ ((__nothrow__)) strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoul_internal (__nptr, __endptr, __base, 0); } extern __inline float __attribute__ ((__nothrow__)) strtof (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtof_internal (__nptr, __endptr, 0); } extern __inline long double __attribute__ ((__nothrow__)) strtold (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double __attribute__ ((__nothrow__)) atof (__const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } extern __inline int __attribute__ ((__nothrow__)) atoi (__const char *__nptr) { return (int) strtol (__nptr, (char **) ((void *)0), 10); } extern __inline long int __attribute__ ((__nothrow__)) atol (__const char *__nptr) { return strtol (__nptr, (char **) ((void *)0), 10); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) atoll (__const char *__nptr) { return strtoll (__nptr, (char **) ((void *)0), 10); } # 424 "/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))); # 440 "/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__ ((__malloc__)); 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 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 409 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_NULL # 26 "/usr/include/alloca.h" 2 3 4 #undef alloca extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); #define alloca(size) __builtin_alloca (size) # 607 "/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))); 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 _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__)); extern int clearenv (void) __attribute__ ((__nothrow__)); # 691 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 705 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") __attribute__ ((__nonnull__ (1))); extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))); # 721 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int system (__const char *__command); extern char *canonicalize_file_name (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 749 "/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; 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 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__)); # 814 "/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))); # 902 "/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))); #undef __need_malloc_and_calloc # 184 "../datadefs.h" 2 # 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 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 398 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/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 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_wchar_t #define __need_wint_t #define __need_NULL # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 345 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_wchar_t #define _WINT_T typedef unsigned int wint_t; #undef __need_wint_t # 398 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 15 "/usr/include/_G_config.h" 2 3 4 # 23 "/usr/include/_G_config.h" 3 4 #define __need_mbstate_t # 1 "/usr/include/wchar.h" 1 3 4 # 47 "/usr/include/wchar.h" 3 4 #define __need_wint_t # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 357 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_wint_t # 409 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_NULL # 49 "/usr/include/wchar.h" 2 3 4 # 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 (-2147483647 - 1) #define __WCHAR_MAX (2147483647) # 51 "/usr/include/wchar.h" 2 3 4 # 74 "/usr/include/wchar.h" 3 4 #define __mbstate_t_defined 1 typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; #undef __need_mbstate_t # 25 "/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 # 1 "/usr/include/gconv.h" 1 3 4 # 24 "/usr/include/gconv.h" 3 4 #define _GCONV_H 1 #define __need_mbstate_t # 1 "/usr/include/wchar.h" 1 3 4 # 47 "/usr/include/wchar.h" 3 4 #define __need_wint_t # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 357 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_wint_t # 409 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_NULL # 49 "/usr/include/wchar.h" 2 3 4 # 86 "/usr/include/wchar.h" 3 4 #undef __need_mbstate_t # 29 "/usr/include/gconv.h" 2 3 4 #define __need_size_t #define __need_wchar_t # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 345 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_wchar_t # 409 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_NULL # 32 "/usr/include/gconv.h" 2 3 4 #define __UNKNOWN_10646_CHAR ((wchar_t) 0xfffd) enum { __GCONV_OK = 0, __GCONV_NOCONV, __GCONV_NODB, __GCONV_NOMEM, __GCONV_EMPTY_INPUT, __GCONV_FULL_OUTPUT, __GCONV_ILLEGAL_INPUT, __GCONV_INCOMPLETE_INPUT, __GCONV_ILLEGAL_DESCRIPTOR, __GCONV_INTERNAL_ERROR }; enum { __GCONV_IS_LAST = 0x0001, __GCONV_IGNORE_ERRORS = 0x0002 }; struct __gconv_step; struct __gconv_step_data; struct __gconv_loaded_object; struct __gconv_trans_data; typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *, int, int); typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); typedef int (*__gconv_init_fct) (struct __gconv_step *); typedef void (*__gconv_end_fct) (struct __gconv_step *); typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, __const unsigned char *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *); typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, __const unsigned char *, unsigned char *, unsigned char *); typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, size_t *); typedef int (*__gconv_trans_init_fct) (void **, const char *); typedef void (*__gconv_trans_end_fct) (void *); struct __gconv_trans_data { __gconv_trans_fct __trans_fct; __gconv_trans_context_fct __trans_context_fct; __gconv_trans_end_fct __trans_end_fct; void *__data; struct __gconv_trans_data *__next; }; struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; __const char *__modname; int __counter; char *__from_name; char *__to_name; __gconv_fct __fct; __gconv_btowc_fct __btowc_fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct __gconv_step_data __data []; } *__gconv_t; # 45 "/usr/include/_G_config.h" 2 3 4 typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; 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 #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_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; # 176 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 199 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 267 "/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; # 315 "/usr/include/libio.h" 3 4 __off64_t _offset; # 324 "/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_)) # 360 "/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 *) __attribute__ ((__nothrow__)); extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__)); extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__)); #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))) #define _IO_getwc_unlocked(_fp) (_IO_BE ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end, 0) ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++) #define _IO_putwc_unlocked(_wch,_fp) (_IO_BE ((_fp)->_wide_data->_IO_write_ptr >= (_fp)->_wide_data->_IO_write_end, 0) ? __woverflow (_fp, _wch) : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch))) #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) __attribute__ ((__nothrow__)); extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__)); 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) __attribute__ ((__nothrow__)); #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__)); # 472 "/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) __attribute__ ((__nothrow__)); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__)); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__)); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__)); extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); # 73 "/usr/include/stdio.h" 2 3 4 # 86 "/usr/include/stdio.h" 3 4 typedef _G_fpos64_t fpos_t; typedef _G_fpos64_t fpos64_t; #define _IOFBF 0 #define _IOLBF 1 #define _IONBF 2 #define BUFSIZ _IO_BUFSIZ # 118 "/usr/include/stdio.h" 3 4 #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #define P_tmpdir "/tmp" # 138 "/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 # 139 "/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__)); # 169 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile (void) __asm__ ("" "tmpfile64"); extern FILE *tmpfile64 (void); extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)); extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)); # 198 "/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); # 223 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 233 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); # 254 "/usr/include/stdio.h" 3 4 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64"); extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64"); 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 **__restrict __bufloc, size_t *__restrict __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))); 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__)); 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))); 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); # 467 "/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) # 500 "/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); # 545 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream); # 561 "/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); # 622 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 633 "/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); # 677 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64"); extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); # 702 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64"); extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64"); 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[]; # 750 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)); extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); # 769 "/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__)); # 830 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio.h" 1 3 4 # 27 "/usr/include/bits/stdio.h" 3 4 #define __STDIO_INLINE extern __inline extern __inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } extern __inline int getchar (void) { return _IO_getc (stdin); } extern __inline int getc_unlocked (FILE *__fp) { return (__builtin_expect ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end, 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline int getchar_unlocked (void) { return (__builtin_expect ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end, 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline int putchar (int __c) { return _IO_putc (__c, stdout); } extern __inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putchar_unlocked (int __c) { return (__builtin_expect ((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end, 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } extern __inline __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } extern __inline int __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x10) != 0); } extern __inline int __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x20) != 0); } #define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = _IO_getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream)))) # 154 "/usr/include/bits/stdio.h" 3 4 #define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream)))) # 176 "/usr/include/bits/stdio.h" 3 4 #undef __STDIO_INLINE # 831 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/bits/stdio2.h" 1 3 4 # 24 "/usr/include/bits/stdio2.h" 3 4 extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__)); #define sprintf(str,...) __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), __VA_ARGS__) #define vsprintf(str,fmt,ap) __builtin___vsprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), fmt, ap) extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) __attribute__ ((__nothrow__)); #define snprintf(str,len,...) __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), __VA_ARGS__) #define vsnprintf(str,len,fmt,ap) __builtin___vsnprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), fmt, ap) extern int __fprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format, ...); extern int __printf_chk (int __flag, __const char *__restrict __format, ...); extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format, __gnuc_va_list __ap); extern int __vprintf_chk (int __flag, __const char *__restrict __format, __gnuc_va_list __ap); #define printf(...) __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__) #define fprintf(stream,...) __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) #define vprintf(format,ap) __vprintf_chk (__USE_FORTIFY_LEVEL - 1, format, ap) #define vfprintf(stream,format,ap) __vfprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, format, ap) # 86 "/usr/include/bits/stdio2.h" 3 4 extern char *__gets_chk (char *__str, size_t); #define gets(__str) ((__bos (__str) == (size_t) -1) ? (gets) (__str) : __gets_chk (__str, __bos (__str))) # 834 "/usr/include/stdio.h" 2 3 4 # 185 "../datadefs.h" 2 # 1 "/usr/include/string.h" 1 3 4 # 24 "/usr/include/string.h" 3 4 #define _STRING_H 1 #define __need_size_t #define __need_NULL # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 398 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 34 "/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))); extern void *memchr (__const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (__const void *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 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))); # 121 "/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); })) # 154 "/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); })) # 165 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 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))); extern char *strpbrk (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 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))); 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__)); # 281 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); 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))); extern char *index (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 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 int strverscmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __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 char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 414 "/usr/include/string.h" 3 4 # 1 "/usr/include/bits/string.h" 1 3 4 # 26 "/usr/include/bits/string.h" 3 4 #define _STRING_ARCH_unaligned 1 # 415 "/usr/include/string.h" 2 3 4 # 1 "/usr/include/bits/string2.h" 1 3 4 # 46 "/usr/include/bits/string2.h" 3 4 #define __STRING_INLINE extern __inline # 56 "/usr/include/bits/string2.h" 3 4 #define __STRING2_SMALL_GET16(src,idx) (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 | ((__const unsigned char *) (__const char *) (src))[idx]) #define __STRING2_SMALL_GET32(src,idx) (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 | ((__const unsigned char *) (__const char *) (src))[idx]) # 93 "/usr/include/bits/string2.h" 3 4 #define __string2_1bptr_p(__x) ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) # 195 "/usr/include/bits/string2.h" 3 4 #define __bzero(s,n) __builtin_memset (s, '\0', n) # 207 "/usr/include/bits/string2.h" 3 4 #define __mempcpy(dest,src,n) __builtin_mempcpy (dest, src, n) # 223 "/usr/include/bits/string2.h" 3 4 #define mempcpy(dest,src,n) __mempcpy (dest, src, n) # 394 "/usr/include/bits/string2.h" 3 4 extern void *__rawmemchr (const void *__s, int __c); #define strchr(s,c) (__extension__ (__builtin_constant_p (c) && !__builtin_constant_p (s) && (c) == '\0' ? (char *) __rawmemchr (s, c) : __builtin_strchr (s, c))) # 577 "/usr/include/bits/string2.h" 3 4 #define __stpcpy(dest,src) __builtin_stpcpy (dest, src) # 598 "/usr/include/bits/string2.h" 3 4 #define stpcpy(dest,src) __stpcpy (dest, src) # 761 "/usr/include/bits/string2.h" 3 4 #define strncpy(dest,src,n) __builtin_strncpy (dest, src, n) # 785 "/usr/include/bits/string2.h" 3 4 #define strncat(dest,src,n) __builtin_strncat (dest, src, n) # 800 "/usr/include/bits/string2.h" 3 4 #define strcmp(s1,s2) __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (s1) && __builtin_constant_p (s2) && (__s1_len = strlen (s1), __s2_len = strlen (s2), (!__string2_1bptr_p (s1) || __s1_len >= 4) && (!__string2_1bptr_p (s2) || __s2_len >= 4)) ? __builtin_strcmp (s1, s2) : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) && (__s1_len = strlen (s1), __s1_len < 4) ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) ? __builtin_strcmp (s1, s2) : __strcmp_cg (s1, s2, __s1_len)) : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) && (__s2_len = strlen (s2), __s2_len < 4) ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) ? __builtin_strcmp (s1, s2) : __strcmp_gc (s1, s2, __s2_len)) : __builtin_strcmp (s1, s2)))); }) # 842 "/usr/include/bits/string2.h" 3 4 #define __strcmp_cc(s1,s2,l) (__extension__ ({ register int __result = (((__const unsigned char *) (__const char *) (s1))[0] - ((__const unsigned char *) (__const char *)(s2))[0]); if (l > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[1] - ((__const unsigned char *) (__const char *) (s2))[1]); if (l > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[2] - ((__const unsigned char *) (__const char *) (s2))[2]); if (l > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (s1))[3] - ((__const unsigned char *) (__const char *) (s2))[3]); } } __result; })) # 869 "/usr/include/bits/string2.h" 3 4 #define __strcmp_cg(s1,s2,l1) (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (s2); register int __result = (((__const unsigned char *) (__const char *) (s1))[0] - __s2[0]); if (l1 > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[1] - __s2[1]); if (l1 > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[2] - __s2[2]); if (l1 > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (s1))[3] - __s2[3]); } } __result; })) # 891 "/usr/include/bits/string2.h" 3 4 #define __strcmp_gc(s1,s2,l2) (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (s1); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (s2))[0]; if (l2 > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (s2))[1]); if (l2 > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (s2))[2]); if (l2 > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (s2))[3]); } } __result; })) # 920 "/usr/include/bits/string2.h" 3 4 #define strncmp(s1,s2,n) (__extension__ (__builtin_constant_p (n) && ((__builtin_constant_p (s1) && strlen (s1) < ((size_t) (n))) || (__builtin_constant_p (s2) && strlen (s2) < ((size_t) (n)))) ? strcmp (s1, s2) : strncmp (s1, s2, n))) # 935 "/usr/include/bits/string2.h" 3 4 #define strcspn(s,reject) __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p (reject) && __string2_1bptr_p (reject) ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) ? __builtin_strcspn (s, reject) : ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') ? strlen (s) : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') ? __strcspn_c1 (s, __r0) : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') ? __strcspn_c2 (s, __r0, __r1) : (((__const char *) (reject))[3] == '\0' ? __strcspn_c3 (s, __r0, __r1, __r2) : __builtin_strcspn (s, reject)))))) : __builtin_strcspn (s, reject)); }) # 969 "/usr/include/bits/string2.h" 3 4 extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); extern __inline size_t __strcspn_c1 (__const char *__s, int __reject) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject) ++__result; return __result; } extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2); extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2) ++__result; return __result; } extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3); extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2 && __s[__result] != __reject3) ++__result; return __result; } # 1011 "/usr/include/bits/string2.h" 3 4 #define strspn(s,accept) __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p (accept) && __string2_1bptr_p (accept) ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) ? __builtin_strspn (s, accept) : ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') ? ((void) (s), 0) : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') ? __strspn_c1 (s, __a0) : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') ? __strspn_c2 (s, __a0, __a1) : (((__const char *) (accept))[3] == '\0' ? __strspn_c3 (s, __a0, __a1, __a2) : __builtin_strspn (s, accept)))))) : __builtin_strspn (s, accept)); }) # 1045 "/usr/include/bits/string2.h" 3 4 extern __inline size_t __strspn_c1 (__const char *__s, int __accept); extern __inline size_t __strspn_c1 (__const char *__s, int __accept) { register size_t __result = 0; while (__s[__result] == __accept) ++__result; return __result; } extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2); extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2) ++__result; return __result; } extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2 || __s[__result] == __accept3) ++__result; return __result; } #define strpbrk(s,accept) __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p (accept) && __string2_1bptr_p (accept) ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) ? __builtin_strpbrk (s, accept) : ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') ? ((void) (s), (char *) NULL) : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') ? __builtin_strchr (s, __a0) : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') ? __strpbrk_c2 (s, __a0, __a1) : (((__const char *) (accept))[3] == '\0' ? __strpbrk_c3 (s, __a0, __a1, __a2) : __builtin_strpbrk (s, accept)))))) : __builtin_strpbrk (s, accept)); }) # 1121 "/usr/include/bits/string2.h" 3 4 extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, int __accept2); extern __inline char * __strpbrk_c2 (__const char *__s, int __accept1, int __accept2) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline char * __strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 && *__s != __accept3) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } # 1164 "/usr/include/bits/string2.h" 3 4 #define __strtok_r(s,sep,nextp) (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) ? (((__const char *) (sep))[0] != '\0' && ((__const char *) (sep))[1] == '\0' ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) : __strtok_r (s, sep, nextp)) : __strtok_r (s, sep, nextp))) # 1173 "/usr/include/bits/string2.h" 3 4 extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); extern __inline char * __strtok_r_1c (char *__s, char __sep, char **__nextp) { char *__result; if (__s == ((void *)0)) __s = *__nextp; while (*__s == __sep) ++__s; __result = ((void *)0); if (*__s != '\0') { __result = __s++; while (*__s != '\0') if (*__s++ == __sep) { __s[-1] = '\0'; break; } *__nextp = __s; } return __result; } #define strtok_r(s,sep,nextp) __strtok_r (s, sep, nextp) extern char *__strsep_g (char **__stringp, __const char *__delim); #define __strsep(s,reject) __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p (reject) && __string2_1bptr_p (reject) && (__r0 = ((__const char *) (reject))[0], ((__const char *) (reject))[0] != '\0') ? ((__r1 = ((__const char *) (reject))[1], ((__const char *) (reject))[1] == '\0') ? __strsep_1c (s, __r0) : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') ? __strsep_2c (s, __r0, __r1) : (((__const char *) (reject))[3] == '\0' ? __strsep_3c (s, __r0, __r1, __r2) : __strsep_g (s, reject)))) : __strsep_g (s, reject)); }) # 1223 "/usr/include/bits/string2.h" 3 4 extern __inline char *__strsep_1c (char **__s, char __reject); extern __inline char * __strsep_1c (char **__s, char __reject) { register char *__retval = *__s; if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) *(*__s)++ = '\0'; return __retval; } extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); extern __inline char * __strsep_2c (char **__s, char __reject1, char __reject2) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3); extern __inline char * __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } #define strsep(s,reject) __strsep (s, reject) # 1298 "/usr/include/bits/string2.h" 3 4 #define __need_malloc_and_calloc extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); #define __strdup(s) (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) ? (((__const char *) (s))[0] == '\0' ? (char *) calloc (1, 1) : ({ size_t __len = strlen (s) + 1; char *__retval = (char *) malloc (__len); if (__retval != NULL) __retval = (char *) memcpy (__retval, s, __len); __retval; })) : __strdup (s))) # 1317 "/usr/include/bits/string2.h" 3 4 #define strdup(s) __strdup (s) extern char *__strndup (__const char *__string, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); #define __strndup(s,n) (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) ? (((__const char *) (s))[0] == '\0' ? (char *) calloc (1, 1) : ({ size_t __len = strlen (s) + 1; size_t __n = (n); char *__retval; if (__n < __len) __len = __n + 1; __retval = (char *) malloc (__len); if (__retval != NULL) { __retval[__len - 1] = '\0'; __retval = (char *) memcpy (__retval, s, __len - 1); } __retval; })) : __strndup (s, n))) # 1345 "/usr/include/bits/string2.h" 3 4 #define strndup(s,n) __strndup (s, n) #undef __STRING_INLINE # 418 "/usr/include/string.h" 2 3 4 # 1 "/usr/include/bits/string3.h" 1 3 4 # 26 "/usr/include/bits/string3.h" 3 4 #undef memcpy #undef memmove #undef memset #undef strcat #undef strcpy #undef strncat #undef strncpy #undef mempcpy #undef stpcpy #undef bcopy #undef bzero #define memcpy(dest,src,len) ((__bos0 (dest) != (size_t) -1) ? __builtin___memcpy_chk (dest, src, len, __bos0 (dest)) : __memcpy_ichk (dest, src, len)) static __inline__ void * __attribute__ ((__always_inline__)) __memcpy_ichk (void *__restrict __dest, const void *__restrict __src, size_t __len) { return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } #define memmove(dest,src,len) ((__bos0 (dest) != (size_t) -1) ? __builtin___memmove_chk (dest, src, len, __bos0 (dest)) : __memmove_ichk (dest, src, len)) static __inline__ void * __attribute__ ((__always_inline__)) __memmove_ichk (void *__dest, const void *__src, size_t __len) { return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } #define mempcpy(dest,src,len) ((__bos0 (dest) != (size_t) -1) ? __builtin___mempcpy_chk (dest, src, len, __bos0 (dest)) : __mempcpy_ichk (dest, src, len)) static __inline__ void * __attribute__ ((__always_inline__)) __mempcpy_ichk (void *__restrict __dest, const void *__restrict __src, size_t __len) { return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); } #define memset(dest,ch,len) ((__bos0 (dest) != (size_t) -1) ? __builtin___memset_chk (dest, ch, len, __bos0 (dest)) : __memset_ichk (dest, ch, len)) static __inline__ void * __attribute__ ((__always_inline__)) __memset_ichk (void *__dest, int __ch, size_t __len) { return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); } #define bcopy(src,dest,len) ((void) ((__bos0 (dest) != (size_t) -1) ? __builtin___memmove_chk (dest, src, len, __bos0 (dest)) : __memmove_ichk (dest, src, len))) #define bzero(dest,len) ((void) ((__bos0 (dest) != (size_t) -1) ? __builtin___memset_chk (dest, '\0', len, __bos0 (dest)) : __memset_ichk (dest, '\0', len))) #define strcpy(dest,src) ((__bos (dest) != (size_t) -1) ? __builtin___strcpy_chk (dest, src, __bos (dest)) : __strcpy_ichk (dest, src)) static __inline__ char * __attribute__ ((__always_inline__)) __strcpy_ichk (char *__restrict __dest, const char *__restrict __src) { return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } #define stpcpy(dest,src) ((__bos (dest) != (size_t) -1) ? __builtin___stpcpy_chk (dest, src, __bos (dest)) : __stpcpy_ichk (dest, src)) static __inline__ char * __attribute__ ((__always_inline__)) __stpcpy_ichk (char *__restrict __dest, const char *__restrict __src) { return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } #define strncpy(dest,src,len) ((__bos (dest) != (size_t) -1) ? __builtin___strncpy_chk (dest, src, len, __bos (dest)) : __strncpy_ichk (dest, src, len)) static __inline__ char * __attribute__ ((__always_inline__)) __strncpy_ichk (char *__restrict __dest, const char *__restrict __src, size_t __len) { return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } #define strcat(dest,src) ((__bos (dest) != (size_t) -1) ? __builtin___strcat_chk (dest, src, __bos (dest)) : __strcat_ichk (dest, src)) static __inline__ char * __attribute__ ((__always_inline__)) __strcat_ichk (char *__restrict __dest, const char *__restrict __src) { return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); } #define strncat(dest,src,len) ((__bos (dest) != (size_t) -1) ? __builtin___strncat_chk (dest, src, len, __bos (dest)) : __strncat_ichk (dest, src, len)) static __inline__ char * __attribute__ ((__always_inline__)) __strncat_ichk (char *__restrict __dest, const char *__restrict __src, size_t __len) { return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); } # 423 "/usr/include/string.h" 2 3 4 # 186 "../datadefs.h" 2 # 1 "/usr/include/math.h" 1 3 4 # 25 "/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()) # 34 "/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()) # 36 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_vall.h" 1 3 4 # 26 "/usr/include/bits/huge_vall.h" 3 4 #define HUGE_VALL (__builtin_huge_vall()) # 37 "/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()) # 40 "/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 ("")) # 43 "/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 # 1 "/usr/include/bits/wordsize.h" 1 3 4 #define __WORDSIZE 64 #define __WORDSIZE_COMPAT32 1 # 27 "/usr/include/bits/mathdef.h" 2 3 4 typedef float float_t; typedef double double_t; # 45 "/usr/include/bits/mathdef.h" 3 4 #define FP_ILOGB0 (-2147483647 - 1) #define FP_ILOGBNAN (-2147483647 - 1) # 47 "/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__)); # 71 "/usr/include/math.h" 2 3 4 #undef _Mdouble_ #undef _Mdouble_BEGIN_NAMESPACE #undef _Mdouble_END_NAMESPACE #undef __MATH_PRECNAME # 83 "/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 (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)); extern void __sincosf (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__)); # 94 "/usr/include/math.h" 2 3 4 #undef _Mdouble_ #undef _Mdouble_BEGIN_NAMESPACE #undef _Mdouble_END_NAMESPACE #undef __MATH_PRECNAME #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 (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)); extern void __sincosl (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__)); # 115 "/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; # 171 "/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)) # 202 "/usr/include/math.h" 3 4 #define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) : sizeof (x) == sizeof (double) ? __signbit (x) : __signbitl (x)) # 214 "/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)) # 242 "/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 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 282 "/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 # 323 "/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 # 372 "/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) # 1 "/usr/include/bits/mathinline.h" 1 3 4 # 28 "/usr/include/bits/mathinline.h" 3 4 #define __MATH_INLINE extern __inline extern __inline int __attribute__ ((__nothrow__)) __signbitf (float __x) { __extension__ union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; } extern __inline int __attribute__ ((__nothrow__)) __signbit (double __x) { __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; return __u.__i[1] < 0; } extern __inline int __attribute__ ((__nothrow__)) __signbitl (long double __x) { __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; return (__u.__i[2] & 0x8000) != 0; } # 383 "/usr/include/math.h" 2 3 4 # 438 "/usr/include/math.h" 3 4 # 187 "../datadefs.h" 2 # 215 "../datadefs.h" #define SPEXP1 #define SPEXP2 #define COMPILE_TIME_ASSERT_DECLARATION(COND) extern int boobytrap[(COND) ? 1 : -1] # 1 "../sicstus.h" 1 # 9 "../sicstus.h" #define INCLUDED_SICSTUS_H #define SP_HAVE_GCC_VERSION(MAJOR,MINOR) ((__GNUC__ > (MAJOR)) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR))) #define SICSTUS_OLDHOOKS 1 #define SP_BEGIN_DECL #define SP_END_DECL # 42 "../sicstus.h" #define SP_NO_PRIVATE_CONFIG 1 # 1 "./config.h" 1 # 44 "../sicstus.h" 2 #undef SP_NO_PRIVATE_CONFIG # 91 "../sicstus.h" #define SPGLUEEXP #define SPGLUEEXP1 #define SPGLUEEXP2 #define SP_TYPE_VARIABLE 1 #define SP_TYPE_INTEGER 2 #define SP_TYPE_ATOM 3 #define SP_TYPE_FLOAT 4 #define SP_TYPE_COMPOUND 5 #define SP_SUCCESS 1 #define SP_FAILURE 0 #define SP_ERROR (-1) #define SP_WHEN_EXPLICIT 0 #define SP_WHEN_RESTORE 1 #define SP_WHEN_EXIT 2 # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 43 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #define _STDDEF_H #define _STDDEF_H_ #define _ANSI_STDDEF_H #define __STDDEF_H__ # 141 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/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 long int ptrdiff_t; # 163 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 236 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_size_t # 345 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef __need_wchar_t # 398 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 120 "../sicstus.h" 2 # 1 "../sicstus_spio.h" 1 #define SICSTUS_SPIO_H_INCLUDED 1 # 20 "../sicstus_spio.h" #define SPIO_TRACE_LINE_ sp_spio_trace_line #define SP_ASSERT(TEST) SPIO_ASSERT1(1,(TEST)) # 1 "../spio/spio_simple_device.h" 1 #define SPIO_SIMPLE_DEVICE_H_INCLUDED 1 # 1 "../spio/spio_types.h" 1 #define SPIO_TYPES_H_INCLUDED 1 #define SPIO__FUNCTION__ __FUNCTION__ # 1 "../spio/spio_config.h" 1 #define SPIO_CONFIG_H_POSIX_INCLUDED # 14 "../spio/spio_config.h" # 1 "../spio/spio_version.h" 1 #define SPIO_VERSION_H_INCLUDED #define SPIO_VERSION_MAJOR 1 #define SPIO_VERSION_MINOR 0 #define SPIO_BETA_VERSION 1 # 15 "../spio/spio_config.h" 2 #define SPIO_UNIX 1 #define SPIO_USE_PTHREADS 1 #define SPIO_USE_AIO 0 # 68 "../spio/spio_config.h" #define SPIO_USE_SPIO_EVENT_PIPE 1 #define SPIO_TASK_PTHREAD_CANCEL_HANDLING 1 # 94 "../spio/spio_config.h" #define SPIO_HAVE_ERRNO_H 1 #define SPIO_HAVE_FCNTL_H 1 #define SPIO_HAVE_PTHREAD_H 1 #define SPIO_HAVE_SIGNAL_H 1 #define SPIO_HAVE_SYS_STAT_H 1 #define SPIO_HAVE_SYS_TYPES_H 1 #define SPIO_HAVE_UNISTD_H 1 #define SPIO_HAVE_TIME_H 1 #define SPIO_HAVE_AIO_H 1 #define SPIO_HAVE_SPAWN_H 1 #define SPIO_HAVE_SSIZE_T 1 #define SPIO_CDECL #define SPIO_HAVE_PROC_SELF_FD 1 #define SPIO_HAVE_DIRFD 1 #define SPIO_HAVE_WAITID HAVE_WAITID # 15 "../spio/spio_types.h" 2 # 46 "../spio/spio_types.h" #define SPIO_CDECL typedef unsigned char spio_t_uint8; typedef spio_t_uint8 spio_t_byte; typedef signed short spio_t_int16; typedef unsigned short spio_t_uint16; typedef signed int spio_t_int32; typedef unsigned int spio_t_uint32; typedef signed long long spio_t_int64; typedef unsigned long long spio_t_uint64; #define SPIO_INT64_FORMAT "%lld" #define SPIO_UINT64_FORMAT "%llu" #define SPIO__w64 typedef ssize_t spio_t_ssize; # 90 "../spio/spio_types.h" typedef void *spio_t_thread_id; typedef spio_t_int64 spio_t_offset; typedef spio_t_int32 spio_t_refcount; # 114 "../spio/spio_types.h" typedef int spio_t_os_file_handle; typedef pid_t spio_t_os_process_handle; #define SPIO_INVALID_OS_FILE_HANDLE ((spio_t_os_file_handle) -1) #define SPIO_INVALID_OS_PROCESS_HANDLE ((spio_t_os_process_handle) -1) typedef pid_t spio_t_pid; typedef spio_t_uint32 spio_t_bits; typedef spio_t_uint16 spio_t_bits16; typedef spio_t_uint32 spio_t_wchar; typedef spio_t_int32 spio_t_wcharint; typedef spio_t_uint8 spio_t_utf8; typedef spio_t_uint16 spio_t_utf16; typedef spio_t_uint32 spio_t_utf32; typedef spio_t_int32 spio_t_utf32int; typedef struct spio_t_timespec_ spio_t_timespec; struct spio_t_timespec_ { long sec; long nsec; }; typedef spio_t_int64 spio_t_time; enum spio_t_variant_type_ { SPIO_VARIANT_ILLEGAL=0, SPIO_VARIANT_END=1, SPIO_VARIANT_STRING, SPIO_VARIANT_POINTER, SPIO_VARIANT_FLAGS, SPIO_VARIANT_INT, SPIO_VARIANT_INT64, SPIO_VARIANT_FIRST_UNUSED }; #define SPIO_VARIANT_TYPE_MASK 0x07 extern int dummy1[( (SPIO_VARIANT_FIRST_UNUSED > (0x07 +1)) ? -1 : 1 )]; #define SPIO_VARIANT_TYPE(PVARIANT) ((spio_t_variant_type)((PVARIANT)->flags & SPIO_VARIANT_TYPE_MASK)) #define SPIO_VARIANT_INIT_TYPE(VARIANT,TYPE) (((VARIANT).flags = (TYPE))) #define SPIO_VARIANT_INIT(VARIANT) SPIO_VARIANT_INIT_TYPE((VARIANT), SPIO_VARIANT_ILLEGAL) #define SPIO_VARIANT_INIT_STATIC_STRING(VARIANT,STRING) (SPIO_VARIANT_INIT_TYPE((VARIANT), SPIO_VARIANT_STRING), SPIO_SET_MASK((VARIANT).flags, SPIO_VARIANT_FLAG_STATIC_DATA), (VARIANT).u.string = (STRING)) #define SPIO_VARIANT_INIT_STRING(VARIANT,STRING) (SPIO_VARIANT_INIT_TYPE((VARIANT), SPIO_VARIANT_STRING), (VARIANT).u.string = (STRING)) #define SPIO_VARIANT_INIT_POINTER(VARIANT,PTR) (SPIO_VARIANT_INIT_TYPE((VARIANT), SPIO_VARIANT_POINTER), (VARIANT).u.p = (void*)(PTR)) #define SPIO_VARIANT_INIT_END(VARIANT) (SPIO_VARIANT_INIT_TYPE((VARIANT), SPIO_VARIANT_END), (VARIANT).u.p = NULL) typedef enum spio_t_variant_type_ spio_t_variant_type; typedef struct spio_t_variant_ spio_t_variant; struct spio_t_variant_ { #define SPIO_VARIANT_FLAG_DYNAMIC (SPIO_VARIANT_TYPE_MASK+1) #define SPIO_VARIANT_FLAG_STATIC_DATA SPIO_NEXT_BIT(SPIO_VARIANT_FLAG_DYNAMIC) spio_t_bits flags; union { char const *string; spio_t_int64 i64; void const *p; spio_t_bits flags; int i; } u; }; typedef struct spio_t_property_ spio_t_property; struct spio_t_property_ { char const *key; spio_t_variant v; }; #define SPIO_PROPERTY_INITIALIZER_END { NULL, { SPIO_VARIANT_END, { NULL } } } #define SPIO_PROPERTY_INIT_END(PROPERY) do { (PROPERY).key = NULL; SPIO_VARIANT_INIT_END((PROPERY).v); }while(0) #define SPIO_PROPERTY_INITIALIZER_STATIC_(KEY,TYPE,VALUE) { (KEY), { ((TYPE) | SPIO_VARIANT_FLAG_STATIC_DATA), { (VALUE) } } } #define SPIO_PROPERTY_INITIALIZER_STATIC_STRING(KEY,STRING) SPIO_PROPERTY_INITIALIZER_STATIC_((KEY), SPIO_VARIANT_STRING, (STRING)) #define SPIO_PROPERTY_INITIALIZER_STATIC_POINTER(KEY,PTR) SPIO_PROPERTY_INITIALIZER_STATIC_((KEY), SPIO_VARIANT_POINTER, (PTR)) typedef spio_t_property *spio_t_arglist; enum spio_t_device_type_ { SPIO_DEVICE_TYPE_ILLEGAL = 0, SPIO_DEVICE_TYPE_UNKNOWN, SPIO_DEVICE_TYPE_FILE, SPIO_DEVICE_TYPE_TTY, #define SPIO_DEVICE_TYPE_CONSOLE SPIO_DEVICE_TYPE_TTY SPIO_DEVICE_TYPE_SOCKET, SPIO_DEVICE_TYPE_FIFO, #define SPIO_DEVICE_TYPE_PIPE SPIO_DEVICE_TYPE_FIFO SPIO_DEVICE_TYPE_CHARACTER, #define SPIO_DEVICE_TYPE_SERIAL SPIO_DEVICE_TYPE_CHARACTER SPIO_DEVICE_TYPE_DIRECTORY, SPIO_DEVICE_TYPE_BLOCK, SPIO_DEVICE_TYPE_LINK, SPIO_DEVICE_TYPE_FIRST_UNUSED_, SPIO_DEVICE_TYPE_LAST = SPIO_DEVICE_TYPE_FIRST_UNUSED_-1 }; typedef enum spio_t_device_type_ spio_t_device_type; typedef struct spio_t_dirent_ spio_t_dirent; typedef struct spio_t_dir_ spio_t_dir; # 1 "../spio/spio_errors.h" 1 #define SPIO_ERRORS_H_INCLUDED # 13 "../spio/spio_errors.h" #define SPIO_E_ERROR_1 SPIO_E_ERROR #define SPIO_E_ERROR_2 SPIO_E_ERROR #define SPIO_E_ERROR_3 SPIO_E_ERROR #define SPIO_E_ERROR_4 SPIO_E_ERROR #define SPIO_E_ERROR_5 SPIO_E_ERROR #define SPIO_E_ERROR_6 SPIO_E_ERROR #define SPIO_E_ERROR_7 SPIO_E_ERROR enum spio_t_error_code_ { #define SPIO_SUCCEEDED(CODE) ((CODE) >= 0) #define SPIO_FAILED(CODE) ((CODE) < 0) SPIO_S_PRIVATE_ERROR_0 = 30000, SPIO_S_PRIVATE_ERROR_1 = SPIO_S_PRIVATE_ERROR_0+1, SPIO_S_PRIVATE_ERROR_2 = SPIO_S_PRIVATE_ERROR_1+1, SPIO_S_PRIVATE_ERROR_3 = SPIO_S_PRIVATE_ERROR_2+1, SPIO_S_PRIVATE_ERROR_4 = SPIO_S_PRIVATE_ERROR_3+1, SPIO_S_PRIVATE_ERROR_5 = SPIO_S_PRIVATE_ERROR_4+1, SPIO_S_PRIVATE_ERROR_6 = SPIO_S_PRIVATE_ERROR_5+1, SPIO_S_NOERR = 0, SPIO_E_NOERR = 0, SPIO_S_TRUE = 1, SPIO_S_FALSE = 0, SPIO_S_OPERATION_FAILED = 1, SPIO_S_DEALLOCATED = 2, SPIO_S_NOT_SUPPORTED = 3, SPIO_E_ERROR = -10001, SPIO_E_END_OF_FILE = -1, SPIO_E_OUT_OF_MEMORY = -10003, SPIO_E_INSUFFICIENT_BUFFER = SPIO_E_OUT_OF_MEMORY, SPIO_E_PARAMETER_ERROR = -10004, SPIO_E_VERSION_ERROR = -10005, SPIO_E_NOT_IMPLEMENTED = -10006, SPIO_E_NOT_SUPPORTED = -10007, SPIO_E_NOT_FOUND = -10008, SPIO_E_FOUND = -10009, SPIO_E_NOT_READ = -10010, SPIO_E_NOT_WRITE = -10011, SPIO_E_NOT_OPEN_READ = -10012, SPIO_E_NOT_OPEN_WRITE = -10013, SPIO_E_INTERRUPTED = -10014, SPIO_E_IMPOSSIBLE_ERROR = -10015, SPIO_E_INTERNAL_ERROR = -10016, SPIO_E_OS_ERROR = -10017, SPIO_E_TIMEOUT = -10018, SPIO_E_WOULD_BLOCK = -10019, SPIO_E_TRY_AGAIN = SPIO_E_WOULD_BLOCK, SPIO_E_PERMISSION_ERROR = -10020, SPIO_E_NO_MORE_ENTRIES = -10021, SPIO_E_LAYER_ = -10100, SPIO_E_OPEN_ERROR = SPIO_E_LAYER_-1, SPIO_E_READ_ERROR = SPIO_E_OPEN_ERROR-1, SPIO_E_WRITE_ERROR = SPIO_E_READ_ERROR-1, SPIO_E_SEEK_ERROR = SPIO_E_WRITE_ERROR-1, SPIO_E_CLOSE_ERROR = SPIO_E_SEEK_ERROR-1, SPIO_E_SYNC_ERROR = SPIO_E_CLOSE_ERROR-1, SPIO_E_PUSH_ERROR = SPIO_E_SYNC_ERROR-1, SPIO_E_CHAR_CODER_ = -10200, SPIO_E_GRANULARITY_ERROR = SPIO_E_CHAR_CODER_-1, SPIO_E_NOT_ENOUGH_DATA = SPIO_E_GRANULARITY_ERROR-1, SPIO_E_SYNTAX_ERROR = SPIO_E_NOT_ENOUGH_DATA-1, SPIO_E_ENCODING_ERROR_ = SPIO_E_SYNTAX_ERROR, SPIO_E_ENCODING_UNMAPPABLE = SPIO_E_ENCODING_ERROR_-1, SPIO_E_ENCODING_UNASSIGNED = SPIO_E_ENCODING_UNMAPPABLE, SPIO_E_ENCODING_INVALID = SPIO_E_ENCODING_UNASSIGNED-1, SPIO_E_CHARSET_NOT_FOUND = SPIO_E_ENCODING_INVALID-1, SPIO_E_THREAD_ = -10300, SPIO_E_THREAD_ERROR = SPIO_E_THREAD_-1, SPIO_E_THREAD_RUNNING = SPIO_E_THREAD_ERROR-1, SPIO_E_AIO_ = -10400, SPIO_E_AIO_ERROR = SPIO_E_AIO_-1, SPIO_E_ASYNC_ERROR = SPIO_E_AIO_ERROR, SPIO_E_AIO_INPROGRESS = SPIO_E_AIO_ERROR-1, SPIO_E_ASYNC_INPROGRESS = SPIO_E_AIO_INPROGRESS, SPIO_E_INPROGRESS = SPIO_E_ASYNC_INPROGRESS, SPIO_E_CANCELED = SPIO_E_AIO_INPROGRESS-1, SPIO_E_AIO_CANCELED = SPIO_E_CANCELED, SPIO_E_AIO_EROFS = SPIO_E_AIO_CANCELED-1, SPIO_E_AIO_EINVAL = SPIO_E_AIO_EROFS-1, SPIO_E_FILE_ = -10500, SPIO_E_FILE_NOT_FOUND = -10501, SPIO_E_FILE_ACCESS = -10502, SPIO_E_FILE_IS_DIRECTORY = -10503, SPIO_E_FILE_NOT_DIRECTORY = -10504, SPIO_E_FILE_NOT_ABSOLUTE = -10505, SPIO_E_FILE_EXISTS = -10506, SPIO_E_DIR_NOT_EMPTY = -10507, SPIO_E_INVALID_NAME = -10508, SPIO_E_NET_ = -10600, SPIO_E_NET_CONNREFUSED = SPIO_E_NET_-1, SPIO_E_NET_ADDRINUSE = SPIO_E_NET_CONNREFUSED-1, SPIO_E_NET_CONNRESET = SPIO_E_NET_ADDRINUSE-1, SPIO_E_MISC_ERROR_0 = -20000, SPIO_E_MISC_ERROR_1 = SPIO_E_MISC_ERROR_0-1, SPIO_E_MISC_ERROR_2 = SPIO_E_MISC_ERROR_1-1, SPIO_E_MISC_ERROR_3 = SPIO_E_MISC_ERROR_2-1, SPIO_E_MISC_ERROR_4 = SPIO_E_MISC_ERROR_3-1, SPIO_E_MISC_ERROR_5 = SPIO_E_MISC_ERROR_4-1, SPIO_E_MISC_ERROR_6 = SPIO_E_MISC_ERROR_5-1, SPIO_E_PRIVATE_ERROR_0 = -30000, SPIO_E_PRIVATE_ERROR_1 = SPIO_E_PRIVATE_ERROR_0-1, SPIO_E_PRIVATE_ERROR_2 = SPIO_E_PRIVATE_ERROR_1-1, SPIO_E_PRIVATE_ERROR_3 = SPIO_E_PRIVATE_ERROR_2-1, SPIO_E_PRIVATE_ERROR_4 = SPIO_E_PRIVATE_ERROR_3-1, SPIO_E_PRIVATE_ERROR_5 = SPIO_E_PRIVATE_ERROR_4-1, SPIO_E_PRIVATE_ERROR_6 = SPIO_E_PRIVATE_ERROR_5-1, SPIO_E_LAST_ERROR_CODE }; typedef enum spio_t_error_code_ spio_t_error_code; extern char const *spio_error_name(spio_t_error_code code); extern spio_t_error_code spio_map_unix_error(int posix_errno, spio_t_error_code default_error); # 244 "../spio/spio_types.h" 2 # 5 "../spio/spio_simple_device.h" 2 # 1 "../spio/spio.h" 1 #define SPIO_H_INCLUDED # 1 "../spio/spio_buf.h" 1 #define SPIO_BUF_H_INCLUDED 1 # 1 "../spio/spio_allocator.h" 1 #define SPIO_ALLOCATOR_H_INCLUDED 1 # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 5 "../spio/spio_allocator.h" 2 # 1 "../spio/spio_debug.h" 1 #define SPIO_DEBUG_H_INCLUDED #define SPIO_DEBUG 1 enum spio_t_assertions_level { SPIO_ASSERTION_DISABLE = 0, SPIO_ASSERTION_REPORT, SPIO_ASSERTION_DEBUG, SPIO_ASSERTION_ABORT }; extern enum spio_t_assertions_level spio_assertions; extern int spio_assert_failure(char const *function, char const *file, int line); extern int spio_trace_line(char const *function, char const *file, int line, char const *msg, long l, char const *string, int level); extern int spio_trace_line_p(char const *function, char const *file, int line, char const *msg, void *p, char const *string, int level); extern int spio_trace_line_lls(char const *function, char const *file, int line, char const *msg, long l1, long l2, char const *string, int level); #define SPIO_DEBUG_BREAK_FUNCTION_NEEDED 1 extern int spio_debug_break(char const *file, int line); # 38 "../spio/spio_debug.h" #define SPIO_DEBUG_BREAK_ spio_debug_break #define SPIO_ERROR_NAME_ spio_error_name #define SPIO_COMPILETIME_ASSERT(TEST) do { int spio_compiletime_assert[ (TEST) ? 1 : -1 ] = { 1 }; (void)spio_compiletime_assert; } while(0) #define SPIO_DEBUG_BREAK_FL(F,L) SPIO_DEBUG_BREAK_((F), (L)) #define SPIO_TRACE_LEVEL 1 #define SPIO_TRACE_LINE_ls(MSG,LONG,STRING) SPIO_TRACE_LINE_(SPIO__FUNCTION__, __FILE__,__LINE__, (MSG), (long)(LONG), (STRING), SPIO_TRACE_LEVEL) # 71 "../spio/spio_debug.h" #define SPIO_TRACE_LINE_lls(MSG,LONG1,LONG2,STRING) spio_trace_line_lls(SPIO__FUNCTION__, __FILE__,__LINE__, (MSG), (long)(LONG1), (long)(LONG2), (STRING), SPIO_TRACE_LEVEL) # 82 "../spio/spio_debug.h" #define SPIO_TRACE_LINE_l(MSG,LONG) SPIO_TRACE_LINE_(SPIO__FUNCTION__, __FILE__,__LINE__, (MSG), (long)(LONG), NULL, SPIO_TRACE_LEVEL) # 97 "../spio/spio_debug.h" #define SPIO_TRACE_LINE_p(MSG,PTR) spio_trace_line_p(SPIO__FUNCTION__, __FILE__,__LINE__, (MSG), (void*)(PTR), NULL, SPIO_TRACE_LEVEL) # 124 "../spio/spio_debug.h" #define SPIO_DEBUG_BREAK() SPIO_DEBUG_BREAK_FL(__FILE__, __LINE__) #define SPIO_ASSERTIONS 1 #define SPIO_ASSERT_CAST_TO_VOID_ (void) #define SPIO_ASSERT_FAILURE_ spio_assert_failure #define SPIO_ASSERT1(ENABLE,TEST) (SPIO_ASSERT_CAST_TO_VOID_ ( (ENABLE) ? ( (TEST) ? 1 : SPIO_ASSERT_FAILURE_(SPIO__FUNCTION__, __FILE__,__LINE__) ) : 1 )) # 163 "../spio/spio_debug.h" #define SPIO_ASSUME(CONDITION) #define SPIO_ASSERT(TEST) do { SPIO_ASSERT1(spio_assertions!=SPIO_ASSERTION_DISABLE, (TEST)); SPIO_ASSUME((TEST)); }while(0) #define SPIO_SOFT_ASSERTIONS 1 # 179 "../spio/spio_debug.h" #define SPIO_SOFT_ASSERT(TEST) SPIO_ASSERT((TEST)) #define SPIO_ALLOCATOR_DEBUG_ARGS_DECL , char const *file, int line #define SPIO_ALLOCATOR_DEBUG_ARGS_PASS_ON , file, line #define SPIO_ALLOCATOR_DEBUG_ARGS , __FILE__, __LINE__ #define SPIO_VALID(S) (((S) != NULL) && (*(S) != NULL)) #define SPIO_VALIDATE(S) (SPIO_VALID(S) && ((*(S))->funcs != NULL)) #define SPIO_TRACKED_CODE_ #define SPIO_BARF_HOOK(CODE) if (code != SPIO_E_IMPOSSIBLE_ERROR && code != SPIO_E_INTERNAL_ERROR SPIO_TRACKED_CODE_) {} else { SPIO_DEBUG_BREAK(); } #define SPIO_BARF(CODE) do { code = (CODE); SPIO_TRACE_LINE_ls("barf", code, SPIO_ERROR_NAME_(code)); SPIO_BARF_HOOK(code); goto SPIO_BARF_LABEL; } while (0) #define SPIO_CHECK(EXPR) if (SPIO_FAILED(code = (EXPR))) SPIO_BARF(code); else { } #define SPIO_NULL_CHECK(EXPR) if ((EXPR) == NULL) { SPIO_BARF(SPIO_E_OUT_OF_MEMORY); } else { } #define SPIO_POSIX_CHECK1(EXPR,ERRNO,DEFAULT_ERROR) if ((EXPR) == -1) { int posix_check_err_no = (ERRNO); SPIO_TRACE_LINE_l("errno==", (long)posix_check_err_no); SPIO_BARF(spio_map_unix_error(posix_check_err_no, (DEFAULT_ERROR))); } else { } #define SPIO_POSIX_CHECK(EXPR,DEFAULT_ERROR) SPIO_POSIX_CHECK1((EXPR), errno, (DEFAULT_ERROR)) # 227 "../spio/spio_debug.h" #define SPIO_ASSERT_MAIN_THREAD() SPIO_ASSERT(spio_is_in_main_thread() == SPIO_S_TRUE) # 244 "../spio/spio_debug.h" #define SPIO_DEBUG_DUMP_BACKTRACE_OPTION_STDOUT SPIO_BIT(0) #define SPIO_DEBUG_DUMP_BACKTRACE_OPTION_STDERR SPIO_NEXT_BIT(SPIO_DEBUG_DUMP_BACKTRACE_OPTION_STDOUT) extern void spio_debug_dump_backtrace(char const *title, spio_t_bits options); extern spio_t_error_code spio_is_in_main_thread(void); extern spio_t_error_code spio_init_debug(spio_t_bits options); # 8 "../spio/spio_allocator.h" 2 typedef void * spio_t_allocator_hook (void *cookie, void *ptr, size_t size); # 20 "../spio/spio_allocator.h" spio_t_error_code spio_init_allocator(spio_t_allocator_hook *fun, void *cookie, spio_t_bits options); spio_t_error_code spio_deinit_allocator(void); #define spio_allocator_alloc(SIZE) spio_allocator_alloc_((SIZE) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_allocator_realloc(PTR,SIZE) spio_allocator_realloc_((PTR), (SIZE) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_allocator_free(PTR) spio_allocator_free_((PTR) SPIO_ALLOCATOR_DEBUG_ARGS) # 35 "../spio/spio_allocator.h" void *spio_allocator_alloc_(size_t size , char const *file, int line); void *spio_allocator_realloc_(void *p, size_t size , char const *file, int line); void spio_allocator_free_(void *p , char const *file, int line); # 6 "../spio/spio_buf.h" 2 # 1 "../spio/spio_utils.h" 1 #define SPIO_UTILS_H_INCLUDED 1 # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 7 "../spio/spio_utils.h" 2 #define SPIO_SYMCAT_(A,B) A ## B #define SPIO_SYMCAT(A,B) SPIO_SYMCAT_(A, B) #define SPIO_WRONGENDIAN_ASSIGN16(TO,FROM) do{ spio_t_uint16 tmp_from = (FROM); (TO) = (((tmp_from & 0xFF) << 8) | (tmp_from >> 8)); }while(0) #define SPIO_WRONGENDIAN_ASSIGN32(TO,FROM) do{ spio_t_uint32 tmp_from = (FROM); spio_t_uint32 tmp_to; tmp_to = (tmp_from & 0xFF); tmp_to <<= 8; tmp_from >>=8; tmp_to |= (tmp_from & 0xFF); tmp_to <<= 8; tmp_from >>=8; tmp_to |= (tmp_from & 0xFF); tmp_to <<= 8; tmp_from >>=8; SPIO_ASSERT(tmp_from == (tmp_from & 0xFF)); tmp_to |= (tmp_from); (TO) = tmp_to; }while(0) # 36 "../spio/spio_utils.h" #define SPIO_RIGHTENDIAN_ASSIGN16(TO,FROM) do{ spio_t_uint16 tmp_from = (FROM); (TO) = tmp_from; }while(0) #define SPIO_RIGHTENDIAN_ASSIGN32(TO,FROM) do{ spio_t_uint32 tmp_from = (FROM); (TO) = tmp_from; }while(0) # 69 "../spio/spio_utils.h" #define SPIO_SET_MASK(VAR,BITMASK) ((VAR) |= (BITMASK)) #define SPIO_CLEAR_MASK(VAR,BITMASK) ((VAR) &= ~(BITMASK)) #define SPIO_MASK_IS_SET(VAR,BITMASK) (!!(((VAR) & (BITMASK)) == (BITMASK))) #define SPIO_MASK_IS_CLEAR(VAR,BITMASK) (!!(((VAR) & (BITMASK)) == 0)) #define SPIO_BIT(N) (((spio_t_bits)0x1) << (N)) #define SPIO_NEXT_BIT(BITMASK) (BITMASK << 1) #define SPIO_TRANSLATE_MASK(FROM_VAR,FROM_MASK,TO_VAR,TO_MASK) do{ if (SPIO_MASK_IS_SET((FROM_VAR), (FROM_MASK))) SPIO_SET_MASK((TO_VAR), (TO_MASK)); } while (0) #define SPIO_BITMASK8(B7,B6,B5,B4,B3,B2,B1,B0) (((B7)<<7)|((B6)<<6)|((B5)<<5)|((B4)<<4)|((B3)<<3)|((B2)<<2)|((B1)<<1)|((B0)<<0)) #define SPIO_FALSE 0 #define SPIO_TRUE (!SPIO_FALSE) #define spio_streq(S1,S2) (strcmp((S1),(S2))==0) #define SPIO_MIN(X,Y) ((X) < (Y) ? (X) : (Y)) #define SPIO_MAX(X,Y) ((X) > (Y) ? (X) : (Y)) #define SPIO_FIELD_OFFSET(TYPE,FIELD_NAME) offsetof(TYPE, FIELD_NAME) #define SPIO_CONTAINING_STRUCT(CONTAINING_TYPE,FIELD_NAME,FIELD_ADDRESS) ((CONTAINING_TYPE*)(((char *)(FIELD_ADDRESS))-SPIO_FIELD_OFFSET(CONTAINING_TYPE, FIELD_NAME))) #define SPIO_ROUND_DOWN(X,GRANULARITY) (((X)/(GRANULARITY)) * (GRANULARITY)) #define SPIO_ROUND_UP(X,GRANULARITY) SPIO_ROUND_DOWN((X)+((GRANULARITY)-1), (GRANULARITY)) extern spio_t_error_code spio_get_arg(spio_t_arglist args, char const *key, spio_t_variant_type type, void const **value); extern spio_t_error_code spio_get_arg_variant(spio_t_arglist args, char const *key, spio_t_variant const **value); extern spio_t_error_code spio_get_arg_string(spio_t_arglist args, char const *key, char const **value); typedef spio_t_error_code spio_t_group_predicate(void *key, void *value, void *user_data); spio_t_error_code spio_group_by_pred(spio_t_group_predicate *pred, void* keys[], void *values[], void *user_data, size_t *pnitems, spio_t_bits options); extern spio_t_error_code spio_double_to_timespec(double x, spio_t_timespec *ptimespec); # 7 "../spio/spio_buf.h" 2 # 50 "../spio/spio_buf.h" typedef struct spio_t_buf_ spio_t_buf; struct spio_t_buf_ { spio_t_uint8 *buf; size_t extent; size_t writable_size; spio_t_bits flags; spio_t_bits pad; }; #define SPIO_BUF_INITIALIZER_(BUF,EXTENT,WRITABLE_SIZE,FLAGS) { (BUF), (EXTENT), (WRITABLE_SIZE), (FLAGS), 0 } # 69 "../spio/spio_buf.h" #define SPIO_BUF_F_FREED SPIO_BIT(0) #define SPIO_BUF_F_STATIC_BUF SPIO_BIT(1) #define SPIO_BUF_F_FIXED_BUF SPIO_BIT(3) #define SPIO_BUF_F_STATIC_STRUCT SPIO_BIT(2) #define SPIO_BUF_IS_EMPTY(BUF) ((BUF)->extent == 0) #define SPIO_DECLARE_INDIRECT_RO_BUF(NAME,SIZE,DATA) spio_t_buf NAME ## _SPIO_STATIC_RO = SPIO_BUF_INITIALIZER_( (DATA), (SIZE), 0, (SPIO_BUF_F_STATIC_BUF|SPIO_BUF_F_STATIC_STRUCT) ); spio_t_buf *NAME = &NAME ## _SPIO_STATIC_RO # 87 "../spio/spio_buf.h" #define SPIO_DECLARE_INDIRECT_RW_BUF(NAME,SIZE,DATA) spio_t_buf NAME ## _SPIO_STATIC_RW = SPIO_BUF_INITIALIZER_( (DATA), (SIZE), (SIZE), (SPIO_BUF_F_STATIC_BUF|SPIO_BUF_F_STATIC_STRUCT) ); spio_t_buf *NAME = &NAME ## _SPIO_STATIC_RW # 97 "../spio/spio_buf.h" #define SPIO_DECLARE_EMPTY_STATIC_BUF(NAME) SPIO_DECLARE_INDIRECT_RO_BUF(NAME, 0, NULL) #define SPIO_DECLARE_INDIRECT_FIXED_RW_BUF(NAME,SIZE,DATA) spio_t_buf NAME ## _SPIO_STATIC_FIXED_RW = SPIO_BUF_INITIALIZER_( (DATA), 0, (SIZE), (SPIO_BUF_F_FIXED_BUF|SPIO_BUF_F_STATIC_BUF|SPIO_BUF_F_STATIC_STRUCT) ); spio_t_buf *NAME = &NAME ## _SPIO_STATIC_FIXED_RW # 111 "../spio/spio_buf.h" #define spio_buf_alloc(DATA,SIZE,OPTIONS) spio_buf_alloc_((DATA),(SIZE),(OPTIONS) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_buf_reserve(PTR,EXTRA) spio_buf_reserve_((PTR), (EXTRA) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_buf_reset(PTR,SIZE) spio_buf_reset_((PTR), (SIZE) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_buf_free(PTR) spio_buf_free_((PTR) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_buf_trim(PTR) spio_buf_trim_((PTR) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_buf_get_buf(PTR,PDATA,PSIZE) spio_buf_get_buf_((PTR), (PDATA), (PSIZE) SPIO_ALLOCATOR_DEBUG_ARGS) # 131 "../spio/spio_buf.h" extern spio_t_error_code spio_init_buf(spio_t_bits options); #define SPIO_BUF_ALLOC_OPTION_FREE_DATA SPIO_BIT(0) #define SPIO_BUF_ALLOC_OPTION_READ_ONLY SPIO_NEXT_BIT(SPIO_BUF_ALLOC_OPTION_FREE_DATA) #define SPIO_BUF_ALLOC_OPTION_COPY_DATA SPIO_NEXT_BIT(SPIO_BUF_ALLOC_OPTION_READ_ONLY) #define SPIO_BUF_ALLOC_OPTION_FIXED_SIZE SPIO_NEXT_BIT(SPIO_BUF_ALLOC_OPTION_COPY_DATA) extern spio_t_buf *spio_buf_alloc_(void *data, size_t size, spio_t_bits options , char const *file, int line); # 148 "../spio/spio_buf.h" extern spio_t_error_code spio_buf_reserve_(spio_t_buf *, size_t extra , char const *file, int line); extern spio_t_error_code spio_buf_reset_(spio_t_buf *, size_t size , char const *file, int line); extern spio_t_error_code spio_buf_trim_(spio_t_buf * , char const *file, int line); extern void spio_buf_free_(spio_t_buf * , char const *file, int line); #define SPIO_BUF_CONCAT_OPTION_ALLOW_SWITCH SPIO_BIT(0) extern spio_t_error_code spio_buf_concat(spio_t_buf *buf, spio_t_buf *suffix, spio_t_bits options); extern spio_t_error_code spio_buf_concat_bytes(spio_t_buf *buf, void const *bytes, size_t nbytes); extern spio_t_error_code spio_buf_concat_string(spio_t_buf *buf, char const *string); extern spio_t_error_code spio_buf_push(spio_t_buf *buf, spio_t_uint8 byte); extern spio_t_error_code spio_buf_pop(spio_t_buf *buf, spio_t_uint8 *pbyte); extern spio_t_error_code spio_buf_contract(spio_t_buf *buf, spio_t_ssize amount); extern void spio_buf_init_buf(spio_t_buf *buf); spio_t_error_code spio_buf_get_buf_(spio_t_buf *buf, spio_t_uint8 **pdata, size_t *psize , char const *file, int line); # 5 "../spio/spio.h" 2 # 1 "../spio/spio_event.h" 1 #define SPIO_EVENT_H_INCLUDED 1 typedef struct spio_t_event_ spio_t_event; typedef struct spio_t_event_funcs_ spio_t_event_funcs; struct spio_t_event_funcs_ { spio_t_error_code (*set)(spio_t_event *event); spio_t_error_code (*reset)(spio_t_event *event); spio_t_error_code (*query)(spio_t_event *event); void (*release)(spio_t_event *event); }; struct spio_t_event_ { spio_t_event_funcs *funcs; #define SPIO_EVENT_FLAG_READONLY_ SPIO_BIT(0) #define SPIO_EVENT_FLAG_PRIVATE1 SPIO_NEXT_BIT(SPIO_EVENT_FLAG_READONLY_) #define SPIO_EVENT_FLAG_PRIVATE2 SPIO_NEXT_BIT(SPIO_EVENT_FLAG_PRIVATE1) #define SPIO_EVENT_FLAG_PRIVATE3 SPIO_NEXT_BIT(SPIO_EVENT_FLAG_PRIVATE2) #define SPIO_EVENT_FLAG_PRIVATE4 SPIO_NEXT_BIT(SPIO_EVENT_FLAG_PRIVATE3) #define SPIO_EVENT_FLAG_PRIVATE5 SPIO_NEXT_BIT(SPIO_EVENT_FLAG_PRIVATE4) spio_t_bits flags; }; extern spio_t_error_code spio_event_set(spio_t_event *event); extern spio_t_error_code spio_event_reset(spio_t_event *event); extern spio_t_error_code spio_event_query(spio_t_event *event); extern spio_t_error_code spio_event_wait(spio_t_event *events[], size_t nevents, spio_t_timespec *timeout); extern spio_t_error_code spio_init_event(spio_t_bits options); #define SPIO_EVENT_NEW_OPTION_SET SPIO_BIT(0) extern spio_t_error_code spio_event_new(spio_t_bits options, spio_t_event **pevent); extern void spio_event_free(spio_t_event *event); # 6 "../spio/spio.h" 2 # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 10 "../spio/spio.h" 2 #define SPIO_OPTION_NONE 0 # 22 "../spio/spio.h" #define SPIO_OPTION_PRIVATE_BIT_OFFSET 20 #define SPIO_OPTION_PUBLIC_MASK ((0x1 << SPIO_OPTION_PRIVATE_BIT_OFFSET)-1) #define SPIO_OPTION_PRIVATE_MASK (~ SPIO_OPTION_PUBLIC_MASK) #define SPIO_PRIVATE_OPTION_0_ (0x1 << (SPIO_OPTION_PRIVATE_BIT_OFFSET+ 0)) #define SPIO_OPTION_USE_PRIVATE SPIO_PRIVATE_OPTION_0_ #define SPIO_PRIVATE_OPTION_1 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 1) #define SPIO_PRIVATE_OPTION_2 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 2) #define SPIO_PRIVATE_OPTION_3 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 3) #define SPIO_PRIVATE_OPTION_4 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 4) #define SPIO_PRIVATE_OPTION_5 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 5) #define SPIO_PRIVATE_OPTION_6 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 6) #define SPIO_PRIVATE_OPTION_7 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 7) #define SPIO_PRIVATE_OPTION_8 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 8) #define SPIO_PRIVATE_OPTION_9 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+ 9) #define SPIO_PRIVATE_OPTION_10 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+10) #define SPIO_PRIVATE_OPTION_11 SPIO_BIT(SPIO_OPTION_PRIVATE_BIT_OFFSET+11) #define SPIO_OPTION_DEINIT SPIO_BIT(0) typedef struct spio_t_layer_ spio_t_layer; # 61 "../spio/spio.h" typedef spio_t_layer *SPIO; enum spio_t_ioctl_operation_ { SPIO_IOCTL_UNDEFINED = 0, SPIO_IOCTL_READABLE_EVENT_, #define SPIO_IOCTL_READABLE_EVENT_ SPIO_IOCTL_READABLE_EVENT_ #define SPIO_IOCTL_READABLE_EVENT ((spio_t_ioctl_operation)SPIO_IOCTL_READABLE_EVENT_) SPIO_IOCTL_WRITABLE_EVENT_, #define SPIO_IOCTL_WRITABLE_EVENT_ SPIO_IOCTL_WRITABLE_EVENT_ #define SPIO_IOCTL_WRITABLE_EVENT ((spio_t_ioctl_operation)SPIO_IOCTL_WRITABLE_EVENT_) SPIO_IOCTL_DEVICE_TYPE_, #define SPIO_IOCTL_DEVICE_TYPE_ SPIO_IOCTL_DEVICE_TYPE_ #define SPIO_IOCTL_DEVICE_TYPE ((spio_t_ioctl_operation)SPIO_IOCTL_DEVICE_TYPE_) SPIO_IOCTL_GET_ENCODING_NAME_, #define SPIO_IOCTL_GET_ENCODING_NAME_ SPIO_IOCTL_GET_ENCODING_NAME_ #define SPIO_IOCTL_GET_ENCODING_NAME ((spio_t_ioctl_operation)SPIO_IOCTL_GET_ENCODING_NAME_) SPIO_IOCTL_ENCODING_FALLBACK_, #define SPIO_IOCTL_ENCODING_FALLBACK_ SPIO_IOCTL_ENCODING_FALLBACK_ #define SPIO_IOCTL_ENCODING_FALLBACK ((spio_t_ioctl_operation)SPIO_IOCTL_ENCODING_FALLBACK_) SPIO_IOCTL_SIZE_, #define SPIO_IOCTL_SIZE_ SPIO_IOCTL_SIZE_ #define SPIO_IOCTL_SIZE ((spio_t_ioctl_operation)SPIO_IOCTL_SIZE_) SPIO_IOCTL_LAST_PREDEFINED_, #define SPIO_IOCTL_LAST_PREDEFINED_ SPIO_IOCTL_LAST_PREDEFINED_ #define SPIO_IOCTL_LAST_PREDEFINED ((spio_t_ioctl_operation)SPIO_IOCTL_LAST_PREDEFINED_) # 105 "../spio/spio.h" SPIO_IOCTL_PRIVATE_LAST_ }; typedef void * spio_t_ioctl_operation; typedef struct spio_t_funcs_ spio_t_funcs; struct spio_t_funcs_ { size_t sizeof_spio_t_funcs; char const *name; size_t layer_size; spio_t_bits features; spio_t_bits reserved; #define SPIO_READ_OPTION_BINARY SPIO_BIT(0) #define SPIO_READ_OPTION_TEXT SPIO_NEXT_BIT(SPIO_READ_OPTION_BINARY) #define SPIO_READ_OPTION_NONBLOCKING SPIO_NEXT_BIT(SPIO_READ_OPTION_TEXT) spio_t_error_code (*read)(SPIO *s, spio_t_buf *buf, spio_t_bits options); #define SPIO_WRITE_OPTION_BINARY SPIO_BIT(0) #define SPIO_WRITE_OPTION_TEXT SPIO_NEXT_BIT(SPIO_WRITE_OPTION_BINARY) #define SPIO_WRITE_OPTION_NONBLOCKING SPIO_NEXT_BIT(SPIO_WRITE_OPTION_TEXT) #define SPIO_WRITE_OPTION_FORCE SPIO_NEXT_BIT(SPIO_WRITE_OPTION_NONBLOCKING) #define SPIO_WRITE_OPTION_EOF SPIO_NEXT_BIT(SPIO_WRITE_OPTION_FORCE) spio_t_error_code (*write)(SPIO *s, spio_t_buf *buf, size_t *poffset, spio_t_bits options); #define SPIO_WRITE_OPTION_DISALLOW_PARTIAL SPIO_NEXT_BIT(SPIO_WRITE_OPTION_EOF) #define SPIO_SYNC_OPTION_NONBLOCKING SPIO_BIT(0) #define SPIO_SYNC_OPTION_READ SPIO_NEXT_BIT(SPIO_SYNC_OPTION_NONBLOCKING) #define SPIO_SYNC_OPTION_WRITE SPIO_NEXT_BIT(SPIO_SYNC_OPTION_READ) #define SPIO_SYNC_OPTION_RECURSE SPIO_NEXT_BIT(SPIO_SYNC_OPTION_WRITE) #define SPIO_SYNC_OPTION_CLOSE SPIO_NEXT_BIT(SPIO_SYNC_OPTION_RECURSE) #define SPIO_SYNC_OPTION_POP SPIO_NEXT_BIT(SPIO_SYNC_OPTION_CLOSE) spio_t_error_code (*sync)(SPIO *s, spio_t_bits options); #define SPIO_SEEK_OPTION_SET SPIO_BIT(0) #define SPIO_SEEK_OPTION_CUR SPIO_NEXT_BIT(SPIO_SEEK_OPTION_SET) #define SPIO_SEEK_OPTION_END SPIO_NEXT_BIT(SPIO_SEEK_OPTION_CUR) #define SPIO_SEEK_OPTION_DATA SPIO_NEXT_BIT(SPIO_SEEK_OPTION_END) #define SPIO_SEEK_OPTION_READ SPIO_NEXT_BIT(SPIO_SEEK_OPTION_DATA) #define SPIO_SEEK_OPTION_WRITE SPIO_NEXT_BIT(SPIO_SEEK_OPTION_READ) spio_t_error_code (*seek)(SPIO *s, spio_t_offset offset, spio_t_offset *new_pos, spio_t_buf *buf, spio_t_bits options); #define SPIO_CLOSE_OPTION_ABORT SPIO_BIT(0) #define SPIO_CLOSE_OPTION_READ SPIO_NEXT_BIT(SPIO_CLOSE_OPTION_ABORT) #define SPIO_CLOSE_OPTION_WRITE SPIO_NEXT_BIT(SPIO_CLOSE_OPTION_READ) #define SPIO_CLOSE_OPTION_NONBLOCKING SPIO_NEXT_BIT(SPIO_CLOSE_OPTION_WRITE) spio_t_error_code (*close)(SPIO *s, spio_t_bits options); #define SPIO_PUSH_OPTION_POPPABLE SPIO_BIT(0) #define SPIO_PUSH_OPTION_SEEKABLE_BACK SPIO_NEXT_BIT(SPIO_PUSH_OPTION_POPPABLE) # 195 "../spio/spio.h" spio_t_error_code (*push)(spio_t_funcs *funcs, SPIO *s, spio_t_arglist args, spio_t_bits options); spio_t_error_code (*pop)(spio_t_funcs *funcs, SPIO *s, spio_t_bits options); void (*destroy)(spio_t_layer *layer); #define SPIO_OPEN_OPTION_READ SPIO_BIT(0) #define SPIO_OPEN_OPTION_WRITE SPIO_NEXT_BIT(SPIO_OPEN_OPTION_READ) #define SPIO_OPEN_OPTION_APPEND SPIO_NEXT_BIT(SPIO_OPEN_OPTION_WRITE) #define SPIO_OPEN_OPTION_NEW SPIO_NEXT_BIT(SPIO_OPEN_OPTION_APPEND) #define SPIO_OPEN_OPTION_KEEP_FILE_HANDLE SPIO_NEXT_BIT(SPIO_OPEN_OPTION_NEW) # 227 "../spio/spio.h" spio_t_error_code (*open)(spio_t_funcs *funcs, SPIO *s, spio_t_arglist args, spio_t_bits options); spio_t_error_code (*ioctl)(SPIO *s, spio_t_ioctl_operation operation, void *ioctl_param, spio_t_bits options); }; struct spio_t_layer_ { spio_t_funcs *funcs; spio_t_layer *next; # 327 "../spio/spio.h" #define SPIO_LAYER_FLAG_READ SPIO_BIT(0) #define SPIO_LAYER_FLAG_CANREAD SPIO_NEXT_BIT(SPIO_LAYER_FLAG_READ) #define SPIO_LAYER_FLAG_WRITE SPIO_NEXT_BIT(SPIO_LAYER_FLAG_CANREAD) #define SPIO_LAYER_FLAG_CANWRITE SPIO_NEXT_BIT(SPIO_LAYER_FLAG_WRITE) #define SPIO_LAYER_FLAG_OPEN_READ SPIO_NEXT_BIT(SPIO_LAYER_FLAG_CANWRITE) #define SPIO_LAYER_FLAG_OPEN_WRITE SPIO_NEXT_BIT(SPIO_LAYER_FLAG_OPEN_READ) #define SPIO_LAYER_FLAG_KEEP_FILE_HANDLE SPIO_NEXT_BIT(SPIO_LAYER_FLAG_OPEN_WRITE) #define SPIO_LAYER_FLAG_CLOSING_READ SPIO_NEXT_BIT(SPIO_LAYER_FLAG_KEEP_FILE_HANDLE) #define SPIO_LAYER_FLAG_CLOSING_WRITE SPIO_NEXT_BIT(SPIO_LAYER_FLAG_CLOSING_READ) #define SPIO_LAYER_FLAG_SEEKABLE_OFFSET SPIO_NEXT_BIT(SPIO_LAYER_FLAG_CLOSING_WRITE) #define SPIO_LAYER_FLAG_SEEKABLE_DATA SPIO_NEXT_BIT(SPIO_LAYER_FLAG_SEEKABLE_OFFSET) #define SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_1 SPIO_NEXT_BIT(SPIO_LAYER_FLAG_SEEKABLE_DATA) #define SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_2 SPIO_NEXT_BIT(SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_1) #define SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_4 SPIO_NEXT_BIT(SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_2) #define SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_1 SPIO_NEXT_BIT(SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_4) #define SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_2 SPIO_NEXT_BIT(SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_1) #define SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_4 SPIO_NEXT_BIT(SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_2) # 364 "../spio/spio.h" #define SPIO_LAYER_FLAG_IMMORTAL_IS_GONE_ SPIO_NEXT_BIT(SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_4) #define SPIO_LAYER_FLAG_LAST_ SPIO_LAYER_FLAG_IMMORTAL_IS_GONE_ #define SPIO_READ_GRANULARITY(FLAGS) ( (((FLAGS) & SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_1) ? 1 : 0) + (((FLAGS) & SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_2) ? 2 : 0) + (((FLAGS) & SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_4) ? 4 : 0) ) #define SPIO_SET_READ_GRANULARITY(FLAGS,GRANULARITY) ( (FLAGS) |= (((GRANULARITY) & 1) ? SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_1 : 0) | (((GRANULARITY) & 2) ? SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_2 : 0) | (((GRANULARITY) & 4) ? SPIO_LAYER_FLAG_READ_GRANULARITY_BIT_4 : 0) ) # 386 "../spio/spio.h" #define SPIO_WRITE_GRANULARITY(FLAGS) ( (((FLAGS) & SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_1) ? 1 : 0) + (((FLAGS) & SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_2) ? 2 : 0) + (((FLAGS) & SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_4) ? 4 : 0) ) #define SPIO_SET_WRITE_GRANULARITY(FLAGS,GRANULARITY) ( (FLAGS) |= (((GRANULARITY) & 1) ? SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_1 : 0) | (((GRANULARITY) & 2) ? SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_2 : 0) | (((GRANULARITY) & 4) ? SPIO_LAYER_FLAG_WRITE_GRANULARITY_BIT_4 : 0) ) # 405 "../spio/spio.h" spio_t_bits flags; spio_t_bits pad; }; # 446 "../spio/spio.h" extern spio_t_error_code spio_init(spio_t_allocator_hook *allocator, void *cookie, spio_t_bits options); #define spio_alloc(SIZE) spio_alloc_((SIZE) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_realloc(PTR,SIZE) spio_realloc_((PTR), (SIZE) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_free(PTR) spio_free_((PTR) SPIO_ALLOCATOR_DEBUG_ARGS) #define spio_alloc_string(STRING) spio_alloc_string_((STRING) SPIO_ALLOCATOR_DEBUG_ARGS) # 461 "../spio/spio.h" extern void *spio_alloc_(size_t size , char const *file, int line); extern void *spio_alloc_string_(char const *string , char const *file, int line); extern void *spio_realloc_(void *, size_t size , char const *file, int line); extern void spio_free_(void * , char const *file, int line); extern spio_t_error_code spio_register_layer(spio_t_funcs *funcs, spio_t_bits options); extern spio_t_error_code spio_find_layer(char const *name, spio_t_funcs **funcs, spio_t_bits options); extern spio_t_error_code spio_open(spio_t_funcs *funcs, SPIO *s, spio_t_arglist args, spio_t_bits options); extern spio_t_error_code spio_open_by_name(char const *layer_name, SPIO *s, spio_t_arglist args, spio_t_bits options); extern spio_t_error_code spio_close(SPIO *s, spio_t_bits open_options); extern spio_t_error_code spio_push(spio_t_funcs *funcs, SPIO *s, spio_t_arglist args, spio_t_bits options); extern spio_t_error_code spio_push_by_name(char const *layer_name, SPIO *s, spio_t_arglist push_args, spio_t_bits push_options); extern spio_t_error_code spio_pop(spio_t_funcs *funcs, SPIO *s, spio_t_bits options); extern spio_t_error_code spio_read(SPIO *s, spio_t_buf **pbuf, spio_t_bits options); extern spio_t_error_code spio_write(SPIO *s, spio_t_buf *buf, size_t *poffset, spio_t_bits options); extern spio_t_error_code spio_seek(SPIO *s, spio_t_offset offset, spio_t_offset *new_pos, spio_t_buf *buf, spio_t_bits options); extern spio_t_error_code spio_sync(SPIO *s, spio_t_bits options); #define SPIO_GET_SPIO_LAYER_OPTION_NEXT SPIO_BIT(0) extern spio_t_error_code spio_get_spio_layer(SPIO const *s, spio_t_funcs *funcs, SPIO *spio_layer, spio_t_bits options); #define SPIO_IOCTL_OPTION_RECURSE SPIO_BIT(0) #define SPIO_IOCTL_OPTION_PRIVATE1 SPIO_NEXT_BIT(SPIO_IOCTL_OPTION_RECURSE) #define SPIO_IOCTL_OPTION_PRIVATE2 SPIO_NEXT_BIT(SPIO_IOCTL_OPTION_PRIVATE1) #define SPIO_IOCTL_OPTION_PRIVATE3 SPIO_NEXT_BIT(SPIO_IOCTL_OPTION_PRIVATE2) #define SPIO_IOCTL_OPTION_PRIVATE4 SPIO_NEXT_BIT(SPIO_IOCTL_OPTION_PRIVATE3) #define SPIO_IOCTL_OPTION_PRIVATE5 SPIO_NEXT_BIT(SPIO_IOCTL_OPTION_PRIVATE4) #define SPIO_IOCTL_OPTION_PRIVATE6 SPIO_NEXT_BIT(SPIO_IOCTL_OPTION_PRIVATE5) #define SPIO_IOCTL_OPTION_PRIVATE7 SPIO_NEXT_BIT(SPIO_IOCTL_OPTION_PRIVATE6) spio_t_error_code spio_ioctl(SPIO *s, spio_t_ioctl_operation operation, void *param, spio_t_bits options); typedef struct spio_t_ioctl_spio_set_ spio_t_ioctl_spio_set; struct spio_t_ioctl_spio_set_ { spio_t_ioctl_operation operation; SPIO **spios; void **ids; size_t nitems; void *user_data; }; spio_t_error_code spio_ioctl_readable_event(SPIO *s, spio_t_event **pevent, spio_t_bits options); spio_t_error_code spio_ioctl_writable_event(SPIO *s, spio_t_event **pevent, spio_t_bits options); #define SPIO_IOCTL_DEVICE_TYPE_OPTION_READ SPIO_IOCTL_OPTION_PRIVATE1 #define SPIO_IOCTL_DEVICE_TYPE_OPTION_WRITE SPIO_IOCTL_OPTION_PRIVATE2 spio_t_error_code spio_ioctl_device_type(SPIO *s, spio_t_device_type *ptype, spio_t_bits options); #define SPIO_IOCTL_ENCODING_FALLBACK_OPTION_READ SPIO_IOCTL_OPTION_PRIVATE1 #define SPIO_IOCTL_ENCODING_FALLBACK_OPTION_WRITE SPIO_IOCTL_OPTION_PRIVATE2 #define SPIO_IOCTL_GET_ENCODING_NAME_OPTION_READ SPIO_IOCTL_OPTION_PRIVATE1 #define SPIO_IOCTL_GET_ENCODING_NAME_OPTION_WRITE SPIO_IOCTL_OPTION_PRIVATE2 spio_t_error_code spio_ioctl_get_encoding_name(SPIO *s, char const **pname, spio_t_bits options); #define SPIO_IOCTL_ENCODING_FALLBACK_OPTION_FALLBACK_ON_INVALID SPIO_IOCTL_OPTION_PRIVATE3 #define SPIO_IOCTL_ENCODING_FALLBACK_OPTION_FALLBACK_ERROR SPIO_IOCTL_OPTION_PRIVATE5 #define SPIO_IOCTL_ENCODING_FALLBACK_OPTION_FALLBACK_REPLACE SPIO_IOCTL_OPTION_PRIVATE6 spio_t_error_code spio_ioctl_encoding_fallback(SPIO *s, spio_t_bits options); #define SPIO_IOCTL_SIZE_OPTION_READ SPIO_IOCTL_OPTION_PRIVATE1 #define SPIO_IOCTL_SIZE_OPTION_WRITE SPIO_IOCTL_OPTION_PRIVATE2 spio_t_error_code spio_ioctl_size(SPIO *s, spio_t_offset *psize, spio_t_bits options); extern void spio_layer_pop(SPIO *s); extern void spio_layer_push(SPIO *s, spio_t_layer *layer); extern void spio_layer_destroy(spio_t_layer *layer); extern spio_t_error_code spio_write_dbg(SPIO *s, char const *text); extern void spio_interrupt(void); typedef void spio_t_interrupt_hook_fun(void *cookie); extern spio_t_error_code spio_register_interrupt_hook(spio_t_interrupt_hook_fun* fun, void*cookie, spio_t_bits options); #define SPIO_STANDARD_STREAM_OPTION_STREAM_BITS SPIO_BIT(0) #define SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_1 SPIO_NEXT_BIT(SPIO_STANDARD_STREAM_OPTION_STREAM_BITS) #define SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_2 SPIO_NEXT_BIT(SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_1) #define SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_HIGHEST SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_2 #define SPIO_STANDARD_STREAM_OPTION_INPUT_STREAM SPIO_STANDARD_STREAM_OPTION_STREAM_BITS|0 #define SPIO_STANDARD_STREAM_OPTION_OUTPUT_STREAM SPIO_STANDARD_STREAM_OPTION_STREAM_BITS|SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_1 #define SPIO_STANDARD_STREAM_OPTION_ERROR_STREAM SPIO_STANDARD_STREAM_OPTION_STREAM_BITS|SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_2 #define SPIO_STANDARD_STREAM_OPTION_LAST_COMMON_OPTION_ SPIO_STANDARD_STREAM_OPTION_STREAM_BIT_HIGHEST #define SPIO_SET_STANDARD_STREAM_OPTION_CLOSE_READ SPIO_NEXT_BIT(SPIO_STANDARD_STREAM_OPTION_LAST_COMMON_OPTION_) #define SPIO_SET_STANDARD_STREAM_OPTION_CLOSE_WRITE SPIO_NEXT_BIT(SPIO_SET_STANDARD_STREAM_OPTION_CLOSE_READ) extern spio_t_error_code spio_set_standard_stream(SPIO *s, spio_t_bits options); extern spio_t_error_code spio_get_standard_stream(SPIO *s, spio_t_bits options); extern spio_t_error_code spio_open_file_descriptor(SPIO *s, int fd, spio_t_bits options); #define SPIO_LOCK() #define SPIO_UNLOCK() # 7 "../spio/spio_simple_device.h" 2 #define SPIO_DEVICE_READ_OPTION_NONBLOCKING SPIO_BIT(0) #define SPIO_DEVICE_READ_OPTION_BINARY SPIO_NEXT_BIT(SPIO_DEVICE_READ_OPTION_NONBLOCKING) #define SPIO_DEVICE_READ_OPTION_TEXT SPIO_NEXT_BIT(SPIO_DEVICE_READ_OPTION_BINARY) typedef spio_t_error_code spio_t_simple_device_read(void *user_data, void *buf, size_t *pbuf_size, spio_t_bits read_options ); #define SPIO_DEVICE_WRITE_OPTION_NONBLOCKING SPIO_BIT(0) #define SPIO_DEVICE_WRITE_OPTION_BINARY SPIO_NEXT_BIT(SPIO_DEVICE_WRITE_OPTION_NONBLOCKING) #define SPIO_DEVICE_WRITE_OPTION_TEXT SPIO_NEXT_BIT(SPIO_DEVICE_WRITE_OPTION_BINARY) typedef spio_t_error_code spio_t_simple_device_write(void *user_data, void *buf, size_t *pbuf_size, spio_t_bits write_options ); #define SPIO_DEVICE_FLUSH_OPTION_NONBLOCKING SPIO_BIT(0) typedef spio_t_error_code spio_t_simple_device_flush_output(void *user_data, spio_t_bits flush_options ); typedef spio_t_error_code spio_t_simple_device_seek(void *user_data, spio_t_offset offset, spio_t_offset *new_pos, void *reserved, spio_t_bits seek_options ); #define SPIO_DEVICE_CLOSE_OPTION_READ SPIO_BIT(0) #define SPIO_DEVICE_CLOSE_OPTION_WRITE SPIO_NEXT_BIT(SPIO_DEVICE_CLOSE_OPTION_READ) #define SPIO_DEVICE_CLOSE_OPTION_FORCE SPIO_NEXT_BIT(SPIO_DEVICE_CLOSE_OPTION_WRITE) typedef spio_t_error_code spio_t_simple_device_close(void **puser_data, spio_t_bits close_options ); typedef void spio_t_simple_device_interrupt(void *user_data, spio_t_bits interrupt_options ); typedef spio_t_error_code spio_t_simple_device_ioctl(void *user_data, void *param, spio_t_bits ioctl_options ); #define SPIO_CREATE_DEVICE_OPTION_BINARY SPIO_BIT(0) #define SPIO_CREATE_DEVICE_OPTION_TEXT SPIO_NEXT_BIT(SPIO_CREATE_DEVICE_OPTION_BINARY) extern spio_t_error_code spio_create_device(SPIO *s, void *user_data, void const *user_class, spio_t_simple_device_read *user_read, spio_t_simple_device_write *user_write, spio_t_simple_device_flush_output *user_flush_output, spio_t_simple_device_seek *user_seek, spio_t_simple_device_close *user_close, spio_t_simple_device_interrupt *user_interrupt, spio_t_simple_device_ioctl *user_ioctl, spio_t_bits create_options ); extern spio_t_error_code spio_get_device_user_data(SPIO const *s, void const *user_class, void **puser_data, spio_t_bits options); # 27 "../sicstus_spio.h" 2 # 1 "../spio/spio_char_coder.h" 1 #define SPIO_CHAR_CODER_H_INCLUDED typedef struct spio_t_coder_ spio_t_coder; typedef struct spio_t_coder_funcs_ spio_t_coder_funcs; struct spio_t_coder_funcs_ { size_t sizeof_spio_t_coder_funcs; char const *name; char const * const *aliases; spio_t_bits features; spio_t_refcount refcount; void(*free)(spio_t_coder *coder); #define SPIO_CHAR_CODER_ENCODE_OPTION_EOF SPIO_BIT(0) #define SPIO_CHAR_CODER_ENCODE_OPTION_FALLBACK_ON_INVALID SPIO_NEXT_BIT(SPIO_CHAR_CODER_ENCODE_OPTION_EOF) #define SPIO_CHAR_CODER_ENCODE_OPTION_FALLBACK_DEFAULT_ SPIO_NEXT_BIT(SPIO_CHAR_CODER_ENCODE_OPTION_FALLBACK_ON_INVALID) #define SPIO_CHAR_CODER_ENCODE_OPTION_FALLBACK_ERROR SPIO_NEXT_BIT(SPIO_CHAR_CODER_ENCODE_OPTION_FALLBACK_DEFAULT_) #define SPIO_CHAR_CODER_ENCODE_OPTION_FALLBACK_REPLACE SPIO_NEXT_BIT(SPIO_CHAR_CODER_ENCODE_OPTION_FALLBACK_ERROR) spio_t_error_code (*encode)(spio_t_coder *coder, spio_t_buf *from_buf, size_t *pfrom_buf_offset, spio_t_buf *to_buf, spio_t_bits options); void (*commit)(spio_t_coder *coder); void (*rollback)(spio_t_coder *coder); spio_t_error_code (*translate_offset)(spio_t_coder *coder, spio_t_offset from_offset, spio_t_offset *pto_offset); spio_t_error_code (*seek)(spio_t_coder *coder, spio_t_offset offset, spio_t_bits options); void (*addref)(spio_t_coder_funcs *); void (*release)(spio_t_coder_funcs *); void (*destroy)(spio_t_coder_funcs *); #define SPIO_CHAR_CODER_OPEN_OPTION_SEEKABLE_BACK SPIO_BIT(0) #define SPIO_CHAR_CODER_OPEN_OPTION_DECODE SPIO_NEXT_BIT(SPIO_CHAR_CODER_OPEN_OPTION_SEEKABLE_BACK) #define SPIO_CHAR_CODER_OPEN_OPTION_EOL_CRLF SPIO_NEXT_BIT(SPIO_CHAR_CODER_OPEN_OPTION_DECODE) #define SPIO_CHAR_CODER_OPEN_OPTION_EOL_AUTO SPIO_NEXT_BIT(SPIO_CHAR_CODER_OPEN_OPTION_EOL_CRLF) #define SPIO_CHAR_CODER_OPEN_OPTION_BOM SPIO_NEXT_BIT(SPIO_CHAR_CODER_OPEN_OPTION_EOL_AUTO) #define SPIO_CHAR_CODER_OPEN_OPTION_BOM_OPTIONAL SPIO_NEXT_BIT(SPIO_CHAR_CODER_OPEN_OPTION_BOM) spio_t_error_code (*open)(spio_t_coder_funcs *funcs, spio_t_coder **pcoder, spio_t_arglist args, spio_t_bits options); }; struct spio_t_coder_ { spio_t_coder_funcs *funcs; #define SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_1 SPIO_BIT(0) #define SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_2 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_1) #define SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_4 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_2) #define SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_1 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_4) #define SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_2 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_1) #define SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_4 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_2) #define SPIO_CHAR_CODER_FLAG_DECODE SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_4) #define SPIO_CHAR_CODER_FLAG_SEEKABLE_BACK SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_DECODE) #define SPIO_CHAR_CODER_FLAG_EOL_CRLF SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_SEEKABLE_BACK) #define SPIO_CHAR_CODER_FLAG_EOL_AUTO SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_EOL_CRLF) #define SPIO_CHAR_CODER_FLAG_BOM SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_EOL_AUTO) #define SPIO_CHAR_CODER_FLAG_PRIVATE_1 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_BOM) #define SPIO_CHAR_CODER_FLAG_PRIVATE_2 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_PRIVATE_1) #define SPIO_CHAR_CODER_FLAG_PRIVATE_3 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_PRIVATE_2) #define SPIO_CHAR_CODER_FLAG_PRIVATE_4 SPIO_NEXT_BIT(SPIO_CHAR_CODER_FLAG_PRIVATE_3) spio_t_bits flags; # 107 "../spio/spio_char_coder.h" }; #define SPIO_CHAR_CODER_FLAG_TO_GRANULARITY(FLAGS) ( (((FLAGS) & SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_1) ? 1 : 0) + (((FLAGS) & SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_2) ? 2 : 0) + (((FLAGS) & SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_4) ? 4 : 0) ) #define SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY(FLAGS) ( (((FLAGS) & SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_1) ? 1 : 0) + (((FLAGS) & SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_2) ? 2 : 0) + (((FLAGS) & SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_4) ? 4 : 0) ) #define SPIO_SET_CHAR_CODER_FLAG_TO_GRANULARITY(FLAGS,GRANULARITY) ( (FLAGS) |= (((GRANULARITY) & 1) ? SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_1 : 0) | (((GRANULARITY) & 2) ? SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_2 : 0) | (((GRANULARITY) & 4) ? SPIO_CHAR_CODER_FLAG_TO_GRANULARITY_BIT_4 : 0) ) # 139 "../spio/spio_char_coder.h" #define SPIO_SET_CHAR_CODER_FLAG_FROM_GRANULARITY(FLAGS,GRANULARITY) ( (FLAGS) |= (((GRANULARITY) & 1) ? SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_1 : 0) | (((GRANULARITY) & 2) ? SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_2 : 0) | (((GRANULARITY) & 4) ? SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY_BIT_4 : 0) ) # 148 "../spio/spio_char_coder.h" #define SPIO_CHAR_CODER_TO_GRANULARITY(CODER) SPIO_CHAR_CODER_FLAG_TO_GRANULARITY((CODER)->flags) #define SPIO_CHAR_CODER_FROM_GRANULARITY(CODER) SPIO_CHAR_CODER_FLAG_FROM_GRANULARITY((CODER)->flags) #define SPIO_SET_CHAR_CODER_TO_GRANULARITY(CODER,GRANULARITY) SPIO_SET_CHAR_CODER_FLAG_TO_GRANULARITY((CODER)->flags, (GRANULARITY)) extern spio_t_error_code spio_register_charset(char const *name, char const * const aliases[], spio_t_bits options); extern spio_t_error_code spio_register_coder(char const *name, spio_t_coder_funcs *funcs, spio_t_bits options); extern void spio_coder_funcs_addref(spio_t_coder_funcs *funcs); extern void spio_coder_funcs_release(spio_t_coder_funcs *funcs); extern void spio_coder_default_addref(spio_t_coder_funcs *funcs); extern void spio_coder_default_release(spio_t_coder_funcs *funcs); extern void spio_coder_default_destroy(spio_t_coder_funcs *funcs); extern spio_t_error_code spio_charset_canonical_name(char const *name, char const **pcanonical_name); extern int spio_charset_name_equal(char const *name1, char const *name2); extern spio_t_error_code spio_char_coder_find(spio_t_coder_funcs **pfuncs, char const *name, spio_t_arglist args, spio_t_bits options); extern spio_t_error_code spio_char_coder_open(spio_t_coder_funcs *funcs, spio_t_coder **pcoder, spio_t_arglist args, spio_t_bits options); extern void spio_char_coder_close(spio_t_coder *coder); extern spio_t_error_code spio_char_coder_encode(spio_t_coder *coder, spio_t_buf *from_buf, size_t *pfrom_buf_offset, spio_t_buf *to_buf, spio_t_bits options); extern void spio_char_coder_commit(spio_t_coder *coder); extern void spio_char_coder_rollback(spio_t_coder *coder); extern spio_t_error_code spio_char_coder_translate_offset(spio_t_coder *coder, spio_t_offset from_offset, spio_t_offset *pto_offset); extern spio_t_error_code spio_char_coder_seek(spio_t_coder *coder, spio_t_offset offset, spio_t_bits options); #define SPIO_CHAR_CODER_INTERNAL_GRANULARITY 4 #define SPIO_CHAR_ASCII_LF 10 #define SPIO_CHAR_ASCII_CR 13 #define SPIO_CHAR_ASCII_SUB 0x1A #define SPIO_CHAR_NEWLINE 10 #define SPIO_CHAR_ASCII_REPLACEMENT_CHARACTER SPIO_CHAR_ASCII_SUB #define SPIO_CHAR_UNICODE_REPLACEMENT_CHARACTER 0xFFFD #define SPIO_CHAR_UNICODE_BOM_CHARACTER 0xFEFF extern spio_t_error_code spio_init_char_coder(spio_t_bits options); #define SPIO_DETECT_FILE_ENCODING_OPTION_IGNORE_UNKOWN_CHARSET SPIO_BIT(0) extern spio_t_error_code spio_detect_file_encoding(SPIO *s, spio_t_coder_funcs **pcoder_funcs, spio_t_bits options); # 28 "../sicstus_spio.h" 2 # 1 "../spio/spio_char_coder_utf8.h" 1 #define SPIO_CHAR_CODER_UTF8_H_INCLUDED #define SPIO_CHAR_CODER_UTF8_OPEN_OPTION_TCL SPIO_PRIVATE_OPTION_1 extern spio_t_error_code spio_init_char_coder_utf8(spio_t_bits options); #define SPIO_DECODE_UTF8_TO_UTF32_OPTION_ALLOW_NON_SHORTEST_FORM_NUL SPIO_BIT(0) #define SPIO_DECODE_UTF8_TO_UTF32_OPTION_ALLOW_OUT_OF_RANGE_UNICODE SPIO_NEXT_BIT(SPIO_DECODE_UTF8_TO_UTF32_OPTION_ALLOW_NON_SHORTEST_FORM_NUL) extern spio_t_error_code spio_decode_utf8_to_utf32(spio_t_utf8 const *from_utf8, size_t from_utf8_count, spio_t_utf32 *to_utf32, size_t *pto_utf32_count, spio_t_bits options); #define SPIO_IS_LEGAL_UTF8_OPTION_ALLOW_NON_SHORTEST_FORM_NUL SPIO_BIT(0) #define SPIO_IS_LEGAL_UTF8_OPTION_ALLOW_OUT_OF_RANGE_UNICODE SPIO_NEXT_BIT(SPIO_IS_LEGAL_UTF8_OPTION_ALLOW_NON_SHORTEST_FORM_NUL) extern spio_t_error_code spio_is_legal_utf8(spio_t_utf8 const *source, size_t length, spio_t_bits options); # 29 "../sicstus_spio.h" 2 typedef struct sp_t_spio_stream_node_ SP_stream; typedef struct sp_t_stream_buf_info_binary_ sp_t_stream_buf_info_binary; struct sp_t_stream_buf_info_binary_ { unsigned char *ptr; unsigned char *limit; }; # 46 "../sicstus_spio.h" typedef struct sp_t_stream_buf_info_text_ sp_t_stream_buf_info_text; struct sp_t_stream_buf_info_text_ { SP_uint32 *ptr; SP_uint32 *limit; }; typedef struct sp_t_public_stream_fields_ sp_t_public_stream_fields; struct sp_t_public_stream_fields_ { sp_t_stream_buf_info_binary input_binary; sp_t_stream_buf_info_binary output_binary; sp_t_stream_buf_info_text input_text; sp_t_stream_buf_info_text output_text; }; #define SP_CAST_STREAM_(PTR) ((sp_t_public_stream_fields *)(PTR)) #define SP_get_byte(STREAM) ((SP_CAST_STREAM_(STREAM)->input_binary.ptr < SP_CAST_STREAM_(STREAM)->input_binary.limit) ? *(SP_CAST_STREAM_(STREAM)->input_binary.ptr++) : sp_get_byte_helper((STREAM), 0) ) #define SP_get_code(STREAM) ((SP_CAST_STREAM_(STREAM)->input_text.ptr < SP_CAST_STREAM_(STREAM)->input_text.limit) ? *(SP_CAST_STREAM_(STREAM)->input_text.ptr++) : sp_get_code_helper((STREAM), 0) ) #define SP_put_byte(STREAM,BYTE) ((SP_CAST_STREAM_(STREAM)->output_binary.ptr < SP_CAST_STREAM_(STREAM)->output_binary.limit) ? *(SP_CAST_STREAM_(STREAM)->output_binary.ptr++) = (BYTE) : sp_put_byte_helper((STREAM), (BYTE), 0) ) #define SP_put_code(STREAM,CODE) ((SP_CAST_STREAM_(STREAM)->output_text.ptr < SP_CAST_STREAM_(STREAM)->output_text.limit) ? *(SP_CAST_STREAM_(STREAM)->output_text.ptr++) = (CODE) : sp_put_code_helper((STREAM), (CODE), 0) ) #define SP_CREATE_STREAM_OPTION_BINARY 0x0001 #define SP_CREATE_STREAM_OPTION_TEXT 0x0002 #define SP_CREATE_STREAM_OPTION_INTERACTIVE 0x0004 #define SP_CREATE_STREAM_OPTION_AUTOFLUSH 0x0008 #define SP_CREATE_STREAM_OPTION_EOF_ON_EOF 0x0010 #define SP_CREATE_STREAM_OPTION_RESET_ON_EOF 0x0020 #define SP_FOPEN_OPTION_READ 0x000001 #define SP_FOPEN_OPTION_WRITE 0x000002 #define SP_FOPEN_OPTION_APPEND 0x000004 #define SP_FOPEN_OPTION_BINARY 0x000008 #define SP_FOPEN_OPTION_TEXT 0x000010 #define SP_FOPEN_OPTION_INTERACTIVE 0x000020 #define SP_FOPEN_OPTION_SEEK 0x000040 #define SP_FOPEN_OPTION_AUTOFLUSH 0x000080 #define SP_FOPEN_OPTION_NOEXPAND 0x000100 #define SP_FOPEN_OPTION_NEW 0x000200 #define SP_FOPEN_OPTION_URL 0x000400 #define SP_FOPEN_OPTION_RESERVED1_ 0x002000 #define SP_FOPEN_OPTION_RESERVED2_ 0x004000 #define SP_FOPEN_OPTION_RESERVED3_ 0x008000 #define SP_FCLOSE_OPTION_FORCE 0x0001 #define SP_FCLOSE_OPTION_READ 0x0002 #define SP_FCLOSE_OPTION_WRITE 0x0004 #define SP_FCLOSE_OPTION_NONBLOCKING 0x0008 #define SP_FCLOSE_OPTION_USER_STREAMS 0x0010 #define SP_FCLOSE_OPTION_RESERVED1_ 0x0020 #define SP_FCLOSE_OPTION_RESERVED2_ 0x0040 #define SP_FLUSH_OUTPUT_OPTION_NONBLOCKING 0x0001 #define SP_FLUSH_OUTPUT_OPTION_AUTOFLUSH 0x0002 #define SP_FLUSH_OUTPUT_OPTION_RESERVED1_ 0x0004 #define SP_PUT_ENCODED_STRING_OPTION_NONBLOCKING 0x0001 #define SP_PUT_ENCODED_STRING_OPTION_RESERVED1_ 0x0002 #define SP_PUT_ENCODED_STRING_OPTION_RESERVED2_ 0x0004 #define SP_PUT_BYTES_OPTION_NONBLOCKING 0x0001 #define SP_PUT_CODES_OPTION_NONBLOCKING 0x0001 #define SP_PUT_CODES_OPTION_PRIVATE_1 0x1000 #define SP_PUT_CODES_OPTION_PRIVATE_2 0x2000 #define SP_PUT_CODES_OPTION_PRIVATE_3 0x4000 #define SP_CREATE_OS_STREAM_OPTION_READ 0x00001 #define SP_CREATE_OS_STREAM_OPTION_WRITE 0x00002 #define SP_CREATE_OS_STREAM_OPTION_BINARY 0x00004 #define SP_CREATE_OS_STREAM_OPTION_TEXT 0x00008 #define SP_CREATE_OS_STREAM_OPTION_OWN 0x00010 #define SP_CREATE_OS_STREAM_OPTION_KEEP_FILE_HANDLE 0x00020 #define SP_CREATE_OS_STREAM_OPTION_OBEY_FILE_OFFSET 0x00040 #define SP_CREATE_OS_STREAM_OPTION_AUTOFLUSH 0x00080 #define SP_CREATE_OS_STREAM_OPTION_ENCODING_FALLBACK_ON_INVALID 0x00100 #define SP_CREATE_OS_STREAM_OPTION_ENCODING_FALLBACK_ERROR 0x00400 #define SP_CREATE_OS_STREAM_OPTION_ENCODING_FALLBACK_REPLACE 0x00800 #define SP_CREATE_OS_STREAM_OPTION_BOM_READ 0x01000 #define SP_CREATE_OS_STREAM_OPTION_BOM_READ_OPTIONAL 0x02000 #define SP_CREATE_OS_STREAM_OPTION_BOM_WRITE 0x04000 #define SP_CREATE_OS_STREAM_OPTION_BOM_WRITE_OPTIONAL 0x08000 #define SP_CREATE_OS_STREAM_OPTION_SEEKABLE_ 0x10000 typedef struct spio_t_encoding_ spio_t_encoding; typedef struct spio_t_encoding_state_ spio_t_encoding_state; #define SP_ENCODING_OPEN_OPTION_DECODE SPIO_CHAR_CODER_OPEN_OPTION_DECODE #define SP_ENCODING_OPEN_OPTION_EOL_CRLF SPIO_CHAR_CODER_OPEN_OPTION_EOL_CRLF #define SP_ENCODING_OPEN_OPTION_EOL_AUTO SPIO_CHAR_CODER_OPEN_OPTION_EOL_AUTO #define SP_ENCODING_OPEN_OPTION_UTF8_TCL SPIO_CHAR_CODER_UTF8_OPEN_OPTION_TCL #define SP_ENCODE_CODES_OPTION_START SPIO_BIT(0) #define SP_ENCODE_CODES_OPTION_END SPIO_NEXT_BIT(SP_ENCODE_CODES_OPTION_START) #define SP_ENCODE_CODES_OPTION_ABORT SPIO_NEXT_BIT(SP_ENCODE_CODES_OPTION_END) #define SP_ENCODE_CODES_OPTION_EOL_CRLF SPIO_NEXT_BIT(SP_ENCODE_CODES_OPTION_ABORT) #define SP_ENCODE_CODES_OPTION_EOL_AUTO SPIO_NEXT_BIT(SP_ENCODE_CODES_OPTION_EOL_CRLF) #define SP_ENCODE_CODES_OPTION_LAST_ SP_ENCODE_CODES_OPTION_EOL_AUTO #define SP_INSTALL_IDLE_HOOK_OPTION_REMOVE SPIO_BIT(0) # 124 "../sicstus.h" 2 #define PROTOTYPE(argl) argl #define PROTOARGS(argl) argl #define SP_FLI_CONST const #define ANYPOINTER void * #define SPLD_DSP 0 #define SP_initialize(Argc,Argv,Reserved) sp_glue_initialize(Argc,Argv,Reserved,sp_pre_linkage,sp_pre_map,SPLD_DSP,1) #define SP_errno SP_get_errno() #define SP_stdin SP_get_stdin() #define SP_stdout SP_get_stdout() #define SP_stderr SP_get_stderr() #define SP_curin SP_get_curin() #define SP_curout SP_get_curout() typedef unsigned long int SP_term; # 174 "../sicstus.h" #define LAZY_MEMORY_FAULT(MSG) do { SP_ASSERT(0); sp_memory_fault((MSG),-1); } while (0) # 183 "../sicstus.h" #define LAZY_NULL_CHECK(EXPR) do{ if ((EXPR) == NULL) LAZY_MEMORY_FAULT(NULL); } while (0) typedef unsigned long SP_atom; typedef long SP_integer; typedef long SP_qid; struct SP_pred_ref_; typedef struct SP_pred_ref_ *SP_pred_ref; typedef int SP_term_ref; typedef double *SP_globref; typedef struct { void *mutex; } SP_mutex; # 208 "../sicstus.h" #define SP_MUTEX_INITIALIZER {0} typedef struct SP_external_object_info_ *SP_external_object_type; typedef struct SP_external_object_link_ SP_external_object_link; typedef void ( *SP_external_object_finalizer)(void *obj, void* type_data); typedef int ( *SP_external_object_putter)(SP_term_ref, SP_external_object_link*); typedef int ( SP_EventFun) (void *); typedef void ( SP_SigFun) (int, void *); typedef void ( SP_SetWindowTitleHook) (void *, char const *title_ienc); typedef char const * ( SP_GetWindowTitleHook) (void *); typedef int ( SP_idle_hook) (void *cookie); struct SICSTUS_API_STRUCT; typedef struct SICSTUS_API_STRUCT SPEnv; # 264 "../sicstus.h" #define SPAPI_ARG0 #define SPAPI_ARG #define SPAPI_ARG_PROTO_DECL0 void #define SPAPI_ARG_LOCAL_DECL #define SPAPI_ARG_PROTO_DECL #define SPAPI_ARG_IGNORE struct worker; typedef int ( SP_GlueFun) (SPEnv *spenv); typedef SP_GlueFun *SP_GlueFunPtr; typedef int ( SP_CPredFun)(SP_term_ref goal, void *stash); typedef void ( SP_InitFunPlain) (int); typedef void ( SP_InitFunMulti) (SPEnv *, int); typedef union { SP_InitFunPlain *plain; SP_InitFunMulti *multi; } SP_InitFunUnion; struct SICSTUS_DISPATCH_TABLE_STRUCT; #define SP_MAINFUN_PARAMS_VERSION (((SP_DISPATCH_API_VERSION_MAJOR)<<16) + 1) struct SP_MAINFUN_PARAMS_STRUCT; typedef struct SP_MAINFUN_PARAMS_STRUCT SP_MAINFUN_PARAMS; typedef int ( SP_MainFun)(SP_MAINFUN_PARAMS *params); # 321 "../sicstus.h" #define SP_WCX_FLAG -1 #define CHT_LAYOUT_CHAR 1 #define CHT_SMALL_LETTER 2 #define CHT_CAPITAL_LETTER 3 #define CHT_SOLO_CHAR 4 #define CHT_SYMBOL_CHAR 5 #define CHT_UNDECIDED 6 #define CHT_OTHER 7 typedef void ( SP_WcxOpenHook) (SP_stream *s, SP_atom option, int where); typedef void ( SP_WcxCloseHook) (SP_stream *s); typedef int ( SP_WcxGetcHook) (int first_byte, SP_stream *s, long *pbyte_count); typedef int ( SP_WcxPutcHook) (int char_code, SP_stream *s, long *pbyte_count); typedef int ( SP_WcxCharTypeHook) (int char_code); typedef char const * ( SP_WcxConvHook) (char const *string, int context); #define WCX_USE_LATIN1 0 #define WCX_USE_EUC 1 #define WCX_USE_UTF8 2 #define WCX_USE_UNDEF 3 #define WCX_OS_8BIT 0 #define WCX_OS_UTF8 0x100 #define WCX_PRESERVES_ASCII 0 #define WCX_CHANGES_ASCII 0x4000 #define WCX_FILE 1 #define WCX_OPTION 2 #define WCX_WINDOW_TITLE 3 #define WCX_C_CODE 4 #define WCI_MAX_BYTES 6 # 424 "../sicstus.h" extern SP_MainFun *sp_pre_linkage[]; extern char *sp_pre_map[]; # 435 "../sicstus.h" #define SP_STREAMHOOK_STDIN 0x00 #define SP_STREAMHOOK_STDOUT 0x01 #define SP_STREAMHOOK_STDERR 0x02 #define SP_STREAMHOOK_BIN 0x40 #define SP_STREAMHOOK_WCI 0x41 #define SP_STREAMHOOK_NULL 0x80 #define SP_STREAMHOOK_OPEN 0x81 #define SP_STREAMHOOK_LIB 0x90 #define SP_STREAMHOOK_C 0xff typedef SP_stream * ( SP_UserStreamHook) (void *, int which); typedef void ( SP_UserStreamPostHook) (void *, int which, SP_stream *); typedef int ( SP_ErrprintfHook) (void *, int exit_x, char const *fmt, va_list ap); typedef int ( SP_InitAllocHook) (size_t alignment, void *cookie); typedef void ( SP_DeinitAllocHook) (void *cookie); typedef void* ( SP_AllocHook) (size_t size, size_t *actual_sizep, void *cookie); typedef int ( SP_FreeHook) (void *ptr, size_t size, int force, void *cookie); #define SP_on_fault(Stmt,Reason,CleanupStmt) { jmp_buf m__buf; if (!setjmp(m__buf)) { sp_set_abort_env(&m__buf); {Stmt}; sp_set_abort_env(NULL); } else { (Reason) = sp_get_abort_err_ienc(); {CleanupStmt}; } } # 477 "../sicstus.h" #define INSTANTIATION_ERROR 0 #define TYPE_ERROR 1 #define DOMAIN_ERROR 2 #define REPRESENTATION_ERROR 3 #define EXISTENCE_ERROR 4 #define SYSTEM_ERROR 5 #define PERMISSION_ERROR 6 #define EVALUATION_ERROR 7 #define CONSISTENCY_ERROR 8 #define TYPE_ATOMIC (1<<8) #define TYPE_ATOM (2<<8) #define TYPE_NUMBER (3<<8) #define TYPE_INTEGER (4<<8) #define TYPE_COMPOUND (5<<8) #define TYPE_VAR (6<<8) #define TYPE_SPCODES (7<<8) #define TYPE_FLOAT (8<<8) #define DOMAIN_1_ARITY (1<<8) #define DOMAIN_CHAR (2<<8) #define DOMAIN_NONZERO (3<<8) #define DOMAIN_GT_ZERO (4<<8) #define DOMAIN_GE_ZERO (5<<8) #define DOMAIN_EXPRESSION (6<<8) #define DOMAIN_LIST (7<<8) #define DOMAIN_MUTABLE (8<<8) #define DOMAIN_STREAM (9<<8) #define DOMAIN_INPUT_STREAM (10<<8) #define DOMAIN_OUTPUT_STREAM (11<<8) #define DOMAIN_ATTR_MODULE (12<<8) #define DOMAIN_IO_DESCR_STREAM (13<<8) #define DOMAIN_ABS_LE_ONE (14<<8) #define DOMAIN_ABS_GE_ONE (15<<8) #define DOMAIN_GE_ONE (16<<8) #define DOMAIN_GT_FZERO (17<<8) #define DOMAIN_GE_FZERO (18<<8) #define REPR_MAXARITY (1<<8) #define REPR_PATHLEN (2<<8) #define REPR_NAN (3<<8) #define REPR_WORD (4<<8) #define REPR_MISENC (5<<8) #define REPR_MAXATOM (6<<8) #define EXIST_EOF (1<<8) #define EXIST_PREDICATE (2<<8) #define EXIST_FUNCTION (3<<8) #define EXIST_RESOURCE (4<<8) #define EXIST_FILE (5<<8) #define PERM_READ_STREAM (1<<8) #define PERM_WRITE_STREAM (2<<8) #define PERM_READ_FILE (3<<8) #define PERM_WRITE_FILE (4<<8) #define PERM_SEEK (5<<8) #define CONS_RESTORE (1<<8) #define EVAL_FLOAT_OFLO (1<<8) #define EVAL_UNDEFINED (2<<8) #define EVAL_ZERO_DIV (3<<8) #define EVAL_FLOAT_NOT_A_NUMBER (4<<8) #define SP_syserror_clib(PRED,CALL) sp_syserror(API_CLIB, NULL, PRED, CALL) #define SP_syserror_win32(PRED,CALL) sp_syserror(API_WIN32, NULL, PRED, CALL) #define API_CLIB 0 #define API_WIN32 1 #define SP_EXPAND_FILE_NAME_OPTION_DIR 0x0001 #define SP_EXPAND_FILE_NAME_OPTION_NO_CWD 0x0002 #define SP_EXPAND_FILE_NAME_OPTION_NO_ENV 0x0004 #define SP_EXPAND_FILE_NAME_OPTION_NO_HOME 0x0008 #define SP_EXPAND_FILE_NAME_OPTION_ROOT_DOT 0x00010 #define SP_EXPAND_FILE_NAME_OPTION_ROOT_SLASH 0x0020 #define SP_GET_STREAM_COUNTS_OPTION_READ 0x0001 #define SP_GET_STREAM_COUNTS_OPTION_WRITE 0x0002 extern int user_main(int argc, char *argv[]); extern int sp_main_internal(int argc, char **argv); extern int SU_initialize(int argc, char *argv[]); enum SP_option_type { SP_option_type_invalid=0, SP_option_type_null=1, SP_option_type_environment_property=2 }; struct SP_option_environment_property { char const *key; char const *value; }; struct SP_option { enum SP_option_type type; union SP_option_ { void *reserved; struct SP_option_environment_property prop; } u; }; struct SP_options { unsigned long version; size_t noptions; struct SP_option *options; }; #define SP_OPTIONS_VERSION 0 #define SP_OPTIONS_STATIC_INITIALIZER {SP_OPTIONS_VERSION, 0, 0} # 633 "../sicstus.h" #define SP_ERRPRINTF_MORE 2 #define SP_ERRPRINTF_DLG 1 #define SP_ERRPRINTF_STDERR 3 struct SICSTUS_API_STRUCT; # 650 "../sicstus.h" typedef struct SICSTUS_API_STRUCT * SP_get_dispatch_type(void *reserved ); struct SP_multi_sp_state; # 671 "../sicstus.h" # 1 "./spaux.h" 1 # 28 "./spaux.h" #define SP_DISPATCH_API_VERSION_MAJOR (2) #define SP_DISPATCH_API_VERSION_MINOR ((1<<8)+SP_API_SICSTUS_H_NUMBER_OF_ENTRIES) #define SP_DISPATCH_API_VERSION ((int)((SP_DISPATCH_API_VERSION_MAJOR<<16)+SP_DISPATCH_API_VERSION_MINOR)) # 45 "./spaux.h" #define INCLUDED_SICSTUS_H_AUX_H 1 typedef int ( tsp_glue_initialize) (int, char * *, void *, SP_MainFun * *, char * *, int, int); typedef void ( tSP_deinitialize) (void); typedef void ( tSP_force_interactive) (void); typedef int ( tSP_is_interactive) (void); typedef int ( tSP_load) (char const *); typedef SP_pred_ref ( tSP_predicate) (char const *, long, char const *); typedef SP_pred_ref ( tSP_pred) (SP_atom, long, SP_atom); typedef SP_term_ref ( tSP_new_term_ref) (void); typedef int ( tSP_new_term_refs) (int); typedef void ( tSP_reset_term_refs) (int); typedef SP_globref ( tSP_alloc_globrefs) (int); typedef void ( tSP_free_globrefs) (SP_globref, int); typedef int ( tSP_query) (SP_pred_ref predicate, ...); typedef int ( tSP_query_cut_fail) (SP_pred_ref predicate, ...); typedef SP_qid ( tSP_open_query) (SP_pred_ref predicate, ...); typedef SP_qid ( tSP_open_query_array) (SP_pred_ref, SP_term_ref *); typedef int ( tSP_next_solution) (SP_qid); typedef int ( tSP_cut_query) (SP_qid); typedef int ( tSP_close_query) (SP_qid); typedef int ( tSP_event) (SP_EventFun *, void *); typedef spio_t_error_code ( tSP_fopen) (char const * path_ienc, void * reserved, spio_t_bits options, SP_stream * * ps); typedef SP_term ( tsp_ref_term) (SP_term_ref ref); typedef spio_t_error_code ( tSP_create_os_stream) (spio_t_os_file_handle hFile, SP_stream * * pstream, void * arg, spio_t_bits options); typedef spio_t_error_code ( tSP_get_stream_user_data) (SP_stream * stream, void const * user_class, void * * puser_data); typedef spio_t_error_code ( tSP_get_stream_counts) (SP_stream * stream, spio_t_offset * item_offset, spio_t_offset * newline_count, spio_t_offset * line_length, spio_t_bits option); typedef int ( tSP_put_variable) (SP_term_ref); typedef int ( tSP_put_term) (SP_term_ref, SP_term_ref); typedef int ( tSP_put_integer) (SP_term_ref, long); typedef int ( tSP_put_float) (SP_term_ref, double); typedef int ( tSP_put_atom) (SP_term_ref, SP_atom); typedef int ( tSP_put_string) (SP_term_ref, char const *); typedef int ( tSP_put_address) (SP_term_ref, void *); typedef int ( tSP_put_list_codes) (SP_term_ref, SP_term_ref, char const *); typedef int ( tSP_put_number_codes) (SP_term_ref, char const *); typedef int ( tSP_put_functor) (SP_term_ref, SP_atom, int); typedef int ( tSP_put_list) (SP_term_ref); typedef int ( tSP_cons_functor) (SP_term_ref term, SP_atom name, int arity, ...); typedef int ( tSP_cons_list) (SP_term_ref, SP_term_ref, SP_term_ref); typedef int ( tSP_read_from_string) (SP_term_ref term, char const * string, SP_term_ref * values); typedef int ( tSP_get_integer) (SP_term_ref, long *); typedef int ( tSP_get_float) (SP_term_ref, double *); typedef int ( tSP_get_atom) (SP_term_ref, SP_atom *); typedef int ( tSP_get_string) (SP_term_ref, char const * *); typedef int ( tSP_get_address) (SP_term_ref, void * *); typedef int ( tSP_get_list_codes) (SP_term_ref, char const * *); typedef int ( tSP_get_number_codes) (SP_term_ref, char const * *); typedef int ( tSP_get_functor) (SP_term_ref, SP_atom *, int *); typedef int ( tSP_get_list) (SP_term_ref, SP_term_ref, SP_term_ref); typedef int ( tSP_get_arg) (int, SP_term_ref, SP_term_ref); typedef int ( tSP_term_type) (SP_term_ref); typedef int ( tSP_is_variable) (SP_term_ref); typedef int ( tSP_is_integer) (SP_term_ref); typedef int ( tSP_is_float) (SP_term_ref); typedef int ( tSP_is_atom) (SP_term_ref); typedef int ( tSP_is_compound) (SP_term_ref); typedef int ( tSP_is_list) (SP_term_ref); typedef int ( tSP_is_atomic) (SP_term_ref); typedef int ( tSP_is_number) (SP_term_ref); typedef SP_atom ( tSP_atom_from_string) (char const *); typedef SP_atom ( tSP_existing_atom_from_string) (char const *); typedef char const * ( tSP_string_from_atom) (SP_atom); typedef int ( tSP_unify) (SP_term_ref, SP_term_ref); typedef int ( tSP_compare) (SP_term_ref, SP_term_ref); typedef int ( tSP_exception_term) (SP_term_ref); typedef void ( tSP_raise_exception) (SP_term_ref); typedef void ( tSP_fail) (void); typedef char const * ( tSP_error_message) (int); typedef int ( tSP_get_errno) (void); typedef SP_stream * ( tSP_get_stdin) (void); typedef SP_stream * ( tSP_get_stdout) (void); typedef SP_stream * ( tSP_get_stderr) (void); typedef SP_stream * ( tSP_get_curin) (void); typedef SP_stream * ( tSP_get_curout) (void); typedef SP_UserStreamHook * ( tSP_set_user_stream_hook) (SP_UserStreamHook *, void *); typedef SP_UserStreamPostHook * ( tSP_set_user_stream_post_hook) (SP_UserStreamPostHook *, void *); typedef SP_ErrprintfHook * ( tSP_set_errprintf_hook) (SP_ErrprintfHook *, void *); typedef int ( tSP_set_memalloc_hooks) (int hints, SP_InitAllocHook * init_alloc_hook, SP_DeinitAllocHook * deinit_alloc_hook, SP_AllocHook * alloc_hook, SP_FreeHook * free_hook, void * cookie); typedef spio_t_error_code ( tSP_create_stream) (void * user_data, void const * user_class, spio_t_simple_device_read * user_read, spio_t_simple_device_write * user_write, spio_t_simple_device_flush_output * user_flush_output, spio_t_simple_device_seek * user_seek, spio_t_simple_device_close * user_close, spio_t_simple_device_interrupt * user_interrupt, spio_t_simple_device_ioctl * user_ioctl, void * args, spio_t_bits create_options, SP_stream * * pstream); typedef spio_t_error_code ( tsp_get_byte_helper) (SP_stream * s, spio_t_bits options); typedef spio_t_error_code ( tsp_put_byte_helper) (SP_stream * s, spio_t_uint8 byte, spio_t_bits options); typedef spio_t_error_code ( tsp_get_code_helper) (SP_stream * s, spio_t_bits options); typedef spio_t_error_code ( tsp_put_code_helper) (SP_stream * s, spio_t_wchar code, spio_t_bits options); typedef spio_t_error_code ( tSP_printf) (char const * fmt, ...); typedef spio_t_error_code ( tSP_fprintf) (SP_stream * stream, char const * fmt, ...); typedef spio_t_error_code ( tsp_ttyprintf) (char const * fmt, ...); typedef spio_t_error_code ( tSP_put_bytes) (SP_stream * s, spio_t_uint8 const * bytes, size_t byte_count, spio_t_bits options); typedef spio_t_error_code ( tSP_put_codes) (SP_stream * s, spio_t_wchar const * codes, size_t code_count, spio_t_bits options); typedef spio_t_error_code ( tSP_put_encoded_string) (SP_stream * s, char const * string, spio_t_bits options); typedef spio_t_error_code ( tSP_flush_output) (SP_stream * s, spio_t_bits options); typedef spio_t_error_code ( tSP_fclose) (SP_stream * s, spio_t_bits options); typedef spio_t_error_code ( tSP_unget_code) (SP_stream *, int); typedef spio_t_error_code ( tSP_unget_byte) (SP_stream *, int); typedef SP_SigFun * ( tSP_signal) (int, SP_SigFun *, void *); typedef int ( tsp_raise_signal) (int signo); typedef int ( tSP_define_c_predicate) (char const * name, int arity, char const * module, SP_CPredFun * proc, void * stash); typedef char * * ( tSP_copy_environ) (void); typedef void ( tSP_write_term) (SP_term_ref); typedef int ( tSP_isatty) (SP_stream *); typedef void * ( tSP_malloc) (size_t); typedef void * ( tSP_realloc) (void *, size_t); typedef void ( tSP_free) (void *); typedef void * ( tSP_memmove) (void * dest, void * src, int n); typedef void ( tSP_save_error) (int error_type, char const * error_msg_ienc, SP_term_ref culprit); typedef void ( tSP_raise_error) (char const * name, int arity, int argn); typedef void ( tsp_syserror) (int api, char const * msg, char const * pred, char const * syscall_name); typedef int ( tSP_atom_length) (SP_atom); typedef int ( tSP_put_list_n_codes) (SP_term_ref, SP_term_ref, long, char const *); typedef int ( tSP_get_list_n_codes) (SP_term_ref, SP_term_ref, long, long *, char *); typedef int ( tSP_register_atom) (SP_atom); typedef int ( tSP_unregister_atom) (SP_atom); typedef int ( tSP_cons_functor_array) (SP_term_ref term, SP_atom name, int arity, SP_term_ref * args); typedef int ( tSP_restore) (char const *); typedef int ( tSP_set_current_dir) (char const *); typedef char * ( tSP_get_current_dir) (void); typedef void ( tSP_raise_fault) (char const * message_ienc); typedef void ( tsp_set_abort_env) (void *); typedef char const * ( tsp_get_abort_err_ienc) (void); typedef char const * ( tsp_get_boot_path) (void); typedef char const * ( tSP_get_emulator_version) (void); typedef char const * ( tSP_get_emulator_dir) (void); typedef int ( tSP_set_initial_options) (struct SP_options *); typedef SP_SetWindowTitleHook * ( tSP_set_set_window_title_hook) (SP_SetWindowTitleHook *, void *); typedef SP_GetWindowTitleHook * ( tSP_set_get_window_title_hook) (SP_GetWindowTitleHook *, void *); typedef void * ( tsp_get_engine_global) (void); typedef void ( tsp_reset_ctrlc_pending) (void); typedef int ( tsp_get_ctrlc_pending) (void); typedef int ( tsp_qload_or_restore) (char const *, int); typedef void ( tsp_variable_to_string) (SP_term_ref, char *); typedef int ( tsp_get_mem_usage) (void); typedef char * ( tsp_get_classpath) (void); typedef char const * ( tsp_get_failed_bootpath) (void); typedef int ( tsp_prolog_initialized) (void); typedef int ( tsp_is_development_system) (void); typedef void * ( tSP_calloc) (size_t, size_t); typedef char * ( tSP_strdup) (char const *); typedef spio_t_error_code ( tSP_next_stream) (SP_stream * s, SP_stream * * pnext); typedef spio_t_error_code ( tSP_select) (int read_fds[], size_t * pnread_fds, int write_fds[], size_t * pnwrite_fds, SP_stream * read_streams[], size_t * pnread_streams, SP_stream * write_streams[], size_t * pnwrite_streams, spio_t_timespec * timeout, spio_t_bits options); typedef spio_t_error_code ( tSP_open_socket_stream) (char const * nodename, char const * servname, void * args, SP_stream * * pstream, spio_t_bits options); typedef char const * ( tSP_to_os) (char const * ienc, int context); typedef char const * ( tSP_from_os) (char const * senc, int context); typedef int ( tSP_wci_code) (int * pcode, char const * wci); typedef int ( tSP_wci_len) (char const * wci); typedef int ( tSP_code_wci) (char * wci, int code); typedef int ( tSP_latin1_chartype) (int char_code); typedef int ( tSP_mutex_lock) (SP_mutex * pmutex); typedef int ( tSP_mutex_unlock) (SP_mutex * pmutex); typedef int ( tSP_mutex_destroy) (SP_mutex * pmutex); typedef int ( tSP_load_sicstus_run_time) (SP_get_dispatch_type * * ppfunc, void * * phandle); typedef int ( tSP_set_multi_sp_state) (struct SP_multi_sp_state *); typedef int ( tSP_put_external_object) (SP_term_ref tObj, SP_external_object_link * pObj); typedef int ( tSP_get_external_object) (SP_term_ref tObj, SP_external_object_link * * ppObj); typedef int ( tSP_external_object_default_putter_helper) (SP_term_ref tr, SP_external_object_link * obj, unsigned long functor); typedef int ( tSP_put_external_object_link) (SP_term_ref tObj, SP_external_object_link * pObj); typedef int ( tSP_put_weak_external_object_link) (SP_term_ref tObj, SP_external_object_link * pObj); typedef SP_external_object_type ( tSP_register_external_object_type) (SP_external_object_finalizer finalizer, SP_external_object_putter putter, void * type_data); typedef SP_external_object_link * ( tSP_register_external_object) (void * data, SP_external_object_type object_type); typedef void ( tSP_unlink_external_object) (SP_external_object_link * pObj, int finalize); typedef void * ( tSP_get_external_object_data) (SP_external_object_link *); typedef SP_external_object_type ( tSP_get_external_object_type) (SP_external_object_link *); typedef void ( tSP_finalize_external_object) (SP_term_ref tObj, long * existed); typedef long ( tSP_garbage_collect_external_objects) (SP_external_object_type object_type); typedef void ( tSP_ctrlc_action) (void); typedef void ( tSP_ctrlbreak_action) (void); typedef int ( tsp_set_jasper_magic) (void *, int); typedef void * ( tsp_get_jasper_magic) (int); typedef int ( tsp_set_jasper_threadservermode) (int, int); typedef int ( tsp_get_jasper_threadservermode) (int *, int); typedef int ( tSP_get_integer_bytes) (SP_term_ref tr, void * buf, size_t * pbuf_size, int native); typedef int ( tSP_put_integer_bytes) (SP_term_ref tr, void * buf, size_t buf_size, int native); typedef int ( tSP_setenv) (char const * key_ienc, char const * value_ienc); typedef char * ( tSP_getenv) (char const * key_ienc); typedef spio_t_error_code ( tSP_expand_file_name) (char const * relpath, char const * cwd, spio_t_bits options, char * * pabspath); typedef int ( tsp_spio_assert_failure) (char const * function, char const * file, int line); typedef int ( tsp_spio_debug_break) (char const * file, int line); typedef char const * ( tsp_spio_error_name) (spio_t_error_code code); typedef int ( tsp_spio_trace_line) (char const * function, char const * file, int line, char const * msg, long l, char const * string, int level); typedef spio_t_error_code ( tSP_get_encoding) (char const * encoding_name, spio_t_encoding * * pencoding, spio_t_bits options); typedef void ( tSP_encoding_release) (spio_t_encoding * encoding); typedef spio_t_error_code ( tSP_encoding_open) (spio_t_encoding * encoding, spio_t_encoding_state * * pencoding_state, void * args, spio_t_bits options); typedef spio_t_error_code ( tSP_encode_from_codes) (spio_t_encoding * encoding, spio_t_wchar const * src, size_t src_size, spio_t_encoding_state * * pencoding_state, spio_t_byte * dst, size_t dst_size, size_t * psrc_size_read, size_t * pdst_size_wrote, spio_t_bits options); typedef spio_t_error_code ( tSP_encode_to_codes) (spio_t_encoding * encoding, spio_t_byte const * src, size_t src_size, spio_t_encoding_state * * pencoding_state, spio_t_wchar * dst, size_t dst_size, size_t * psrc_size_read, size_t * pdst_size_wrote, spio_t_bits options); typedef spio_t_error_code ( tsp_ttyflush) (void); typedef void ( tsp_memory_fault) (char const * msg, int culprit); typedef int ( tSP_decode_reserved_exception) (SP_term_ref tr, long * pdata); typedef spio_t_error_code ( tSP_install_idle_hook) (SP_idle_hook * hook, void * cookie, spio_t_bits options); typedef struct DISPATCH_TABLE_STRUCT_SICSTUS_H { unsigned long size; const char *name; int version; const char *nsp_glue_initialize; tsp_glue_initialize *psp_glue_initialize; const char *nSP_deinitialize; tSP_deinitialize *pSP_deinitialize; const char *nSP_force_interactive; tSP_force_interactive *pSP_force_interactive; const char *nSP_is_interactive; tSP_is_interactive *pSP_is_interactive; const char *nSP_load; tSP_load *pSP_load; const char *nSP_predicate; tSP_predicate *pSP_predicate; const char *nSP_pred; tSP_pred *pSP_pred; const char *nSP_new_term_ref; tSP_new_term_ref *pSP_new_term_ref; const char *nSP_new_term_refs; tSP_new_term_refs *pSP_new_term_refs; const char *nSP_reset_term_refs; tSP_reset_term_refs *pSP_reset_term_refs; const char *nSP_alloc_globrefs; tSP_alloc_globrefs *pSP_alloc_globrefs; const char *nSP_free_globrefs; tSP_free_globrefs *pSP_free_globrefs; const char *nSP_query; tSP_query *pSP_query; const char *nSP_query_cut_fail; tSP_query_cut_fail *pSP_query_cut_fail; const char *nSP_open_query; tSP_open_query *pSP_open_query; const char *nSP_open_query_array; tSP_open_query_array *pSP_open_query_array; const char *nSP_next_solution; tSP_next_solution *pSP_next_solution; const char *nSP_cut_query; tSP_cut_query *pSP_cut_query; const char *nSP_close_query; tSP_close_query *pSP_close_query; const char *nSP_event; tSP_event *pSP_event; const char *nSP_fopen; tSP_fopen *pSP_fopen; const char *nsp_ref_term; tsp_ref_term *psp_ref_term; const char *nSP_create_os_stream; tSP_create_os_stream *pSP_create_os_stream; const char *nSP_get_stream_user_data; tSP_get_stream_user_data *pSP_get_stream_user_data; const char *nSP_get_stream_counts; tSP_get_stream_counts *pSP_get_stream_counts; const char *nSP_put_variable; tSP_put_variable *pSP_put_variable; const char *nSP_put_term; tSP_put_term *pSP_put_term; const char *nSP_put_integer; tSP_put_integer *pSP_put_integer; const char *nSP_put_float; tSP_put_float *pSP_put_float; const char *nSP_put_atom; tSP_put_atom *pSP_put_atom; const char *nSP_put_string; tSP_put_string *pSP_put_string; const char *nSP_put_address; tSP_put_address *pSP_put_address; const char *nSP_put_list_codes; tSP_put_list_codes *pSP_put_list_codes; const char *nSP_put_number_codes; tSP_put_number_codes *pSP_put_number_codes; const char *nSP_put_functor; tSP_put_functor *pSP_put_functor; const char *nSP_put_list; tSP_put_list *pSP_put_list; const char *nSP_cons_functor; tSP_cons_functor *pSP_cons_functor; const char *nSP_cons_list; tSP_cons_list *pSP_cons_list; const char *nSP_read_from_string; tSP_read_from_string *pSP_read_from_string; const char *nSP_get_integer; tSP_get_integer *pSP_get_integer; const char *nSP_get_float; tSP_get_float *pSP_get_float; const char *nSP_get_atom; tSP_get_atom *pSP_get_atom; const char *nSP_get_string; tSP_get_string *pSP_get_string; const char *nSP_get_address; tSP_get_address *pSP_get_address; const char *nSP_get_list_codes; tSP_get_list_codes *pSP_get_list_codes; const char *nSP_get_number_codes; tSP_get_number_codes *pSP_get_number_codes; const char *nSP_get_functor; tSP_get_functor *pSP_get_functor; const char *nSP_get_list; tSP_get_list *pSP_get_list; const char *nSP_get_arg; tSP_get_arg *pSP_get_arg; const char *nSP_term_type; tSP_term_type *pSP_term_type; const char *nSP_is_variable; tSP_is_variable *pSP_is_variable; const char *nSP_is_integer; tSP_is_integer *pSP_is_integer; const char *nSP_is_float; tSP_is_float *pSP_is_float; const char *nSP_is_atom; tSP_is_atom *pSP_is_atom; const char *nSP_is_compound; tSP_is_compound *pSP_is_compound; const char *nSP_is_list; tSP_is_list *pSP_is_list; const char *nSP_is_atomic; tSP_is_atomic *pSP_is_atomic; const char *nSP_is_number; tSP_is_number *pSP_is_number; const char *nSP_atom_from_string; tSP_atom_from_string *pSP_atom_from_string; const char *nSP_existing_atom_from_string; tSP_existing_atom_from_string *pSP_existing_atom_from_string; const char *nSP_string_from_atom; tSP_string_from_atom *pSP_string_from_atom; const char *nSP_unify; tSP_unify *pSP_unify; const char *nSP_compare; tSP_compare *pSP_compare; const char *nSP_exception_term; tSP_exception_term *pSP_exception_term; const char *nSP_raise_exception; tSP_raise_exception *pSP_raise_exception; const char *nSP_fail; tSP_fail *pSP_fail; const char *nSP_error_message; tSP_error_message *pSP_error_message; const char *nSP_get_errno; tSP_get_errno *pSP_get_errno; const char *nSP_get_stdin; tSP_get_stdin *pSP_get_stdin; const char *nSP_get_stdout; tSP_get_stdout *pSP_get_stdout; const char *nSP_get_stderr; tSP_get_stderr *pSP_get_stderr; const char *nSP_get_curin; tSP_get_curin *pSP_get_curin; const char *nSP_get_curout; tSP_get_curout *pSP_get_curout; const char *nSP_set_user_stream_hook; tSP_set_user_stream_hook *pSP_set_user_stream_hook; const char *nSP_set_user_stream_post_hook; tSP_set_user_stream_post_hook *pSP_set_user_stream_post_hook; const char *nSP_set_errprintf_hook; tSP_set_errprintf_hook *pSP_set_errprintf_hook; const char *nSP_set_memalloc_hooks; tSP_set_memalloc_hooks *pSP_set_memalloc_hooks; const char *nSP_create_stream; tSP_create_stream *pSP_create_stream; const char *nsp_get_byte_helper; tsp_get_byte_helper *psp_get_byte_helper; const char *nsp_put_byte_helper; tsp_put_byte_helper *psp_put_byte_helper; const char *nsp_get_code_helper; tsp_get_code_helper *psp_get_code_helper; const char *nsp_put_code_helper; tsp_put_code_helper *psp_put_code_helper; const char *nSP_printf; tSP_printf *pSP_printf; const char *nSP_fprintf; tSP_fprintf *pSP_fprintf; const char *nsp_ttyprintf; tsp_ttyprintf *psp_ttyprintf; const char *nSP_put_bytes; tSP_put_bytes *pSP_put_bytes; const char *nSP_put_codes; tSP_put_codes *pSP_put_codes; const char *nSP_put_encoded_string; tSP_put_encoded_string *pSP_put_encoded_string; const char *nSP_flush_output; tSP_flush_output *pSP_flush_output; const char *nSP_fclose; tSP_fclose *pSP_fclose; const char *nSP_unget_code; tSP_unget_code *pSP_unget_code; const char *nSP_unget_byte; tSP_unget_byte *pSP_unget_byte; const char *nSP_signal; tSP_signal *pSP_signal; const char *nsp_raise_signal; tsp_raise_signal *psp_raise_signal; const char *nSP_define_c_predicate; tSP_define_c_predicate *pSP_define_c_predicate; const char *nSP_copy_environ; tSP_copy_environ *pSP_copy_environ; const char *nunavailable_api_97; void *unavailable_api_97; const char *nunavailable_api_98; void *unavailable_api_98; const char *nSP_write_term; tSP_write_term *pSP_write_term; const char *nSP_isatty; tSP_isatty *pSP_isatty; const char *nSP_malloc; tSP_malloc *pSP_malloc; const char *nSP_realloc; tSP_realloc *pSP_realloc; const char *nSP_free; tSP_free *pSP_free; const char *nSP_memmove; tSP_memmove *pSP_memmove; const char *nSP_save_error; tSP_save_error *pSP_save_error; const char *nSP_raise_error; tSP_raise_error *pSP_raise_error; const char *nsp_syserror; tsp_syserror *psp_syserror; const char *nSP_atom_length; tSP_atom_length *pSP_atom_length; const char *nSP_put_list_n_codes; tSP_put_list_n_codes *pSP_put_list_n_codes; const char *nSP_get_list_n_codes; tSP_get_list_n_codes *pSP_get_list_n_codes; const char *nSP_register_atom; tSP_register_atom *pSP_register_atom; const char *nSP_unregister_atom; tSP_unregister_atom *pSP_unregister_atom; const char *nSP_cons_functor_array; tSP_cons_functor_array *pSP_cons_functor_array; const char *nSP_restore; tSP_restore *pSP_restore; const char *nSP_set_current_dir; tSP_set_current_dir *pSP_set_current_dir; const char *nSP_get_current_dir; tSP_get_current_dir *pSP_get_current_dir; const char *nSP_raise_fault; tSP_raise_fault *pSP_raise_fault; const char *nsp_set_abort_env; tsp_set_abort_env *psp_set_abort_env; const char *nsp_get_abort_err_ienc; tsp_get_abort_err_ienc *psp_get_abort_err_ienc; const char *nsp_get_boot_path; tsp_get_boot_path *psp_get_boot_path; const char *nSP_get_emulator_version; tSP_get_emulator_version *pSP_get_emulator_version; const char *nSP_get_emulator_dir; tSP_get_emulator_dir *pSP_get_emulator_dir; const char *nSP_set_initial_options; tSP_set_initial_options *pSP_set_initial_options; const char *nSP_set_set_window_title_hook; tSP_set_set_window_title_hook *pSP_set_set_window_title_hook; const char *nSP_set_get_window_title_hook; tSP_set_get_window_title_hook *pSP_set_get_window_title_hook; const char *nsp_get_engine_global; tsp_get_engine_global *psp_get_engine_global; const char *nsp_reset_ctrlc_pending; tsp_reset_ctrlc_pending *psp_reset_ctrlc_pending; const char *nsp_get_ctrlc_pending; tsp_get_ctrlc_pending *psp_get_ctrlc_pending; const char *nsp_qload_or_restore; tsp_qload_or_restore *psp_qload_or_restore; const char *nsp_variable_to_string; tsp_variable_to_string *psp_variable_to_string; const char *nsp_get_mem_usage; tsp_get_mem_usage *psp_get_mem_usage; const char *nsp_get_classpath; tsp_get_classpath *psp_get_classpath; const char *nsp_get_failed_bootpath; tsp_get_failed_bootpath *psp_get_failed_bootpath; const char *nsp_prolog_initialized; tsp_prolog_initialized *psp_prolog_initialized; const char *nsp_is_development_system; tsp_is_development_system *psp_is_development_system; const char *nSP_calloc; tSP_calloc *pSP_calloc; const char *nSP_strdup; tSP_strdup *pSP_strdup; const char *nSP_next_stream; tSP_next_stream *pSP_next_stream; const char *nSP_select; tSP_select *pSP_select; const char *nSP_open_socket_stream; tSP_open_socket_stream *pSP_open_socket_stream; const char *nSP_to_os; tSP_to_os *pSP_to_os; const char *nSP_from_os; tSP_from_os *pSP_from_os; const char *nSP_wci_code; tSP_wci_code *pSP_wci_code; const char *nSP_wci_len; tSP_wci_len *pSP_wci_len; const char *nSP_code_wci; tSP_code_wci *pSP_code_wci; const char *nSP_latin1_chartype; tSP_latin1_chartype *pSP_latin1_chartype; const char *nSP_mutex_lock; tSP_mutex_lock *pSP_mutex_lock; const char *nSP_mutex_unlock; tSP_mutex_unlock *pSP_mutex_unlock; const char *nSP_mutex_destroy; tSP_mutex_destroy *pSP_mutex_destroy; const char *nSP_load_sicstus_run_time; tSP_load_sicstus_run_time *pSP_load_sicstus_run_time; const char *nSP_set_multi_sp_state; tSP_set_multi_sp_state *pSP_set_multi_sp_state; const char *nSP_put_external_object; tSP_put_external_object *pSP_put_external_object; const char *nSP_get_external_object; tSP_get_external_object *pSP_get_external_object; const char *nSP_external_object_default_putter_helper; tSP_external_object_default_putter_helper *pSP_external_object_default_putter_helper; const char *nSP_put_external_object_link; tSP_put_external_object_link *pSP_put_external_object_link; const char *nSP_put_weak_external_object_link; tSP_put_weak_external_object_link *pSP_put_weak_external_object_link; const char *nSP_register_external_object_type; tSP_register_external_object_type *pSP_register_external_object_type; const char *nSP_register_external_object; tSP_register_external_object *pSP_register_external_object; const char *nSP_unlink_external_object; tSP_unlink_external_object *pSP_unlink_external_object; const char *nSP_get_external_object_data; tSP_get_external_object_data *pSP_get_external_object_data; const char *nSP_get_external_object_type; tSP_get_external_object_type *pSP_get_external_object_type; const char *nSP_finalize_external_object; tSP_finalize_external_object *pSP_finalize_external_object; const char *nSP_garbage_collect_external_objects; tSP_garbage_collect_external_objects *pSP_garbage_collect_external_objects; const char *nSP_ctrlc_action; tSP_ctrlc_action *pSP_ctrlc_action; const char *nSP_ctrlbreak_action; tSP_ctrlbreak_action *pSP_ctrlbreak_action; const char *nsp_set_jasper_magic; tsp_set_jasper_magic *psp_set_jasper_magic; const char *nsp_get_jasper_magic; tsp_get_jasper_magic *psp_get_jasper_magic; const char *nsp_set_jasper_threadservermode; tsp_set_jasper_threadservermode *psp_set_jasper_threadservermode; const char *nsp_get_jasper_threadservermode; tsp_get_jasper_threadservermode *psp_get_jasper_threadservermode; const char *nSP_get_integer_bytes; tSP_get_integer_bytes *pSP_get_integer_bytes; const char *nSP_put_integer_bytes; tSP_put_integer_bytes *pSP_put_integer_bytes; const char *nSP_setenv; tSP_setenv *pSP_setenv; const char *nSP_getenv; tSP_getenv *pSP_getenv; const char *nSP_expand_file_name; tSP_expand_file_name *pSP_expand_file_name; const char *nsp_spio_assert_failure; tsp_spio_assert_failure *psp_spio_assert_failure; const char *nsp_spio_debug_break; tsp_spio_debug_break *psp_spio_debug_break; const char *nsp_spio_error_name; tsp_spio_error_name *psp_spio_error_name; const char *nsp_spio_trace_line; tsp_spio_trace_line *psp_spio_trace_line; const char *nSP_get_encoding; tSP_get_encoding *pSP_get_encoding; const char *nSP_encoding_release; tSP_encoding_release *pSP_encoding_release; const char *nSP_encoding_open; tSP_encoding_open *pSP_encoding_open; const char *nSP_encode_from_codes; tSP_encode_from_codes *pSP_encode_from_codes; const char *nSP_encode_to_codes; tSP_encode_to_codes *pSP_encode_to_codes; const char *nsp_ttyflush; tsp_ttyflush *psp_ttyflush; const char *nsp_memory_fault; tsp_memory_fault *psp_memory_fault; const char *nSP_decode_reserved_exception; tSP_decode_reserved_exception *pSP_decode_reserved_exception; const char *nSP_install_idle_hook; tSP_install_idle_hook *pSP_install_idle_hook; const char *nNULL; void (*pNULL)(void); } DISPATCH_TABLE_SICSTUS_H; #define SP_API_SICSTUS_H_NUMBER_OF_ENTRIES 187 extern tsp_glue_initialize sp_glue_initialize; extern tSP_deinitialize SP_deinitialize; extern tSP_force_interactive SP_force_interactive; extern tSP_is_interactive SP_is_interactive; extern tSP_load SP_load; extern tSP_predicate SP_predicate; extern tSP_pred SP_pred; extern tSP_new_term_ref SP_new_term_ref; extern tSP_new_term_refs SP_new_term_refs; extern tSP_reset_term_refs SP_reset_term_refs; extern tSP_alloc_globrefs SP_alloc_globrefs; extern tSP_free_globrefs SP_free_globrefs; extern tSP_query SP_query; extern tSP_query_cut_fail SP_query_cut_fail; extern tSP_open_query SP_open_query; extern tSP_open_query_array SP_open_query_array; extern tSP_next_solution SP_next_solution; extern tSP_cut_query SP_cut_query; extern tSP_close_query SP_close_query; extern tSP_event SP_event; extern tSP_fopen SP_fopen; extern tsp_ref_term sp_ref_term; extern tSP_create_os_stream SP_create_os_stream; extern tSP_get_stream_user_data SP_get_stream_user_data; extern tSP_get_stream_counts SP_get_stream_counts; extern tSP_put_variable SP_put_variable; extern tSP_put_term SP_put_term; extern tSP_put_integer SP_put_integer; extern tSP_put_float SP_put_float; extern tSP_put_atom SP_put_atom; extern tSP_put_string SP_put_string; extern tSP_put_address SP_put_address; extern tSP_put_list_codes SP_put_list_codes; extern tSP_put_number_codes SP_put_number_codes; extern tSP_put_functor SP_put_functor; extern tSP_put_list SP_put_list; extern tSP_cons_functor SP_cons_functor; extern tSP_cons_list SP_cons_list; extern tSP_read_from_string SP_read_from_string; extern tSP_get_integer SP_get_integer; extern tSP_get_float SP_get_float; extern tSP_get_atom SP_get_atom; extern tSP_get_string SP_get_string; extern tSP_get_address SP_get_address; extern tSP_get_list_codes SP_get_list_codes; extern tSP_get_number_codes SP_get_number_codes; extern tSP_get_functor SP_get_functor; extern tSP_get_list SP_get_list; extern tSP_get_arg SP_get_arg; extern tSP_term_type SP_term_type; extern tSP_is_variable SP_is_variable; extern tSP_is_integer SP_is_integer; extern tSP_is_float SP_is_float; extern tSP_is_atom SP_is_atom; extern tSP_is_compound SP_is_compound; extern tSP_is_list SP_is_list; extern tSP_is_atomic SP_is_atomic; extern tSP_is_number SP_is_number; extern tSP_atom_from_string SP_atom_from_string; extern tSP_existing_atom_from_string SP_existing_atom_from_string; extern tSP_string_from_atom SP_string_from_atom; extern tSP_unify SP_unify; extern tSP_compare SP_compare; extern tSP_exception_term SP_exception_term; extern tSP_raise_exception SP_raise_exception; extern tSP_fail SP_fail; extern tSP_error_message SP_error_message; extern tSP_get_errno SP_get_errno; extern tSP_get_stdin SP_get_stdin; extern tSP_get_stdout SP_get_stdout; extern tSP_get_stderr SP_get_stderr; extern tSP_get_curin SP_get_curin; extern tSP_get_curout SP_get_curout; extern tSP_set_user_stream_hook SP_set_user_stream_hook; extern tSP_set_user_stream_post_hook SP_set_user_stream_post_hook; extern tSP_set_errprintf_hook SP_set_errprintf_hook; extern tSP_set_memalloc_hooks SP_set_memalloc_hooks; extern tSP_create_stream SP_create_stream; extern tsp_get_byte_helper sp_get_byte_helper; extern tsp_put_byte_helper sp_put_byte_helper; extern tsp_get_code_helper sp_get_code_helper; extern tsp_put_code_helper sp_put_code_helper; extern tSP_printf SP_printf; extern tSP_fprintf SP_fprintf; extern tsp_ttyprintf sp_ttyprintf; extern tSP_put_bytes SP_put_bytes; extern tSP_put_codes SP_put_codes; extern tSP_put_encoded_string SP_put_encoded_string; extern tSP_flush_output SP_flush_output; extern tSP_fclose SP_fclose; extern tSP_unget_code SP_unget_code; extern tSP_unget_byte SP_unget_byte; extern tSP_signal SP_signal; extern tsp_raise_signal sp_raise_signal; extern tSP_define_c_predicate SP_define_c_predicate; extern tSP_copy_environ SP_copy_environ; extern tSP_write_term SP_write_term; extern tSP_isatty SP_isatty; extern tSP_malloc SP_malloc; extern tSP_realloc SP_realloc; extern tSP_free SP_free; extern tSP_memmove SP_memmove; extern tSP_save_error SP_save_error; extern tSP_raise_error SP_raise_error; extern tsp_syserror sp_syserror; extern tSP_atom_length SP_atom_length; extern tSP_put_list_n_codes SP_put_list_n_codes; extern tSP_get_list_n_codes SP_get_list_n_codes; extern tSP_register_atom SP_register_atom; extern tSP_unregister_atom SP_unregister_atom; extern tSP_cons_functor_array SP_cons_functor_array; extern tSP_restore SP_restore; extern tSP_set_current_dir SP_set_current_dir; extern tSP_get_current_dir SP_get_current_dir; extern tSP_raise_fault SP_raise_fault; extern tsp_set_abort_env sp_set_abort_env; extern tsp_get_abort_err_ienc sp_get_abort_err_ienc; extern tsp_get_boot_path sp_get_boot_path; extern tSP_get_emulator_version SP_get_emulator_version; extern tSP_get_emulator_dir SP_get_emulator_dir; extern tSP_set_initial_options SP_set_initial_options; extern tSP_set_set_window_title_hook SP_set_set_window_title_hook; extern tSP_set_get_window_title_hook SP_set_get_window_title_hook; extern tsp_get_engine_global sp_get_engine_global; extern tsp_reset_ctrlc_pending sp_reset_ctrlc_pending; extern tsp_get_ctrlc_pending sp_get_ctrlc_pending; extern tsp_qload_or_restore sp_qload_or_restore; extern tsp_variable_to_string sp_variable_to_string; extern tsp_get_mem_usage sp_get_mem_usage; extern tsp_get_classpath sp_get_classpath; extern tsp_get_failed_bootpath sp_get_failed_bootpath; extern tsp_prolog_initialized sp_prolog_initialized; extern tsp_is_development_system sp_is_development_system; extern tSP_calloc SP_calloc; extern tSP_strdup SP_strdup; extern tSP_next_stream SP_next_stream; extern tSP_select SP_select; extern tSP_open_socket_stream SP_open_socket_stream; extern tSP_to_os SP_to_os; extern tSP_from_os SP_from_os; extern tSP_wci_code SP_wci_code; extern tSP_wci_len SP_wci_len; extern tSP_code_wci SP_code_wci; extern tSP_latin1_chartype SP_latin1_chartype; extern tSP_mutex_lock SP_mutex_lock; extern tSP_mutex_unlock SP_mutex_unlock; extern tSP_mutex_destroy SP_mutex_destroy; extern tSP_load_sicstus_run_time SP_load_sicstus_run_time; extern tSP_set_multi_sp_state SP_set_multi_sp_state; extern tSP_put_external_object SP_put_external_object; extern tSP_get_external_object SP_get_external_object; extern tSP_external_object_default_putter_helper SP_external_object_default_putter_helper; extern tSP_put_external_object_link SP_put_external_object_link; extern tSP_put_weak_external_object_link SP_put_weak_external_object_link; extern tSP_register_external_object_type SP_register_external_object_type; extern tSP_register_external_object SP_register_external_object; extern tSP_unlink_external_object SP_unlink_external_object; extern tSP_get_external_object_data SP_get_external_object_data; extern tSP_get_external_object_type SP_get_external_object_type; extern tSP_finalize_external_object SP_finalize_external_object; extern tSP_garbage_collect_external_objects SP_garbage_collect_external_objects; extern tSP_ctrlc_action SP_ctrlc_action; extern tSP_ctrlbreak_action SP_ctrlbreak_action; extern tsp_set_jasper_magic sp_set_jasper_magic; extern tsp_get_jasper_magic sp_get_jasper_magic; extern tsp_set_jasper_threadservermode sp_set_jasper_threadservermode; extern tsp_get_jasper_threadservermode sp_get_jasper_threadservermode; extern tSP_get_integer_bytes SP_get_integer_bytes; extern tSP_put_integer_bytes SP_put_integer_bytes; extern tSP_setenv SP_setenv; extern tSP_getenv SP_getenv; extern tSP_expand_file_name SP_expand_file_name; extern tsp_spio_assert_failure sp_spio_assert_failure; extern tsp_spio_debug_break sp_spio_debug_break; extern tsp_spio_error_name sp_spio_error_name; extern tsp_spio_trace_line sp_spio_trace_line; extern tSP_get_encoding SP_get_encoding; extern tSP_encoding_release SP_encoding_release; extern tSP_encoding_open SP_encoding_open; extern tSP_encode_from_codes SP_encode_from_codes; extern tSP_encode_to_codes SP_encode_to_codes; extern tsp_ttyflush sp_ttyflush; extern tsp_memory_fault sp_memory_fault; extern tSP_decode_reserved_exception SP_decode_reserved_exception; extern tSP_install_idle_hook SP_install_idle_hook; # 1095 "./spaux.h" typedef DISPATCH_TABLE_SICSTUS_H SICSTUS_DISPATCH_TABLE; struct DISPATCH_TABLE_STRUCT_SICSTUS_H; struct DISPATCH_TABLE_STRUCT_SUPPORT_H; #define SICSTUS_API_STRUCT_DBG_MEMBERS 1 struct SICSTUS_API_STRUCT { struct DISPATCH_TABLE_STRUCT_SICSTUS_H *dispatch_API_SICSTUS_H; struct DISPATCH_TABLE_STRUCT_SUPPORT_H *dispatch_API_SUPPORT_H; void *stash; struct sp_fli_info **fli_data; void *dummy; const char* name; SP_MainFun * mainfunc; }; #define SICSTUS_API_STRUCT_TYPE struct SICSTUS_API_STRUCT #define GetSICStusDISPATCH(API) ((*(SICStusDISPATCHVAR)). dispatch_ ## API) # 1141 "./spaux.h" #define SICStusDISPATCHVAR sp_GlobalSICStus #define GetSICStusDISPATCHAddress() (&(SICStusDISPATCHVAR)) # 1155 "./spaux.h" #define SetupSICStusDISPATCH() (((*GetSICStusDISPATCHAddress()) == 0) ? (*(GetSICStusDISPATCHAddress())) = SP_get_dispatch(NULL) : 0) #define GetSICStusAPIProc(API,PTRFIELD_NAME,NAMEFIELD_NAME,NAME_AS_STRING) (*((GetSICStusDISPATCH(API))->PTRFIELD_NAME)) #define SP_AVOID_WARNING_ABOUT_UNUSED_LEFT_HAND_ARG_TO_COMMA(X) ((void)(X)) # 1174 "./spaux.h" #define GetSICStusAPIProcInit(API,PTRFIELD_NAME,NAMEFIELD_NAME,NAME_AS_STRING) ((SP_AVOID_WARNING_ABOUT_UNUSED_LEFT_HAND_ARG_TO_COMMA(SetupSICStusDISPATCH()), GetSICStusAPIProc(API, PTRFIELD_NAME, NAMEFIELD_NAME, NAME_AS_STRING))) # 1243 "./spaux.h" extern struct SICSTUS_API_STRUCT *sp_GlobalSICStus; # 1263 "./spaux.h" #define SPAUX_H_ 1 # 672 "../sicstus.h" 2 # 681 "../sicstus.h" struct sp_fli_info { SP_term *fli_stack_start; SP_term *term; int excp_flag; }; struct SP_MAINFUN_PARAMS_STRUCT { unsigned long version; SPEnv *spenv; int flags; #define SP_MAINFUN_PARAM_FLAG_ENTER 0x1 #define SP_MAINFUN_PARAM_FLAG_EXIT 0x2 #define SP_MAINFUN_PARAM_FLAG_PLAIN 0x8 #define SP_MAINFUN_PARAM_FLAG_MULTI 0x10 const SP_GlueFunPtr *funcs; char const* *prednames; const int *arities; SP_InitFunUnion init_fun; SP_InitFunUnion deinit_fun; }; extern __attribute__ ((__visibility__ ("default"))) SP_get_dispatch_type SP_get_dispatch; # 1314 "../sicstus.h" # 226 "../datadefs.h" 2 # 1 "../alloc.h" 1 # 1 "./config.h" 1 # 4 "../alloc.h" 2 #define kB 1024 #define kCells 1024 #define ABUFSIZE 512 #define SP_ALIGN_DOWN(X,Alignment) (((size_t)(X)) & ~(size_t)((Alignment)-1)) #define SP_ALIGN_UP(X,Alignment) SP_ALIGN_DOWN(((size_t)(X) + ((Alignment)-1)), (Alignment)) #define SP_ALIGN(X,Alignment) SP_ALIGN_UP((X), (Alignment)) #define CONTPAD 128 #define CALLPAD (1024 + CONTPAD) #define STACKPAD (2*ARITYLIMIT + 16) #define CHOICEPAD (2*ARITYLIMIT) #define QLOADSIZE (2*kCells) #define GLOBALSTKSIZE (WD(4096)) #define LOCALSTKSIZE (WD(4096)) #define CHOICESTKSIZE (WD(4096)) #define TRAILSTKSIZE (WD(4096)) #define XREGBANKSIZE ARITYLIMIT #define ATMTABSIZE 16384 extern size_t get_stack_size(char *name, size_t def); #define MM_HEAD int mm_args_internal #define MM_OPTION_WIDTH 4 #define MM_BUILD_ARG(BIN,OPTION) ((BIN) << MM_OPTION_WIDTH | (OPTION)) #define MM_OPTIONS (mm_args_internal & ((((long)0x1) << MM_OPTION_WIDTH)-1)) #define MM_BIN (mm_args_internal >> MM_OPTION_WIDTH) #define MM_ARGS mm_args_internal #define MM_OPTION_NONE 0x0 #define MM_OPTION_NULL_ON_FAILURE 0x1 #define MM_MALLOC_BIN 0 #define MM_MALLOC_NULL MM_BUILD_ARG(MM_MALLOC_BIN, MM_OPTION_NULL_ON_FAILURE) #define MM_MISC_BIN 1 #define MM_MISC MM_BUILD_ARG(MM_MISC_BIN, MM_OPTION_NONE) #define MM_MISC_NULL MM_BUILD_ARG(MM_MISC_BIN, MM_OPTION_NULL_ON_FAILURE) #define MM_ABUF MM_BUILD_ARG(2, MM_OPTION_NONE) #define MM_BDD MM_BUILD_ARG(3, MM_OPTION_NONE) #define MM_ATOM MM_BUILD_ARG(4, MM_OPTION_NONE) #define MM_ATMTAB MM_BUILD_ARG(5, MM_OPTION_NONE) #define MM_FORRES MM_BUILD_ARG(6, MM_OPTION_NONE) #define MM_TRY MM_BUILD_ARG(7, MM_OPTION_NONE) #define MM_SWITCH MM_BUILD_ARG(8, MM_OPTION_NONE) #define MM_NC_INFO MM_BUILD_ARG(9, MM_OPTION_NONE) #define MM_DEF MM_BUILD_ARG(10, MM_OPTION_NONE) #define MM_EMUL_INFO MM_BUILD_ARG(11, MM_OPTION_NONE) #define MM_INCORE_INFO MM_BUILD_ARG(12, MM_OPTION_NONE) #define MM_INT_INFO MM_BUILD_ARG(13, MM_OPTION_NONE) #define MM_GCDEF MM_BUILD_ARG(14, MM_OPTION_NONE) #define MM_MOD_DEF MM_BUILD_ARG(15, MM_OPTION_NONE) #define MM_INSTANCE MM_BUILD_ARG(16, MM_OPTION_NONE) #define MM_MODTAB MM_BUILD_ARG(17, MM_OPTION_NONE) #define MM_MODDATA MM_BUILD_ARG(18, MM_OPTION_NONE) #define MM_ITABLE MM_BUILD_ARG(19, MM_OPTION_NONE) #define MM_SETOF MM_BUILD_ARG(20, MM_OPTION_NONE) #define MM_QLINFO MM_BUILD_ARG(21, MM_OPTION_NONE) #define MM_FLI_STACK MM_BUILD_ARG(22, MM_OPTION_NONE) #define MM_EVQ MM_BUILD_ARG(23, MM_OPTION_NONE) #define MM_STREAM MM_BUILD_ARG(24, MM_OPTION_NONE) #define MM_NUMSTACK MM_BUILD_ARG(25, MM_OPTION_NONE) #define MM_CTABLE MM_BUILD_ARG(26, MM_OPTION_NONE) #define MM_BTREE MM_BUILD_ARG(27, MM_OPTION_NONE) #define MM_LHEAP MM_BUILD_ARG(28, MM_OPTION_NONE) #define MM_STACK_BIN 29 #define MM_STACK MM_BUILD_ARG(MM_STACK_BIN, MM_OPTION_NONE) #define MM_NO_BINS 30 extern SP_int64 program_in_use(void); extern SP_int64 program_free(void); # 227 "../datadefs.h" 2 # 1 "../termdefs.h" 1 #define INCLUDED_TERMDEFS_H_ # 15 "../termdefs.h" # 1 "./config.h" 1 # 16 "../termdefs.h" 2 #define ANY 1 #define SAME 0 typedef unsigned long SP_UWORD; typedef long SP_WORD; typedef unsigned int UHALF; typedef int HALF; # 47 "../termdefs.h" #define HALFSHIFT (4<<LogSizeOfWord) typedef UHALF INSN; typedef SP_UWORD TAGGED; typedef int SP_BOOL; typedef long SP_INTEGER; typedef double SP_FLOAT; #define FALSE 0 #define TRUE 1 #define AddrToTag(P) ((TAGGED)(P)) #define TagToAddr(X) ((TAGGED *)(X)) #define POINTERMASK (-4L) #define WORDSIZE (sizeof(char *)<<3) #define ARITYLIMIT 256 #define ARITYOFFSET (WORDSIZE-9) #define INDEXMASK ((1L << (ARITYOFFSET)) - 1) #define INDEXOFFSET 3 #define HashExt 0x55555555 #define WD(I) (((long)(I))<<LogSizeOfWord) #define TagOf(P) ((P)&3) #define FullTagOf(P) ((P)&7) #define REF_TAG 00 #define STRUCT_TAG 01 #define LIST_TAG 02 #define CONST_TAG 03 #define REF_TAG2 04 #define STRUCT_TAG2 05 #define LIST_TAG2 06 #define CONST_TAG2 07 #define INT_TAG 03 #define ATOM_TAG 07 #define ERRORTAG ((TAGGED)0x0) #define ALT_ERRORTAG ((TAGGED)0x1) #define CVA_HEADER ((TAGGED)(-1L)) #define IsVar(X) (TagOf(X)==REF_TAG) #define VarIsSVA(X,H) ((TagToAddr(X) >= (H))) #define GVarIsHVA(X) (CTagToHeader(X) != CVA_HEADER) #define GVarIsCVA(X) (CTagToHeader(X) == CVA_HEADER) #define TagIsAtomic(X) (TagOf(X)==CONST_TAG) #define TagIsComplex(X) (TagOf((X)+1)>=LIST_TAG) #define TagIsSIN(X) (FullTagOf(X)==INT_TAG) #define TagIsSmall(X) (FullTagOf(X)==INT_TAG) #define TagIsATM(X) (FullTagOf(X)==ATOM_TAG) #define TagIsLST(X) (TagOf(X)==LIST_TAG) #define TagIsSTR(X) (TagOf(X)==STRUCT_TAG) #define TagIsAtom(X) (TagIsATM(X) && !FunIsLarge(X)) #define TagIsStructure(X) (TagIsSTR(X) && !STRIsLarge(X)) #define TagIsLarge(X) (TagIsSTR(X) && STRIsLarge(X)) #define STRIsLarge(X) FunIsLarge(TagToHeadfunctor(X)) #define MakeList(P) (AddrToTag(P)+LIST_TAG) #define MakeStructure(P) (AddrToTag(P)+STRUCT_TAG) #define REFToSTR(X) ((X)+STRUCT_TAG) #define STRToREF(X) ((X)-STRUCT_TAG) #define TagIndex(T,P) (((TAGGED)(P) << INDEXOFFSET) + (T)) #define GetIndex(X) (((SP_WORD)(X)) >> INDEXOFFSET) #define TagOffset(T,P) (((TAGGED)(P) << LogSizeOfWord) + (T)) #define GetOffset(X) (((SP_WORD)(X)) >> LogSizeOfWord) #define TermToPointer(X) TagToAddr((X) - INT_TAG) #define PointerToTerm(X) (AddrToTag(X) + INT_TAG) #define TermToAnyPointer(X) TagToAddr(GetInteger(X)) #define AnyPointerToTerm(X) MakeInteger(AddrToTag(X)) #define IsHeapTerm(A,H) (IsVar(A) ? !VarIsSVA(A,H) : !TagIsAtomic(A)) #define IsStackTerm(A,H) (IsVar(A) && VarIsSVA(A,H)) #define IsAtomic(X) TagIsAtomic(X) #define IsComplex(X) TagIsComplex(X) #define AreComplex(X,Y) (TagOf(((X)+1)&((Y)+1))>=LIST_TAG) #define AreSmall(X,Y) TagIsSmall((X)|(Y)) #define Are3Small(X,Y,Z) TagIsSmall((X)|(Y)|(Z)) #define BothAreSmall(X,Y) TagIsAtomic((X)&(Y)) #define SomeAreSmall(X,Y) TagIsAtomic((X)|(Y)) #define TermIsAtomic(X) (TagIsAtomic(X) || TagIsLarge(X)) #define TermIsComplex(X) (TagIsComplex(X) && !TagIsLarge(X)) #define TaggedLow (((TAGGED)1L<<(WORDSIZE-1))+3) #define TaggedHigh (((TAGGED)1L<<(WORDSIZE-1))-5) #define HighInt (1L<<(WORDSIZE-INDEXOFFSET-1)) #define IStep(I) ((I) << INDEXOFFSET) #define TaggedZero ((TAGGED)INT_TAG) #define TaggedOne (TaggedZero+IStep(1)) #define TaggedMinusOne (TaggedZero-IStep(1)) #define MakeSmall(X) (((TAGGED)((SP_WORD)(X)<<INDEXOFFSET))+INT_TAG) #define GetSmall(X) (((SP_WORD)(X))>>INDEXOFFSET) #define Teq(U,V) ((long)(U)==(long)(V)) #define Tne(U,V) ((long)(U)!=(long)(V)) #define Tlt(U,V) ((long)(U)< (long)(V)) #define Tle(U,V) ((long)(U)<=(long)(V)) #define Tgt(U,V) ((long)(U)> (long)(V)) #define Tge(U,V) ((long)(U)>=(long)(V)) #define Teqz(U) ((long)(U)==(long)INT_TAG) #define Tnez(U) ((long)(U)!=(long)INT_TAG) #define Tltz(U) ((long)(U)< 0L) #define Tlez(U) ((long)(U)<=(long)INT_TAG) #define Tgtz(U) ((long)(U)> (long)INT_TAG) #define Tgez(U) ((long)(U)>=0L) #define Tminus(U) ((TaggedZero<<1)-(U)) #define Tdifference(U,V) ((long)(U) - (long)(V)) #define MakeLarge(Ptr) make_large(w,(TAGGED *)(Ptr)) #define MakeInteger(X) (IntIsSmall(X) ? MakeSmall(X) : make_integer(w,X)) #define MakeInt64(X) MakeInteger(X) # 233 "../termdefs.h" extern int barf_MakeIntegerFromInt(long x, const char *f, int l); #define MakeIntegerFromInt(X) ((sizeof (X) <= sizeof (int)) ? MakeSmall(X) : barf_MakeIntegerFromInt(X, __FILE__, __LINE__)) #define MakeFloat(X) make_float(w,X) #define IencAtom(X) init_atom_check(X, 0) #define IencAtomSoft(X) init_atom_check(X, 1) #define SencAtom(X,Cxt) IencAtom(SencIenc(X,Cxt)) #define GetInteger(X) (TagIsSmall(X) ? GetSmall(X) : spi_get_integer(X)) #define GetInt64(X) GetInteger(X) #define GetLong(X) (TagIsSmall(X) ? GetSmall(X) : (long)CTagToArg(X,1)) #define GetFloat(X) (TagIsSmall(X) ? (SP_FLOAT)GetSmall(X) : spi_get_float(X)) #define IntIsSmall(X) ((TAGGED)((((long)(X))>>(WORDSIZE-INDEXOFFSET-1))+1) <= 1) #define FloatIsSmall(X) ((SP_FLOAT)(X) >= -(SP_FLOAT)HighInt && (SP_FLOAT)(X) < (SP_FLOAT)HighInt) #define IsBignum(X) (TagIsLarge(X) && FunIsInteger(TagToHeadfunctor(X))) #define IsInteger(X) (TagIsSmall(X) || (TagIsLarge(X) && FunIsInteger(TagToHeadfunctor(X)))) #define IsSmall(X) TagIsSmall(X) #define IsLong(X) (TagIsSmall(X) || (TagIsSTR(X) && TagToHeadfunctor(X)==BIGNUM_HEADER)) #define IsLong64(X) IsLong(X) #define IsFloat(X) (TagIsLarge(X) && FunIsFloat(TagToHeadfunctor(X))) #define IsNumber(X) (TagIsSmall(X) || TagIsLarge(X)) #define IsAtom(X) TagIsAtom(X) #define IsString(X) TagIsAtom(X) #define CTagToREF(x) (*TagToREF(x)) #define CTagToLST(x) (*TagToLST(x)) #define CTagToSTR(x) (*TagToSTR(x)) #define TagToHeadfunctor(X) CTagToSTR(X) #define CTagToArg(x,I) (*TagToArg(x,I)) #define CTagToCar(x) (*TagToCar(x)) #define CTagToCdr(x) (*TagToCdr(x)) #define CTagToPointer(x) (*TagToPointer(x)) #define CTagToHeader(x) (*TagToHeader(x)) #define CTagToAttr(x) (*TagToAttr(x)) #define CTagToSusp(x) (*TagToSusp(x)) #define TagToREF(x) TagToAddr(x) #define TagToLST(x) TagToAddr((x)-LIST_TAG) #define TagToSTR(x) TagToAddr((x)-STRUCT_TAG) #define TagToArg(X,N) HeapOffset(TagToSTR(X),N) #define TagToCar(X) TagToLST(X) #define TagToCdr(X) HeapOffset(TagToLST(X),1) #define TagToPointer(T) TagToAddr((TAGGED)(T)&POINTERMASK) #define AlignPointer(T) TagToPointer(T) #define TagToHeader(X) HeapOffset(TagToREF(X),-1) #define TagToAttr(X) HeapOffset(TagToREF(X),1) #define TagToSusp(X) HeapOffset(TagToREF(X),2) #define TagREF(x) AddrToTag(x) #define IndexPart(T) ((T) << (WORDSIZE-ARITYOFFSET) >> (WORDSIZE-ARITYOFFSET+INDEXOFFSET)) #define Arity(X) ((X) >> ARITYOFFSET) #define SetArity(X,A) (((X) & ~((long)(ARITYLIMIT-1)<<ARITYOFFSET)) | (((long)(A))<<ARITYOFFSET)) #define TagToAtom(X) getatom(IndexPart(X)) #define AtomIenc(X) ((char const *)TagToAtom(X)->name) #define AtomSenc(X,Cxt) (TagToAtom(X)->is_ascii ? AtomIenc(X) : IencSenc(AtomIenc(X),Cxt)) #define SencIenc(X,Cxt) SP_from_os(X,Cxt) #define IencSenc(X,Cxt) SP_to_os(X,Cxt) #define AtomLength(X) (TagToAtom(X)->length) #define MakeAtom(IX) (((TAGGED)(IX) << INDEXOFFSET) + ATOM_TAG) #define FunIsLarge(Fun) ((long)(Fun) < 0L) #define FunIsLargeNotCVA(Fun) ((long)(Fun) < -1L) #define FunIsCVA(Fun) ((long)(Fun) == -1L) #define IsTrailedCVA(X) (IsVar(X) && GVarIsCVA(X)) #define IsTrailedVar(X) IsVar(X) #define TrailedCVABinding(X) CTagToREF(X) #define TrailedCVAREF(X) (X) #define CVAContents(X) (X) # 343 "../termdefs.h" #define FunIsFloat(Fun) ((Fun) & 0x8) #define FunIsInteger(Fun) (!((Fun) & 0x8)) #define CVAArity 3 # 360 "../termdefs.h" #define FLOAT_HEADER ((TAGGED)(-17L)) #define FloatArity 2 #define BIGNUM_HEADER ((TAGGED)(-25L)) #define LargeArity(X) (((-(long)(X))+15) >> 4) #define LargeInsns(X) (LargeArity(X)<<1) #define LStep(I) ((I) << 4) #define TagToInstance(X) ((struct instance *)TermToPointer(X)) #define TagToEmul(X) ((struct emul_info *)TermToPointer(X)) #define TagToDefinition(X) ((struct definition *)TermToPointer(X)) #define TagToSetofRoot(X) ((struct setof_int_info *)TermToPointer(X)) #define TagToSwitch(X) ((struct sw_on_key *)TermToPointer(X)) #define TagToModule(X) ((struct mod_def *)TermToPointer(X)) #define TagToStream(X) ((SP_stream *)TermToAnyPointer(X)) #define TagToClause(X) ((struct emul_info *)TermToPointer(X)) # 397 "../termdefs.h" #define WORKER_TERM_DECL TAGGED term[256]; struct worker { struct sp_fli_info *fli_data; struct node *node; struct node *next_node; struct node *segment_node; INSN *insn; TAGGED *structure; int value_trail; unsigned int wake_count; struct definition *predicate; struct bdd_hash *bdd_node_table, *bdd_univ_table, *bdd_subst_table; struct bdd_hash_node *bdd_current_node, *bdd_current_univ, *bdd_current_subst; int fli_stack_size; int fli_stack_index; TAGGED *fli_stack_start; TAGGED *heap_start, *heap_end; # 489 "../termdefs.h" TAGGED * heap_warn; #define HEAP_WARN_VOLATILE volatile TAGGED * volatile heap_warn_soft; TAGGED * volatile int_heap_warn; TAGGED *stack_start, *stack_end, *stack_warn, *choice_start, *choice_end, *trail_start, *trail_end, tagged_choice_start; long current_debugger_local; #define WORKER_FLAGS_ABORT_MASK 0 #define FLAG_IN_TRACER 1 #define FLAG_IN_HOOK 2 #define FLAG_PAST_CONTEXT 4 TAGGED *numstack_top, *numstack_end; struct node *current_query; double pad; struct try_node *next_alt; TAGGED *local_top; TAGGED *global_top; TAGGED *trail_top; struct frame *frame; INSN *next_insn; TAGGED term[256]; #define WORKER_VARS 32 #define WORKER_VAR_MODE 0 #define WORKER_VAR_SHOW 1 #define WORKER_VAR_COMMAND 2 #define WORKER_VAR_PORT 3 #define WORKER_VAR_BID 4 #define WORKER_VAR_MAX_INV 5 #define WORKER_VAR_IN_TRACER 6 #define WORKER_VAR_IN_HOOK 7 TAGGED worker_vars[32]; struct sp_fli_info flidata; }; struct frame { struct frame *frame; INSN *next_insn; TAGGED term[1]; }; struct node { struct try_node *next_alt; TAGGED *local_top; TAGGED *global_top; TAGGED *trail_top; struct frame *frame; INSN *next_insn; TAGGED term[1]; }; # 1 "../mt.h" 1 # 10 "../mt.h" #define INCLUDED_MT_H # 1 "../datadefs.h" 1 # 16 "../mt.h" 2 # 1 "../support.h" 1 #define INCLUDED_SUPPORT_H # 16 "../support.h" # 1 "./config.h" 1 # 17 "../support.h" 2 # 29 "../support.h" # 1 "./atoms.h" 1 #define ATOMS_H_INCLUDED #define ATOMS_H_INCLUDE_TWICE_FOR_INITIAL_ATOMS 1 # 61 "./atoms.h" #define MAKE_ATOM(INDEX) TagIndex(ATOM_TAG,(INDEX)) #define MAKE_FUNCTOR(INDEX,ARITY) SetArity(MAKE_ATOM((INDEX)), (ARITY)) enum atom_sequence_number_enum { atom_nil_enum, #define atom_nil MAKE_ATOM(atom_nil_enum) atom_list_enum, #define atom_list MAKE_ATOM(atom_list_enum) #define functor_list MAKE_FUNCTOR(atom_list_enum,2) atom_lessthan_enum, #define atom_lessthan MAKE_ATOM(atom_lessthan_enum) atom_equal_enum, #define atom_equal MAKE_ATOM(atom_equal_enum) atom_greaterthan_enum, #define atom_greaterthan MAKE_ATOM(atom_greaterthan_enum) atom_inf_enum, #define atom_inf MAKE_ATOM(atom_inf_enum) atom_sup_enum, #define atom_sup MAKE_ATOM(atom_sup_enum) atom_exit_enum, #define atom_exit MAKE_ATOM(atom_exit_enum) atom_fail_enum, #define atom_fail MAKE_ATOM(atom_fail_enum) atom_error_enum, #define atom_error MAKE_ATOM(atom_error_enum) atom_on_enum, #define atom_on MAKE_ATOM(atom_on_enum) atom_off_enum, #define atom_off MAKE_ATOM(atom_off_enum) atom_NUL_enum, #define atom_NUL MAKE_ATOM(atom_NUL_enum) atom_else_enum, #define atom_else MAKE_ATOM(atom_else_enum) atom_encoding_enum, #define atom_encoding MAKE_ATOM(atom_encoding_enum) atom_void_enum, #define atom_void MAKE_ATOM(atom_void_enum) atom_colon_enum, #define atom_colon MAKE_ATOM(atom_colon_enum) #define functor_module MAKE_FUNCTOR(atom_colon_enum,2) atom_questionmark_enum, #define atom_questionmark MAKE_ATOM(atom_questionmark_enum) atom_user_input_enum, #define atom_user_input MAKE_ATOM(atom_user_input_enum) atom_user_output_enum, #define atom_user_output MAKE_ATOM(atom_user_output_enum) atom_user_error_enum, #define atom_user_error MAKE_ATOM(atom_user_error_enum) atom_past_enum, #define atom_past MAKE_ATOM(atom_past_enum) atom_prolog_enum, #define atom_prolog MAKE_ATOM(atom_prolog_enum) atom_user_enum, #define atom_user MAKE_ATOM(atom_user_enum) atom_trace_enum, #define atom_trace MAKE_ATOM(atom_trace_enum) atom_debug_enum, #define atom_debug MAKE_ATOM(atom_debug_enum) atom_zip_enum, #define atom_zip MAKE_ATOM(atom_zip_enum) atom_wci_enum, #define atom_wci MAKE_ATOM(atom_wci_enum) atom_write_enum, #define atom_write MAKE_ATOM(atom_write_enum) atom_development_enum, #define atom_development MAKE_ATOM(atom_development_enum) atom_runtime_enum, #define atom_runtime MAKE_ATOM(atom_runtime_enum) atom_sicstus_enum, #define atom_sicstus MAKE_ATOM(atom_sicstus_enum) atom_iso_enum, #define atom_iso MAKE_ATOM(atom_iso_enum) atom_portable_enum, #define atom_portable MAKE_ATOM(atom_portable_enum) atom_latin1_enum, #define atom_latin1 MAKE_ATOM(atom_latin1_enum) atom_codes_enum, #define atom_codes MAKE_ATOM(atom_codes_enum) atom_character_code_enum, #define atom_character_code MAKE_ATOM(atom_character_code_enum) atom_terse_enum, #define atom_terse MAKE_ATOM(atom_terse_enum) atom_verbose_enum, #define atom_verbose MAKE_ATOM(atom_verbose_enum) atom_true_enum, #define atom_true MAKE_ATOM(atom_true_enum) atom_catch_hook_enum, #define atom_catch_hook MAKE_ATOM(atom_catch_hook_enum) atom_compactcode_enum, #define atom_compactcode MAKE_ATOM(atom_compactcode_enum) atom_profiledcode_enum, #define atom_profiledcode MAKE_ATOM(atom_profiledcode_enum) atom_debugcode_enum, #define atom_debugcode MAKE_ATOM(atom_debugcode_enum) atom_dynamic_enum, #define atom_dynamic MAKE_ATOM(atom_dynamic_enum) atom_multifile_enum, #define atom_multifile MAKE_ATOM(atom_multifile_enum) atom_volatile_enum, #define atom_volatile MAKE_ATOM(atom_volatile_enum) atom_counter_enum, #define atom_counter MAKE_ATOM(atom_counter_enum) atom_nan_enum, #define atom_nan MAKE_ATOM(atom_nan_enum) atom_not_enum, #define atom_not MAKE_ATOM(atom_not_enum) atom_clpfd_enum, #define atom_clpfd MAKE_ATOM(atom_clpfd_enum) atom_uninit_enum, #define atom_uninit MAKE_ATOM(atom_uninit_enum) atom_at_enum, #define atom_at MAKE_ATOM(atom_at_enum) atom_atom_enum, #define atom_atom MAKE_ATOM(atom_atom_enum) #define functor_atom1 MAKE_FUNCTOR(atom_atom_enum,1) atom_append_enum, #define atom_append MAKE_ATOM(atom_append_enum) functor_number1_enum, #define functor_number1 MAKE_FUNCTOR(functor_number1_enum,1) atom_string_enum, #define atom_string MAKE_ATOM(atom_string_enum) #define functor_string1 MAKE_FUNCTOR(atom_string_enum,1) functor_var3_enum, #define functor_var3 MAKE_FUNCTOR(functor_var3_enum,3) functor_variable_enum, #define functor_variable MAKE_FUNCTOR(functor_variable_enum,1) functor_value_enum, #define functor_value MAKE_FUNCTOR(functor_value_enum,1) functor_unsafe_value_enum, #define functor_unsafe_value MAKE_FUNCTOR(functor_unsafe_value_enum,1) atom_slpar_enum, #define atom_slpar MAKE_ATOM(atom_slpar_enum) atom_lpar_enum, #define atom_lpar MAKE_ATOM(atom_lpar_enum) atom_lbrack_enum, #define atom_lbrack MAKE_ATOM(atom_lbrack_enum) atom_lbrace_enum, #define atom_lbrace MAKE_ATOM(atom_lbrace_enum) atom_rpar_enum, #define atom_rpar MAKE_ATOM(atom_rpar_enum) atom_rbrack_enum, #define atom_rbrack MAKE_ATOM(atom_rbrack_enum) atom_rbrace_enum, #define atom_rbrace MAKE_ATOM(atom_rbrace_enum) atom_read_enum, #define atom_read MAKE_ATOM(atom_read_enum) atom_readwrite_enum, #define atom_readwrite MAKE_ATOM(atom_readwrite_enum) atom_cut_enum, #define atom_cut MAKE_ATOM(atom_cut_enum) atom_semi_enum, #define atom_semi MAKE_ATOM(atom_semi_enum) atom_comma_enum, #define atom_comma MAKE_ATOM(atom_comma_enum) atom_bar_enum, #define atom_bar MAKE_ATOM(atom_bar_enum) functor_o_enum, #define functor_o MAKE_FUNCTOR(functor_o_enum,1) functor_x_enum, #define functor_x MAKE_FUNCTOR(functor_x_enum,1) functor_y_enum, #define functor_y MAKE_FUNCTOR(functor_y_enum,1) functor_y_unsafe_enum, #define functor_y_unsafe MAKE_FUNCTOR(functor_y_unsafe_enum,1) functor_minus_enum, #define functor_minus MAKE_FUNCTOR(functor_minus_enum,2) functor_slash_enum, #define functor_slash MAKE_FUNCTOR(functor_slash_enum,2) functor_functor_enum, #define functor_functor MAKE_FUNCTOR(functor_functor_enum,1) functor_tagged_enum, #define functor_tagged MAKE_FUNCTOR(functor_tagged_enum,1) functor_emul_entry_enum, #define functor_emul_entry MAKE_FUNCTOR(functor_emul_entry_enum,1) functor_builtin_enum, #define functor_builtin MAKE_FUNCTOR(functor_builtin_enum,1) functor_large_enum, #define functor_large MAKE_FUNCTOR(functor_large_enum,2) functor_long_enum, #define functor_long MAKE_FUNCTOR(functor_long_enum,1) functor_ref_enum, #define functor_ref MAKE_FUNCTOR(functor_ref_enum,1) functor_try_enum, #define functor_try MAKE_FUNCTOR(functor_try_enum,3) functor_lineno_enum, #define functor_lineno MAKE_FUNCTOR(functor_lineno_enum,1) functor_bdd_pos_enum, #define functor_bdd_pos MAKE_FUNCTOR(functor_bdd_pos_enum,3) functor_bdd_neg_enum, #define functor_bdd_neg MAKE_FUNCTOR(functor_bdd_neg_enum,3) functor_bdd_key_enum, #define functor_bdd_key MAKE_FUNCTOR(functor_bdd_key_enum,3) # 663 "./atoms.h" atom_det_enum, #define atom_det MAKE_ATOM(atom_det_enum) atom_nondet_enum, #define atom_nondet MAKE_ATOM(atom_nondet_enum) atom_flit_call_enum, #define atom_flit_call MAKE_ATOM(atom_flit_call_enum) functor_invst_enum, #define functor_invst MAKE_FUNCTOR(functor_invst_enum,9) atom_call_enum, #define atom_call MAKE_ATOM(atom_call_enum) atom_proceed_enum, #define atom_proceed MAKE_ATOM(atom_proceed_enum) atom_ask_enum, #define atom_ask MAKE_ATOM(atom_ask_enum) atom_redo_enum, #define atom_redo MAKE_ATOM(atom_redo_enum) atom_print_enum, #define atom_print MAKE_ATOM(atom_print_enum) atom_flit_enum, #define atom_flit MAKE_ATOM(atom_flit_enum) #define functor_flit MAKE_FUNCTOR(atom_flit_enum,2) atom_silent_enum, #define atom_silent MAKE_ATOM(atom_silent_enum) functor_exec_st_enum, #define functor_exec_st MAKE_FUNCTOR(functor_exec_st_enum,2) atom_advice_enum, #define atom_advice MAKE_ATOM(atom_advice_enum) atom_contprompt_enum, #define atom_contprompt MAKE_ATOM(atom_contprompt_enum) functor_resource_error_enum, #define functor_resource_error MAKE_FUNCTOR(functor_resource_error_enum,2) atom_memory_enum, #define atom_memory MAKE_ATOM(atom_memory_enum) atom_mem_stat_enum, #define atom_mem_stat MAKE_ATOM(atom_mem_stat_enum) functor_Dref_enum, #define functor_Dref MAKE_FUNCTOR(functor_Dref_enum,2) functor_Dstream_enum, #define functor_Dstream MAKE_FUNCTOR(functor_Dstream_enum,1) functor_Dmutable_enum, #define functor_Dmutable MAKE_FUNCTOR(functor_Dmutable_enum,2) functor_Dapply_enum, #define functor_Dapply MAKE_FUNCTOR(functor_Dapply_enum,3) functor_Dfree_enum, #define functor_Dfree MAKE_FUNCTOR(functor_Dfree_enum,1) atom_external_object_enum, #define atom_external_object MAKE_ATOM(atom_external_object_enum) atom_atmtab_full_enum, #define atom_atmtab_full MAKE_ATOM(atom_atmtab_full_enum) atom_goal_expansion_enum, #define atom_goal_expansion MAKE_ATOM(atom_goal_expansion_enum) atom_SIGABRT_enum, #define atom_SIGABRT MAKE_ATOM(atom_SIGABRT_enum) atom_SIGALRM_enum, #define atom_SIGALRM MAKE_ATOM(atom_SIGALRM_enum) atom_SIGBUS_enum, #define atom_SIGBUS MAKE_ATOM(atom_SIGBUS_enum) atom_SIGCHLD_enum, #define atom_SIGCHLD MAKE_ATOM(atom_SIGCHLD_enum) atom_SIGCONT_enum, #define atom_SIGCONT MAKE_ATOM(atom_SIGCONT_enum) atom_SIGFPE_enum, #define atom_SIGFPE MAKE_ATOM(atom_SIGFPE_enum) atom_SIGHUP_enum, #define atom_SIGHUP MAKE_ATOM(atom_SIGHUP_enum) atom_SIGILL_enum, #define atom_SIGILL MAKE_ATOM(atom_SIGILL_enum) atom_SIGINT_enum, #define atom_SIGINT MAKE_ATOM(atom_SIGINT_enum) atom_SIGKILL_enum, #define atom_SIGKILL MAKE_ATOM(atom_SIGKILL_enum) atom_SIGPIPE_enum, #define atom_SIGPIPE MAKE_ATOM(atom_SIGPIPE_enum) atom_SIGQUIT_enum, #define atom_SIGQUIT MAKE_ATOM(atom_SIGQUIT_enum) atom_SIGSEGV_enum, #define atom_SIGSEGV MAKE_ATOM(atom_SIGSEGV_enum) atom_SIGSTOP_enum, #define atom_SIGSTOP MAKE_ATOM(atom_SIGSTOP_enum) atom_SIGTERM_enum, #define atom_SIGTERM MAKE_ATOM(atom_SIGTERM_enum) atom_SIGTSTP_enum, #define atom_SIGTSTP MAKE_ATOM(atom_SIGTSTP_enum) atom_SIGTTIN_enum, #define atom_SIGTTIN MAKE_ATOM(atom_SIGTTIN_enum) atom_SIGTTOU_enum, #define atom_SIGTTOU MAKE_ATOM(atom_SIGTTOU_enum) atom_SIGUSR1_enum, #define atom_SIGUSR1 MAKE_ATOM(atom_SIGUSR1_enum) atom_SIGUSR2_enum, #define atom_SIGUSR2 MAKE_ATOM(atom_SIGUSR2_enum) atom_SIGPOLL_enum, #define atom_SIGPOLL MAKE_ATOM(atom_SIGPOLL_enum) atom_SIGPROF_enum, #define atom_SIGPROF MAKE_ATOM(atom_SIGPROF_enum) atom_SIGSYS_enum, #define atom_SIGSYS MAKE_ATOM(atom_SIGSYS_enum) atom_SIGTRAP_enum, #define atom_SIGTRAP MAKE_ATOM(atom_SIGTRAP_enum) atom_SIGURG_enum, #define atom_SIGURG MAKE_ATOM(atom_SIGURG_enum) atom_SIGVTALRM_enum, #define atom_SIGVTALRM MAKE_ATOM(atom_SIGVTALRM_enum) atom_SIGXCPU_enum, #define atom_SIGXCPU MAKE_ATOM(atom_SIGXCPU_enum) atom_SIGXFSZ_enum, #define atom_SIGXFSZ MAKE_ATOM(atom_SIGXFSZ_enum) atom_dollar_process_enum, #define atom_dollar_process MAKE_ATOM(atom_dollar_process_enum) atom_infinite_enum, #define atom_infinite MAKE_ATOM(atom_infinite_enum) atom_file_enum, #define atom_file MAKE_ATOM(atom_file_enum) atom_all_enum, #define atom_all MAKE_ATOM(atom_all_enum) atom_close_cleanup_enum, #define atom_close_cleanup MAKE_ATOM(atom_close_cleanup_enum) atom_times_enum, #define atom_times MAKE_ATOM(atom_times_enum) atom_bof_enum, #define atom_bof MAKE_ATOM(atom_bof_enum) atom_current_enum, #define atom_current MAKE_ATOM(atom_current_enum) atom_eof_enum, #define atom_eof MAKE_ATOM(atom_eof_enum) atom_dollar_reserved_enum, #define atom_dollar_reserved MAKE_ATOM(atom_dollar_reserved_enum) first_unused_atom_number }; # 30 "../support.h" 2 # 1 "../regs.h" 1 # 1 "./config.h" 1 # 6 "../regs.h" 2 #define Arg w #define Argtype struct worker * #define Argdecl Argtype w #define WAMENV Argdecl = GET_CURRENT_WORKER() #define Xb(I) (*CharOffset(w,I)) #define X(I) (w->term[I]) #define XToI(X) (&(Xb(X)) - w->term) #define DynamicPreserved 6 #define INIT_CP_ARITY 3 #define InitialNode ChoiceCharOffset(w->choice_start,ArityToOffset(INIT_CP_ARITY)) #define InitialValueTrail (-((int)(sizeof(struct node)/sizeof(TAGGED)-ANY))) #define IToXOffset(I) ((INSN)(size_t)(((struct worker *)0)->term+(I))) #define IToYOffset(I) ((INSN)(size_t)(((struct frame *)0)->term+(I))) #define Yb(I) (*CharOffset(E,I)) #define Y(I) (E->term[I]) #define YToI(Y) (&(Yb(Y)) - E->term) #define NewShadowregs(Gtop) { GLOBAL_UNCOND = (Gtop); LOCAL_UNCOND = w->local_top; } #define SetShadowregs(Chpt) { GLOBAL_UNCOND = (Chpt)->global_top; LOCAL_UNCOND = (Chpt)->local_top; } # 62 "../regs.h" #define GLOBAL_UNCOND global_uncond #define LOCAL_UNCOND local_uncond #define LetShadowGlobal TAGGED *GLOBAL_UNCOND = w->node->global_top; #define LetShadowLocal TAGGED * LOCAL_UNCOND = w->node->local_top; #define SetWamShadowregs(Chpt) #define NewWamShadowregs(Chpt) #define UpdateShadowregs(Chpt) SetShadowregs(Chpt) #define LetShadowregs LetShadowGlobal LetShadowLocal #define SaveGtop(Chpt,Gtop) (Chpt)->global_top = (Gtop); #define RestoreGtop(Chpt) w->global_top = (Chpt)->global_top; #define RestoreLtop(Chpt) w->local_top = (Chpt)->local_top; #define FrameSize(L) (*(HALF *)((L)-1)) #define SetSoftEvent (w->heap_warn_soft=NULL) #define TestEvent (!w->heap_warn_soft) #define Wake (SetSoftEvent, w->wake_count++) #define SetInterrupt do{ w->int_heap_warn = NULL; SetSoftEvent; }while(0) # 122 "../regs.h" #define OPSHIFT (LogSizeOfWord+1) extern void * const *emul_entry; #define OPSHIFTOF(COND) ((COND) ? LogSizeOfWord+1 : 1) #define Wmode(Op) ((Op)<<OPSHIFT) # 31 "../support.h" 2 # 1 "../objareas.h" 1 #define INCLUDED_OBJAREAS_H_ # 1 "./config.h" 1 # 8 "../objareas.h" 2 typedef UHALF CLOCK; #define ENDOFDAY ((CLOCK)(~0x0)) #define IDXVAR 0x1 #define IDXNUMBER 0x2 #define IDXATOM 0x4 #define IDXLIST 0x8 #define IDXSTRUCTURE 0x10 #define IDXLAST 0x20 #define IDXCHOICE 0x40 #define IDXCUT 0x80 #define IDXELSE 0x100 #define IDXOTHER (IDXNUMBER+IDXATOM+IDXSTRUCTURE) #define IDXNONVAR (IDXLIST+IDXOTHER) #define IDXANY (IDXVAR+IDXNONVAR) #define IDXPRUNING (IDXCHOICE+IDXCUT) struct emul_info { struct emul_info *next; INSN *elsecode; unsigned int ix:9; unsigned int objsize:23; unsigned int pad:32; TAGGED filename; INSN emulcode[1]; }; #define EMULCODE_END(C) ((INSN *)((char *)(C) + (C)->objsize)) #define EMUL_NO_BYTES(C) ((char *)EMULCODE_END(C) - (char *)(C)->emulcode) typedef struct itable { unsigned long key; unsigned long value; } ITABLE; #define ITableFile(itbl) (*((TAGGED *)((char *)(itbl) + (itbl)[0].value) - 1)) #define MAX_ATOM_INDEX_BITS 25 # 120 "../objareas.h" #define TaggedAsLast(I) ((long)(I) & 1) #define TagAsLast(I) ((struct instance *)((long)(I) | 1L)) #define UntagAsLast(I) ((struct instance *)((long)(I) & -2L)) #define TaggedAsAbolished(I) (!(I)->rank) #define TagAsAbolished(I) ((I)->rank = 0) struct instance { struct instance *forward; struct instance *backward; struct definition *root; struct instance *next_forward; struct instance *next_backward; TAGGED key; TAGGED rank; union { TAGGED filename; struct instance *next_dead; } extra; CLOCK birth, death; ITABLE *source_link; unsigned int objsize; int bdd_count; TAGGED code[1]; }; #define INSTANCE_NO_CELLS(I) ((((I)->objsize-sizeof(struct instance))>>LogSizeOfWord) + 1) struct dc_chain { struct instance *first; struct instance *last; CLOCK earliest_use; }; struct int_info { struct instance *first; struct instance *varcase; struct instance *lstcase; struct sw_on_key *indexer; }; struct setof_int_info { struct instance *first; struct instance *last; struct setof_int_info *prev; struct setof_int_info *next; }; struct und_info { int unused; }; typedef int SP_RTPred (struct worker * w); typedef SP_BOOL CInfoFun(struct worker * w , void*foo, float *bar ); typedef CInfoFun *CInfo; # 299 "../objareas.h" #define MAXATOMS ((1<<MAX_ATOM_INDEX_BITS)-1) #define ATMHASH_ROWS 4096 #define ATMHASH_COLS 4096 #define ATMHASH_COLS_LOG 12 #define ATMHASH_MAX 16777216 #define ATMTAB_ROWS 8192 #define ATMTAB_COLS 8192 #define ATMTAB_COLS_LOG 13 #define getbucket(ix) (EG.atmhash.segment[(ix)>>ATMHASH_COLS_LOG][(ix)&(ATMHASH_COLS-1)]) #define getatom(ix) (EG.atmtab[(ix)>>ATMTAB_COLS_LOG][(ix)&(ATMTAB_COLS-1)]) struct linhash_dir { int pop; int splits; int buckets; struct atom **segment[4096]; }; struct atom { struct atom *next; unsigned int hash; unsigned int is_punctchars:1; unsigned int is_symbolchars:1; unsigned int is_ascii:1; unsigned int needs_escaping:1; unsigned int needs_quoting:1; unsigned int index:25; unsigned char refcount; unsigned char marked; unsigned short length; char name[sizeof(long)]; }; struct try_node { struct try_node *next; INSN *entry; union { struct try_node *tail; INSN *alt; } link; HALF node_offset; INSN opcode; }; #define ArityToOffset(A) (((A)+(sizeof(struct node)/sizeof(TAGGED)-ANY))<<LogSizeOfWord) #define OffsetToArity(O) (((O)>>LogSizeOfWord)-(sizeof(struct node)/sizeof(TAGGED)-ANY)) #define SwitchSize(X) (((X)->mask>>(LogSizeOfWord+1))+1) #define SizeToMask(X) (((X)-1)<<(LogSizeOfWord+1)) struct sw_on_key_node { TAGGED key; union { void *any; INSN *wam; struct try_node *try_node; struct instance *instp; struct sw_on_key_node *node; struct definition *def; struct mod_def *mod; struct int_info *irootp; struct atom *atomp; struct dc_chain *asdcc; unsigned long arities; CInfo cinfo; } value; }; struct sw_on_key { unsigned long mask; long int count; union { char aschar[1]; struct sw_on_key_node asnode[1]; } tab; }; struct incore_info { struct emul_info *clauses; struct emul_info **clauses_tail; INSN *varcase; INSN *lstcase; struct sw_on_key *othercase; }; struct mod_def { TAGGED name; struct { unsigned int hidden:1; } prop; struct definition *public_lst; struct sw_on_key *preds; struct sw_on_key *names; int attr_no; struct sw_on_key *bb; TAGGED filename; }; struct worker; struct indexical_info; struct fd_info { struct indexical_info *info[4]; }; union definfo { struct int_info *intinfo; struct und_info *undinfo; struct incore_info *incoreinfo; struct fd_info *fdinfo; INSN *asinsn; SP_RTPred *rtpred; }; struct gcdef_proc { int tag; int marked; union definfo info; struct gcdef_proc *next; }; struct gcdef_mem { char *ptr; unsigned int size; struct gcdef_proc *proc; }; struct procedure { UHALF enter_instr; HALF arity; HALF frame_size; INSN continuation; void *emul_entry; union definfo code; TAGGED printname; union { struct { unsigned int spy:1; unsigned int dynamic:1; unsigned int block:1; unsigned int meta:1; unsigned int multifile:1; unsigned int volatyle:1; unsigned int cut:1; unsigned int hidden:1; unsigned int marked:1; unsigned int locked:1; unsigned int predtyp:16; } prop; SP_UWORD all; } properties; }; #define SP_pred_ref_ definition struct definition { struct procedure proc; struct mod_def *module; struct mod_def *imported_from; struct mod_def *defined_in; struct definition *exported_to; struct definition *next_public; struct block_info *blockinfo; unsigned char *metainfo; TAGGED filename; }; struct pred_addresses { struct definition *user_event; # 517 "../objareas.h" struct definition *rdtok; struct definition *zap_chpt; struct definition *true0; struct definition *fail; struct definition *metacall; struct definition *metacall_pc; struct definition *meta_colon_pc; struct definition *call_illarg_pc; struct definition *undefined_goal; struct definition *solve_fd_constraint; struct definition *debug_goal; struct definition *call_int; struct definition *unify_cva; struct definition *call_goals; struct definition *slow_apply; struct definition *slow_functor; struct definition *slow_append; struct definition *slow_arg; struct definition *slow_univ; struct definition *slow_length; struct definition *slow_create_mutable; struct definition *slow_get_mutable; struct definition *slow_update_mutable; struct definition *call; struct definition *call_cleanup; struct definition *unwind_stack; struct definition *resume; struct definition *cerror; struct definition *raise_excp; struct definition *ctrlc_handler; struct definition *ctrlbrk_handler; struct definition *evaluate; struct definition *loaded_resource; struct definition *load_clpfd_resource; struct definition *unload_clpfd_resource; # 563 "../objareas.h" struct try_node *nd_current_atom; struct try_node *nd_current_module; struct try_node *nd_current_instance; struct try_node *nd_predicate_property; struct try_node *nd_cerror; struct try_node *nd_raise_excp; }; extern struct pred_addresses preds; struct block_info { struct block_info *next; unsigned char mask[1]; }; struct open_resource { TAGGED rname; void *misc; struct SICSTUS_API_STRUCT spenv; void *handle; SP_MainFun *funcp; SP_BOOL unload_attempted; struct open_resource *next; SP_MAINFUN_PARAMS params; }; struct qlinfo { struct qlinfo *next; TAGGED *qlarray; int qloffset; int qllimit; }; #define ONE_CHAR_CACHE_SIZE 256 struct free_block { struct free_block *next; size_t size; }; struct bigmem_link { struct bigmem_link *next_addr; struct bigmem_link *next_time; size_t size; void * bigmem; }; #define INITMEMSIZE (512*kB) #define MEMINCSIZE (256*kB) #define MM_MINSIZE (2<<LogSizeOfWord) #define LOG2GRAIN (LogSizeOfWord+1) #define EXACTSIZE 15 #define LOG2EXACTSIZE 4 #define SIZE_CLASSES 25 #define UNSAFE_WORDS ((2*SP_ALIGN(sizeof(struct bigmem_link) + sizeof(struct free_block), MM_MINSIZE))>>LogSizeOfWord) struct mm { struct { TAGGED *ptr; size_t size; TAGGED save_word[((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3)]; } recovery; struct free_block *free_arr[25]; int free_arr_max[25 -15]; struct free_block *free_cache; size_t total_in_use; size_t total_free; size_t recently_freed; struct bigmem_link *bigmems_by_addr; struct bigmem_link *bigmems_by_time; int culprit; int alloc_dist[25]; size_t mm_bins[30]; }; struct globref_blk { long size; long nrefs; struct globref_blk *backward; struct globref_blk *forward; }; #define LEGACY_STAT_RUN_TIME 1 struct eglobal { struct { struct setof_int_info head; struct setof_int_info tail; } setof; struct open_resource *open_resources; char *cwd_ienc; struct gcdef_proc *gcdef_procs; struct gcdef_mem *gcdef_scratch; int gcdef_mems; int gcdef_scratch_size; int atmtabsize; struct atom **atmtab[8192]; struct linhash_dir atmhash; unsigned int atom_count; unsigned int atom_count_limit; TAGGED atom_free; TAGGED one_char_cache[256]; unsigned char default_chtype[257]; unsigned char chtype_hash[512]; int chcode_hash[512]; struct { char **argv; int argc; char *boot_path_ienc; char **fli_pre_map; SP_MainFun **fli_pre_linkage; } persistent; struct { SP_int64 ss_time; SP_int64 ss_global; SP_int64 ss_local; SP_int64 ss_control; SP_int64 gc_time; SP_int64 gc_count; SP_int64 gc_acc; SP_int64 agc_time; SP_int64 agc_count; SP_int64 agc_alloced; SP_int64 agc_freed; SP_int64 agc_nfreed; SP_int64 defrag_time; SP_int64 defrag_count; SP_int64 legacy_starttime; SP_int64 legacy_lasttime; SP_int64 start_user_time; SP_int64 last_user_time; SP_int64 last_total_user_time; SP_int64 last_excluded_run_time; SP_int64 startwall; SP_int64 lastwall; } stats; TAGGED current_breaklevel; TAGGED current_compiling; TAGGED current_quoted_charset_flag; TAGGED current_ferror_flag; TAGGED current_gcmargin; TAGGED current_gcmode; TAGGED current_gctrace; TAGGED current_agcmargin; TAGGED current_leash_mode; TAGGED current_source_info; TAGGED current_prompt; TAGGED current_wcx_flag; TAGGED current_char_conversion; TAGGED current_double_quotes; TAGGED current_redefine_flag; TAGGED current_discontiguous_flag; TAGGED current_informational_flag; TAGGED current_single_var_flag; TAGGED current_syntax; TAGGED current_unknown; TAGGED current_compatibility_flag; TAGGED current_system_type_flag; TAGGED current_version_flag; TAGGED current_threadmodel_flag; TAGGED current_debugger_global; struct instance *exception; struct instance *memory_fault_exception; #define GLOBAL_VARS 32 TAGGED global_vars[32]; #define GLOBAL_VAR_ANY_GENERIC 0 #define GLOBAL_VAR_ANY_ADVICE 1 # 806 "../objareas.h" #define DEBUGGER_LOCAL_OFF 4 #define DEBUGGER_LOCAL_DISABLED 3 #define DEBUGGER_LOCAL_ZIP 2 #define DEBUGGER_LOCAL_TRACE 1 # 824 "../objareas.h" #define ESCAPE_TO_DEBUGGER (w->current_debugger_local<DEBUGGER_LOCAL_DISABLED) #define DEBUGGER_BREAKPOINTING(STATE) ((STATE)==DEBUGGER_LOCAL_DISABLED || (STATE)==DEBUGGER_LOCAL_TRACE) CLOCK def_clock; CLOCK use_clock; int clauses_dead; int clauses_dead_recently; int clauses_total; struct sw_on_key *dead_clause_table; struct sw_on_key *user_modules; struct mod_def *prolog_module; struct mod_def *typein_mod; TAGGED *qlarray; int qloffset; int qllimit; struct qlinfo *qlstack; SP_stream *input_stream_ptr; SP_stream *output_stream_ptr; SP_stream *root_stream_ptr; SP_stream *stream_user_input; SP_stream *stream_user_output; SP_stream *stream_user_error; SP_stream *persistent_null_stream; SP_stream *stream_user_input_orig; SP_stream *stream_user_output_orig; SP_stream *stream_user_error_orig; TAGGED attr_info[256]; int attr_no; void (*add_table_comp)(long pc, TAGGED File, long Line); void (*del_table_comp)(long PCLow, long PCHigh); void (*agc_table_comp)(void (*agc_atom)(TAGGED file)); SP_THREAD_ID_T main_thread; SP_CRITICAL_SECTION event_queue_cs; struct mm mm[1]; struct globref_blk globref_blk; }; extern struct eglobal engine_global; #define EG engine_global #define REL_ATOM 1 #define REL_PRED 2 #define SAVEREST_VERSION 2 enum saverest_tag { sr_rel_atom=0, sr_rel_fun, sr_rel_module, sr_rel_pred, sr_data_module, sr_data_public, sr_data_block, sr_data_filename, sr_data_bb, sr_data_key, sr_data_pred, sr_data_import, sr_data_instance, sr_data_emul, sr_data_fd, sr_data_flag, sr_undefine_module, sr_rel_kernel }; struct saverest_record { long tag; union { struct { TAGGED ptr; long size; long reloc; } atom; struct { CInfo ptr; long index; } code; struct { struct mod_def *ptr; TAGGED name; long info; } module; struct { struct definition *ptr; struct mod_def *module; TAGGED name; } pred; struct { struct mod_def *ptr; long atts; } mod_data; struct { struct mod_def *module; TAGGED filename; long size; } public_data; struct { struct definition *def; long size; } block_data; struct { struct definition *def; TAGGED filename; } filename_data; struct { struct mod_def *module; TAGGED key; long size; } bb_data; struct { struct mod_def *module; TAGGED key; long offset; } key_data; struct { struct definition *def; long props; long predtyp; } pred_data; struct { struct definition *def_to; struct mod_def *mod_from; struct definition *def_from; } import_data; struct { struct definition *def; TAGGED filename; TAGGED key; long size; } instance_data; struct { struct definition *def; unsigned long info; INSN *emulcode_end; INSN *failcode_at_save; TAGGED filename; long size; } emul_data; struct { struct definition *def; long source; long target; } else_data; struct { struct definition *pred; unsigned long info; unsigned long length_of_bytecode; unsigned long length_of_literals; } fd_data; struct { long size; } rel_kernel; } body; }; enum insn_fmt { fmt_, fmt_01, fmt_02, fmt_03, fmt_10, fmt_12, fmt_13, fmt_20, fmt_21, fmt_23, fmt_30, fmt_31, fmt_32, fmt_0u, fmt_1u, fmt_2u, fmt_3u, fmt_d0, fmt_d1, fmt_d2, fmt_d3, fmt_C, fmt_Ce, fmt_E, fmt_aAZEe, fmt_P, fmt_PP, fmt_L, fmt_QC, fmt_QCe, fmt_QE, fmt_QaAZEe, fmt_QP, fmt_QPP, fmt_QL, fmt_QAZEe, fmt_QZE, fmt_QZEe, fmt_Qf, fmt_QiiEC, fmt_Ql, fmt_Qlp, fmt_Qp, fmt_Qt, fmt_Qup, fmt_QdL, fmt_QuL, fmt_Qdf, fmt_Quf, fmt_Qufdd, fmt_Qdt, fmt_Qut, fmt_Quutt, fmt_Qt1, fmt_Qtt12, fmt_Qttt123, fmt_AZEe, fmt_AZre, fmt_ZE, fmt_ZEe, fmt_Zr, fmt_Zre, fmt_aZ, fmt_Z, fmt_f, fmt_aAZre, fmt_i, fmt_iiEC, fmt_id, fmt_iu, fmt_l, fmt_lp, fmt_p, fmt_r, fmt_s, fmt_t, fmt_d, fmt_u, fmt_up, fmt_dL, fmt_uL, fmt_df, fmt_uf, fmt_ufdd, fmt_di, fmt_ui, fmt_dt, fmt_ut, fmt_dd, fmt_du, fmt_ud, fmt_uu, fmt_uutt, fmt_t1, fmt_tt12, fmt_ttt123, fmt_udd, fmt_uud, fmt_uuu, fmt_dudu, fmt_udud, fmt_dy, fmt_dv, fmt_adv, fmt_uy, fmt_uv, fmt_auv, fmt_uvuv, fmt_auvuv, fmt_y, fmt_v, fmt_av, fmt_G, fmt_aG }; typedef SP_UWORD Bignum; # 32 "../support.h" 2 # 1 "../support2.h" 1 # 10 "../support2.h" #define SUPPORT2_H_ 1 # 36 "../support2.h" #define DEBUG_BREAK() debug_break() extern void debug_break(void); #define DEBUG_BREAK_MSG1(FPRINTFARGS,SRCFILE,SRCLINE) do{ fprintf(stderr, "\n%s:%d ERROR: (debug break) ", (SRCFILE), (int)(SRCLINE)); fprintf FPRINTFARGS; fprintf(stderr, "\n"); fflush(stderr); DEBUG_BREAK(); }while(0) #define DEBUG_BREAK_MSG(FPRINTFARGS) DEBUG_BREAK_MSG1(FPRINTFARGS,(__FILE__),(__LINE__)) #define RUN_TIME_ASSERT1(COND,MSG,SRCFILE,SRCLINE) do { if (!(COND)) { DEBUG_BREAK_MSG1((stderr, "ASSERTION FAILED%s%s", (((MSG) != NULL && (MSG)[0] != 0) ? ": " : ""), (MSG)),(SRCFILE),(SRCLINE)); } } while (0) #define RUN_TIME_ASSERT(COND,MSG) RUN_TIME_ASSERT1((COND),(MSG),__FILE__,__LINE__) #define COMPILE_TIME_ASSERT(COND) { int boobytrap[(COND) ? 1 : -1]; (void)boobytrap; } # 81 "../support2.h" #define KERNEL_NOT_INIT 1 #define INV_PRED_DEF 2 #define NOT_FIND_BOOTFILE 3 #define PRED_NOT_FOUND 4 #define BOOT_FAILED 5 #define INV_QUERY 6 #define NULL_STRING 7 #define INV_ACTION 8 #define INV_INQUIRY 9 #define UNCAUGHT_EXCEPTION 10 #define INV_TYPE 11 #define INV_DOMAIN 12 #define INV_NUMBER 13 #define INV_STRING 14 #define SYS_ERROR 15 #define UNKNOWN_ERROR 16 #define TIME_LIMIT_ERROR 17 #define MEM_ERROR 18 extern void sp_set_errno(int); extern char *sp_expand_file_name_internal(char const *relpath, char const *cwd, spio_t_bits options); extern char const *sp_split_path(char const *path_ienc, char const **proot, char const **pfilename, char const **psuffix); extern size_t sp_get_root_len(char const *path); extern char const *sp_path_suffix(char const *path_ienc); extern char *sp_basename(char const *path_ienc, int strip_suffix); extern FILE *win32_fopen_ienc(char const *path, char const *mode); extern char *alloc_bootpath(char *bootfilename); extern int set_app_paths(void); extern char *win32_errmsg_ienc(void); extern char *sp_win32_expand_env_path(char const *varname); extern char *sp_win32_user_directory(char const *username, unsigned long options); extern SP_MainFun *win32_load_foreign_resource (char const *abs_rname_ienc, char const *rnmae, char const *hexname, void**handlep); extern void win32_unload_foreign_resource (char const *rname, void *handle); #define SP_MAIN_PREFIX "sp_main_SPENV_" extern void ff_fault (char const *fmt_ienc, ...); #define SP_SETENV_OPTION_IENC 0x0001 extern int sp_setenv_internal(char const *key, char const *value, unsigned long options); extern char *sp_getenv_senc(char const *key, void *buf, size_t *psize); #define SP_GETENV_OPTION_IENC 0x0001 extern char* sp_getenv_internal(char const *key, void *buf, size_t *psize, unsigned long options); extern int sp_win32_setenv_raw(char const *var, char const *val, unsigned long options); extern char* sp_win32_getenv(char const *key, void *buf, size_t *psize, unsigned long options); extern char** sp_copy_environ_win32(void); extern int sp_checkenv(char const *key); #define code_HKEY_CLASSES_ROOT 1 #define code_HKEY_CURRENT_CONFIG 2 #define code_HKEY_CURRENT_USER 3 #define code_HKEY_LOCAL_MACHINE 4 #define code_HKEY_USERS 5 #define code_HKEY_PERFORMANCE_DATA 6 #define code_HKEY_DYN_DATA 7 extern char* prolog_get_registry_value_win32(int code, char const *path_ienc[], char const *valueName_ienc); extern char* win32_get_registry_sp_value(char const *valname, void *buf, size_t buf_size); extern void win32_yield_to_other_threads(void); extern void *win32_mem_alloc(size_t size, size_t *actualsize); extern int win32_mem_free(void *mem, size_t actualsize); extern int win32_mem_init(size_t alignment, size_t max_size); extern void win32_mem_deinit(void); extern unsigned long win32_mem_limit(void); void init_main_thread_id(void); int is_in_main_thread(void); SP_THREAD_ID_T sp_get_main_thread(void); extern SP_THREAD_ID_T sp_get_current_thread(void); extern int sp_thread_id_equal(SP_THREAD_ID_T t1, SP_THREAD_ID_T t2); extern void sp_init_critical_section(SP_CRITICAL_SECTION *); extern void sp_deinit_critical_section(SP_CRITICAL_SECTION *); extern void sp_enter_critical_section(SP_CRITICAL_SECTION *); extern void sp_exit_critical_section(SP_CRITICAL_SECTION *); extern size_t sp_size_of_critical_section(void); extern int multi_sp_init(void); extern void init_multi_sp_init_mutex(void); extern int is_statically_linked(void); extern int load_sicstus_run_time(const char *orig_path,SP_get_dispatch_type **pfuncp, void **handlep, int counter); # 215 "../support2.h" #define THREAD_CHECK_VERBOSE(MSG) #define THREAD_CHECK(name) do{ THREAD_CHECK_VERBOSE(name); if (!is_in_main_thread()) { fprintf(stderr, "\n### ERROR: %s called outside main thread", name); fflush(stderr); fprintf(stderr, "\n### called in thread %ld, main is %ld\n", (long)sp_get_current_thread(), (long)sp_get_main_thread()); fflush(stderr); DEBUG_BREAK(); } } while (0) # 271 "../support2.h" extern int errprintf__int (int will_exit, const char *fmt, ...); extern SP_int64 usertime (void); extern SP_int64 walltime (void); extern char *sp_get_win32_wd(void); extern int sp_set_win32_wd(char const *dir_ienc); extern size_t sp_get_win32_root_len(char const *abspath); typedef char SP_TCHAR; #define SP_TCHAR SP_TCHAR # 301 "../support2.h" extern int is_file_ienc(char const *name_ienc); extern int is_readable_file_ienc(char const *name_ienc); extern int is_dir_ienc(char const *name_ienc); # 315 "../support2.h" extern char *sp_dirname(char const *path); # 327 "../support2.h" extern char *sp_stralloc(char const *s1, ...); # 33 "../support.h" 2 # 1 "/usr/include/setjmp.h" 1 3 4 # 24 "/usr/include/setjmp.h" 3 4 #define _SETJMP_H 1 # 1 "/usr/include/bits/setjmp.h" 1 3 4 # 21 "/usr/include/bits/setjmp.h" 3 4 #define _BITS_SETJMP_H 1 # 1 "/usr/include/bits/wordsize.h" 1 3 4 #define __WORDSIZE 64 #define __WORDSIZE_COMPAT32 1 # 28 "/usr/include/bits/setjmp.h" 2 3 4 #define JB_RBX 0 #define JB_RBP 1 #define JB_R12 2 #define JB_R13 3 #define JB_R14 4 #define JB_R15 5 #define JB_RSP 6 #define JB_PC 7 #define JB_SIZE (8*8) # 62 "/usr/include/bits/setjmp.h" 3 4 typedef long int __jmp_buf[8]; #define _JMPBUF_UNWINDS(jmpbuf,address) ((void *) (address) < (void *) (jmpbuf)[JB_RSP]) # 31 "/usr/include/setjmp.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 32 "/usr/include/setjmp.h" 2 3 4 typedef struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; } jmp_buf[1]; extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); #define setjmp(env) _setjmp (env) # 76 "/usr/include/setjmp.h" 3 4 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); typedef struct __jmp_buf_tag sigjmp_buf[1]; #define sigsetjmp(env,savemask) __sigsetjmp (env, savemask) extern void siglongjmp (sigjmp_buf __env, int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 34 "../support.h" 2 # 1 "/src/sicstus/install/gcc-4.1.1/x86_64-linux-glibc2.3/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/include/limits.h" 1 3 4 # 37 "../support.h" 2 # 51 "../support.h" struct worker; extern int sperrno; extern INSN *elsecode; extern INSN *failcode; extern INSN *pfailcode; extern INSN *dispatchcode; extern INSN *exitcode; extern INSN *contcode; extern struct try_node *termcode; extern struct try_node *excpcode; extern struct try_node *fail_alt; extern struct definition *int_address; extern jmp_buf *do_wam_env; extern int predtrace; extern int do_wam (struct worker *w,int message,struct definition *predicate); extern struct worker *self; extern struct worker self_storage; extern int self_storage_free; #define GET_CURRENT_WORKER() self extern void clear_profile(void); extern void dump_profile(void); extern char *sp_emulator_version; extern jmp_buf *abort_env; extern int SP_prolog_initialized; enum atom_buffer_id { BASE_ATOMBUF = 0, IENC_ATOMBUF, SENC_ATOMBUF, PATH_ATOMBUF, CWD_ATOMBUF, NO_ATOM_BUFFERS }; #define atom_buffer (atom_buffers[BASE_ATOMBUF]) #define atom_buffer_length (atom_buffers_length[BASE_ATOMBUF]) #define ensure_atom_buffer(SIZE) ensure_atom_buffers(BASE_ATOMBUF, SIZE) #define ensure_path_buffer(SIZE) ensure_atom_buffers(PATH_ATOMBUF, SIZE) extern char *atom_buffers[NO_ATOM_BUFFERS]; extern size_t atom_buffers_length[NO_ATOM_BUFFERS]; extern INSN insn_kontinue; extern INSN insn_try; extern SP_FLOAT ieee_plus_inf, ieee_minus_inf, ieee_nan; extern void *user_strhook_cookie; extern void *user_strposthook_cookie; extern SP_UserStreamPostHook spstdio_posthook; typedef SP_stream QFILE; # 138 "../support.h" extern SP_INTEGER spi_get_integer (TAGGED t); extern SP_FLOAT spi_get_float (TAGGED t); extern TAGGED make_large (struct worker * w,TAGGED *p); extern TAGGED make_float (struct worker * w,SP_FLOAT f); extern long required_heap_size (long min_heap, long min_stack); extern void resize_heap_and_stack (struct worker * w, size_t size0, size_t size, long min_heap, long min_stack); extern void heap_overflow (struct worker * w,int pad,int live); extern void trail_gc (struct worker * w); extern struct definition *collect_goals_from_trail (struct worker * w, struct definition *); extern struct definition *collect_cleanup_from_trail (struct worker * w, struct definition *); extern int compare_terms (struct worker * w,TAGGED u,TAGGED v, int nonrec); extern void get_instance (struct worker * w,struct instance *, int, int); extern TAGGED decode_instance_key (struct instance *); extern TAGGED wrap_goal (struct worker * w, TAGGED goal, struct definition *def); extern void suspend_goal (struct worker * w, TAGGED goal, TAGGED var); extern TAGGED make_structure (struct worker * w,TAGGED atom); extern TAGGED make_integer (struct worker * w,SP_INTEGER i); # 170 "../support.h" extern TAGGED make_temp_long (struct worker * w,long l); extern TAGGED make_temp_float (struct worker * w,SP_FLOAT f); extern void raise_error(char const *, int, int); extern void raise_error_goal(TAGGED, int); extern void raise_exception(TAGGED); extern SP_BOOL single_quoted_character (char const *s, long *pnum); extern int sp_list_to_string (TAGGED,SP_BOOL,char const **); extern TAGGED sp_list_to_n_codes (TAGGED,long,long *,char *); extern char *sp_number_to_string (TAGGED,int,TAGGED); extern TAGGED sp_n_codes_to_list (struct worker * w,long,const char *,TAGGED,SP_BOOL,int,int); extern TAGGED sp_n_ints_to_list (struct worker * w, long n, int *src, TAGGED tail, SP_BOOL codesp, int pad, int arity); extern TAGGED sp_string_to_number (char const *,int,int,int); extern SP_FLOAT ieee_atof (char const *,int *); extern char *ensure_atom_buffers (enum atom_buffer_id, size_t alen); extern struct procedure *new_procedure (TAGGED tagpname, int arity); extern struct definition *insert_definition (struct mod_def *module, TAGGED tagpname, int arity, SP_BOOL insertp); extern TAGGED init_atom_check (char const *str, int lookup_only); extern void init_atoms (void); extern struct sw_on_key_node *safe_incore_gethash(struct sw_on_key *sw, TAGGED key); extern void format_float (char formatChar, int control, double arg); extern void trimcore (struct worker *w,int full); extern void memman_deinit (void); extern TAGGED mm_statistics (struct worker * w); extern TAGGED *checkalloc (size_t,int mm_args_internal); extern void checkdealloc (TAGGED *, size_t,int mm_args_internal); extern TAGGED *checkrealloc (TAGGED *, size_t, size_t,int mm_args_internal); extern size_t sp_malloc_bytes(void); extern struct try_node *def_retry_c (SP_RTPred *, int arity); extern struct instance *memory_fault_term (void); extern struct instance *compile_term (struct worker *w,TAGGED); extern struct instance *current_instance (struct worker *w); extern SP_BOOL next_instance (struct worker *w, struct instance **ipp); extern void compressTrail (struct worker * w,SP_BOOL b); extern struct try_node *def_retry_prolog (struct definition *f); extern void set_memalloc_default (void); extern TAGGED *stackalloc (size_t, size_t *); extern TAGGED *stackrealloc (TAGGED *, size_t, size_t, size_t *); extern void stackdealloc (TAGGED *, size_t); extern void undefine_predicate (struct definition *); extern void undefine_all (struct mod_def *, SP_BOOL); extern void redefine_predicate (struct definition *,int); extern char const *get_window_title (void); extern void set_window_title (char const *); extern int init_once (void); extern void init_each_time (struct worker * w); extern void init_mt (struct worker * w); extern void init_mt_signals (void); extern void init_stacks (struct worker * w); extern void deinit_stacks (struct worker * w); extern SP_BOOL qload_or_restore (char *buf,SP_BOOL restorep); extern int wam_blocked_goal (struct worker * w,TAGGED *,INSN *); extern int wam (struct worker *w,int message,struct definition *predicate); extern SP_BOOL dfs_acyclic (struct worker * w,TAGGED q); extern SP_BOOL dfs_ground (struct worker * w,TAGGED q); extern void dfs_undo (struct worker * w,TAGGED q); extern int wam_unwind_stack (struct worker * w); extern SP_BOOL fast_callable (struct definition *def); extern void pop_choicept (struct worker * w); extern void push_choicept (struct worker * w,struct try_node *alt); extern TAGGED cons_dbref (struct instance *ins,TAGGED **top); extern struct instance *decode_dbref (TAGGED *dbref,SP_BOOL verify); extern void insertz (struct definition *,struct instance *n); extern void bb_remove (struct mod_def *); extern void import_predicate (struct definition *,struct mod_def *,struct definition *); extern void clock_overflow (struct worker * w); extern void reclaim_dead_clauses (struct worker * w); extern void reclaim_dead_predicates (struct worker * w); extern void multifile_retractall (struct definition *f, TAGGED *filter); extern void multifile_retractall_compiled (struct definition *f, TAGGED *filter); extern void abolish_interpreted (struct definition *); extern void init_setof_roots (void); extern void clean_up_setof_roots (void); extern struct instance *active_instance_call (struct instance *,SP_BOOL); extern struct instance *active_instance_redo (struct instance *,SP_UWORD,SP_BOOL); extern int init_stream(void); extern int deinit_stream(void); extern void init_stream_again(void); extern void init_stream_wcx (void); extern void init_char_conversion (void); extern char *librarypath_ienc (char const *suffix); extern void memman_reinit (struct mm *mm); extern void ct_memman (struct worker * w); extern void memman_set_hooks_raw (int hints, SP_InitAllocHook *init_alloc_hook, SP_DeinitAllocHook *deinit_alloc_hook, SP_AllocHook *alloc_hook, SP_FreeHook *free_hook, void *cookie); extern void sp_memman_set_hooks (int hints, SP_InitAllocHook *init_alloc_hook, SP_DeinitAllocHook *deinit_alloc_hook, SP_AllocHook *alloc_hook, SP_FreeHook *free_hook, void *cookie); extern int mem_start_level (void); extern void atom_buffer_init (void); extern void atom_buffer_remove (void); extern long GarbageCollect (struct worker * w); extern void insert_compactcode (struct definition *f, struct emul_info *ref, int ix, TAGGED key); extern INSN *asm_try_insn (INSN *code, INSN *addr, int arity, int nb); extern void add_table_comp (long PC, TAGGED File, long Line); extern void calculate_segment_node (struct worker * w); extern void trail_usage (struct worker * w, SP_int64 *pused, SP_int64 *pfree); extern void choice_usage (struct worker * w, SP_int64 *pused, SP_int64 *pfree); extern void raise_func_error (char const *name,int arity); extern void numstack_init (struct worker * w); extern void numstack_remove (void); extern TAGGED bn_call (struct worker * w, int (*f)(Bignum *x, Bignum *ignore, Bignum *z, Bignum *zmax),TAGGED x,TAGGED y,int *error); extern SP_BOOL expansion_due (struct sw_on_key *sw); extern int population_table_size (int pop); extern void expand_sw_on_key (struct sw_on_key **,void *,struct sw_on_key_node *); extern SP_BOOL cunify_args (struct worker * w,int arity,TAGGED *pt1,TAGGED *pt2); extern int p2_offset (INSN *label); extern int p2_unoffset (INSN *label,TAGGED key); extern TAGGED key_of_clause (struct emul_info *cl); extern void init_exitcode (void); extern void init_contcode (void); extern void def_call_n (struct definition *def); extern QFILE *qopen (char const *path); extern int qclose (QFILE *f); extern SP_BOOL qread1 (struct worker * w,QFILE *qfile,TAGGED filename,TAGGED *rungoal); extern SP_BOOL run_determ_c (struct worker * w,TAGGED goal); extern int live_x_regs (struct worker * w,INSN *pc,SP_BOOL recursive); void wam_reset_counters (struct emul_info *clause); void wam_gather_counters (struct emul_info *clause, long *calls, long *chpts, long *insns); extern void init_environment (struct frame *frame,INSN *cp); extern int continuation_type (INSN *cp,INSN **insnp); extern void wire_else (struct emul_info *clause); extern void checkasserts (void); extern int alarm_event (void); extern void signals_init (void); extern void fli_stack_init (struct worker * w); extern void refresh_current_query (struct worker * w); extern void event_queue_init (void); extern void event_queue_remove (void); extern SP_BOOL run_event (struct worker * w); extern void sync_heap_pointers (struct worker * w); extern void sp_ltostr (long l,int base,char *cbuf); extern void save_attribute_info (struct mod_def *); extern SP_BOOL prolog_delete_attributes (struct worker *w,struct mod_def *); extern SP_BOOL prolog_get_attributes (struct worker *w,struct mod_def *); extern SP_BOOL prolog_put_attributes (struct worker *w,struct mod_def *); extern int SP_query_vararg(SP_pred_ref predicate, va_list ap); extern int SP_query_cut_fail_vararg(SP_pred_ref predicate, va_list ap); extern SP_qid SP_open_query_vararg(SP_pred_ref predicate, va_list ap); extern int SP_cons_functor_vararg(SP_term_ref tr, SP_atom name_atom, int arity, va_list ap); extern int get_functor(TAGGED t, TAGGED *name, int *arity); extern int init_each_time_file(void); extern int init_once_file(void); extern char *sp_get_unix_wd(void); extern void bdd_begin (struct worker * w); extern void bdd_end (struct worker * w); extern void bdd_reset_node (TAGGED *h); extern TAGGED bdd_lookup_external (TAGGED t); extern void bdd_heap_overflow (long reloc,TAGGED *newh); extern void bdd_garbage_collect (TAGGED *oldh,TAGGED *newh,long count); extern void wr_tagged (TAGGED t); extern void wr_tagged_rec (TAGGED t); extern void wr_functor (TAGGED t); extern void wr_proc (struct definition *func); extern void wr_call (struct definition *func); extern void wr_x (int i); extern void wr_y (int i); extern TAGGED set_compound_data (struct worker * w, TAGGED t); extern void da_code (INSN *code); extern void wr_predicate (char const *module, char const *name, int arity); extern double sp_strtod (const char *s00, char **se); extern void sp_dtoa (double _d, int mode, int ndigits, int *decpt, int *sign, char *res); extern void sp_double_parts(double f, int *signp, int *scalep, int *bitsp, int *mantissa); #define Strtod(NPTR,ENDPTR) sp_strtod(NPTR,ENDPTR) #define RequireHeap(Req,Arity) { if (HeapDifference(w->global_top,w->stack_start) < CONTPAD+(Req)) { call_overflow(w,CONTPAD+(Req), Arity); } } #define RequireHeap1(Req,T1,Arity) { if (HeapDifference(w->global_top,w->stack_start) < CONTPAD+(Req)) { X(Arity) = (T1); call_overflow(w,CONTPAD+(Req), (Arity)+1); (T1) = X(Arity); } } #define RequireHeap2(Req,T1,T2,Arity) { if (HeapDifference(w->global_top,w->stack_start) < CONTPAD+(Req)) { X(Arity) = (T1); X((Arity)+1) = (T2); call_overflow(w,CONTPAD+(Req), (Arity)+2); (T1) = X(Arity); (T2) = X((Arity)+1); } } # 411 "../support.h" #define NumstackAlloc(Req,Ptr) { while (w->numstack_top+(Req) > w->numstack_end) numstack_overflow(w); (Ptr) = (w->numstack_top+=(Req))-(Req); } #define DerefHeapSwitch(T,CaseRef) DerefSwitch(T,CaseRef) #define DerefHeap(Xderef,Ptr) { register TAGGED m_i = *(Ptr); DerefHeapSwitch(m_i,{break;}) Xderef = m_i; } #define DerefCar(Xderef,Ptr) { register TAGGED m_i=CTagToCar(Ptr); DerefHeapSwitch(m_i,{break;}) Xderef = m_i; } #define DerefCdr(Xderef,Ptr) { register TAGGED m_i=CTagToCdr(Ptr); DerefHeapSwitch(m_i,{break;}) Xderef = m_i; } #define DerefArg(Xderef,Ptr,I) { register TAGGED m_i=CTagToArg(Ptr,I); DerefHeapSwitch(m_i,{break;}) Xderef = m_i; } #define DerefHeapNext(Xderef,Ptr) { register TAGGED m_i=HeapNext(Ptr); DerefHeapSwitch(m_i,{break;}) Xderef = m_i; } # 461 "../support.h" #define DEREF(Xderef,X) { register TAGGED m_i; m_i = X; DerefSwitch(m_i,;) Xderef = m_i; } # 471 "../support.h" #define DEREF_ARGS(N) do{ int d_a_i; for (d_a_i = 0; d_a_i < (N); d_a_i++) { DEREF(X(d_a_i), X(d_a_i)); } }while(0) #define DerefSwitch(T,CaseRef) for (;;) { if (!((T) & 0x3)) { TAGGED m_r = (T); (T) = CTagToREF(m_r); if ((T)!=m_r) continue; else { CaseRef } } break; } # 535 "../support.h" #define SwitchOnTerm(T,CaseConst,CaseStruct,CaseList,CaseRef) for (;;) { if (!((T) & 0x1)) { if (!((T) & 0x2)) { TAGGED m_r = (T); (T) = CTagToREF(m_r); if ((T)!=m_r) continue; CaseRef } else { CaseList } } else if (!((T) & 0x2)) { CaseStruct } else { CaseConst } break; } # 558 "../support.h" #define SwitchOnTermList(T,CaseObj,CaseList,CaseRef) for (;;) { if (!((T) & (0x1 | 0x2))) { TAGGED m_r = (T); (T) = CTagToREF(m_r); if ((T)!=m_r) continue; else { CaseRef } } else if (!((T) & 0x1)) { CaseList } else { CaseObj } break; } # 600 "../support.h" #define Bind(Var,Term,H) CTagToREF(Var) = (Term); do { if (VarIsSVA(Var,H)) { if (!CondSVA(Var)) break; } else if (!GVarIsHVA(Var)) Wake; else if (!CondHVA(Var)) break; TrailPushCheck(Var); break; } while (0); # 610 "../support.h" #define MaybeTrail(Var,H) do { if (VarIsSVA(Var,H)) { if (!CondSVA(Var)) break; } else if (!GVarIsHVA(Var)) Wake; else if (!CondHVA(Var)) break; TrailPushCheck(Var); break; } while (0); # 619 "../support.h" #define BindGlobal(Var,Term) CTagToREF(Var) = (Term); do { if (!GVarIsHVA(Var)) Wake; else if (!CondHVA(Var)) break; TrailPushCheck(Var); break; } while (0); #define CondHVA(X) (!OffHeaptop(TagToREF(X),GLOBAL_UNCOND)) #define CondCVA(X) (!OffHeaptop(TagToREF(X),GLOBAL_UNCOND)) #define CondSVA(X) (!OffStacktop(TagToREF(X),LOCAL_UNCOND)) #define BindSVA(U,V) { CTagToREF(U) = V; if (CondSVA(U)) TrailPushCheck(U); } #define BindCVA(U,V) { CTagToREF(U) = V; TrailPushCheck(U); } #define BindCVAUnsafe(U,V) { TrailPush(w->trail_top,U); CTagToREF(U) = V; } #define Globalize(It,H) { TAGGED t0 = (It); if (IsVar(t0) && VarIsSVA(t0,H)) { do { TAGGED m_r = t0; t0 = CTagToREF(m_r); if (t0==m_r) { LoadHVA(t0,H); BindSVA(m_r,t0); break; } } while (IsVar(t0) && VarIsSVA(t0,H)); (It) = t0; } } # 668 "../support.h" #define BindHVA(U,V) { CTagToREF(U) = V; if (CondHVA(U)) TrailPushCheck(U); } #define BindHVAUnsafe(U,V) { if (CondHVA(U)) TrailPush(w->trail_top,U); CTagToREF(U) = V; } #define PUSH_STACK_FRAME(Func) { register struct frame *E = (struct frame *)w->local_top; register int PSF_i; for (PSF_i=0; PSF_i<Func->proc.arity; PSF_i++) Y(PSF_i) = X(PSF_i); E->next_insn = w->next_insn; E->frame = w->frame; w->frame = E; w->next_insn = &Func->proc.continuation; w->local_top = E->term+PSF_i; } # 696 "../support.h" #define POP_STACK_FRAME { register struct frame *E = (struct frame *)w->frame; register int PSF_i; for (PSF_i=(w->local_top-&Y(1)); PSF_i>=0; PSF_i--) X(PSF_i) = Y(PSF_i); w->frame = E->frame; w->next_insn = E->next_insn; w->local_top = (TAGGED *)E; } # 722 "../support.h" #define WAM_REINITIALISE 2 #define WAM_ABORT 3 #define WAM_HALT 4 extern void save_error (int error_type, char const *message_ienc, TAGGED culprit); extern void map_unix_error_ienc (int errorcode, SP_BOOL writeop, int *perror_type, char const **perror_msg); extern void save_unix_error (TAGGED, SP_BOOL); extern TAGGED build_goal (struct worker * w,const char *name, int arity); extern char const *syserrmsg_ienc (int api, int lerrno); extern void sp_set_ctrlc_pending(void); extern void open_stdbufs (int); extern void close_stdbufs (int); void sp_os_signal_delivered(void); extern SP_stream *console_stream (int std_fd, int mode); extern void set_fp (void); typedef spio_t_error_code spio_t_byte_device_close_callback(void *cookie, spio_t_bits spio_device_close_options); #define SP_CREATE_SPIO_BYTE_DEVICE_OPTION_FREE_READ_BUF SPIO_BIT(0) extern spio_t_error_code sp_create_spio_byte_device(SPIO *s, spio_t_buf *read_buf, void *cookie, spio_t_byte_device_close_callback *close_callback, spio_t_bits options); typedef TAGGED (*RELOCATE_FUN) (TAGGED *loc, TAGGED value, SP_stream *srf, int type); extern void relocate_instance (struct instance *clause, RELOCATE_FUN fun, SP_stream *srf); extern void relocate_emul_data (struct emul_info *clause, long ctr_offset, INSN *at_save, RELOCATE_FUN fun, unsigned long smask, unsigned long rmask, SP_stream *srf); typedef int fread_longs_fun(void *ptr, int size, SP_stream *); typedef size_t fwrite_fun(const void *,size_t,SP_stream *); extern void agc_abolished (struct sw_on_key *, RELOCATE_FUN f); extern void do_memory_fault(char const *msg, int culprit); #define SERIOUS_FAULT(Y) { SP_raise_fault(Y); } #define MEMORY_FAULT(Y,C) do_memory_fault((Y), (C)) # 783 "../support.h" #define MINOR_FAULT(Y) do{ return FALSE; }while(0) #define INTERNAL_FAULT(Y) do{ sp_ttyprintf("! %s\n",Y); sp_ttyflush(); return FALSE; }while(0) #define SYSERROR(Pred,Call) { SP_syserror_clib(Pred, Call); return FALSE; } # 800 "../support.h" extern void install_c_predicate (const char *,int,struct mod_def *,int,SP_RTPred *); extern void set_enter_instr_breakpointing (struct procedure *,SP_BOOL); # 813 "../support.h" #define MakeLST(Ptr,To,Car,Cdr) { TAGGED makelst_car = (Car); HeapPush(Ptr,makelst_car); HeapPush(Ptr,Cdr); To = MakeList(HeapOffset(Ptr,-2)); } #define Unify_constant(U,V) { TAGGED m_u=(U), m_t1=(V); SwitchOnTermList(m_t1, {if (m_t1!=m_u) return FALSE;}, {if (m_t1!=m_u) return FALSE;}, {Bind(m_t1,m_u,w->global_top)}) } # 830 "../support.h" #define Unify_constant_else(U,V,ELSE) { TAGGED m_u=(U), m_t1=(V); SwitchOnTermList(m_t1, {if (m_t1!=m_u) {ELSE;}}, {if (m_t1!=m_u) {ELSE;}}, {Bind(m_t1,m_u,w->global_top)}) } # 839 "../support.h" #define Unify_number(U,V) { TAGGED m_u=(U), m_t1=(V), *pt1, *pt2; int m_i; SwitchOnTerm(m_t1, {if (m_t1!=m_u) return FALSE;}, { if (!TagIsSTR(m_u)) return FALSE; else { pt1=TagToSTR(m_u); pt2=TagToSTR(m_t1); for (m_i = LargeArity(*pt1); m_i>0; --m_i) if (*pt1++ != *pt2++) return FALSE; } }, return FALSE;, {Bind(m_t1,m_u,w->global_top)}) } # 857 "../support.h" #define Unify_else(Term1,Term2,Else) if (cunify(Arg, (Term1), (Term2))) { ; } else { Else; } # 868 "../support.h" #define RemoveTrailingSlash(Str) {int i=strlen(Str); if(i>0 && (Str)[i-1]=='/') (Str)[i-1]='\0';} enum { CH_WHITE = 1, CH_LC = 2, CH_UC = 3, CH_SOLO = 4, CH_SYMBOL = 5, CH_UNDECIDED = 6, CH_DIGIT = 7, CH_BANG, CH_BAR, CH_COMMA, CH_DQUOTE, CH_LPAR, CH_LBRACE, CH_LBRACK, CH_PERCENT, CH_RPAR, CH_RBRACE, CH_RBRACK, CH_SEMICOLON, CH_SQUOTE, CH_UNDERSCORE, CH_BACKQUOTE }; #define IS_ALPHANUM(Typ,Ch) (Typ==CH_LC || Typ==CH_UC || Typ==CH_DIGIT || (Ch)=='_') #define IS_ALPHANUM_ASCII(Typ,Ch) ((Ch) < 128 && IS_ALPHANUM(Typ,(Ch))) extern int ch_type_hash (int c); #define DFT_CH_TYPE(C) (EG.default_chtype[C+1]) #define CH_TYPE_OF(C,Typ) { register int CTO_hash = C&255; if (EG.chcode_hash[CTO_hash]==C) Typ = EG.chtype_hash[CTO_hash]; else if (EG.chcode_hash[CTO_hash+256]==C) Typ = EG.chtype_hash[CTO_hash+256]; else Typ = ch_type_hash(C); } # 916 "../support.h" extern int ch_type_hash(int); extern int wci_valid_string(const char *wci); extern SP_WcxOpenHook *wcx_open_hook; extern SP_WcxCloseHook *wcx_close_hook; extern SP_WcxCharTypeHook *wcx_chartype_hook; extern SP_WcxConvHook *wcx_from_os_hook; extern SP_WcxConvHook *wcx_to_os_hook; extern SP_BOOL wcx_io_preserves_ascii; extern SP_WcxGetcHook wcx_raw_getc; extern SP_WcxPutcHook wcx_raw_putc; extern void init_wcx (void); #define WCX_IO_PRESERVES_ASCII 0 # 938 "../support.h" #define PrintString(STREAM,STRING,NONL,ASCII) SP_put_encoded_string((STREAM), (STRING), (((ASCII) ? SP_PUT_ENCODED_STRING_OPTION_ASCII : 0)|((NONL) ? SP_PUT_ENCODED_STRING_OPTION_NONL : 0))) #define PrintAscii(S,CH,NONL) PrintString((S), (CH), (NONL), 1) #define WIDE_CODE_BYTES(WC,LEN) do{ int WC_ = (WC); SP_ASSERT(SP_MINCHAR_INCLUSIVE <= WC_ && WC_ <= SP_MAXCHAR_INCLUSIVE); if ((WC_ & 0x7f) == WC_ && (WC_ != '\0')) { (LEN) = 1; } else { int TMP_; int LEN_ = 2; for (TMP_ = ((WC_ >> 11)&0xfffff) ; TMP_ != 0; TMP_ >>= 5) { LEN_++; } (LEN) = LEN_; } } while(0) # 971 "../support.h" #define ADD_WIDE_CHAR(WC,LEN,S0) do{ int LEN_ = (LEN); int WC_ = (WC); char *S = (S0); SP_ASSERT(LEN_ > 0); SP_ASSERT(SP_MINCHAR_INCLUSIVE <= WC_ && WC_ <= SP_MAXCHAR_INCLUSIVE); if (--LEN_) { *(S++) = (char)((0xff&(0x1f80 >> LEN_)) | (int)(WC_ >> (LEN_*6))); while (LEN_-- != 0) { *(S++) = (char)(0x80|(0x3f&(int)(WC_ >> (LEN_*6)))); } } else { *(S++) = (char)WC_; } }while(0) # 995 "../support.h" #define BREAK_BAD_WIDE_CHAR 1 #define BAD_WIDE_CHAR_DEBUG_BREAK() SERIOUS_FAULT("Malformed wide character") #define GET_WIDE_CHAR(S,WC) GET_WIDE_CHAR_0(S, WC, { fprintf(stderr, "ERROR: %s:%d Encountered malformed internal string \"%s\"\n", __FILE__, (int)__LINE__, (S)); fflush(stderr); BAD_WIDE_CHAR_DEBUG_BREAK(); WC=0x80; }) extern char wci_extra_bytes[]; #define GET_WIDE_CHAR_0(S,WC,ERROR_ACTION) { register int CHAR = *(unsigned char *)S++, EXTRA; if ((EXTRA = wci_extra_bytes[CHAR])==0) WC = CHAR; else { if (EXTRA >= WCI_MAX_BYTES) { ERROR_ACTION; } else { WC = CHAR & (0x3f >> EXTRA); while (EXTRA-- > 0) if (((CHAR = *(unsigned char *)S++) & 0xc0) != 0x80) { S--; { ERROR_ACTION; } break; } else WC = (WC<<6) | (CHAR&0x3f); } } } # 1044 "../support.h" #define BACK_WIDE_CHAR(S,BASE) while (((S) > (BASE)) && ((*(--(S))&0xC0) == 0x80)) {} #define CORRECT_WIDE_CHAR_BOUNDARY(S,BASE) do{ char *SAVE = (S); int DUMMY_; BACK_WIDE_CHAR((S),(BASE)); GET_WIDE_CHAR((S),DUMMY_); if ((S) != SAVE) { BACK_WIDE_CHAR((S),(BASE)); } } while(0) # 1065 "../support.h" #define FloatExceptions (EG.current_compatibility_flag == atom_iso) #define RefTerm(tr) ((w)->fli_stack_start[tr]) #define RefGlob(gr) (*(TAGGED *)(gr)) extern char * resolve_argv_execpath(const char *name, const char *envvar); #define Native_path(P) (P) # 1106 "../support.h" #define Normal_path(P) (P) #define Normalise_path(P) (void)(P) #define Localise_path(P) (void)(P) #define Native_path1(P) (P) # 1139 "../support.h" typedef SPEnv *SP_HOOKS_COOKIE; #define SP_HOOKS_COOKIE_COMMA SP_HOOKS_COOKIE, #define SP_FD_GLOBAL_DESTRUCTOR 1 struct indexical_info; struct saverest_record; typedef void ( SP_FD_FreeFun)(struct indexical_info **infop); typedef void ( SP_FD_ManagerFun)(SP_HOOKS_COOKIE, struct worker * w,int msg,TAGGED *ptr); typedef void ( SP_FD_RestoreFun)(SP_HOOKS_COOKIE, struct saverest_record *record, fread_longs_fun *frd, SP_stream *f); typedef void ( SP_FD_SaveFun)(SP_HOOKS_COOKIE, struct saverest_record *record, struct definition *pred, fwrite_fun *fwr, SP_stream *f); typedef void ( SP_FD_DestructorFun)(SP_HOOKS_COOKIE, struct indexical_info **infop); extern void init_fd_hooks(void); extern void call_fd_manager(int msg, TAGGED *ptr); extern void call_fd_destructor(struct indexical_info **infop); # 1188 "../support.h" struct init_ds_arg { size_t sz; int fast_start; char *flag_file_senc; char *restore_file_senc; char *flag_goal; int flag_language; int nologo; int noinfo; }; typedef struct { struct globref_blk *blk; struct globref_blk *root; int next, end; } GlobRefIter; extern void globref_iter_init(GlobRefIter *it); extern SP_BOOL globref_iter_empty(GlobRefIter *it); extern SP_globref globref_iter_next(GlobRefIter *it); extern void do_update_mutable(struct worker * w,TAGGED mutable,TAGGED value); # 1231 "../support.h" # 1 "./spaux.h" 1 # 915 "./spaux.h" #define INCLUDED_SUPPORT_H_AUX_H 1 typedef struct mod_def * ( tfind_module) (TAGGED name, SP_BOOL insertp); typedef struct definition * ( tfind_definition) (struct mod_def * module, TAGGED term, TAGGED * * argl, SP_BOOL insertp); typedef void ( tcall_overflow) (struct worker * w, int pad, int arity); typedef struct definition * ( tfind_def_in_module) (TAGGED head, TAGGED module); typedef void ( tnumstack_overflow) (struct worker *); typedef TAGGED ( tsp_make_integer) (struct worker * w, SP_INTEGER i); typedef SP_BOOL ( tcunify) (struct worker * w, TAGGED u, TAGGED v); typedef void ( tinit_ds) (struct init_ds_arg *); typedef struct sw_on_key_node * ( tincore_gethash) (struct sw_on_key * sw, TAGGED k); typedef void ( tchoice_overflow) (struct worker * w, int pad); typedef struct worker * ( tget_current_worker) (void); typedef TAGGED * ( tsp_checkalloc) (size_t, SP_BOOL gc); typedef void ( tsp_checkdealloc) (TAGGED *, size_t, SP_BOOL gc); typedef TAGGED * ( tsp_checkrealloc) (TAGGED *, size_t, size_t, SP_BOOL gc); typedef struct sw_on_key_node * ( tdyn_puthash) (struct sw_on_key * * swp, TAGGED k); typedef struct sw_on_key * ( tnew_switch_on_key) (int size, struct try_node * otherwise); typedef void ( tdispose_switch_on_key) (struct sw_on_key * htab); typedef struct definition * ( tparse_definition) (TAGGED complex, struct mod_def * module); typedef int ( tSP_install_fd_hooks) (SP_HOOKS_COOKIE, SP_FD_ManagerFun *, SP_FD_RestoreFun *, SP_FD_SaveFun *, SP_FD_DestructorFun *, int); typedef void ( treinitialize) (struct worker *); typedef void ( tintoRelocationChain) (struct worker * w, TAGGED * chain, TAGGED * elem); typedef void ( tupdate_exports) (struct definition * f, int type); typedef int ( tlarge_insn_offset) (INSN *, INSN *); typedef void ( tsp_exitmsg) (int); typedef char * ( tsp_expand_file_name) (char const * relpath, char const * cwd, spio_t_bits options); typedef int ( terrprintf) (int flags, const char * fmt, ...); typedef void ( tdelete_attributes) (TAGGED, struct mod_def *); typedef TAGGED ( tget_attributes) (TAGGED, struct mod_def *); typedef void ( tput_attributes) (TAGGED, TAGGED, struct mod_def *); typedef void ( tset_enter_instr) (struct definition *, int); typedef void ( tmarkTerm) (TAGGED term); typedef FILE * ( tsp_fopen) (char const * path_ienc, char const * mode); typedef struct DISPATCH_TABLE_STRUCT_SUPPORT_H { unsigned long size; const char *name; int version; const char *nfind_module; tfind_module *pfind_module; const char *nfind_definition; tfind_definition *pfind_definition; const char *ncall_overflow; tcall_overflow *pcall_overflow; const char *nfind_def_in_module; tfind_def_in_module *pfind_def_in_module; const char *nnumstack_overflow; tnumstack_overflow *pnumstack_overflow; const char *nsp_make_integer; tsp_make_integer *psp_make_integer; const char *ncunify; tcunify *pcunify; const char *ninit_ds; tinit_ds *pinit_ds; const char *nincore_gethash; tincore_gethash *pincore_gethash; const char *nchoice_overflow; tchoice_overflow *pchoice_overflow; const char *nget_current_worker; tget_current_worker *pget_current_worker; const char *nsp_checkalloc; tsp_checkalloc *psp_checkalloc; const char *nsp_checkdealloc; tsp_checkdealloc *psp_checkdealloc; const char *nsp_checkrealloc; tsp_checkrealloc *psp_checkrealloc; const char *ndyn_puthash; tdyn_puthash *pdyn_puthash; const char *nnew_switch_on_key; tnew_switch_on_key *pnew_switch_on_key; const char *ndispose_switch_on_key; tdispose_switch_on_key *pdispose_switch_on_key; const char *nparse_definition; tparse_definition *pparse_definition; const char *nSP_install_fd_hooks; tSP_install_fd_hooks *pSP_install_fd_hooks; const char *nreinitialize; treinitialize *preinitialize; const char *nintoRelocationChain; tintoRelocationChain *pintoRelocationChain; const char *nupdate_exports; tupdate_exports *pupdate_exports; const char *nlarge_insn_offset; tlarge_insn_offset *plarge_insn_offset; const char *nsp_exitmsg; tsp_exitmsg *psp_exitmsg; const char *nsp_expand_file_name; tsp_expand_file_name *psp_expand_file_name; const char *nerrprintf; terrprintf *perrprintf; const char *ndelete_attributes; tdelete_attributes *pdelete_attributes; const char *nget_attributes; tget_attributes *pget_attributes; const char *nput_attributes; tput_attributes *pput_attributes; const char *nset_enter_instr; tset_enter_instr *pset_enter_instr; const char *nmarkTerm; tmarkTerm *pmarkTerm; const char *nsp_fopen; tsp_fopen *psp_fopen; const char *nunavailable_api_33; void *unavailable_api_33; const char *nunavailable_api_34; void *unavailable_api_34; const char *nNULL; void (*pNULL)(void); } DISPATCH_TABLE_SUPPORT_H; #define SP_API_SUPPORT_H_NUMBER_OF_ENTRIES 34 extern tfind_module find_module; extern tfind_definition find_definition; extern tcall_overflow call_overflow; extern tfind_def_in_module find_def_in_module; extern tnumstack_overflow numstack_overflow; extern tsp_make_integer sp_make_integer; extern tcunify cunify; extern tinit_ds init_ds; extern tincore_gethash incore_gethash; extern tchoice_overflow choice_overflow; extern tget_current_worker get_current_worker; extern tsp_checkalloc sp_checkalloc; extern tsp_checkdealloc sp_checkdealloc; extern tsp_checkrealloc sp_checkrealloc; extern tdyn_puthash dyn_puthash; extern tnew_switch_on_key new_switch_on_key; extern tdispose_switch_on_key dispose_switch_on_key; extern tparse_definition parse_definition; extern tSP_install_fd_hooks SP_install_fd_hooks; extern treinitialize reinitialize; extern tintoRelocationChain intoRelocationChain; extern tupdate_exports update_exports; extern tlarge_insn_offset large_insn_offset; extern tsp_exitmsg sp_exitmsg; extern tsp_expand_file_name sp_expand_file_name; extern terrprintf errprintf; extern tdelete_attributes delete_attributes; extern tget_attributes get_attributes; extern tput_attributes put_attributes; extern tset_enter_instr set_enter_instr; extern tmarkTerm markTerm; extern tsp_fopen sp_fopen; # 1232 "../support.h" 2 # 17 "../mt.h" 2 # 1 "../regs.h" 1 # 1 "./config.h" 1 # 6 "../regs.h" 2 #define Arg w #define Argtype struct worker * #define Argdecl Argtype w #define WAMENV Argdecl = GET_CURRENT_WORKER() #define Xb(I) (*CharOffset(w,I)) #define X(I) (w->term[I]) #define XToI(X) (&(Xb(X)) - w->term) #define DynamicPreserved 6 #define INIT_CP_ARITY 3 #define InitialNode ChoiceCharOffset(w->choice_start,ArityToOffset(INIT_CP_ARITY)) #define InitialValueTrail (-((int)(sizeof(struct node)/sizeof(TAGGED)-ANY))) #define IToXOffset(I) ((INSN)(size_t)(((struct worker *)0)->term+(I))) #define IToYOffset(I) ((INSN)(size_t)(((struct frame *)0)->term+(I))) #define Yb(I) (*CharOffset(E,I)) #define Y(I) (E->term[I]) #define YToI(Y) (&(Yb(Y)) - E->term) #define NewShadowregs(Gtop) { GLOBAL_UNCOND = (Gtop); LOCAL_UNCOND = w->local_top; } #define SetShadowregs(Chpt) { GLOBAL_UNCOND = (Chpt)->global_top; LOCAL_UNCOND = (Chpt)->local_top; } # 62 "../regs.h" #define GLOBAL_UNCOND global_uncond #define LOCAL_UNCOND local_uncond #define LetShadowGlobal TAGGED *GLOBAL_UNCOND = w->node->global_top; #define LetShadowLocal TAGGED * LOCAL_UNCOND = w->node->local_top; #define SetWamShadowregs(Chpt) #define NewWamShadowregs(Chpt) #define UpdateShadowregs(Chpt) SetShadowregs(Chpt) #define LetShadowregs LetShadowGlobal LetShadowLocal #define SaveGtop(Chpt,Gtop) (Chpt)->global_top = (Gtop); #define RestoreGtop(Chpt) w->global_top = (Chpt)->global_top; #define RestoreLtop(Chpt) w->local_top = (Chpt)->local_top; #define FrameSize(L) (*(HALF *)((L)-1)) #define SetSoftEvent (w->heap_warn_soft=NULL) #define TestEvent (!w->heap_warn_soft) #define Wake (SetSoftEvent, w->wake_count++) #define SetInterrupt do{ w->int_heap_warn = NULL; SetSoftEvent; }while(0) # 122 "../regs.h" #define OPSHIFT (LogSizeOfWord+1) extern void * const *emul_entry; #define OPSHIFTOF(COND) ((COND) ? LogSizeOfWord+1 : 1) #define Wmode(Op) ((Op)<<OPSHIFT) # 18 "../mt.h" 2 # 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 # 43 "/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; })) # 72 "/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; })) # 88 "/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; })) # 103 "/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); #define __SIGSETFN(NAME,BODY,CONST) _EXTERN_INLINE int NAME (CONST __sigset_t *__set, int __sig) { unsigned long int __mask = __sigmask (__sig); unsigned long int __word = __sigword (__sig); return BODY; } # 117 "/usr/include/bits/sigset.h" 3 4 extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } #undef __SIGSETFN # 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 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__)); # 104 "/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); # 153 "/usr/include/signal.h" 3 4 extern int __sigpause (int __sig_or_mask, int __is_sig); # 162 "/usr/include/signal.h" 3 4 extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); # 178 "/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; #define __need_timespec # 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 #define __WORDSIZE 64 #define __WORDSIZE_COMPAT32 1 # 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)) - 4) typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 / sizeof (int)) - 4)]; 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)) - 4) typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 4)]; __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 }; # 213 "/usr/include/signal.h" 2 3 4 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 # 247 "/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__)); # 304 "/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 # 20 "/usr/include/bits/sigcontext.h" 3 4 #define _BITS_SIGCONTEXT_H 1 # 1 "/usr/include/bits/wordsize.h" 1 3 4 #define __WORDSIZE 64 #define __WORDSIZE_COMPAT32 1 # 27 "/usr/include/bits/sigcontext.h" 2 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 { __uint32_t element[4]; }; # 101 "/usr/include/bits/sigcontext.h" 3 4 struct _fpstate { __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _fpxreg _st[8]; struct _xmmreg _xmm[16]; __uint32_t padding[24]; }; struct sigcontext { unsigned long r8; unsigned long r9; unsigned long r10; unsigned long r11; unsigned long r12; unsigned long r13; unsigned long r14; unsigned long r15; unsigned long rdi; unsigned long rsi; unsigned long rbp; unsigned long rbx; unsigned long rdx; unsigned long rax; unsigned long rcx; unsigned long rsp; unsigned long rip; unsigned long eflags; unsigned short cs; unsigned short gs; unsigned short fs; unsigned short __pad0; unsigned long err; unsigned long trapno; unsigned long oldmask; unsigned long cr2; struct _fpstate * fpstate; unsigned long __reserved1 [8]; }; # 334 "/usr/include/signal.h" 2 3 4 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__)); # 346 "/usr/include/signal.h" 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; # 349 "/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/bits/wordsize.h" 1 3 4 #define __WORDSIZE 64 #define __WORDSIZE_COMPAT32 1 # 25 "/usr/include/sys/ucontext.h" 2 3 4 # 33 "/usr/include/sys/ucontext.h" 3 4 typedef long int greg_t; #define NGREG 23 typedef greg_t gregset_t[23]; enum { REG_R8 = 0, #define REG_R8 REG_R8 REG_R9, #define REG_R9 REG_R9 REG_R10, #define REG_R10 REG_R10 REG_R11, #define REG_R11 REG_R11 REG_R12, #define REG_R12 REG_R12 REG_R13, #define REG_R13 REG_R13 REG_R14, #define REG_R14 REG_R14 REG_R15, #define REG_R15 REG_R15 REG_RDI, #define REG_RDI REG_RDI REG_RSI, #define REG_RSI REG_RSI REG_RBP, #define REG_RBP REG_RBP REG_RBX, #define REG_RBX REG_RBX REG_RDX, #define REG_RDX REG_RDX REG_RAX, #define REG_RAX REG_RAX REG_RCX, #define REG_RCX REG_RCX REG_RSP, #define REG_RSP REG_RSP REG_RIP, #define REG_RIP REG_RIP REG_EFL, #define REG_EFL REG_EFL REG_CSGSFS, #define REG_CSGSFS REG_CSGSFS REG_ERR, #define REG_ERR REG_ERR REG_TRAPNO, #define REG_TRAPNO REG_TRAPNO REG_OLDMASK, #define REG_OLDMASK REG_OLDMASK REG_CR2 #define REG_CR2 REG_CR2 }; struct _libc_fpxreg { unsigned short int significand[4]; unsigned short int exponent; unsigned short int padding[3]; }; struct _libc_xmmreg { __uint32_t element[4]; }; struct _libc_fpstate { __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _libc_fpxreg _st[8]; struct _libc_xmmreg _xmm[16]; __uint32_t padding[24]; }; typedef struct _libc_fpstate *fpregset_t; typedef struct { gregset_t gregs; fpregset_t fpregs; unsigned long __reserved1 [8]; } 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; # 352 "/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/pthreadtypes.h" 1 3 4 # 387 "/usr/include/signal.h" 2 3 4 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__)); extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__)); # 21 "../mt.h" 2 # 34 "../mt.h" extern void set_current_worker (struct worker *); extern struct worker * create_worker (void); extern void dealloc_worker(struct worker *w); # 575 "../termdefs.h" 2 #define ChoiceptMarkPure(b) (*(unsigned long *)(&(b)->trail_top) |= 0x1) #define ChoiceptClearPure(b) (*(unsigned long *)(&(b)->trail_top) &= ~0x1) #define ChoiceptTestPure(b) ((unsigned long)(b)->trail_top & 0x1) #define ChoiceptMarkStatic(b) (*(unsigned long *)(&(b)->trail_top) |= 0x2) #define ChoiceptTestStatic(b) ((unsigned long)(b)->trail_top & 0x2) #define ChoiceptMarkCleanup(b) (*(unsigned long *)(&(b)->next_alt) |= 0x1) #define ChoiceptClearCleanup(b) (*(unsigned long *)(&(b)->next_alt) &= ~0x1) #define ChoiceptTestCleanup(b) ((unsigned long)(b)->next_alt & 0x1) #define ChoiceptAlt(b) ((struct try_node *)((TAGGED)((b)->next_alt) & ~0x1)) #define ChoiceptPrevious(b) ChoiceCharOffset(b,-ChoiceptAlt(b)->node_offset) #define Unmarked(P) TagToPointer(AddrToTag(P)) #define MAX_ATOM_LENGTH 65535 #define Deposit(Source,Mask,Dest) (((Source)&(Mask))|((Dest)& ~(Mask))) # 608 "../termdefs.h" #define revshort(S) ((((S)&0xff)<<8)|(((S)&0xff00)>>8)) #define revhalf(W) (((UHALF)revshort(W)<<16) | (UHALF)revshort(((W)>>16))) #define revword(L) (((SP_UWORD)revhalf(L)<<32) | (SP_UWORD)revhalf(((L)>>32))) # 228 "../datadefs.h" 2 # 1 "../access.h" 1 # 16 "../access.h" #define SP_EXPECT(EXPR,C) __builtin_expect((EXPR), (C)) # 25 "../access.h" #define SP_UNLIKELY(EXPR) SP_EXPECT((EXPR), 0) #define Offset(X,O) ((TAGGED *)(X) + (O)) #define CharOffset(X,O) ((TAGGED *)((char *)(X) + (O))) #define OnHeap(pt) (HeapYounger(w->stack_start,pt) && !HeapYounger(w->heap_start,pt)) #define OffHeaptop(pt,H) SP_UNLIKELY(!HeapYounger(H,pt)) #define HeapYounger(X,Y) ((TAGGED)(X) > (TAGGED)(Y)) #define HeapDifference(X,Y) ((Y) - (X)) #define HeapCharDifference(X,Y) ((char *)(Y) - (char *)(X)) #define HeapOffset(X,O) ((X) + (O)) #define HeapCharOffset(X,O) ((TAGGED *)((char *)(X) + (O))) #define HeapNext(X) (*(X)++) #define HeapInc(X) ((X)++) #define HeapDecr(H) (--(H)) #define HeapPush(H,X) (*(H) = (X), (H)++) #define HeapPushLocal(h,VAL) { TAGGED m_tmp = (VAL); DerefSwitch(m_tmp,{if (VarIsSVA(m_tmp,h)) goto unsafe;}); if (TRUE) HeapPush(h,m_tmp); else unsafe: { BindSVA(m_tmp,TagREF(h)); Load0HVA(h); } } # 61 "../access.h" #define OnStack(t) (StackYounger(w->stack_end,t) && !StackYounger(w->stack_start,t)) #define OffStacktop(t,H) SP_UNLIKELY(!StackYounger(H,t)) #define StackYounger(X,Y) ((TAGGED)(X) > (TAGGED)(Y)) #define StackDifference(X,Y) ((Y) - (X)) #define StackCharDifference(X,Y) ((char *)(Y) - (char *)(X)) #define StackOffset(X,O) ((X) + (O)) #define StackCharOffset(X,O) ((TAGGED *)((char *)(X) + (O))) #define StackNext(P) (*(P)++) #define StackDecr(P) (--(P)) #define OnTrail(pt) (TrailYounger(w->trail_end,pt) && !TrailYounger(w->trail_start,pt)) #define OffTrailtop(pt,P) SP_UNLIKELY(!TrailYounger(P,pt)) #define TrailYounger(X,Y) ((TAGGED)(X) > (TAGGED)(Y)) #define TrailDifference(X,Y) ((Y) - (X)) #define TrailCharDifference(X,Y) ((char *)(Y) - (char *)(X)) #define TrailOffset(X,O) ((X) + (O)) #define TrailCharOffset(X,O) ((TAGGED *)((char *)(X) + (O))) #define TrailPop(P) (*--(P)) #define TrailNext(P) (*(P)++) #define TrailInc(P) ((P)++) #define TrailPush(P,X) (*(P)++ = (X)) #define TrailPushCheck(X) { TAGGED *tr_ = w->trail_top; TrailPush(tr_,X); w->trail_top = tr_; if (ChoiceYounger(w->node,TrailOffset(tr_,CHOICEPAD))) choice_overflow(w,CHOICEPAD); } # 101 "../access.h" #define OnChoice(pt) (ChoiceYounger(pt,w->choice_start) && !ChoiceYounger(pt,w->choice_end)) #define OffChoicetop(pt,B) SP_UNLIKELY(ChoiceYounger(pt,B)) #define ChoiceYounger(X,Y) ((TAGGED)(X) < (TAGGED)(Y)) #define ChoiceOffset(X,O) ((TAGGED *)(X) - (O)) #define ChoiceCharOffset(X,O) ((struct node *)((char *)(X) - (O))) #define ChoiceDifference(X,Y) ((TAGGED *)(X) - (TAGGED *)(Y)) #define ChoiceCharDifference(X,Y) ((char *)(X) - (char *)(Y)) #define ChoicePrev(P) (*(P)++) #define ChoiceNext(P) (*--(P)) #define ChoicePush(P,X) (*--(P) = (X)) #define ChoiceFromInt(Y) ((struct node *)(w->choice_start + GetSmall(Y))) #define ChoiceToInt(Y) MakeSmall((TAGGED *)(Y) - w->choice_start) #define TrailFromInt(Y) (w->trail_start + GetSmall(Y)) #define TrailToInt(Y) MakeSmall((Y) - w->trail_start) #define LoadSVA(Y) {Y = TagREF(&Y); } #define Load2SVA(X,Y) {X = Y = TagREF(&Y); } #define PreLoadHVA(X,H) {X = TagREF(H); } #define Load0HVA(H) {HeapPush(H,TagREF(H)); } #define LoadHVA(To,H) {HeapPush(H,To = TagREF(H)); } #define Load2HVA(To1,To2,H) {HeapPush(H,To1 = To2 = TagREF(H)); } #define LoadCVA(To,H) {HeapPush(H,CVA_HEADER); HeapPush(H,To = TagREF(H)); } # 229 "../datadefs.h" 2 # 1 "../regs.h" 1 # 1 "./config.h" 1 # 6 "../regs.h" 2 #define Arg w #define Argtype struct worker * #define Argdecl Argtype w #define WAMENV Argdecl = GET_CURRENT_WORKER() #define Xb(I) (*CharOffset(w,I)) #define X(I) (w->term[I]) #define XToI(X) (&(Xb(X)) - w->term) #define DynamicPreserved 6 #define INIT_CP_ARITY 3 #define InitialNode ChoiceCharOffset(w->choice_start,ArityToOffset(INIT_CP_ARITY)) #define InitialValueTrail (-((int)(sizeof(struct node)/sizeof(TAGGED)-ANY))) #define IToXOffset(I) ((INSN)(size_t)(((struct worker *)0)->term+(I))) #define IToYOffset(I) ((INSN)(size_t)(((struct frame *)0)->term+(I))) #define Yb(I) (*CharOffset(E,I)) #define Y(I) (E->term[I]) #define YToI(Y) (&(Yb(Y)) - E->term) #define NewShadowregs(Gtop) { GLOBAL_UNCOND = (Gtop); LOCAL_UNCOND = w->local_top; } #define SetShadowregs(Chpt) { GLOBAL_UNCOND = (Chpt)->global_top; LOCAL_UNCOND = (Chpt)->local_top; } # 62 "../regs.h" #define GLOBAL_UNCOND global_uncond #define LOCAL_UNCOND local_uncond #define LetShadowGlobal TAGGED *GLOBAL_UNCOND = w->node->global_top; #define LetShadowLocal TAGGED * LOCAL_UNCOND = w->node->local_top; #define SetWamShadowregs(Chpt) #define NewWamShadowregs(Chpt) #define UpdateShadowregs(Chpt) SetShadowregs(Chpt) #define LetShadowregs LetShadowGlobal LetShadowLocal #define SaveGtop(Chpt,Gtop) (Chpt)->global_top = (Gtop); #define RestoreGtop(Chpt) w->global_top = (Chpt)->global_top; #define RestoreLtop(Chpt) w->local_top = (Chpt)->local_top; #define FrameSize(L) (*(HALF *)((L)-1)) #define SetSoftEvent (w->heap_warn_soft=NULL) #define TestEvent (!w->heap_warn_soft) #define Wake (SetSoftEvent, w->wake_count++) #define SetInterrupt do{ w->int_heap_warn = NULL; SetSoftEvent; }while(0) # 122 "../regs.h" #define OPSHIFT (LogSizeOfWord+1) extern void * const *emul_entry; #define OPSHIFTOF(COND) ((COND) ? LogSizeOfWord+1 : 1) #define Wmode(Op) ((Op)<<OPSHIFT) # 230 "../datadefs.h" 2 # 1 "../streams_spio.h" 1 #define SICSTUS_STREAMS_SPIO_H_INCLUDED 1 #define modeNone 0x000000 #define modeAny 0x000001 #define modeRead 0x000002 #define modeWrite 0x000004 #define modeTTY 0x000008 #define modeStd 0x000010 #define modeAppend 0x000020 #define modeHidden 0x000040 #define modeNoWCX 0x000080 #define modeSeekable 0x000100 #define modeEofOnEof 0x000200 #define modeResetOnEof 0x000400 #define modeBinary 0x000800 #define modeHasPrologInfo 0x001000 #define modeText 0x004000 #define modeAutoFlush 0x008000 #define modeOpenNew 0x010000 #define modeGenerateUnique 0x020000 #define modeStreamToPointerSilent 0x040000 #define stream_to_ptr_DECLARED 1 extern SP_stream *stream_to_ptr(TAGGED t, unsigned long mode, unsigned long notmode); extern void raise_spio_error(spio_t_error_code code, SP_BOOL writeop, char const *pred_name, int arity, int argno); #define SP_CREATE_SPIO_STREAM_OPTION_READ SPIO_BIT(0) #define SP_CREATE_SPIO_STREAM_OPTION_WRITE SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_READ) #define SP_CREATE_SPIO_STREAM_OPTION_APPEND SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_WRITE) #define SP_CREATE_SPIO_STREAM_OPTION_BINARY SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_APPEND) #define SP_CREATE_SPIO_STREAM_OPTION_TEXT SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_BINARY) #define SP_CREATE_SPIO_STREAM_OPTION_INTERACTIVE SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_TEXT) #define SP_CREATE_SPIO_STREAM_OPTION_AUTOFLUSH SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_INTERACTIVE) #define SP_CREATE_SPIO_STREAM_OPTION_HIDDEN SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_AUTOFLUSH) #define SP_CREATE_SPIO_STREAM_OPTION_NULL SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_HIDDEN) #define SP_CREATE_SPIO_STREAM_OPTION_EOF_ON_EOF SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_NULL) #define SP_CREATE_SPIO_STREAM_OPTION_RESET_ON_EOF SPIO_NEXT_BIT(SP_CREATE_SPIO_STREAM_OPTION_EOF_ON_EOF) spio_t_error_code SP_create_spio_stream(SPIO *s, SP_stream **pstream, spio_t_bits options); #define SPIO_PUSH_ENCODING_OPTION_READ SPIO_BIT(0) #define SPIO_PUSH_ENCODING_OPTION_WRITE SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_READ) #define SPIO_PUSH_ENCODING_OPTION_BOM_READ SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_WRITE) #define SPIO_PUSH_ENCODING_OPTION_BOM_READ_OPTIONAL SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_READ) #define SPIO_PUSH_ENCODING_OPTION_BOM_WRITE SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_BOM_READ_OPTIONAL) #define SPIO_PUSH_ENCODING_OPTION_BOM_WRITE_OPTIONAL SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_BOM_WRITE) #define SPIO_PUSH_ENCODING_OPTION_EOL_LF_READ SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_BOM_WRITE_OPTIONAL) #define SPIO_PUSH_ENCODING_OPTION_EOL_LF_WRITE SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_EOL_LF_READ) #define SPIO_PUSH_ENCODING_OPTION_EOL_CRLF_READ SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_EOL_LF_WRITE) #define SPIO_PUSH_ENCODING_OPTION_EOL_CRLF_WRITE SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_EOL_CRLF_READ) #define SPIO_PUSH_ENCODING_OPTION_EOL_AUTO_READ SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_EOL_CRLF_WRITE) #define SPIO_PUSH_ENCODING_OPTION_EOL_AUTO_WRITE SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_EOL_AUTO_READ) #define SPIO_PUSH_ENCODING_OPTION_SEEKABLE SPIO_NEXT_BIT(SPIO_PUSH_ENCODING_OPTION_EOL_AUTO_WRITE) #define SPIO_S_PUSH_ENCODING_ENCODING_DETECTED SPIO_S_PRIVATE_ERROR_1 extern spio_t_error_code spio_push_encoding(SPIO *s, spio_t_coder_funcs *read_coder_funcs, spio_t_coder_funcs *write_coder_funcs, spio_t_bits options); #define SP_PUT_ENCODED_STRING_OPTION_ASCII SP_PUT_ENCODED_STRING_OPTION_RESERVED1_ #define SP_PUT_ENCODED_STRING_OPTION_NONL SP_PUT_ENCODED_STRING_OPTION_RESERVED2_ # 234 "../datadefs.h" 2 # 1 "../bignum.h" 1 extern SP_BOOL bn_positive (Bignum *x); extern int bn_msb (Bignum *x,Bignum *z,Bignum *ignore,Bignum *zmax); extern int bn_add (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_incr (Bignum *x,Bignum *z,Bignum *ignore,Bignum *zmax); extern int bn_plus (Bignum *x,Bignum *z,Bignum *ignore,Bignum *zmax); extern int bn_subtract (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_decr (Bignum *x,Bignum *z,Bignum *ignore,Bignum *zmax); extern int bn_minus (Bignum *x,Bignum *z,Bignum *ignore,Bignum *zmax); extern int bn_and (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_or (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_xor (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_not (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_lshift (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_rshift (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_compare (Bignum *x,Bignum *y); extern int bn_multiply (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_quotient (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_remainder (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_modulus (Bignum *x,Bignum *y,Bignum *z,Bignum *zmax); extern int bn_from_float (Bignum *x,Bignum *z,Bignum *ignore,Bignum *zmax); extern int bn_from_string (char *x,Bignum *z,Bignum *zmax,int radix); extern void bn_to_string (Bignum *x,int base); extern int bn_to_bytes(Bignum *x, void *buf, size_t *pbuf_size); extern int bn_from_bytes(void *buf, size_t buf_size, Bignum *x, Bignum *zmax); # 239 "../datadefs.h" 2 # 1 "../preds.h" 1 # 1 "./config.h" 1 # 4 "../preds.h" 2 extern SP_BOOL prolog_sicstuspath (struct worker *w); extern SP_BOOL prolog_platform_name (struct worker *w); extern SP_BOOL prolog_open (struct worker *w); extern SP_BOOL prolog_socket_open (struct worker *w); extern SP_BOOL prolog_socket_listen (struct worker *w); extern SP_BOOL prolog_socket_close (struct worker *w); extern SP_BOOL prolog_socket_accept (struct worker *w); extern SP_BOOL prolog_select (struct worker *w); extern SP_BOOL prolog_hostname (struct worker *w); extern SP_BOOL prolog_next_stream (struct worker *w); extern SP_BOOL prolog_open_null (struct worker *w); extern SP_BOOL prolog_stream_flags (struct worker *w); extern SP_BOOL prolog_set_stream_flags (struct worker *w); extern SP_BOOL prolog_close (struct worker *w); extern SP_BOOL prolog_stream_code (struct worker *w); extern SP_BOOL prolog_input (struct worker *w); extern SP_BOOL prolog_output (struct worker *w); extern SP_BOOL prolog_stream_count (struct worker *w); #define PROLOG_STREAM_SET_LINE_COUNT_ARITY 2 extern SP_BOOL prolog_stream_set_line_count (struct worker *w); extern SP_BOOL prolog_stream_offset (struct worker *w); #define PROLOG_SET_STREAM_POSITION_ARITY 5 extern SP_BOOL prolog_set_stream_position (struct worker *w); extern SP_BOOL prolog_save_stream_position (struct worker *w); #define PROLOG_SEEK_ARITY 4 extern SP_BOOL prolog_seek (struct worker *w); extern SP_BOOL prolog_flush_output1 (struct worker *w); extern SP_BOOL prolog_flush_output2 (struct worker *w); #define PROLOG_GET_CODE2_ARITY 2 extern SP_BOOL prolog_get_code2 (struct worker *w); extern SP_BOOL prolog_get_byte2 (struct worker *w); extern SP_BOOL prolog_end_of_stream2 (struct worker *w); # 54 "../preds.h" SP_BOOL prolog_unget_code2 (struct worker *w); SP_BOOL prolog_unget_byte2 (struct worker *w); extern SP_BOOL prolog_eof1 (struct worker *w); extern SP_BOOL prolog_skip_code2 (struct worker *w); extern SP_BOOL prolog_skip_byte2 (struct worker *w); #define READ_TOKEN_ARITY 6 extern SP_BOOL prolog_read_token (struct worker *w); extern SP_BOOL prolog_nl1 (struct worker *w); extern SP_BOOL prolog_nl2 (struct worker *w); extern SP_BOOL prolog_put_code2 (struct worker *w); extern SP_BOOL prolog_put_code3 (struct worker *w); extern SP_BOOL prolog_put_byte2 (struct worker *w); extern SP_BOOL prolog_put_byte3 (struct worker *w); extern SP_BOOL prolog_tab2 (struct worker *w); extern SP_BOOL prolog_display2 (struct worker *w); extern SP_BOOL prolog_write3 (struct worker *w); extern SP_BOOL prolog_errprintf1 (struct worker *w); extern SP_BOOL prolog_purge (struct worker *w); extern SP_BOOL prolog_erase (struct worker *w); extern SP_BOOL prolog_ptr_ref (struct worker *w); extern SP_BOOL prolog_ref_ptr (struct worker *w); extern SP_BOOL prolog_inserta (struct worker *w); extern SP_BOOL prolog_insertz (struct worker *w); extern SP_BOOL prolog_instance_file (struct worker *w); extern SP_BOOL prolog_patch_fact (struct worker *w); extern SP_BOOL prolog_bb_put (struct worker *w); extern SP_BOOL prolog_bb_get (struct worker *w); extern SP_BOOL prolog_bb_delete (struct worker *w); extern SP_BOOL prolog_bb_update (struct worker *w); extern SP_BOOL prolog_atom_codes (struct worker *w); extern SP_BOOL prolog_atom_elems (struct worker *w); extern SP_BOOL prolog_number_elems (struct worker *w); extern SP_BOOL prolog_copy_term (struct worker *w); extern SP_BOOL prolog_import_preds (struct worker *w); extern SP_BOOL prolog_module_boot (struct worker *w); extern SP_BOOL prolog_module_decl (struct worker *w); extern SP_BOOL prolog_module_hiding (struct worker *w); extern SP_BOOL prolog_curmod (struct worker *w); extern SP_BOOL prolog_typein_module (struct worker *w); extern SP_BOOL prolog_imported (struct worker *w); extern SP_BOOL prolog_predicate_file (struct worker *w); extern SP_BOOL prolog_abolish (struct worker *w); extern SP_BOOL prolog_multifile_retractall (struct worker *w); extern SP_BOOL prolog_retractall (struct worker *w); extern SP_BOOL prolog_undefine_all (struct worker *w); extern SP_BOOL prolog_erase_clause (struct worker *w); extern SP_BOOL prolog_compiled_clause (struct worker *w); extern SP_BOOL prolog_set_property (struct worker *w); extern SP_BOOL prolog_define_predicate (struct worker *w); extern SP_BOOL prolog_ptr_to_mod (struct worker *w); extern SP_BOOL prolog_instance_to_root (struct worker *w); extern SP_BOOL prolog_nth_instance (struct worker *w); extern SP_BOOL prolog_free (struct worker *w); extern SP_BOOL prolog_trail_cleanup (struct worker *w); extern SP_BOOL prolog_trail_undo (struct worker *w); extern SP_BOOL prolog_undo_cleanup (struct worker *w); extern SP_BOOL prolog_qread (struct worker *w); extern SP_BOOL prolog_push_qlinfo (struct worker *w); extern SP_BOOL prolog_pop_qlinfo (struct worker *w); extern SP_BOOL prolog_prompt (struct worker *w); extern SP_BOOL prolog_wcx_flag (struct worker *w); extern SP_BOOL prolog_char_conversion (struct worker *w); extern SP_BOOL prolog_add_char_conversion (struct worker *w); extern SP_BOOL prolog_double_quotes (struct worker *w); extern SP_BOOL prolog_unknown (struct worker *w); extern SP_BOOL prolog_source_info (struct worker *w); extern SP_BOOL prolog_syntax (struct worker *w); extern SP_BOOL prolog_constraint_list (struct worker *w); extern SP_BOOL prolog_term_variables (struct worker *w); extern SP_BOOL prolog_acyclic (struct worker *w); extern SP_BOOL prolog_unify_with_occurs_check (struct worker *w); extern SP_BOOL prolog_subsumes (struct worker *w); extern SP_BOOL prolog_term_hash (struct worker *w); extern SP_BOOL prolog_block_predicate (struct worker *w); extern SP_BOOL prolog_block_declaration (struct worker *w); extern SP_BOOL prolog_meta_declaration (struct worker *w); extern SP_BOOL prolog_meta_predicate (struct worker *w); extern SP_BOOL prolog_disjunctive_geler (struct worker *w); extern SP_BOOL prolog_nth_choicepoint (struct worker *w); extern SP_BOOL prolog_clean_up (struct worker *w); extern SP_BOOL prolog_eq (struct worker *w); extern SP_BOOL prolog_mgu_variables (struct worker *w); extern SP_BOOL prolog_current_atom (struct worker *w); extern SP_BOOL prolog_current_clauses (struct worker *w); extern SP_BOOL prolog_current_module (struct worker *w); extern SP_BOOL prolog_predicate_arities (struct worker *w); extern SP_BOOL prolog_predicate_property (struct worker *w); extern SP_BOOL prolog_walltime (struct worker *w); extern SP_BOOL prolog_runtime (struct worker *w); extern SP_BOOL prolog_total_runtime (struct worker *w); extern SP_BOOL prolog_termheap_usage (struct worker *w); extern SP_BOOL prolog_envstack_usage (struct worker *w); extern SP_BOOL prolog_trail_usage (struct worker *w); extern SP_BOOL prolog_choice_usage (struct worker *w); extern SP_BOOL prolog_trimcore (struct worker *w); extern SP_BOOL prolog_statistics (struct worker *w); extern SP_BOOL prolog_program_usage (struct worker *w); extern SP_BOOL prolog_total_usage (struct worker *w); extern SP_BOOL prolog_mm_usage (struct worker *w); extern SP_BOOL prolog_defrag_usage (struct worker *w); extern SP_BOOL prolog_minfo (struct worker *w); extern SP_BOOL prolog_stack_shift_usage (struct worker *w); extern SP_BOOL prolog_compiling (struct worker *w); extern SP_BOOL prolog_quoted_charset_flag (struct worker *w); extern SP_BOOL prolog_compatibility_flag (struct worker *w); extern SP_BOOL prolog_ferror_flag (struct worker *w); extern SP_BOOL prolog_single_var_flag (struct worker *w); extern SP_BOOL prolog_redefine_flag (struct worker *w); extern SP_BOOL prolog_discontiguous_flag (struct worker *w); extern SP_BOOL prolog_informational_flag (struct worker *w); extern SP_BOOL prolog_system_type_flag (struct worker *w); extern SP_BOOL prolog_version_flag (struct worker *w); extern SP_BOOL prolog_gc_mode (struct worker *w); extern SP_BOOL prolog_gc_trace (struct worker *w); extern SP_BOOL prolog_gc_margin (struct worker *w); extern SP_BOOL prolog_gc_usage (struct worker *w); extern SP_BOOL prolog_gc_start (struct worker *w); extern SP_BOOL prolog_unix_cd (struct worker *w); extern SP_BOOL prolog_unix_argv (struct worker *w); extern SP_BOOL prolog_unix_exit (struct worker *w); extern SP_BOOL prolog_unix_access (struct worker *w); extern SP_BOOL prolog_prelinked_foreign_resource (struct worker *w); extern SP_BOOL prolog_load_foreign_resource (struct worker *w); extern SP_BOOL prolog_unload_foreign_resource (struct worker *w); extern SP_BOOL prolog_foreign_resource_suffix (struct worker *w); extern SP_BOOL prolog_foreign_resource_symbols (struct worker *w); extern SP_BOOL prolog_SP_MAIN_PREFIX (struct worker *w); extern SP_BOOL prolog_absolute_path (struct worker *w); extern SP_BOOL prolog_directory_path (struct worker *w); extern SP_BOOL prolog_test_file_access (struct worker *w); extern SP_BOOL prolog_file_type (struct worker *w); extern SP_BOOL prolog_format_print_integer (struct worker *w); extern SP_BOOL prolog_format_print_float (struct worker *w); extern SP_BOOL prolog_current_key (struct worker *w); extern SP_BOOL prolog_large_data (struct worker *w); extern SP_BOOL prolog_make_bytecode_object (struct worker *w); extern SP_BOOL prolog_cerror_data (struct worker *w); extern SP_BOOL prolog_error_message (struct worker *w); extern SP_BOOL prolog_zap_chpt (struct worker *w); extern SP_BOOL prolog_load_exception (struct worker *w); extern SP_BOOL prolog_store_exception (struct worker *w); extern SP_BOOL prolog_erase_exception (struct worker *w); extern SP_BOOL prolog_add_setof_root (struct worker *w); extern SP_BOOL prolog_remove_setof_root (struct worker *w); extern SP_BOOL prolog_setof_inserta (struct worker *w); extern SP_BOOL prolog_setof_list_instances (struct worker *w); extern SP_BOOL prolog_set_clock (struct worker *w); extern SP_BOOL prolog_term_ref (struct worker *w); extern SP_BOOL prolog_decompile_tokens (struct worker *w); extern SP_BOOL bdd_build (struct worker *w); extern SP_BOOL bdd_parts (struct worker *w); extern SP_BOOL bdd_store (struct worker *w); extern SP_BOOL bdd_negate (struct worker *w); extern SP_BOOL bdd_equiv (struct worker *w); extern SP_BOOL bdd_antiv (struct worker *w); extern SP_BOOL bdd_transv (struct worker *w); extern SP_BOOL bdd_type (struct worker *w); extern SP_BOOL bdd_univ_case (struct worker *w); extern SP_BOOL bdd_subst_case (struct worker *w); extern SP_BOOL bdd_subst_reset (struct worker *w); extern SP_BOOL bdd_subst_store (struct worker *w); extern SP_BOOL bdd_vector_size (struct worker *w); extern SP_BOOL prolog_stdoutput (struct worker *w); extern SP_BOOL prolog_stderror (struct worker *w); extern SP_BOOL prolog_stdinput (struct worker *w); extern SP_BOOL nd_current_atom (struct worker * w); extern SP_BOOL nd_current_module (struct worker * w); extern SP_BOOL nd_predicate_property (struct worker * w); extern SP_BOOL prolog_save_attribute_info (struct worker *w); extern SP_BOOL prolog_get_all_attribute_modules (struct worker *w); extern SP_BOOL prolog_get_attribute_modules (struct worker *w); extern SP_BOOL prolog_get_cva (struct worker *w); extern SP_BOOL prolog_put_cva (struct worker *w); extern SP_BOOL prolog_window_title (struct worker *w); extern SP_BOOL prolog_can_expand_goal (struct worker *w); extern SP_BOOL prolog_fast_goal (struct worker *w); extern SP_BOOL prolog_get_registry_value (struct worker *w); extern SP_BOOL prolog_save (struct worker *w); extern SP_BOOL prolog_restore (struct worker *w); extern SP_BOOL prolog_garbage_collect_atoms (struct worker *w); extern SP_BOOL prolog_atom_usage (struct worker *w); extern SP_BOOL prolog_agc_usage (struct worker *w); extern SP_BOOL prolog_agc_margin (struct worker *w); extern SP_BOOL prolog_atom_mode (struct worker *w); extern SP_BOOL prolog_replace_suffix (struct worker *w); extern SP_BOOL prolog_save_increment (struct worker *w); extern SP_BOOL prolog_restore_increment (struct worker *w); extern SP_BOOL prolog_atom_length (struct worker *w); extern SP_BOOL prolog_atom_concat (struct worker *w); extern SP_BOOL prolog_sub_atom (struct worker *w); extern SP_BOOL prolog_char_code (struct worker *w); extern SP_BOOL prolog_sort (struct worker *w); extern SP_BOOL prolog_keysort (struct worker *w); #define PROLOG_PROCESS_CREATE_ARITY 9 extern SP_BOOL prolog_process_create (struct worker *w); #define PROLOG_PROCESS_WAIT_ARITY 6 extern SP_BOOL prolog_process_wait (struct worker *w); #define PROLOG_PROCESS_KILL_ARITY 3 extern SP_BOOL prolog_process_kill (struct worker *w); #define PROLOG_PROCESS_RELEASE_ARITY 3 extern SP_BOOL prolog_process_release (struct worker *w); #define PROLOG_PROCESS_ID_ARITY 3 extern SP_BOOL prolog_process_id (struct worker *w); #define PROLOG_IS_PROCESS_ARITY 1 extern SP_BOOL prolog_is_process (struct worker *w); #define PROLOG_PROCESS_SELF_ID_ARITY 1 extern SP_BOOL prolog_process_self_id (struct worker *w); #define PROLOG_CREATE_DIRECTORY_ARITY 3 extern SP_BOOL prolog_create_directory (struct worker *w); #define PROLOG_LIST_DIRECTORY_ARITY 4 extern SP_BOOL prolog_list_directory (struct worker *w); #define PROLOG_DELETE_FILE_ARITY 3 extern SP_BOOL prolog_delete_file (struct worker *w); #define PROLOG_RENAME_FILE_ARITY 4 extern SP_BOOL prolog_rename_file (struct worker *w); #define PROLOG_FILE_PROPERTY_ARITY 4 extern SP_BOOL prolog_file_property (struct worker *w); #define PROLOG_SPLIT_ENV_PATH_ARITY 3 extern SP_BOOL prolog_split_env_path (struct worker *w); #define PROLOG_STREAM_PROPERTIES_ARITY 4 extern SP_BOOL prolog_stream_properties (struct worker *w); SP_BOOL prolog_clear_profile (struct worker *w); SP_BOOL prolog_dump_profile (struct worker *w); # 240 "../datadefs.h" 2 # 5 "../alloc.c" 2 # 14 "../alloc.c" static int mem_initialized = 0; #define LINE_STRINGIZE1(X) #X #define LINE_STRINGIZE(X) LINE_STRINGIZE1(X) #define LINE_STRING " at " __FILE__ ":" LINE_STRINGIZE(__LINE__) # 44 "../alloc.c" #define ZAP_MEMORY 0 #define ZAPVALUE 0xDEADC0DF # 60 "../alloc.c" #define ZAPMEM(PTR,BYTE_SIZE) do{;}while(0) static char *mm_msgs[] = { "SP_malloc space:", "misc. space:", "atom_buffer space:", "BDD hash table space:", "atom space:", "atom table space:", "foreign resource space:", "try_node space:", "sw_on_key space:", "nc_info space:", "definition space:", "emul_info space:", "incore_info space:", "int_info space:", "gcdef space:", "mod_def space:", "instance space:", "num. module table space:", "module data space:", "ITABLE space:", "setof_int_info space:", "qlinfo space:", "FLI stack space:", "event queue space:", "SP_stream space:", "numstack space:", "comp. code table space:", "B-tree space:", "lheap space:", "stack space:" }; static int mm_hints; static SP_InitAllocHook *mm_init_alloc_hook; static SP_DeinitAllocHook *mm_deinit_alloc_hook; static SP_AllocHook *mm_alloc_hook; static SP_FreeHook *mm_free_hook; static void *mm_cookie = ((void *)0); static struct free_block * get_exact (size_t size, int i, SP_BOOL use,struct mm *mm); void memman_set_hooks_raw(int hints, SP_InitAllocHook *init_alloc_hook, SP_DeinitAllocHook *deinit_alloc_hook, SP_AllocHook *alloc_hook, SP_FreeHook *free_hook, void *cookie) { mm_hints = hints; mm_init_alloc_hook = init_alloc_hook; mm_deinit_alloc_hook = deinit_alloc_hook; mm_alloc_hook = alloc_hook; mm_free_hook = free_hook; mm_cookie = cookie; } #define MM validated_mm(mm, __FILE__, __LINE__) #define VALIDATE_MM validate_mm(mm, __FILE__, __LINE__) static void validate_mm(struct mm *mm, char const *f, int l) { int i; (void)f; (void)l; for (i=0; i<25; i++) { struct free_block *q; q = mm->free_arr[i]; while (q != ((void *)0)) q = q->next; } } extern struct mm *validated_mm(struct mm *mm, char const *f, int l); struct mm *validated_mm(struct mm *mm, char const *f, int l) { validate_mm(mm, f, l); return mm; } #define MM_ALIGN(Size) Size = SP_ALIGN(Size, MM_MINSIZE) #define FREE_ARR_INDEX(Size,I,J) { if ((J=(Size)>>LOG2GRAIN) > EXACTSIZE) for (J>>=(LOG2EXACTSIZE+1), I=EXACTSIZE; J && I<SIZE_CLASSES-1; I++) J>>=1; else I = J - 1; } # 175 "../alloc.c" #define IF_COALESCED(P,Q,THEN) #define IF_COALESCED_LABEL(L) static void ins_free_arr(struct free_block *p, struct mm *mm) { struct free_block *q, **pp; int i, j; ; { if ((j=(p->size)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; q = mm->free_arr[i]; if (i<25 -1) { p->next = q; mm->free_arr[i] = p; } else { pp = &mm->free_arr[i]; while (q && q < p) { pp = &(q->next); q = q->next; } *pp = p; p->next = q; } ; if (i >= 15 && mm->free_arr_max[i-15] < p->size) mm->free_arr_max[i-15] = p->size; } #define MIN_VALID(I) ( (I)>=SIZE_CLASSES ? 0x7ffffffc : (I)>=EXACTSIZE ? (MM_MINSIZE<<LOG2EXACTSIZE)<<((I)-EXACTSIZE) : ((I)+1)<<LOG2GRAIN ) static struct free_block *bigmem_block( struct bigmem_link *mem_link, size_t *sizep) { struct free_block *cb; if (!mem_link) return ((void *)0); cb = (struct free_block *)(((size_t)(((size_t)((mem_link->bigmem)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); if ((char *)cb==(char *)mem_link) cb = (struct free_block *)(((size_t)(((size_t)((mem_link+1)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); *sizep = (mem_link->size - ((char *)cb - (char *)mem_link->bigmem)) & -(2<<3); return cb; } static int return_bigmem(struct bigmem_link *cp,struct mm *mm) { void * bigmem = cp->bigmem; struct bigmem_link **cpp_addr = &mm->bigmems_by_addr; struct bigmem_link **cpp_time = &mm->bigmems_by_time; struct bigmem_link *next_addr; struct bigmem_link *next_time; while (*cpp_addr != cp) cpp_addr = &(*cpp_addr)->next_addr; next_addr = cp->next_addr; while (*cpp_time != cp) cpp_time = &(*cpp_time)->next_time; next_time = cp->next_time; if ((((char*)bigmem) <= ((char*)cpp_addr)) && (((char*)cpp_addr) < ((char*)bigmem)+cp->size)) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((250))); __fprintf_chk (stderr, 2 - 1, "%s:%ld Overlapping memory cpp_addr=0x%lx, cp->size=0x%lx, bigmem=0x%lx, bigmem+cp->size=0x%lx", "../alloc.c", (long)250, (unsigned long)cpp_addr, (unsigned long)cp->size, (unsigned long)bigmem, (unsigned long)((char*)bigmem)+cp->size); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } if ((((char*)bigmem) <= ((char*)cpp_time)) && (((char*)cpp_time) < ((char*)bigmem)+cp->size)) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((253))); __fprintf_chk (stderr, 2 - 1, "%s:%ld Overlapping memory cpp_time=0x%lx, cp->size=0x%lx, bigmem=0x%lx, bigmem+cp->size=0x%lx", "../alloc.c", (long)253, (unsigned long)cpp_time, (unsigned long)cp->size, (unsigned long)bigmem, (unsigned long)((char*)bigmem)+cp->size); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } if ((*mm_free_hook)(bigmem, cp->size, 0, mm_cookie)) { *cpp_addr = next_addr; *cpp_time = next_time; if ((unsigned long)cp != (((size_t)(((size_t)((bigmem)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1))) checkdealloc((TAGGED *)cp,sizeof(*cp),((1) << 4 | (0x0))); return 1; } else return 0; } # 274 "../alloc.c" static void * validate_bigmem(void * bigmem, size_t size, size_t actual_size) { if (bigmem == ((void *)0)) return ((void *)0); ((void) ( (1) ? ( ((! (actual_size < size))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",285) ) : 1 )); if (actual_size < size) return ((void *)0); # 316 "../alloc.c" return bigmem; } static struct free_block *get_aligned_block( size_t size, struct mm *mm) { void * bigmem; struct bigmem_link *mem_link; struct free_block *new_ptr; size_t link_size, actual_size; register int i, j; link_size = sizeof(*mem_link); link_size = (((size_t)(((size_t)((link_size)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); size += link_size; bigmem = (*mm_alloc_hook)(size,&actual_size,mm_cookie); if (validate_bigmem(bigmem,size,actual_size) == ((void *)0)) return ((void *)0); { if ((j=(link_size)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; mem_link = (struct bigmem_link *)get_exact(link_size,i,0,mm); if (mem_link) { mm->alloc_dist[i]++; mm->mm_bins[((1) << 4 | (0x0))] += link_size; mm->total_in_use += link_size; mm->total_free -= link_size; } else { mem_link = (struct bigmem_link *)(((size_t)(((size_t)((bigmem)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); } { struct bigmem_link *cp1, **cpp; cp1 = mm->bigmems_by_addr; cpp = &mm->bigmems_by_addr; while (cp1 && cp1->bigmem > bigmem) { cpp = &cp1->next_addr; cp1 = cp1->next_addr; } mem_link->next_addr = cp1; mem_link->next_time = mm->bigmems_by_time; mem_link->bigmem = bigmem; mem_link->size = actual_size; *cpp = mem_link; mm->bigmems_by_time = mem_link; } new_ptr = bigmem_block(mem_link, &actual_size); new_ptr->size = actual_size; return new_ptr; } #define MININC MIN_VALID(SIZE_CLASSES-1) static struct free_block *expand_memory(size_t size,struct mm *mm) { return get_aligned_block(( (25 -1)>=25 ? 0x7ffffffc : (25 -1)>=15 ? ((2<<3)<<4)<<((25 -1)-15) : ((25 -1)+1)<<(3 +1) ) > size ? ( (25 -1)>=25 ? 0x7ffffffc : (25 -1)>=15 ? ((2<<3)<<4)<<((25 -1)-15) : ((25 -1)+1)<<(3 +1) ) : size,mm); } # 404 "../alloc.c" static struct free_block *sam_run(struct free_block **ap) { register struct free_block *list = *ap; register struct free_block *c = list; register struct free_block *a = list->next; while (a != ((void *)0)) { if (a<c) { c->next = a; c = a; a = a->next; } else { if (list<a) { struct free_block *x = (struct free_block *) a->next; a->next = list; list = a; a = x; } else break; } } c->next = ((void *)0); *ap = a; return list; } static struct free_block *sam_merge( struct free_block *a, struct free_block *b) { register struct free_block *t, *u; if (a == ((void *)0)) return b; if (b == ((void *)0)) return a; if (a<b) { t = b; b = b->next; } else { t = a; a = a->next; } u = t; while (a != ((void *)0) && b != ((void *)0)) { if (a<b) { t->next = b; t = b; b = b->next; } else { t->next = a; t = a; a = a->next; } } t->next = (a == ((void *)0) ? b : a); return u; } # 470 "../alloc.c" static struct free_block *sam_sort(struct free_block *list) { register int count, c; register struct free_block *run; register int depth; struct free_block *stack[8*8]; if (list == ((void *)0)) return ((void *)0); depth = 0; count = 0; while (list != ((void *)0)) { run = sam_run(&list); count++; for (c = count; depth > 0 && !(c&1); c >>= 1) { run = sam_merge(stack[--depth], run); } ((void) ( (1) ? ( ((depth < ((sizeof stack)/(sizeof stack[0])))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",486) ) : 1 )); stack[depth++] = run; } run = stack[--depth]; while (depth > 0) run = sam_merge(stack[--depth], run); return run; } static struct free_block *defragment_memory(struct mm *mm) { register struct free_block *p, *q; struct free_block *high = ((void *)0); register int i, j; SP_int64 t1, t2; struct worker * w = self; t1 = usertime(); reclaim_dead_clauses(w); reclaim_dead_predicates(w); for (i=0; i<25; i++) mm->free_arr[i] = sam_sort(mm->free_arr[i]); for (i=0,j=1; j<25; i++,j++) { mm->free_arr[j] = sam_merge(mm->free_arr[i], mm->free_arr[j]); mm->free_arr[i] = ((void *)0); if (i >= 15) mm->free_arr_max[i-15] = 0; } p = sam_merge(mm->free_cache, mm->free_arr[25 -1]); mm->free_cache = ((void *)0); mm->free_arr[25 -1] = ((void *)0); mm->free_arr_max[25 -15 -1] = 0; if (p) { q = p->next; while (q) { if ((char *)q + q->size == (char *)p) { q->size += p->size; p = q; q = q->next; } else { if (!high) high = p; ins_free_arr(p,mm); p = q; q = q->next; } } ins_free_arr(p,mm); } mm->recently_freed = 0; t2 = usertime(); engine_global.stats.defrag_time += t2-t1; engine_global.stats.legacy_starttime += t2-t1; engine_global.stats.legacy_lasttime += t2-t1; engine_global.stats.defrag_count++; return high; } TAGGED * sp_checkalloc(size_t size,SP_BOOL gc) { return checkalloc(size, gc ? ((22) << 4 | (0x0)) : ((1) << 4 | (0x0))); } TAGGED * sp_checkrealloc(TAGGED *ptr, size_t decr, size_t size,SP_BOOL gc) { return checkrealloc(ptr, decr, size, gc ? ((22) << 4 | (0x0)) : ((1) << 4 | (0x0))); } void sp_checkdealloc(TAGGED *ptr, size_t decr,SP_BOOL gc) { checkdealloc(ptr, decr, gc ? ((22) << 4 | (0x0)) : ((1) << 4 | (0x0))); } static struct free_block *checkalloc_internal(size_t size,int mm_args_internal) { struct free_block *p, **q; int i, j; struct free_block *high=((void *)0); struct mm *mm = engine_global.mm; { if ((j=(size)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; mm->alloc_dist[i]++; mm->mm_bins[(mm_args_internal >> 4)] += size; if (sp_checkenv("CHECKALLOC_INTERNAL_EAGER_DEFRAG")) { high = defragment_memory(mm); } restart: { if ((j=(size)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; if (i < 15) { if ((p=get_exact(size,i,1,mm))) { p->size = size; return p; } } else for (; i<25; i++) if (mm->free_arr_max[i-15] >= size) { for (q = &mm->free_arr[i], p = *q; p; q = &p->next, p = *q) if (p->size >= size) { *q = p->next; return p; } mm->free_arr_max[i-15] = mm->free_arr[i] ? size-(2<<3) : 0; } if (mm->recently_freed<<3 >= (mm->total_in_use+mm->total_free)) { high = defragment_memory(mm); goto restart; } p = expand_memory(size,mm); if (p == ((void *)0)) return ((void *)0); mm->total_free += p->size; return p; } TAGGED * checkalloc(size_t size, int mm_args_internal) { struct free_block *p, *q; struct mm *mm = engine_global.mm; size = (((size_t)(((size_t)((size)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); p = checkalloc_internal(size, mm_args_internal); if (p == ((void *)0)) { if ((mm_args_internal & ((((long)0x1) << 4)-1)) & 0x1) return ((void *)0); do_memory_fault(("Memory allocation failed (could not get memory-block)" " at " "../alloc.c" ":" "629"), ((mm_args_internal >> 4))); } mm->total_in_use += size; mm->total_free -= size; if (p->size > size) { ((void) ( (1) ? ( (((p->size - size) >= sizeof(struct free_block))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",635) ) : 1 )); q = (struct free_block *)((char *)p + size); q->size = p->size - size; ins_free_arr(q,mm); } return (TAGGED *)p; } #define CACHEMAX (2048<<LogSizeOfWord) static struct free_block *find_cache(size_t size,struct mm *mm) { int i, j; struct free_block *p, *q; if (!(p=mm->free_cache)) for (i=15; !p && i<25; i++) if ((p=mm->free_arr[i])) { mm->free_arr[i] = p->next; if (p->size > (2048<<3)) { do { if (!(((p->size - (2048<<3)) >= sizeof(struct free_block)))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((661))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("re-using too small block")) != ((void *)0) && (("re-using too small block"))[0] != 0) ? ": " : ""), (("re-using too small block"))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); q = (struct free_block *)((char *)p + (2048<<3)); q->size = p->size - (2048<<3); p->size = (2048<<3); ins_free_arr(q,mm); } } if (p) { do { if (!(((p->size - size) >= sizeof(struct free_block)))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((670))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("re-using too small block")) != ((void *)0) && (("re-using too small block"))[0] != 0) ? ": " : ""), (("re-using too small block"))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); q = (struct free_block *)((char *)p + size); q->size = p->size - size; { if ((j=(q->size)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; if (i < 15) { ins_free_arr(q,mm); mm->free_cache = ((void *)0); } else { q->next = ((void *)0); mm->free_cache = q; } } return p; } static struct free_block *get_exact(size_t size, int i, SP_BOOL use_cache, struct mm *mm) { register struct free_block *p; register int j; register struct free_block *q; if ((p=mm->free_arr[i])) { mm->free_arr[i] = p->next; return p; } if (use_cache) { if ((p = find_cache(size,mm))) return p; } else { for (j=15; j<25; j++) { if ((p=mm->free_arr[j])) { mm->free_arr[j] = p->next; ((void) ( (1) ? ( (((p->size - size) >= sizeof(struct free_block))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",708) ) : 1 )); q = (struct free_block *)((char *)p + size); q->size = p->size - size; ins_free_arr(q,mm); return p; } } } for (j=15 -1; j>i; j--) { if ((p=mm->free_arr[j])) { mm->free_arr[j] = p->next; ((void) ( (1) ? ( (((p->size - size) >= sizeof(struct free_block))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",721) ) : 1 )); q = (struct free_block *)((char *)p + size); q->size = p->size - size; ins_free_arr(q,mm); return p; } } return ((void *)0); } void checkdealloc(TAGGED *ptr, size_t decr,int mm_args_internal) { struct free_block *q = (struct free_block *)ptr; struct mm *mm = engine_global.mm; register int i, j; decr = (((size_t)(((size_t)((decr)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); do{;}while(0); mm->total_in_use -= decr; mm->total_free += decr; mm->recently_freed += decr; { if ((j=(decr)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; mm->alloc_dist[i]--; mm->mm_bins[(mm_args_internal >> 4)] -= decr; ((void) ( (1) ? ( ((decr >= sizeof(struct free_block))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",747) ) : 1 )); q->size = decr; ins_free_arr(q,mm); } TAGGED *checkrealloc(TAGGED *ptr, size_t decr, size_t size, int mm_args_internal) { register struct free_block *p, *q; struct mm *mm = engine_global.mm; decr = (((size_t)(((size_t)((decr)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); size = (((size_t)(((size_t)((size)) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)); if (size <= decr) { if (size < decr) { register int i, j; ((void) ( (1) ? ( (((decr - size) >= sizeof(struct free_block))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",765) ) : 1 )); p = (struct free_block *)((char *)ptr + size); p->size = decr - size; ins_free_arr(p,mm); mm->total_in_use += size - decr; mm->total_free -= size - decr; { if ((j=(decr)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; mm->alloc_dist[i]--; { if ((j=(size)>>(3 +1)) > 15) for (j>>=(4 +1), i=15; j && i<25 -1; i++) j>>=1; else i = j - 1; }; mm->alloc_dist[i]++; mm->mm_bins[(mm_args_internal >> 4)] += size - decr; } return ptr; } else if (size>>(3 +1) > 15 && decr >= ((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3)<<3) { size_t psize; int i; TAGGED *target; mm->recovery.ptr = ptr; mm->recovery.size = decr; for (i=0; i<((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3); i++) mm->recovery.save_word[i] = ptr[i]; checkdealloc(ptr, decr, mm_args_internal); p = checkalloc_internal(size, mm_args_internal); if (p == ((void *)0)) { memman_reinit(mm); if ((mm_args_internal & ((((long)0x1) << 4)-1)) & 0x1) return ((void *)0); do_memory_fault(("Memory allocation failed (could not get memory-block)" " at " "../alloc.c" ":" "797"), ((mm_args_internal >> 4))); } mm->total_in_use += size; mm->total_free -= size; mm->recovery.ptr = ((void *)0); psize = p->size; target = (TAGGED *)p; (void)SP_memmove((char *)(target+((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3)), (char *)(ptr+((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3)), decr-(((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3)<<3)); for (i=0; i<((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3); i++) target[i] = mm->recovery.save_word[i]; if (psize > size) { ((void) ( (1) ? ( (((psize - size) >= sizeof(struct free_block))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",811) ) : 1 )); q = (struct free_block *)((char *)p + size); q->size = psize - size; ins_free_arr(q,mm); } return target; } else { p = (struct free_block *)checkalloc(size,mm_args_internal); if (p == ((void *)0)) return ((void *)0); q = (struct free_block *)((char *)ptr + decr); if (p==q) { checkdealloc((TAGGED *)((char *)ptr + size), decr, mm_args_internal); return ptr; } else { (void)((__builtin_object_size ((char *)p, 0) != (size_t) -1) ? __builtin___memcpy_chk ((char *)p, (char *)ptr, decr, __builtin_object_size ((char *)p, 0)) : __memcpy_ichk ((char *)p, (char *)ptr, decr)); checkdealloc(ptr, decr,mm_args_internal); return (TAGGED *)p; } } } #define SP_MALLOC_OVERWRITE_PAD 16 #define SP_MALLOC_STATS 1 static size_t sp_malloc_bytes_allocated = 0; size_t sp_malloc_bytes(void) { return sp_malloc_bytes_allocated; } #define SP_MALLOC_STATS_ALLOC(SIZE) do { size_t sz_ = (SIZE); sp_malloc_bytes_allocated += sz_; } while (0) #define SP_MALLOC_STATS_REALLOC(OLDSIZE,NEWSIZE) do { size_t oldsz_ = (OLDSIZE); size_t newsz_ = (NEWSIZE); if (oldsz_ <= newsz_) { size_t sz_ = newsz_ - oldsz_; sp_malloc_bytes_allocated += sz_; } else { size_t sz_ = oldsz_ - newsz_; SP_ASSERT(sz_ <= sp_malloc_bytes_allocated); sp_malloc_bytes_allocated -= sz_; } } while (0) # 885 "../alloc.c" #define SP_MALLOC_STATS_FREE(SIZE) do { size_t sz_ = (SIZE); SP_ASSERT(sz_ <= sp_malloc_bytes_allocated); sp_malloc_bytes_allocated -= sz_; } while (0) # 899 "../alloc.c" #define SIZEAREA sizeof(struct free_block) #define MALLOC_MAGIC 0xdeaddead # 936 "../alloc.c" void * SP_malloc(size_t size) { char *ptr; size_t alloc_size; do{ ; if (!is_in_main_thread()) { __fprintf_chk (stderr, 2 - 1, "\n### ERROR: %s called outside main thread", "SP_malloc"); fflush(stderr); __fprintf_chk (stderr, 2 - 1, "\n### called in thread %ld, main is %ld\n", (long)sp_get_current_thread(), (long)sp_get_main_thread()); fflush(stderr); debug_break(); } } while (0); if (size == 0) size = 1; ((void) ( (1) ? ( ((mem_initialized)) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",945) ) : 1 )); if (!mem_initialized) return ((void *)0); alloc_size = size; alloc_size += 16; alloc_size += sizeof(struct free_block); ptr = (char *)checkalloc(alloc_size, ((0) << 4 | (0x1))); if (ptr == ((void *)0)) return ((void *)0); *(size_t *)ptr = alloc_size; *((size_t *)ptr+1) = 0xdeaddead; ptr = ptr + sizeof(struct free_block); { int i; char *p = ptr; size_t sz = (*(size_t *)((char *)ptr-sizeof(struct free_block))); sz -= (sizeof(struct free_block) + 16); for (i = 0; i < 16; i++) { char *p_i = (p + sz + i); *p_i = ((i+1) % 0xFF); } } do { size_t sz_ = (size); sp_malloc_bytes_allocated += sz_; } while (0); return ptr; } # 1020 "../alloc.c" void * SP_realloc(void * ptr, size_t size) { char *ptr2; size_t new_alloc_size; size_t old_alloc_size; do{ ; if (!is_in_main_thread()) { __fprintf_chk (stderr, 2 - 1, "\n### ERROR: %s called outside main thread", "SP_realloc"); fflush(stderr); __fprintf_chk (stderr, 2 - 1, "\n### called in thread %ld, main is %ld\n", (long)sp_get_current_thread(), (long)sp_get_main_thread()); fflush(stderr); debug_break(); } } while (0); ((void) ( (1) ? ( ((ptr != ((void *)0))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",1028) ) : 1 )); if (ptr == ((void *)0)) return ((void *)0); if (size == 0) size = 1; new_alloc_size = size; new_alloc_size += 16; ((void) ( (1) ? ( (((*((size_t *)((char *)ptr-sizeof(struct free_block))+1) == 0xdeaddead))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",1039) ) : 1 )); if (*((size_t *)((char *)ptr-sizeof(struct free_block))+1) != 0xdeaddead) { do_memory_fault(("Cannot realloc non-SP_malloc block" " at " "../alloc.c" ":" "1043" "\n"), (0)); } else { { int i; char *p = ptr; size_t sz = (*(size_t *)((char *)ptr-sizeof(struct free_block))); sz -= (sizeof(struct free_block) + 16); for (i = 0; i < 16; i++) { char *p_i = (p + sz + i); char c = *p_i; ((void) ( (1) ? ( ((c == ((i+1) % 0xFF))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",1057) ) : 1 )); } } } new_alloc_size += sizeof(struct free_block); old_alloc_size = *(size_t *)((char *)ptr-sizeof(struct free_block)); ((void) ( (1) ? ( ((old_alloc_size > (16 + sizeof(struct free_block)))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",1065) ) : 1 )); ptr2 = (char *)checkrealloc((TAGGED *)((char *)ptr-sizeof(struct free_block)), old_alloc_size, new_alloc_size ,((0) << 4 | (0x1))); if (ptr2 == ((void *)0)) return ((void *)0); do { size_t oldsz_ = (old_alloc_size - (16 + sizeof(struct free_block))); size_t newsz_ = (size); if (oldsz_ <= newsz_) { size_t sz_ = newsz_ - oldsz_; sp_malloc_bytes_allocated += sz_; } else { size_t sz_ = oldsz_ - newsz_; ((void) ( (1) ? ( ((sz_ <= sp_malloc_bytes_allocated)) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",1073) ) : 1 )); sp_malloc_bytes_allocated -= sz_; } } while (0); *(size_t *)ptr2 = new_alloc_size; *((size_t *)ptr2+1) = 0xdeaddead; ptr = ptr2 + sizeof(struct free_block); { int i; char *p = ptr; size_t sz = (*(size_t *)((char *)ptr-sizeof(struct free_block))); sz -= (sizeof(struct free_block) + 16); for (i = 0; i < 16; i++) { char *p_i = (p + sz + i); *p_i = ((i+1) % 0xFF); } } return ptr; } # 1122 "../alloc.c" void SP_free(void * ptr) { size_t alloc_size; do{ ; if (!is_in_main_thread()) { __fprintf_chk (stderr, 2 - 1, "\n### ERROR: %s called outside main thread", "SP_free"); fflush(stderr); __fprintf_chk (stderr, 2 - 1, "\n### called in thread %ld, main is %ld\n", (long)sp_get_current_thread(), (long)sp_get_main_thread()); fflush(stderr); debug_break(); } } while (0); if (ptr != ((void *)0)) { alloc_size = *(size_t *)((char *)ptr-sizeof(struct free_block)); { int i; char *p = ptr; size_t sz = (*(size_t *)((char *)ptr-sizeof(struct free_block))); sz -= (sizeof(struct free_block) + 16); for (i = 0; i < 16; i++) { char *p_i = (p + sz + i); char c = *p_i; do { if (!((c == ((i+1) % 0xFF)))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((1141))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("SP_malloc block overrun on SP_realloc")) != ((void *)0) && (("SP_malloc block overrun on SP_realloc"))[0] != 0) ? ": " : ""), (("SP_malloc block overrun on SP_realloc"))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); } } do { if (!((alloc_size > ( 16 + sizeof(struct free_block) )))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((1145))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("")) != ((void *)0) && ((""))[0] != 0) ? ": " : ""), ((""))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); do { size_t sz_ = (alloc_size - ( 16 + sizeof(struct free_block) )); ((void) ( (1) ? ( ((sz_ <= sp_malloc_bytes_allocated)) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",1146) ) : 1 )); sp_malloc_bytes_allocated -= sz_; } while (0); checkdealloc((TAGGED *)((char *)ptr-sizeof(struct free_block)), alloc_size ,((0) << 4 | (0x1))); } } void * SP_memmove(void *dest, void *src, int n) { return ((__builtin_object_size (dest, 0) != (size_t) -1) ? __builtin___memmove_chk (dest, src, n, __builtin_object_size (dest, 0)) : __memmove_ichk (dest, src, n)); } #define STACK_FIBONACCI_SIZE 1 static size_t adjust_stack_size(size_t lobound) { size_t a, b; size_t lbwd = lobound >> 3; # 1174 "../alloc.c" a = 2584; b = 4181; while (b < lbwd) { b += a; a = b-a; } b = (((long)(b))<<3); if (b < lobound) { __fprintf_chk (stderr, 2 - 1, "Memory allocation failed (exceeded max stack size)\n"); do_memory_fault(("Memory allocation failed (exceeded max stack size)" " at " "../alloc.c" ":" "1182"), (29)); } return b; } # 1199 "../alloc.c" void trimcore(struct worker * w, int full) { struct free_block *lrg, *lrg2, *q, *q2, *cb; struct bigmem_link *bm, *bm2; size_t cb_size; int freeing = 1; size_t min_large_size = ( (25 -1)>=25 ? 0x7ffffffc : (25 -1)>=15 ? ((2<<3)<<4)<<((25 -1)-15) : ((25 -1)+1)<<(3 +1) ); if (full==0) { reclaim_dead_clauses(w); reclaim_dead_predicates(w); return; } else if (full==2 && w->node) { long min_heap = w->global_top - w->heap_start + (1024 + 128); long min_stack = w->local_top - w->stack_start + (2*256 + 16); size_t current_size = ((char *)(w->heap_end) - (char *)(w->heap_start)); size_t required_size = adjust_stack_size(required_heap_size(min_heap,min_stack)<<3); if (current_size > required_size) { resize_heap_and_stack(w, current_size, required_size, min_heap, min_stack); } current_size = ((char *)(w->trail_end) - (char *)(w->trail_start)); required_size = adjust_stack_size((((w->trail_top) - (w->trail_start)) + ((TAGGED *)(w->choice_start) - (TAGGED *)((TAGGED *)w->node)) + (2*256))<<3); if (current_size > required_size) { char *target = (char *)w->node - (current_size-required_size); (void)SP_memmove(target, (char *)w->node, ((char *)(w->choice_start) - (char *)(w->node))); w->node = (struct node *)target; w->trail_start = stackrealloc(w->trail_start, current_size, required_size, &required_size); w->trail_end = w->trail_start+(required_size>>3); w->choice_start = w->trail_end; calculate_segment_node(w); refresh_current_query(w); } } { struct mm *mm = engine_global.mm; (void)defragment_memory(mm); lrg = ((void *)0); q = mm->free_arr[25 -1]; mm->free_arr[25 -1] = ((void *)0); while (q) { q2 = q->next; q->next = lrg; lrg = q; q = q2; } bm = mm->bigmems_by_addr; cb = bigmem_block(bm, &cb_size); while (lrg && bm && freeing) { if (lrg <= cb) { if ((char *)lrg+lrg->size >= (char *)cb+cb_size) { long trailing = ((char *)lrg+lrg->size) - ((char *)cb+cb_size); lrg2 = lrg->next; bm2 = bm->next_addr; if (return_bigmem(bm,mm)) { bm = bm2; mm->total_free -= cb_size; if (trailing>0) { struct free_block *crumb = (struct free_block *)((char *)cb+cb_size); do { if (!((trailing >= sizeof(struct free_block)))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((1275))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("re-using too small block")) != ((void *)0) && (("re-using too small block"))[0] != 0) ? ": " : ""), (("re-using too small block"))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); crumb->size = trailing; ins_free_arr(crumb,mm); } if (lrg == cb) lrg = lrg2; else { do { if (!(((lrg->size - (cb_size + trailing)) >= sizeof(struct free_block)))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((1282))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("re-using too small block")) != ((void *)0) && (("re-using too small block"))[0] != 0) ? ": " : ""), (("re-using too small block"))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); lrg->size -= cb_size + trailing; if (lrg->size < min_large_size) { ins_free_arr(lrg,mm); lrg = lrg2; } } } else freeing = 0; } else bm = bm->next_addr; cb = bigmem_block(bm, &cb_size); } else { lrg2 = lrg->next; ins_free_arr(lrg,mm); lrg = lrg2; } } while (lrg) { lrg2 = lrg->next; ins_free_arr(lrg,mm); lrg = lrg2; } } } SP_BOOL prolog_trimcore(struct worker * w) { trimcore(w,(((SP_WORD)((w->term[0])))>>3)); return 1; } #define MEM_INITSIZE (832<<(9+LogSizeOfWord)) static int memman_init(struct mm *mm) { int i; struct free_block *free_list; { int boobytrap[((2<<3) <= sizeof(struct free_block)) ? 1 : -1]; (void)boobytrap; }; for (i=0; i<25; i++) { mm->free_arr[i] = ((void *)0); if (i >= 15) mm->free_arr_max[i-15] = 0; mm->alloc_dist[i] = 0; } mm->free_cache = ((void *)0); mm->total_in_use = 0L; mm->total_free = 0L; mm->bigmems_by_addr = ((void *)0); mm->bigmems_by_time = ((void *)0); free_list = get_aligned_block((832<<(9+3)),mm); ((void) ( (1) ? ( ((free_list != ((void *)0))) ? 1 : spio_assert_failure(__FUNCTION__, "../alloc.c",1342) ) : 1 )); if (free_list == ((void *)0)) return 0; ins_free_arr(free_list,mm); mm->total_in_use = 0L; mm->total_free = free_list->size; mm->recently_freed = 0; mm->recovery.ptr = ((void *)0); mm->culprit = -1; for (i=0; i<30; i++) mm->mm_bins[i] = 0; return 1; } void memman_reinit(struct mm *mm) { int i, j; TAGGED *ptr = mm->recovery.ptr; size_t size = mm->recovery.size; struct free_block *p, *q, **tail; if (ptr) { if (mm->free_cache) { ins_free_arr(mm->free_cache,mm); mm->free_cache = ((void *)0); } q = (struct free_block *)((char *)ptr+size); { if ((i=(size)>>(3 +1)) > 15) for (i>>=(4 +1), j=15; i && j<25 -1; j++) i>>=1; else j = i - 1; }; for (; j<25; j++) { tail = &mm->free_arr[j]; while ((p = *tail)) { size_t psize = p->size; if ((char *)p <= (char *)ptr && (char *)p+psize > (char *)ptr) { *tail = p->next; if ((char *)p < (char *)ptr) { do { if (!((((char *)ptr - (char *)p) >= sizeof(struct free_block)))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((1381))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("re-using too small block")) != ((void *)0) && (("re-using too small block"))[0] != 0) ? ": " : ""), (("re-using too small block"))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); p->size = (char *)ptr - (char *)p; ins_free_arr(p,mm); } if ((char *)q < (char *)p+psize) { do { if (!((((char *)p+psize - (char *)q) >= sizeof(struct free_block)))) { do{ __fprintf_chk (stderr, 2 - 1, "\n%s:%d ERROR: (debug break) ", (("../alloc.c")), (int)((1387))); __fprintf_chk (stderr, 2 - 1, "ASSERTION FAILED%s%s", (((("re-using too small block")) != ((void *)0) && (("re-using too small block"))[0] != 0) ? ": " : ""), (("re-using too small block"))); __fprintf_chk (stderr, 2 - 1, "\n"); fflush(stderr); debug_break(); }while(0); } } while (0); q->size = (char *)p+psize - (char *)q; ins_free_arr(q,mm); } mm->total_in_use += size; mm->total_free -= size; mm->recovery.ptr = ((void *)0); for (i=0; i<((2*(((size_t)(((size_t)((sizeof(struct bigmem_link) + sizeof(struct free_block))) + ((((2<<3)))-1)))) & ~(size_t)(((((2<<3))))-1)))>>3); i++) ptr[i] = mm->recovery.save_word[i]; return; } tail = &p->next; } } { SP_raise_fault("memman_reinit: internal error"); }; } } void memman_deinit(void) { struct bigmem_link *bm = engine_global.mm->bigmems_by_time; while (bm) { struct bigmem_link *bm2 = bm->next_time; (void)(*mm_free_hook)(bm->bigmem, bm->size, 1, mm_cookie); bm = bm2; } (*mm_deinit_alloc_hook)(mm_cookie); mm_cookie = ((void *)0); mem_initialized = 0; } int mem_start_level(void) { struct mm *mm = engine_global.mm; if (mem_initialized) return 0; if (!(*mm_init_alloc_hook)((2<<3), mm_cookie)) return 1; mem_initialized = 1; mm->bigmems_by_addr = ((void *)0); mm->bigmems_by_time = ((void *)0); mm->recently_freed = 0; if (!memman_init(mm)) { mem_initialized = 0; return 1; } engine_global.stats.last_user_time = engine_global.stats.last_total_user_time = engine_global.stats.start_user_time = usertime(); engine_global.stats.last_excluded_run_time = 0; engine_global.stats.legacy_lasttime = engine_global.stats.legacy_starttime = engine_global.stats.start_user_time; engine_global.stats.lastwall = engine_global.stats.startwall = walltime(); return 0; } struct mm_item { long count; char *msg; }; static int mm_compare(const void *p, const void *q) { return ((const struct mm_item *)q)->count - ((const struct mm_item *)p)->count; } static void minfo_display_bins(struct mm *mm) { int i, j; double total = (double)mm->total_in_use / 100.0; struct mm_item item[30]; for (i=0, j=0; i<30; i++) if (mm->mm_bins[i]>0) { item[j].count = mm->mm_bins[i]; item[j].msg = mm_msgs[i]; j++; } qsort(&item[0], j, sizeof(struct mm_item), (mm_compare)); for (i=0; i<j; i++) sp_ttyprintf("%24s %8ld (%2.1f%%)\n", item[i].msg, item[i].count, item[i].count/total); } SP_BOOL prolog_minfo(struct worker * w) { struct mm *mm = engine_global.mm; struct free_block *p; size_t free_space = 0; int i, tot_no_free = 0, class_no_free; int no_alloc = 0; (void)w; sp_ttyprintf("\nMemory Manager Info\n"); sp_ttyprintf( "*******************\n"); if ((p = mm->free_cache)) sp_ttyprintf("The exact cache contains a block of size %ld.\n", p->size); else sp_ttyprintf("The exact cache is empty.\n"); sp_ttyprintf(" Size Class Free blocks"); sp_ttyprintf(" Allocated blocks\n"); for (i=0; i < 25; i++) { int lb = ( (i)>=25 ? 0x7ffffffc : (i)>=15 ? ((2<<3)<<4)<<((i)-15) : ((i)+1)<<(3 +1) ); int ub = ( (i+1)>=25 ? 0x7ffffffc : (i+1)>=15 ? ((2<<3)<<4)<<((i+1)-15) : ((i+1)+1)<<(3 +1) ); class_no_free = 0; for (p = mm->free_arr[i]; p; p = p->next) { class_no_free++; tot_no_free++; free_space += p->size; if (p->size<lb || p->size>=ub || (p->size & ((2<<3)-1))) sp_ttyprintf("ERROR: $minfo: block at 0x%lx, expected %d-aligned size in [%d,%d), found %d\n", p, (2<<3), lb, ub, p->size); } sp_ttyprintf(" %8d: %8d %8d\n", lb, class_no_free, mm->alloc_dist[i]); no_alloc += mm->alloc_dist[i]; } sp_ttyprintf("Total nr of blocks: %8d %8d\n", tot_no_free, no_alloc); sp_ttyprintf("Total space: %8d %8d\n", mm->total_free, mm->total_in_use); minfo_display_bins(mm); sp_ttyprintf("No of compactions: %8d\n", engine_global.stats.defrag_count); sp_ttyflush(); return 1; } TAGGED *stackalloc(size_t size, size_t *actual_sizep) { TAGGED *ptr; size = adjust_stack_size(size); *actual_sizep = size; ptr = checkalloc(size,((29) << 4 | (0x0))); return ptr; } TAGGED *stackrealloc(TAGGED *ptr, size_t decr, size_t size, size_t *actual_sizep) { TAGGED *newptr; size = adjust_stack_size(size); *actual_sizep = size; newptr = checkrealloc(ptr,decr,size,((29) << 4 | (0x0))); return newptr; } void stackdealloc(TAGGED *ptr, size_t decr) { checkdealloc(ptr,decr,((29) << 4 | (0x0))); } SP_int64 program_in_use(void) { struct worker * w = self; return engine_global.mm->total_in_use - ((char *)(w->heap_end) - (char *)(w->heap_start)) - ((char *)(w->trail_end) - (char *)(w->trail_start)); } SP_int64 program_free(void) { return engine_global.mm->total_free; } SP_BOOL prolog_program_usage(struct worker * w) { TAGGED x; SP_int64 p_in_use = program_in_use(); SP_int64 p_free = program_free(); { TAGGED makelst_car = ((((TAGGED)((((long)(p_free))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(p_free)<<3))+03) : make_integer(w,p_free))); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = ((((TAGGED)((atom_nil_enum)) << 3) + (07))), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; { TAGGED makelst_car = ((((TAGGED)((((long)(p_in_use))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(p_in_use)<<3))+03) : make_integer(w,p_in_use))); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = (x), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; return cunify(w,(w->term[0]),x); } static SP_INTEGER total_usage(void) { return engine_global.mm->total_in_use + engine_global.mm->total_free; } SP_BOOL prolog_total_usage(struct worker * w) { TAGGED x; SP_INTEGER n = total_usage(); { TAGGED makelst_car = (((TAGGED)03)); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = ((((TAGGED)((atom_nil_enum)) << 3) + (07))), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; { TAGGED makelst_car = ((((TAGGED)((((long)(n))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(n)<<3))+03) : make_integer(w,n))); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = (x), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; return cunify(w,(w->term[0]),x); } SP_BOOL prolog_mm_usage(struct worker * w) { TAGGED x; { TAGGED makelst_car = ((((TAGGED)((((long)(engine_global.mm->total_free))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(engine_global.mm->total_free)<<3))+03) : make_integer(w,engine_global.mm->total_free))); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = ((((TAGGED)((atom_nil_enum)) << 3) + (07))), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; { TAGGED makelst_car = ((((TAGGED)((((long)(engine_global.mm->total_in_use))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(engine_global.mm->total_in_use)<<3))+03) : make_integer(w,engine_global.mm->total_in_use))); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = (x), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; return cunify(w,(w->term[0]),x); } SP_BOOL prolog_defrag_usage(struct worker * w) { SP_int64 t; TAGGED x; t= engine_global.stats.defrag_time; { TAGGED makelst_car = ((((TAGGED)((((long)(t))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(t)<<3))+03) : make_integer(w,t))); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = ((((TAGGED)((atom_nil_enum)) << 3) + (07))), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; t= engine_global.stats.defrag_count; { TAGGED makelst_car = ((((TAGGED)((((long)(t))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(t)<<3))+03) : make_integer(w,t))); (*(w->global_top) = (makelst_car), (w->global_top)++); (*(w->global_top) = (x), (w->global_top)++); x = (((TAGGED)(((w->global_top) + (-2))))+02); }; return cunify(w,x,(w->term[0])); } TAGGED mm_statistics(struct worker * w) { TAGGED *h = w->global_top; TAGGED stat_data = (((TAGGED)(h))+01); int i; *h++ = ((((((TAGGED)((atom_list_enum)) << 3) + (07))) & ~((long)(256 -1)<<((sizeof(char *)<<3)-9))) | (((long)(30))<<((sizeof(char *)<<3)-9))); w->global_top = h+30; for (i=0; i<30; i++) *h++ = (((TAGGED)((((long)(engine_global.mm->mm_bins[i]))>>((sizeof(char *)<<3)-3 -1))+1) <= 1) ? (((TAGGED)((SP_WORD)(engine_global.mm->mm_bins[i])<<3))+03) : make_integer(w,engine_global.mm->mm_bins[i])); return stat_data; }
Fix: No known workaround
Next time don't copy and paste the preprocessed source into the bug but instead attach it.
*** This bug has been marked as a duplicate of 30286 ***