// /usr/libexec/gcc/i686-pc-linux-gnu/3.4.4/cc1plus -quiet -I../src/include/gen -I../src/include -I../src/vulcan -I../extern/icu/source/common -I../extern/icu/source/i18n -MMD ../temp/boot/common/classes/ClumpletReader.d -MQ ../temp/boot/common/classes/ClumpletReader.o -D_GNU_SOURCE -DBOOT_BUILD -DNAMESPACE=Vulcan -DUSE_VALGRIND -DLINUX -DDEV_BUILD ../src/common/classes/ClumpletReader.cpp -quiet -dumpbase ClumpletReader.cpp -mtune=pentiumpro -auxbase-strip ../temp/boot/common/classes/ClumpletReader.o -ggdb -Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -p -fPIC -fmessage-length=0 -o - -frandom-seed=0 # 1 "../src/common/classes/ClumpletReader.cpp" # 1 "/home/firebird/develop/c/firebird-2.0.0.12654-RC2/gen//" # 1 "" # 1 "" # 1 "../src/common/classes/ClumpletReader.cpp" # 29 "../src/common/classes/ClumpletReader.cpp" # 1 "../src/include/firebird.h" 1 # 34 "../src/include/firebird.h" # 1 "../src/include/gen/autoconfig.h" 1 # 35 "../src/include/firebird.h" 2 namespace Vulcan{} using namespace Vulcan; # 76 "../src/include/firebird.h" # 1 "../src/include/fb_exception.h" 1 # 33 "../src/include/fb_exception.h" # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/exception" 1 3 # 40 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/exception" 3 extern "C++" { namespace std { # 52 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/exception" 3 class exception { public: exception() throw() { } virtual ~exception() throw(); virtual const char* what() const throw(); }; class bad_exception : public exception { public: bad_exception() throw() { } virtual ~bad_exception() throw(); }; typedef void (*terminate_handler) (); typedef void (*unexpected_handler) (); terminate_handler set_terminate(terminate_handler) throw(); void terminate() __attribute__ ((__noreturn__)); unexpected_handler set_unexpected(unexpected_handler) throw(); void unexpected() __attribute__ ((__noreturn__)); # 100 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/exception" 3 bool uncaught_exception() throw(); } namespace __gnu_cxx { # 115 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/exception" 3 void __verbose_terminate_handler (); } } # 34 "../src/include/fb_exception.h" 2 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 151 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 3 4 typedef int ptrdiff_t; # 213 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 3 4 typedef unsigned int size_t; # 35 "../src/include/fb_exception.h" 2 # 1 "/usr/include/string.h" 1 3 4 # 26 "/usr/include/string.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 309 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 310 "/usr/include/features.h" 2 3 4 # 332 "/usr/include/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 333 "/usr/include/features.h" 2 3 4 # 27 "/usr/include/string.h" 2 3 4 extern "C" { # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 34 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *memrchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); # 1 "/usr/include/xlocale.h" 1 3 4 # 28 "/usr/include/xlocale.h" 3 4 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; # 119 "/usr/include/string.h" 2 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 165 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strcasestr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); # 281 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); # 426 "/usr/include/string.h" 3 4 } # 36 "../src/include/fb_exception.h" 2 # 1 "../src/include/fb_types.h" 1 # 49 "../src/include/fb_types.h" typedef long SLONG; typedef unsigned long ULONG; typedef struct { SLONG high; ULONG low; } SQUAD; typedef char SCHAR; typedef unsigned char UCHAR; typedef short SSHORT; typedef unsigned short USHORT; typedef SCHAR ISC_SCHAR; typedef UCHAR ISC_UCHAR; typedef SSHORT ISC_SHORT; typedef USHORT ISC_USHORT; typedef SLONG ISC_LONG; typedef ULONG ISC_ULONG; # 1 "../src/include/types_pub.h" 1 # 37 "../src/include/types_pub.h" typedef void* FB_API_HANDLE; typedef long ISC_STATUS; typedef ISC_STATUS ISC_STATUS_ARRAY[20]; # 73 "../src/include/types_pub.h" typedef signed long ISC_LONG; typedef unsigned long ISC_ULONG; typedef signed short ISC_SHORT; typedef unsigned short ISC_USHORT; typedef unsigned char ISC_UCHAR; typedef char ISC_SCHAR; # 91 "../src/include/types_pub.h" typedef long long int ISC_INT64; typedef unsigned long long int ISC_UINT64; typedef int ISC_DATE; typedef unsigned int ISC_TIME; typedef struct { ISC_DATE timestamp_date; ISC_TIME timestamp_time; } ISC_TIMESTAMP; struct GDS_QUAD_t { ISC_LONG gds_quad_high; ISC_ULONG gds_quad_low; }; typedef struct GDS_QUAD_t GDS_QUAD; typedef struct GDS_QUAD_t ISC_QUAD; # 80 "../src/include/fb_types.h" 2 struct vary { USHORT vary_length; char vary_string[1]; }; struct lstring { ULONG lstr_length; ULONG lstr_allocated; UCHAR* lstr_address; }; typedef unsigned char BOOLEAN; typedef char TEXT; typedef unsigned char BYTE; typedef long IPTR; typedef unsigned long U_IPTR; typedef void (*FPTR_VOID) (); typedef void (*FPTR_VOID_PTR) (void*); typedef int (*FPTR_INT) (); typedef int (*FPTR_INT_VOID_PTR) (void*); typedef void (*FPTR_PRINT_CALLBACK) (void*, SSHORT, const char*); typedef void (*FPTR_VERSION_CALLBACK)(void*, const char*); typedef void (*FPTR_EVENT_CALLBACK)(void*, USHORT, const UCHAR*); typedef void (*FPTR_ERROR) (ISC_STATUS, ...); typedef ULONG RCRD_OFFSET; typedef USHORT FLD_LENGTH; typedef IPTR LOCK_OWNER_T; typedef int (*lock_ast_t)(void*); typedef IPTR FB_THREAD_ID; # 37 "../src/include/fb_exception.h" 2 namespace Firebird { class StringsBuffer { public: virtual char* alloc(const char* string, size_t length) = 0; virtual ~StringsBuffer() {} }; template class CircularStringsBuffer : public StringsBuffer { public: CircularStringsBuffer() throw() { memset(buffer, 0, BUFFER_SIZE); buffer_ptr = buffer; } virtual char* alloc(const char* string, size_t length) { if (buffer_ptr + length + 1 > buffer + BUFFER_SIZE) buffer_ptr = buffer; char* new_string = buffer_ptr; memcpy(new_string, string, length); new_string[length] = 0; buffer_ptr += length + 1; return new_string; } private: char buffer[BUFFER_SIZE]; char *buffer_ptr; }; class status_exception : public std::exception { public: status_exception(const ISC_STATUS *status_vector, bool permanent) throw(); virtual ~status_exception() throw(); virtual const char* what() const throw() { return "Firebird::status_exception"; } const ISC_STATUS* value() const throw() { return m_status_vector; } bool strings_permanent() const throw() { return m_strings_permanent; } bool status_known() const throw() { return m_status_known; } static void raise(const ISC_STATUS *status_vector); static void raise(); static void raise(ISC_STATUS status, ...); protected: status_exception() throw(); void set_status(const ISC_STATUS *new_vector, bool permanent) throw(); private: ISC_STATUS_ARRAY m_status_vector; bool m_strings_permanent; bool m_status_known; void release_vector() throw(); }; class system_call_failed : public status_exception { private: int errorCode; public: system_call_failed(const char* v_syscall, int v_error_code); static void raise(const char* syscall, int error_code); static void raise(const char* syscall); int getErrorCode() const { return errorCode; } }; class fatal_exception : public status_exception { public: explicit fatal_exception(const char* message); static void raiseFmt(const char* format, ...); const char* what() const throw() { return reinterpret_cast(value()[3]); } static void raise(const char* message); }; ISC_STATUS stuff_exception(ISC_STATUS *status_vector, const std::exception& ex, StringsBuffer* sb = __null) throw(); const char* status_string(const char* string); const char* status_nstring(const char* string, size_t length); } # 77 "../src/include/firebird.h" 2 # 30 "../src/common/classes/ClumpletReader.cpp" 2 # 1 "../src/include/../common/classes/ClumpletReader.h" 1 # 32 "../src/include/../common/classes/ClumpletReader.h" # 1 "../src/include/../common/classes/alloc.h" 1 # 38 "../src/include/../common/classes/alloc.h" # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/cstddef" 1 3 # 46 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/cstddef" 3 # 47 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/cstddef" 3 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 49 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/cstddef" 2 3 namespace std { using ::ptrdiff_t; using ::size_t; } # 39 "../src/include/../common/classes/alloc.h" 2 # 1 "../src/include/../common/classes/../../include/fb_types.h" 1 # 41 "../src/include/../common/classes/alloc.h" 2 # 1 "../src/include/../common/classes/../../include/firebird.h" 1 # 42 "../src/include/../common/classes/alloc.h" 2 # 1 "/usr/include/stdio.h" 1 3 4 # 30 "/usr/include/stdio.h" 3 4 extern "C" { # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 35 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 28 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/bits/types.h" 2 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 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; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; # 129 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 130 "/usr/include/bits/types.h" 2 3 4 __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __off64_t; __extension__ typedef int __pid_t; __extension__ typedef struct { int __val[2]; } __fsid_t; __extension__ typedef long int __clock_t; __extension__ typedef unsigned long int __rlim_t; __extension__ typedef __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef int __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __fsfilcnt64_t; __extension__ typedef int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef int __intptr_t; __extension__ typedef unsigned int __socklen_t; # 37 "/usr/include/stdio.h" 2 3 4 typedef struct _IO_FILE FILE; # 62 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE __FILE; # 72 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/libio.h" 1 3 4 # 32 "/usr/include/libio.h" 3 4 # 1 "/usr/include/_G_config.h" 1 3 4 # 14 "/usr/include/_G_config.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 354 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 3 4 typedef unsigned int wint_t; # 15 "/usr/include/_G_config.h" 2 3 4 # 24 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 51 "/usr/include/wchar.h" 2 3 4 # 76 "/usr/include/wchar.h" 3 4 typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; # 25 "/usr/include/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 44 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/gconv.h" 1 3 4 # 28 "/usr/include/gconv.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 29 "/usr/include/gconv.h" 2 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 32 "/usr/include/gconv.h" 2 3 4 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__))); # 33 "/usr/include/libio.h" 2 3 4 # 53 "/usr/include/libio.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stdarg.h" 1 3 4 # 43 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 # 166 "/usr/include/libio.h" 3 4 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; 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; 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; void *__pad1; void *__pad2; int _mode; char _unused2[15 * sizeof (int) - 2 * sizeof (void *)]; }; 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_; # 354 "/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 "C" { extern int __underflow (_IO_FILE *) throw (); extern int __uflow (_IO_FILE *) throw (); extern int __overflow (_IO_FILE *, int) throw (); extern wint_t __wunderflow (_IO_FILE *) throw (); extern wint_t __wuflow (_IO_FILE *) throw (); extern wint_t __woverflow (_IO_FILE *, wint_t) throw (); # 444 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp) throw (); extern int _IO_putc (int __c, _IO_FILE *__fp) throw (); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); extern int _IO_peekc_locked (_IO_FILE *__fp) throw (); extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); # 474 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict) throw (); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list) throw (); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw (); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw (); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw (); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw (); extern void _IO_free_backup_area (_IO_FILE *) throw (); # 532 "/usr/include/libio.h" 3 4 } # 73 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 86 "/usr/include/stdio.h" 3 4 typedef _G_fpos64_t fpos_t; typedef _G_fpos64_t fpos64_t; # 138 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 139 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) throw (); extern int rename (__const char *__old, __const char *__new) throw (); # 167 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile (void) __asm__ ("" "tmpfile64"); extern FILE *tmpfile64 (void); extern char *tmpnam (char *__s) throw (); extern char *tmpnam_r (char *__s) throw (); # 196 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) throw () __attribute__ ((__malloc__)); extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 221 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 231 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); # 252 "/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) throw (); extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw (); extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw (); extern FILE *open_memstream (char **__restrict __bufloc, size_t *__restrict __sizeloc) throw (); extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); 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, ...) throw (); 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) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __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, ...) throw (); 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) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); # 454 "/usr/include/stdio.h" 3 4 extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 465 "/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); # 498 "/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); # 543 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream); # 559 "/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); # 620 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 631 "/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); # 675 "/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"); # 700 "/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) throw (); extern int feof (FILE *__stream) throw (); extern int ferror (FILE *__stream) throw (); extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw (); extern int ferror_unlocked (FILE *__stream) throw (); 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[]; # 748 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) throw (); extern int fileno_unlocked (FILE *__stream) throw (); # 767 "/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) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw (); extern void funlockfile (FILE *__stream) throw (); # 834 "/usr/include/stdio.h" 3 4 } # 43 "../src/include/../common/classes/alloc.h" 2 # 1 "../src/include/../jrd/common.h" 1 # 55 "../src/include/../jrd/common.h" # 1 "../src/include/firebird.h" 1 # 56 "../src/include/../jrd/common.h" 2 # 1 "/usr/include/stdlib.h" 1 3 4 # 33 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 34 "/usr/include/stdlib.h" 2 3 4 extern "C" { # 1 "/usr/include/bits/waitflags.h" 1 3 4 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/bits/waitstatus.h" 1 3 4 # 65 "/usr/include/bits/waitstatus.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/endian.h" 1 3 4 # 38 "/usr/include/endian.h" 2 3 4 # 66 "/usr/include/bits/waitstatus.h" 2 3 4 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; }; # 44 "/usr/include/stdlib.h" 2 3 4 # 96 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 140 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) throw (); extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __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) throw () __attribute__ ((__nonnull__ (1, 4))); extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))); extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))); extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))); extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))); extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))); extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))); __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))); # 424 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw (); extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 1 "/usr/include/sys/types.h" 1 3 4 # 29 "/usr/include/sys/types.h" 3 4 extern "C" { 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; typedef __loff_t loff_t; typedef __ino64_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off64_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 58 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 74 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 92 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 104 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 191 "/usr/include/sys/types.h" 3 4 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__))); # 216 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 31 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 23 "/usr/include/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 118 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 69 "/usr/include/bits/time.h" 3 4 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; # 67 "/usr/include/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/sys/select.h" 3 4 extern "C" { # 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 # 29 "/usr/include/sys/sysmacros.h" 3 4 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 220 "/usr/include/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; # 244 "/usr/include/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt_t; typedef __fsblkcnt64_t fsblkcnt_t; typedef __fsfilcnt64_t fsfilcnt_t; typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 23 "/usr/include/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/bits/sched.h" 1 3 4 # 83 "/usr/include/bits/sched.h" 3 4 struct __sched_param { int __sched_priority; }; # 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 struct _pthread_fastlock { long int __status; int __spinlock; }; typedef struct _pthread_descr_struct *_pthread_descr; 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 } # 434 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) throw () __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) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) throw () __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) throw () __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)); extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)); extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__malloc__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 25 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stddef.h" 1 3 4 # 26 "/usr/include/alloca.h" 2 3 4 extern "C" { extern void *alloca (size_t __size) throw (); } # 607 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)); extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw () __attribute__ ((__nonnull__ (1))); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern char *__secure_getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) throw () __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) throw (); extern int clearenv (void) throw (); # 691 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw () __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) throw () __attribute__ ((__nonnull__ (1))); extern int system (__const char *__command); extern char *canonicalize_file_name (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); # 749 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw (); 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) throw () __attribute__ ((__const__)); extern long int labs (long int __x) throw () __attribute__ ((__const__)); __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)); extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)); extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)); __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)); # 814 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))); extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))); extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))); extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))); extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))); extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))); extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __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) throw () __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) throw () __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) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) throw (); extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw (); extern int wctomb (char *__s, wchar_t __wchar) throw (); extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))); # 902 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) throw () __attribute__ ((__nonnull__ (1, 2, 3))); extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag); extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw (); extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw () __attribute__ ((__nonnull__ (1))); } # 59 "../src/include/../jrd/common.h" 2 # 1 "/usr/include/sys/param.h" 1 3 4 # 22 "/usr/include/sys/param.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/limits.h" 1 3 4 # 11 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/limits.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/syslimits.h" 1 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/limits.h" 1 3 4 # 122 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 # 144 "/usr/include/limits.h" 3 4 # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 # 153 "/usr/include/bits/posix1_lim.h" 3 4 # 1 "/usr/include/bits/local_lim.h" 1 3 4 # 36 "/usr/include/bits/local_lim.h" 3 4 # 1 "/usr/include/linux/limits.h" 1 3 4 # 37 "/usr/include/bits/local_lim.h" 2 3 4 # 154 "/usr/include/bits/posix1_lim.h" 2 3 4 # 145 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 # 149 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 # 34 "/usr/include/bits/xopen_lim.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 # 153 "/usr/include/limits.h" 2 3 4 # 123 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/limits.h" 2 3 4 # 8 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/syslimits.h" 2 3 4 # 12 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/limits.h" 2 3 4 # 23 "/usr/include/sys/param.h" 2 3 4 # 1 "/usr/include/linux/param.h" 1 3 4 # 1 "/usr/include/asm/param.h" 1 3 4 # 5 "/usr/include/linux/param.h" 2 3 4 # 25 "/usr/include/sys/param.h" 2 3 4 # 63 "../src/include/../jrd/common.h" 2 # 1 "../src/include/../jrd/../include/fb_macros.h" 1 # 66 "../src/include/../jrd/common.h" 2 # 1 "../src/include/../jrd/../include/fb_types.h" 1 # 67 "../src/include/../jrd/common.h" 2 # 788 "../src/include/../jrd/common.h" typedef long long int SINT64; typedef unsigned long long int UINT64; typedef long SATOM; typedef unsigned long UATOM; # 1003 "../src/include/../jrd/common.h" extern "C" { void GDS_breakpoint(int); } # 1049 "../src/include/../jrd/common.h" struct in_sw_tab_t { int in_sw; int in_spb_sw; const TEXT* in_sw_name; ULONG in_sw_value; ULONG in_sw_requires; ULONG in_sw_incompatibilities; USHORT in_sw_state; USHORT in_sw_msg; USHORT in_sw_min_length; const TEXT* in_sw_text; }; static const TEXT FB_SHORT_MONTHS[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "\0" }; static const TEXT* FB_LONG_MONTHS_UPPER[] = { "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER", 0 }; # 44 "../src/include/../common/classes/alloc.h" 2 # 1 "../src/include/../common/classes/fb_atomic.h" 1 # 85 "../src/include/../common/classes/fb_atomic.h" class AtomicCounter { public: typedef int counter_type; AtomicCounter(counter_type value = 0) : counter(value) {} ~AtomicCounter() {} counter_type exchangeAdd(counter_type value) { register counter_type result; __asm __volatile ( "lock; xaddl %0, %1" : "=r" (result), "=m" (counter) : "0" (value), "m" (counter)); return result; } counter_type operator +=(counter_type value) { return exchangeAdd(value) + value; } counter_type operator -=(counter_type value) { return exchangeAdd(-value) - value; } counter_type operator ++() { return exchangeAdd(1) + 1; } counter_type operator --() { return exchangeAdd(-1) - 1; } counter_type value() const { return counter; } private: volatile counter_type counter; }; # 45 "../src/include/../common/classes/alloc.h" 2 # 1 "../src/include/../common/classes/tree.h" 1 # 34 "../src/include/../common/classes/tree.h" # 1 "../src/include/../jrd/gdsassert.h" 1 # 24 "../src/include/../jrd/gdsassert.h" # 1 "../src/include/../jrd/../jrd/gds_proto.h" 1 # 30 "../src/include/../jrd/../jrd/gds_proto.h" # 1 "../src/include/../jrd/../jrd/../jrd/common.h" 1 # 31 "../src/include/../jrd/../jrd/gds_proto.h" 2 const SSHORT IB_PREFIX_TYPE = 0; const SSHORT IB_PREFIX_LOCK_TYPE = 1; const SSHORT IB_PREFIX_MSG_TYPE = 2; const ULONG ALLROOM = -1UL; const ULONG ALLOC_dont_report = 1L << 0; const ULONG ALLOC_silent = 1L << 1; const ULONG ALLOC_verbose = 1L << 2; const ULONG ALLOC_mark_current = 1L << 3; const ULONG ALLOC_check_each_call = 1L << 4; const ULONG ALLOC_dont_check = 1L << 5; extern "C" { void* gds__alloc_debug(SLONG, const TEXT*, ULONG); void gds_alloc_flag_unfreed(void*); void gds_alloc_report(ULONG, const char*, int); void* gds__alloc(SLONG); ISC_STATUS gds__decode(ISC_STATUS, USHORT*, USHORT*); void isc_decode_date(const ISC_QUAD*, void*); void isc_decode_sql_date(const ISC_DATE*, void*); void isc_decode_sql_time(const ISC_TIME*, void*); void isc_decode_timestamp(const ISC_TIMESTAMP*, void*); ISC_STATUS gds__encode(ISC_STATUS, USHORT); void isc_encode_date(const void*, ISC_QUAD*); void isc_encode_sql_date(const void*, ISC_DATE*); void isc_encode_sql_time(const void*, ISC_TIME*); void isc_encode_timestamp(const void*, ISC_TIMESTAMP*); ULONG gds__free(void*); SLONG fb_interpret(char*, unsigned int, const ISC_STATUS**); SLONG gds__interprete(char*, ISC_STATUS**); void gds__interprete_a(SCHAR*, SSHORT*, ISC_STATUS*, SSHORT*); void gds__log(const TEXT*, ...); void gds__trace(const char*); void gds__trace_raw(const char*, unsigned int = 0); void gds__log_status(const TEXT*, const ISC_STATUS*); int gds__msg_close(void*); SSHORT gds__msg_format(void* handle, USHORT facility, USHORT msgNumber, USHORT bufsize, TEXT* buffer, const TEXT* arg1, const TEXT* arg2, const TEXT* arg3, const TEXT* arg4, const TEXT* arg5); SSHORT gds__msg_lookup(void*, USHORT, USHORT, USHORT, TEXT*, USHORT*); int gds__msg_open(void**, const TEXT*); void gds__msg_put(void*, USHORT, USHORT, const TEXT*, const TEXT*, const TEXT*, const TEXT*, const TEXT*); void gds__prefix(TEXT*, const TEXT*); void gds__prefix_lock(TEXT*, const TEXT*); void gds__prefix_msg(TEXT*, const TEXT*); SLONG gds__get_prefix(SSHORT, const TEXT*); ISC_STATUS gds__print_status(const ISC_STATUS*); USHORT gds__parse_bpb(USHORT, const UCHAR*, USHORT*, USHORT*); USHORT gds__parse_bpb2(USHORT, const UCHAR*, SSHORT*, SSHORT*, USHORT*, USHORT*); SLONG gds__ftof(const SCHAR*, const USHORT length1, SCHAR*, const USHORT length2); int gds__print_blr(const UCHAR*, FPTR_PRINT_CALLBACK, void*, SSHORT); void gds__put_error(const TEXT*); void gds__qtoq(const void*, void*); void gds__register_cleanup(FPTR_VOID_PTR, void*); SLONG gds__sqlcode(const ISC_STATUS*); void gds__sqlcode_s(const ISC_STATUS*, ULONG*); void gds__temp_dir(TEXT*); void* gds__temp_file(BOOLEAN, const TEXT*, TEXT*, TEXT* = __null, BOOLEAN = 0); void gds__unregister_cleanup(FPTR_VOID_PTR, void*); BOOLEAN gds__validate_lib_path(const TEXT*, const TEXT*, TEXT*, SLONG); SLONG gds__vax_integer(const UCHAR*, SSHORT); void gds__vtof(const SCHAR*, SCHAR*, USHORT); void gds__vtov(const SCHAR*, char*, SSHORT); void isc_print_sqlerror(SSHORT, const ISC_STATUS*); void isc_sql_interprete(SSHORT, TEXT*, SSHORT); SINT64 isc_portable_integer(const UCHAR*, SSHORT); void gds__cleanup(void); void gds__ulstr(char* buffer, ULONG value, const int minlen, const char filler); void gds__default_printer(void*, SSHORT, const TEXT*); void gds__trace_printer(void*, SSHORT, const TEXT*); void gds__print_pool(class JrdMemoryPool*, const TEXT*, ...); # 156 "../src/include/../jrd/../jrd/gds_proto.h" } # 25 "../src/include/../jrd/gdsassert.h" 2 # 35 "../src/include/../common/classes/tree.h" 2 # 1 "../src/include/../common/classes/vector.h" 1 # 37 "../src/include/../common/classes/vector.h" namespace Firebird { template class Vector { public: Vector() : count(0) {} T& operator[](size_t index) { {if (!(index < count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 46); abort();}}; return data[index]; } const T& operator[](size_t index) const { {if (!(index < count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 50); abort();}}; return data[index]; } T* begin() { return data; } T* end() { return data + count; } const T* begin() const { return data; } const T* end() const { return data + count; } size_t getCount() const { return count; } size_t getCapacity() const { return Capacity; } void clear() { count = 0; } void insert(size_t index, const T& item) { {if (!(index <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 62); abort();}}; {if (!(count < Capacity)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 63); abort();}}; memmove(data + index + 1, data + index, sizeof(T) * (count++ - index)); data[index] = item; } size_t add(const T& item) { {if (!(count < Capacity)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 68); abort();}}; data[count++] = item; return count; } void remove(size_t index) { {if (!(index < count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 73); abort();}}; memmove(data + index, data + index + 1, sizeof(T) * (--count - index)); } void shrink(size_t newCount) { {if (!(newCount <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 77); abort();}}; count = newCount; } void join(const Vector& L) { {if (!(count + L.count <= Capacity)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 81); abort();}}; memcpy(data + count, L.data, sizeof(T) * L.count); count += L.count; } T* getBuffer(size_t capacityL) { {if (!(capacityL <= Capacity)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/vector.h", 88); abort();}}; count = capacityL; return data; } protected: size_t count; T data[Capacity]; }; template class DefaultComparator { public: static bool greaterThan(const T& i1, const T& i2) { return i1 > i2; } }; template class DefaultKeyValue { public: static const T& generate(const void* sender, const T& Item) { return Item; } }; template , typename Cmp = DefaultComparator > class SortedVector : public Vector { public: SortedVector() : Vector() {} bool find(const Key& item, size_t& pos) const { size_t highBound = this->count, lowBound = 0; while (highBound > lowBound) { const size_t temp = (highBound + lowBound) >> 1; if (Cmp::greaterThan(item, KeyOfValue::generate(this, this->data[temp]))) lowBound = temp + 1; else highBound = temp; } pos = lowBound; return highBound != this->count && !Cmp::greaterThan(KeyOfValue::generate(this, this->data[lowBound]), item); } size_t add(const Value& item) { size_t pos; find(KeyOfValue::generate(this, item), pos); insert(pos, item); return pos; } }; } # 41 "../src/include/../common/classes/tree.h" 2 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/new" 1 3 # 44 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/new" 3 extern "C++" { namespace std { class bad_alloc : public exception { public: bad_alloc() throw() { } virtual ~bad_alloc() throw(); }; struct nothrow_t { }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler) throw(); } # 82 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/new" 3 void* operator new(std::size_t) throw (std::bad_alloc); void* operator new[](std::size_t) throw (std::bad_alloc); void operator delete(void*) throw(); void operator delete[](void*) throw(); void* operator new(std::size_t, const std::nothrow_t&) throw(); void* operator new[](std::size_t, const std::nothrow_t&) throw(); void operator delete(void*, const std::nothrow_t&) throw(); void operator delete[](void*, const std::nothrow_t&) throw(); inline void* operator new(std::size_t, void* __p) throw() { return __p; } inline void* operator new[](std::size_t, void* __p) throw() { return __p; } inline void operator delete (void*, void*) throw() { } inline void operator delete[](void*, void*) throw() { } } # 42 "../src/include/../common/classes/tree.h" 2 namespace Firebird { static inline bool NEED_MERGE(int current_count, int page_count) { return current_count * 4 / 3 <= page_count; } # 59 "../src/include/../common/classes/tree.h" const int LEAF_PAGE_SIZE = 400; const int NODE_PAGE_SIZE = 3000; const int MAX_TREE_LEVEL = 30; class MallocAllocator { public: void *allocate(size_t size) { return malloc(size); } void deallocate(void *p) { free(p); } }; enum LocType { locEqual, locLess, locGreat, locGreatEqual, locLessEqual }; # 103 "../src/include/../common/classes/tree.h" template , typename Cmp = DefaultComparator, int LeafCount = LEAF_PAGE_SIZE / sizeof(Value), int NodeCount = NODE_PAGE_SIZE / sizeof(void*)> class BePlusTree { public: BePlusTree(Allocator *_pool) : pool(_pool), level(0), root(__null), defaultAccessor(this) { } void clear() { if (!root) return; void *temp = root; for (int i = level; i > 0; i--) temp = (*(NodeList *)temp)[0]; ItemList *items = (ItemList *)temp; NodeList *lists = items->parent; while ( items ) { ItemList *t = items->next; items->~ItemList(); pool->deallocate(items); items = t; } while (lists) { NodeList *list = lists; lists = lists->parent; while ( list ) { NodeList *t = list->next; list->~NodeList(); pool->deallocate(list); list = t; } } root = __null; level = 0; } ~BePlusTree() { clear(); } bool isEmpty() const { return root == __null || (level == 0 && ((ItemList*)root)->getCount() == 0); } bool add(const Value& item); bool fastRemove() { return defaultAccessor.fastRemove(); } bool locate(const Key& key) { return defaultAccessor.locate(locEqual, key); } bool locate(LocType lt, const Key& key) { return defaultAccessor.locate(lt, key); } bool getFirst() { return defaultAccessor.getFirst(); } bool getLast() { return defaultAccessor.getLast(); } bool getNext() { return defaultAccessor.getNext(); } bool getPrev() { return defaultAccessor.getPrev(); } Value& current() const { return defaultAccessor.current(); } bool seemsBiggerThan(const BePlusTree &other) const { if (level != other.level) return level > other.level; if (level == 0) { if (root == __null) return other.root == __null; if (other.root == __null) return true; return ((ItemList*) root)->getCount() > ((ItemList*) other.root)->getCount(); } return ((NodeList*) root)->getCount() > ((NodeList*) other.root)->getCount(); } size_t approxCount() const { if (!root) return 0; if (level == 0) return ((ItemList*)root)->getCount(); size_t items_per_node = LeafCount * 3 / 5; for (int i = 1; i < level; i++) items_per_node *= NodeCount * 3 / 5; {if (!(items_per_node)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/tree.h", 209); abort();}}; return ((NodeList*)root)->getCount() * items_per_node; } size_t approxSize() const { if (!root) return 0; if (level == 0) return sizeof(ItemList); size_t bytes_per_node = sizeof(ItemList); for (int i = 1; i < level; i++) bytes_per_node *= NodeCount * 3 / 5; {if (!(bytes_per_node)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/tree.h", 227); abort();}}; return ((NodeList*)root)->getCount() * bytes_per_node; } private: BePlusTree(Allocator *_pool, void *rootPage) : pool(_pool), level(0), root(new(rootPage) ItemList()), defaultAccessor(this) {} class NodeList; class ItemList : public SortedVector { public: NodeList *parent; ItemList *next, *prev; ItemList(ItemList *items) : parent(__null) { if ( (next = items->next) ) next->prev = this; prev = items; items->next = this; } ItemList() : parent(__null), next(__null), prev(__null) {} friend class BePlusTree; friend class BePlusTree::NodeList; friend class BePlusTree::Accessor; }; class NodeList : public SortedVector { public: NodeList(NodeList *items) : parent(__null) { if ( (next = items->next) ) next->prev = this; prev = items; items->next = this; } NodeList() : parent(__null), next(__null), prev(__null) {} int level; NodeList *parent; NodeList *next, *prev; static const Key& generate(const void *sender, void *item) { for (int lev = ((NodeList *)sender)->level; lev > 0; lev--) item = *((NodeList *)item)->begin(); return KeyOfValue::generate(item, *((ItemList *)item)->begin()); } static void setNodeParentAndLevel(void *node, int level, NodeList *parent) { if (level) { ((NodeList *)node)->parent = parent; ((NodeList *)node)->level = level - 1; } else ((ItemList *)node)->parent = parent; } static void setNodeParent(void *node, int level, NodeList *parent) { if (level) ((NodeList *)node)->parent = parent; else ((ItemList *)node)->parent = parent; } }; public: class Accessor { public: Accessor(BePlusTree* _tree) : tree(_tree), curr(__null), curPos(0) {} bool fastRemove() { if ( !tree->level ) { curr->remove(curPos); return curPos < curr->getCount(); } if ( curr->getCount() == 1 ) { {if (!(curPos == 0)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/tree.h", 318); abort();}}; ItemList *temp; if ( (temp = curr->prev) && NEED_MERGE(temp->getCount(), LeafCount) ) { temp = curr->next; tree->_removePage(0, curr); curr = temp; return curr; } if ( (temp = curr->next) && NEED_MERGE(temp->getCount(), LeafCount) ) { tree->_removePage(0, curr); curr = temp; return true; } if ( (temp = curr->prev) ) { (*curr)[0] = (*temp)[temp->getCount() - 1]; temp->shrink(temp->getCount() - 1); curr = curr->next; return curr; } if ( (temp = curr->next) ) { (*curr)[0] = (*temp)[0]; temp->remove(0); return true; } {if (!(false)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/tree.h", 343); abort();}}; return false; } curr->remove(curPos); ItemList *temp; if ( (temp = curr->prev) && NEED_MERGE(temp->getCount() + curr->getCount(), LeafCount) ) { curPos += temp->getCount(); temp->join(*curr); tree->_removePage(0, curr); curr = temp; } else { if ( (temp = curr->next) && NEED_MERGE(temp->getCount() + curr->getCount(), LeafCount) ) { curr->join(*temp); tree->_removePage(0, temp); return true; } } if (curPos >= curr->getCount()) { {if (!(curPos == curr->getCount())) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/tree.h", 365); abort();}}; curPos = 0; curr = curr->next; return curr; } return true; } bool locate(const Key& key) { return locate(locEqual, key); } bool locate(LocType lt, const Key& key) { void *list = tree->root; if (!list) return false; for (int lev = tree->level; lev; lev--) { size_t pos; if (!((NodeList *)list)->find(key, pos)) if ( pos > 0 ) pos--; list = (*(NodeList *)list)[pos]; } curr = (ItemList *)list; const bool found = curr->find(key, curPos); switch (lt) { case locEqual: return found; case locGreatEqual: if (curPos == curr->getCount()) { curr = curr->next; curPos = 0; } return found || curr; case locLessEqual: if (found) return true; case locLess: if (curPos == 0) { curr = curr->prev; if (!curr) return false; curPos = curr->getCount() - 1; } else curPos--; return true; case locGreat: if (found) curPos++; if (curPos == curr->getCount()) { curr = curr->next; curPos = 0; } return curr != 0; } return false; } bool getFirst() { void *items = tree->root; if (!items) return false; for (int i = tree->level; i > 0; i--) items = (*(NodeList *)items)[0]; curr = (ItemList *)items; curPos = 0; return ((ItemList *)items)->getCount(); } bool getLast() { void *items = tree->root; if (!items) return false; for (int i = tree->level; i > 0; i--) items = (*(NodeList *)items)[((NodeList *)items)->getCount() - 1]; curr = (ItemList *)items; if (((ItemList *)items)->getCount()) { curPos = ((ItemList *)items)->getCount() - 1; return true; } return false; } bool getNext() { curPos++; if (curPos >= curr->getCount()) { if (curr->next) { curr = curr->next; curPos = 0; } else { curPos--; return false; } } return true; } bool getPrev() { if (curPos == 0) { if (curr->prev) { curr = curr->prev; curPos = curr->getCount() - 1; } else { curPos = 0; return false; } } else curPos--; return true; } Value& current() const { return (*curr)[curPos]; } private: BePlusTree* tree; ItemList *curr; size_t curPos; }; private: Allocator *pool; int level; void *root; Accessor defaultAccessor; void _removePage(int level, void *node); friend class MemoryPool; friend class NodeList; friend class Accessor; }; template bool BePlusTree::add(const Value& item) { if (!root) root = new (pool->allocate(sizeof(ItemList))) ItemList(); void *vList = this->root; const Key& key = KeyOfValue::generate(__null, item); for (int lev = this->level; lev > 0 ; lev--) { size_t pos; if (!((NodeList *)vList)->find(key, pos)) if ( pos > 0 ) pos--; vList = (*(NodeList *)vList)[pos]; } ItemList *leaf = (ItemList *)vList; size_t pos; if (leaf->find(key, pos)) return false; if (leaf->getCount() < LeafCount) { leaf->insert(pos, item); return true; } ItemList *temp; if ((temp = leaf->next) && temp->getCount() < LeafCount) { if (pos == LeafCount) { temp->insert(0, item); } else { temp->insert(0, (*leaf)[LeafCount - 1]); leaf->shrink(LeafCount - 1); leaf->insert(pos, item); } return true; } if ((temp = leaf->prev) && temp->getCount() < LeafCount) { if (pos == 0) { temp->insert(temp->getCount(), item); } else { temp->insert(temp->getCount(), (*leaf)[0]); leaf->remove(0); leaf->insert(pos - 1, item); } return true; } ItemList *newLeaf = new(this->pool->allocate(sizeof(ItemList))) ItemList(leaf); int recovery_map[MAX_TREE_LEVEL]; if (pos == LeafCount) { newLeaf->insert(0, item); recovery_map[0] = -1; } else { newLeaf->insert(0, (*leaf)[LeafCount - 1]); leaf->shrink(leaf->getCount() - 1); leaf->insert(pos, item); recovery_map[0] = pos; } void *newNode = newLeaf; NodeList *nodeList = leaf->parent; int curLevel = 0; try { while (nodeList) { if (nodeList->getCount() < NodeCount) { NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList); nodeList->add(newNode); return true; } nodeList->find(NodeList::generate(nodeList, newNode), pos); NodeList *list; if ((list = nodeList->next) && list->getCount() < NodeCount) { if (pos == NodeCount) { NodeList::setNodeParentAndLevel(newNode, curLevel, list); list->insert(0, newNode); } else { void *t = (*nodeList)[NodeCount - 1]; NodeList::setNodeParent(t, curLevel, list); list->insert(0, t); nodeList->shrink(NodeCount - 1); NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList); nodeList->insert(pos, newNode); } return true; } if ((list = nodeList->prev) && list->getCount() < NodeCount) { if (pos == 0) { NodeList::setNodeParentAndLevel(newNode, curLevel, list); list->insert(list->getCount(), newNode); } else { void *t = (*nodeList)[0]; NodeList::setNodeParent(t, curLevel, list); list->insert(list->getCount(), t); nodeList->remove(0); NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList); nodeList->insert(pos - 1, newNode); } return true; } NodeList *newList = new(this->pool->allocate(sizeof(NodeList))) NodeList(nodeList); if (pos == NodeCount) { NodeList::setNodeParentAndLevel(newNode, curLevel, newList); newList->insert(0, newNode); recovery_map[curLevel + 1] = -1; } else { void *t = (*nodeList)[NodeCount - 1]; NodeList::setNodeParent(t, curLevel, newList); newList->insert(0, t); nodeList->shrink(NodeCount - 1); NodeList::setNodeParentAndLevel(newNode, curLevel, nodeList); nodeList->insert(pos, newNode); recovery_map[curLevel + 1] = pos; } newNode = newList; nodeList = nodeList->parent; curLevel++; } nodeList = new(this->pool->allocate(sizeof(NodeList))) NodeList(); nodeList->level = this->level; nodeList->insert(0, this->root); NodeList::setNodeParentAndLevel(newNode, this->level, nodeList); NodeList::setNodeParent(this->root, this->level, nodeList); nodeList->add(newNode); this->root = nodeList; this->level++; } catch(const std::exception&) { while (curLevel) { NodeList *itemL = reinterpret_cast(newNode); void *lower; if (recovery_map[curLevel] < 0) { lower = (*itemL)[0]; } else { lower = (*itemL->prev)[recovery_map[curLevel]]; itemL->prev->remove(recovery_map[curLevel]); itemL->prev->insert(itemL->prev->getCount(), (*itemL)[0]); NodeList::setNodeParent((*itemL)[0], curLevel - 1, itemL->prev); } itemL->~NodeList(); this->pool->deallocate(newNode); newNode = lower; curLevel--; } ItemList *itemL2 = reinterpret_cast(newNode); if (recovery_map[0] >= 0) { itemL2->prev->remove(recovery_map[0]); itemL2->prev->insert(itemL2->prev->getCount(), (*itemL2)[0]); } itemL2->~ItemList(); this->pool->deallocate(newNode); throw; } return true; } template void BePlusTree::_removePage(int nodeLevel, void *node) { NodeList *list; if (nodeLevel) { NodeList *temp = (NodeList *)node; if (temp->prev) temp->prev->next = temp->next; if (temp->next) temp->next->prev = temp->prev; list = temp->parent; } else { ItemList *temp = (ItemList *)node; if (temp->prev) temp->prev->next = temp->next; if (temp->next) temp->next->prev = temp->prev; list = temp->parent; } if ( list->getCount() == 1 ) { NodeList *temp; if ( (temp = list->prev) && NEED_MERGE(temp->getCount(), NodeCount) ) { _removePage(nodeLevel + 1, list); } else if ( (temp = list->next) && NEED_MERGE(temp->getCount(), NodeCount) ) { _removePage(nodeLevel + 1, list); } else if ( (temp = list->prev) ) { NodeList::setNodeParent( ((*list)[0] = (*temp)[temp->getCount() - 1]), nodeLevel, list); temp->shrink(temp->getCount() - 1); } else if ( (temp = list->next) ) { NodeList::setNodeParent( ((*list)[0] = (*temp)[0]), nodeLevel, list); temp->remove(0); } else { {if (!(false)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/tree.h", 757); abort();}}; } } else { size_t pos; const bool found = list->find(NodeList::generate(list, node), pos); {if (!(found)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/tree.h", 767); abort();}}; list->remove(pos); if (list == root && list->getCount() == 1) { root = (*list)[0]; level--; NodeList::setNodeParent(root, level, __null); list->~NodeList(); pool->deallocate(list); } else { NodeList *temp; if ( (temp = list->prev) && NEED_MERGE(temp->getCount() + list->getCount(), NodeCount) ) { temp->join(*list); for (size_t i = 0; i < list->getCount(); i++) NodeList::setNodeParent((*list)[i], nodeLevel, temp); _removePage(nodeLevel + 1, list); } else if ( (temp = list->next) && NEED_MERGE(temp->getCount() + list->getCount(), NodeCount) ) { list->join(*temp); for (size_t i = 0; i < temp->getCount(); i++) NodeList::setNodeParent((*temp)[i], nodeLevel, list); _removePage(nodeLevel + 1, temp); } } } if (nodeLevel) ((NodeList *)node)->~NodeList(); else ((ItemList *)node)->~ItemList(); pool->deallocate(node); } } # 46 "../src/include/../common/classes/alloc.h" 2 # 1 "../src/include/../common/classes/locks.h" 1 # 32 "../src/include/../common/classes/locks.h" # 1 "../src/include/firebird.h" 1 # 33 "../src/include/../common/classes/locks.h" 2 # 49 "../src/include/../common/classes/locks.h" namespace Firebird { # 137 "../src/include/../common/classes/locks.h" class Mutex { public: Mutex() { } ~Mutex() { } void enter() { } void leave() { } }; class MutexLockGuard { public: explicit MutexLockGuard(Mutex &alock) : lock(&alock) { lock->enter(); } ~MutexLockGuard() { lock->leave(); } private: MutexLockGuard(const MutexLockGuard& source); Mutex *lock; }; } # 47 "../src/include/../common/classes/alloc.h" 2 # 73 "../src/include/../common/classes/alloc.h" namespace Firebird { const int MAX_TREE_DEPTH = 4; const size_t ALLOC_ALIGNMENT = 4; static inline size_t MEM_ALIGN(size_t value) { return ((value + ALLOC_ALIGNMENT - 1) & ~(ALLOC_ALIGNMENT - 1)); } const USHORT MBK_LARGE = 1; const USHORT MBK_PARENT = 2; const USHORT MBK_USED = 4; const USHORT MBK_LAST = 8; const USHORT MBK_DELAYED = 16; struct FreeMemoryBlock { FreeMemoryBlock* fbk_next_fragment; }; struct MemoryBlock { USHORT mbk_flags; SSHORT mbk_type; union { struct { USHORT mbk_length; USHORT mbk_prev_length; } small; ULONG mbk_large_length; }; union { class MemoryPool* mbk_pool; FreeMemoryBlock* mbk_prev_fragment; }; const char mbk_valgrind_redzone[8]; }; struct MemoryRedirectList { MemoryBlock* mrl_prev; MemoryBlock* mrl_next; }; const SSHORT TYPE_POOL = -1; const SSHORT TYPE_EXTENT = -2; const SSHORT TYPE_LEAFPAGE = -3; const SSHORT TYPE_TREEPAGE = -4; struct BlockInfo { size_t bli_length; FreeMemoryBlock* bli_fragments; inline static const size_t& generate(const void* sender, const BlockInfo& i) { return i.bli_length; } }; struct MemoryExtent { MemoryExtent *mxt_next; MemoryExtent *mxt_prev; }; struct PendingFreeBlock { PendingFreeBlock *next; }; class MemoryStats { public: MemoryStats() : mst_usage(0), mst_mapped(0), mst_max_usage(0), mst_max_mapped(0) {} ~MemoryStats() {} size_t get_current_usage() const { return mst_usage.value(); } size_t get_maximum_usage() const { return mst_max_usage; } size_t get_current_mapping() const { return mst_mapped.value(); } size_t get_maximum_mapping() const { return mst_max_mapped; } private: MemoryStats(const MemoryStats& object) {} AtomicCounter mst_usage; AtomicCounter mst_mapped; size_t mst_max_usage; size_t mst_max_mapped; friend class MemoryPool; }; # 196 "../src/include/../common/classes/alloc.h" class MemoryPool { private: class InternalAllocator { public: void* allocate(size_t size) { return ((MemoryPool*)this)->tree_alloc(size); } void deallocate(void* block) { ((MemoryPool*)this)->tree_free(block); } }; typedef BePlusTree FreeBlocksTree; bool parent_redirect; FreeBlocksTree freeBlocks; MemoryExtent *extents; Vector spareLeafs; Vector spareNodes; bool needSpare; PendingFreeBlock *pendingFree; Mutex lock; AtomicCounter used_memory; size_t mapped_memory; MemoryPool *parent; MemoryBlock *parent_redirected, *os_redirected; size_t redirect_amount; MemoryStats *stats; void* delayedFree[1024]; int delayedFreeHandles[1024]; size_t delayedFreeCount; size_t delayedFreePos; static void* external_alloc(size_t &size); static void external_free(void* blk, size_t &size, bool pool_destroying); void* tree_alloc(size_t size); void tree_free(void* block); void updateSpare(); inline void addFreeBlock(MemoryBlock* blk); void removeFreeBlock(MemoryBlock* blk); void free_blk_extent(MemoryBlock* blk); void* internal_alloc(size_t size, SSHORT type = 0 ); void internal_deallocate(void* block); MemoryPool(const MemoryPool& pool) : freeBlocks((InternalAllocator*)this) { } inline void increment_usage(size_t size); inline void decrement_usage(size_t size); inline void increment_mapping(size_t size); inline void decrement_mapping(size_t size); protected: MemoryPool(MemoryPool* _parent, MemoryStats &_stats, void* first_extent, void* root_page); ~MemoryPool() { } static MemoryPool* internal_create(size_t instance_size, MemoryPool* parent = __null, MemoryStats &stats = default_stats_group); public: static MemoryStats default_stats_group; static MemoryPool* processMemoryPool; static MemoryPool* createPool(MemoryPool* parent = __null, MemoryStats &stats = default_stats_group) { return internal_create(sizeof(MemoryPool), parent, stats); } static MemoryPool* setContextPool(MemoryPool *newPool); static MemoryPool* getContextPool(); void setStatsGroup(MemoryStats &stats); static void deletePool(MemoryPool* pool); void* allocate(size_t size, SSHORT type = 0 ); void* allocate_nothrow(size_t size, SSHORT type = 0 ); void deallocate(void* block); bool verify_pool(bool fast_checks_only = false); void print_contents(FILE*, bool = false, const char* filter_path = 0); void print_contents(const char* filename, bool = false, const char* filter_path = 0); static void globalFree(void* block) { if (block) ((MemoryBlock*)((char*)block - MEM_ALIGN(sizeof(MemoryBlock))))->mbk_pool->deallocate(block); } void* calloc(size_t size, SSHORT type = 0 ) { void* result = allocate(size, type ); memset(result, 0, size); return result; } static SSHORT blk_type(const void* mem) { return ((MemoryBlock*)((char *)mem - MEM_ALIGN(sizeof(MemoryBlock))))->mbk_type; } friend class InternalAllocator; }; class ContextPoolHolder { public: ContextPoolHolder(MemoryPool* newPool) { savedPool = MemoryPool::setContextPool(newPool); } ~ContextPoolHolder() { MemoryPool::setContextPool(savedPool); } private: MemoryPool* savedPool; }; template class SubsystemContextPoolHolder : public ContextPoolHolder { public: SubsystemContextPoolHolder ( SubsystemThreadData* subThreadData, SubsystemPool* newPool ) : ContextPoolHolder(newPool), savedThreadData(subThreadData), savedPool(savedThreadData->getDefaultPool()) { savedThreadData->setDefaultPool(newPool); } ~SubsystemContextPoolHolder() { savedThreadData->setDefaultPool(savedPool); } private: SubsystemThreadData* savedThreadData; SubsystemPool* savedPool; }; } using Firebird::MemoryPool; inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; } void* operator new(size_t) throw (std::bad_alloc); void* operator new[](size_t) throw (std::bad_alloc); void operator delete(void* mem) throw(); void operator delete[](void* mem) throw(); # 453 "../src/include/../common/classes/alloc.h" inline void* operator new(size_t s, Firebird::MemoryPool& pool) { return pool.allocate(s); } inline void* operator new[](size_t s, Firebird::MemoryPool& pool) { return pool.allocate(s); } # 491 "../src/include/../common/classes/alloc.h" namespace Firebird { template class allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef T* pointer; typedef const T* const_pointer; typedef T& reference; typedef const T& const_reference; typedef T value_type; allocator(MemoryPool& p, SSHORT t = 0) : pool(&p), type(t) {} allocator(MemoryPool* p = getDefaultMemoryPool(), SSHORT t = 0) : pool(p), type(t) {} template allocator(const allocator &alloc) : pool(alloc.getPool()), type(alloc.getType()) { } pointer allocate(size_type s, const void* = 0) { return (pointer) pool->allocate(sizeof(T) * s, 0); } char* _Charalloc(size_type n) { return (char*) pool->allocate(n, 0); } void deallocate(pointer p, size_type s) { pool->deallocate(p); } void deallocate(void* p, size_type s) { pool->deallocate(p); } void construct(pointer p, const T& v) { new(p) T(v); } void destroy(pointer p) { p->~T(); } size_type max_size() const { return (size_type) - 1 / sizeof(T); } pointer address(reference X) const { return &X; } const_pointer address(const_reference X) const { return &X; } template struct rebind { typedef Firebird::allocator<_Tp1> other; }; bool operator==(const allocator& rhs) const { return pool == rhs.pool && type == rhs.type; } MemoryPool* getPool() const { return pool; } SSHORT getType() const { return type; } private: MemoryPool* pool; SSHORT type; }; # 561 "../src/include/../common/classes/alloc.h" class PermanentStorage { private: MemoryPool& pool; protected: explicit PermanentStorage(MemoryPool& p) : pool(p) { } MemoryPool& getPool() const { return pool; } }; class AutoStorage : public PermanentStorage { private: void ProbeStack() const; public: static MemoryPool& getAutoMemoryPool(); protected: AutoStorage() : PermanentStorage(getAutoMemoryPool()) { ProbeStack(); } explicit AutoStorage(MemoryPool& p) : PermanentStorage(p) { } }; } # 33 "../src/include/../common/classes/ClumpletReader.h" 2 # 1 "../src/include/../common/classes/array.h" 1 # 33 "../src/include/../common/classes/array.h" namespace Firebird { template class InlineStorage : public AutoStorage { public: explicit InlineStorage(MemoryPool& p) : AutoStorage(p) { } InlineStorage() : AutoStorage() { } protected: T* getStorage() { return buffer; } size_t getStorageSize() const { return Capacity; } private: T buffer[Capacity]; }; template class EmptyStorage : public AutoStorage { public: explicit EmptyStorage(MemoryPool& p) : AutoStorage(p) { } EmptyStorage() : AutoStorage() { } protected: T* getStorage() { return __null; } size_t getStorageSize() const { return 0; } }; template > class Array : protected Storage { public: explicit Array(MemoryPool& p) : Storage(p), count(0), capacity(this->getStorageSize()), data(this->getStorage()) { } Array(MemoryPool& p, size_t InitialCapacity) : Storage(p), count(0), capacity(this->getStorageSize()), data(this->getStorage()) { ensureCapacity(InitialCapacity); } Array() : count(0), capacity(this->getStorageSize()), data(this->getStorage()) { } explicit Array(size_t InitialCapacity) : count(0), capacity(this->getStorageSize()), data(this->getStorage()) { ensureCapacity(InitialCapacity); } ~Array() { freeData(); } void clear() { count = 0; } protected: const T& getElement(size_t index) const { {if (!(index < count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 88); abort();}}; return data[index]; } T& getElement(size_t index) { {if (!(index < count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 92); abort();}}; return data[index]; } void freeData() { if (data != this->getStorage()) this->getPool().deallocate(data); } public: Array& operator =(const Array& L) { ensureCapacity(L.count); memcpy(data, L.data, sizeof(T) * L.count); count = L.count; return *this; } const T& operator[](size_t index) const { return getElement(index); } T& operator[](size_t index) { return getElement(index); } const T& front() const { {if (!(count > 0)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 115); abort();}}; return *data; } const T& back() const { {if (!(count > 0)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 119); abort();}}; return *(data + count - 1); } const T* begin() const { return data; } const T* end() const { return data + count; } T& front() { {if (!(count > 0)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 125); abort();}}; return *data; } T& back() { {if (!(count > 0)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 129); abort();}}; return *(data + count - 1); } T* begin() { return data; } T* end() { return data + count; } void insert(size_t index, const T& item) { {if (!(index <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 135); abort();}}; ensureCapacity(count + 1); memmove(data + index + 1, data + index, sizeof(T) * (count++ - index)); data[index] = item; } void insert(size_t index, const Array& L) { {if (!(index <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 141); abort();}}; ensureCapacity(count + L.count); memmove(data + index + L.count, data + index, sizeof(T) * (count - index)); memcpy(data + index, L.data, L.count); count += L.count; } void insert(size_t index, const T* items, size_t itemsSize) { {if (!(index <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 148); abort();}}; ensureCapacity(count + itemsSize); memmove(data + index + itemsSize, data + index, sizeof(T) * (count - index)); memcpy(data + index, items, sizeof(T) * itemsSize); count += itemsSize; } size_t add(const T& item) { ensureCapacity(count + 1); data[count++] = item; return count; } void remove(size_t index) { {if (!(index < count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 160); abort();}}; memmove(data + index, data + index + 1, sizeof(T) * (--count - index)); } void removeRange(size_t from, size_t to) { {if (!(from <= to)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 164); abort();}}; {if (!(to <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 165); abort();}}; memmove(data + from, data + to, sizeof(T) * (count - to)); count -= (to - from); } void removeCount(size_t index, size_t n) { {if (!(index + n <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 170); abort();}}; memmove(data + index, data + index + n, sizeof(T) * (count - index - n)); count -= n; } void remove(T* itr) { const size_t index = itr - begin(); {if (!(index < count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 176); abort();}}; memmove(data + index, data + index + 1, sizeof(T) * (--count - index)); } void shrink(size_t newCount) { {if (!(newCount <= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 180); abort();}}; count = newCount; } void grow(size_t newCount) { {if (!(newCount >= count)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 185); abort();}}; ensureCapacity(newCount); memset(data + count, 0, sizeof(T) * (newCount - count)); count = newCount; } void join(const Array& L) { ensureCapacity(count + L.count); memcpy(data + count, L.data, sizeof(T) * L.count); count += L.count; } size_t getCount() const { return count; } size_t getCapacity() const { return capacity; } void push(const T& item) { add(item); } void push(const T* items, size_t itemsSize) { ensureCapacity(count + itemsSize); memcpy(data + count, items, sizeof(T) * itemsSize); count += itemsSize; } T pop() { {if (!(count > 0)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/array.h", 206); abort();}}; count--; return data[count]; } T* getBuffer(size_t capacityL) { ensureCapacity(capacityL); count = capacityL; return data; } void free() { clear(); freeData(); capacity = this->getStorageSize(); data = this->getStorage(); } protected: size_t count, capacity; T* data; void ensureCapacity(size_t newcapacity) { if (newcapacity > capacity) { if (newcapacity < capacity * 2) { newcapacity = capacity * 2; } T* newdata = reinterpret_cast (this->getPool().allocate(sizeof(T) * newcapacity )); memcpy(newdata, data, sizeof(T) * count); freeData(); data = newdata; capacity = newcapacity; } } }; template , typename Key = Value, typename KeyOfValue = DefaultKeyValue, typename Cmp = DefaultComparator > class SortedArray : public Array { public: SortedArray(MemoryPool& p, size_t s) : Array(p, s) {} explicit SortedArray(MemoryPool& p) : Array(p) {} explicit SortedArray(size_t s) : Array(s) {} SortedArray() : Array() {} bool find(const Key& item, size_t& pos) const { size_t highBound = this->count, lowBound = 0; while (highBound > lowBound) { const size_t temp = (highBound + lowBound) >> 1; if (Cmp::greaterThan(item, KeyOfValue::generate(this, this->data[temp]))) lowBound = temp + 1; else highBound = temp; } pos = lowBound; return highBound != this->count && !Cmp::greaterThan(KeyOfValue::generate(this, this->data[lowBound]), item); } size_t add(const Value& item) { size_t pos; find(KeyOfValue::generate(this, item), pos); insert(pos, item); return pos; } }; template class HalfStaticArray : public Array > { public: explicit HalfStaticArray(MemoryPool& p) : Array > (p) {} HalfStaticArray(MemoryPool& p, size_t InitialCapacity) : Array > (p, InitialCapacity) {} HalfStaticArray() : Array > () {} explicit HalfStaticArray(size_t InitialCapacity) : Array > (InitialCapacity) {} }; } # 34 "../src/include/../common/classes/ClumpletReader.h" 2 # 1 "../src/include/../common/classes/fb_string.h" 1 # 34 "../src/include/../common/classes/fb_string.h" # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stdarg.h" 1 3 4 # 35 "../src/include/../common/classes/fb_string.h" 2 # 1 "../src/include/../include/fb_types.h" 1 # 38 "../src/include/../common/classes/fb_string.h" 2 # 1 "../src/include/../include/fb_exception.h" 1 # 39 "../src/include/../common/classes/fb_string.h" 2 # 1 "../src/include/../include/gen/autoconfig.h" 1 # 41 "../src/include/../common/classes/fb_string.h" 2 namespace Firebird { class AbstractString : private AutoStorage { public: typedef char char_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef char* pointer; typedef const char* const_pointer; typedef char& reference; typedef const char& const_reference; typedef char value_type; typedef pointer iterator; typedef const_pointer const_iterator; static const size_type npos; enum {INLINE_BUFFER_SIZE = 32, INIT_RESERVE = 16 }; protected: typedef USHORT internal_size_type; char_type inlineBuffer[INLINE_BUFFER_SIZE]; char_type* stringBuffer; internal_size_type stringLength, bufferSize; private: inline void checkPos(size_type pos) const { if (pos >= length()) { fatal_exception::raise("Firebird::string - pos out of range"); } } static inline void checkLength(size_type len) { if (len > max_length()) { fatal_exception::raise("Firebird::string - length exceeds predefined limit"); } } void reserveBuffer(size_type newLen) { size_type newSize = newLen + 1; if (newSize > bufferSize) { checkLength(newLen); if (newSize / 2 < bufferSize) newSize = bufferSize * 2; if (newSize > max_length() + 1) newSize = max_length() + 1; char_type *newBuffer = new(getPool()) char_type[newSize]; memcpy(newBuffer, stringBuffer, sizeof(char_type) * (stringLength + 1)); if (stringBuffer != inlineBuffer) delete[] stringBuffer; stringBuffer = newBuffer; bufferSize = static_cast(newSize); } } void initialize(size_type len) { if (len < INLINE_BUFFER_SIZE) { stringBuffer = inlineBuffer; bufferSize = INLINE_BUFFER_SIZE; } else { stringBuffer = __null; checkLength(len); size_type newSize = len + 1 + INIT_RESERVE; if (newSize > max_length() + 1) newSize = max_length() + 1; stringBuffer = new(getPool()) char_type[newSize]; bufferSize = static_cast(newSize); } stringLength = static_cast(len); stringBuffer[stringLength] = 0; } void shrinkBuffer() { } protected: AbstractString(size_type sizeL, const_pointer datap); AbstractString(const_pointer p1, size_type n1, const_pointer p2, size_type n2); AbstractString(const AbstractString& v); inline AbstractString() : stringBuffer(inlineBuffer), stringLength(0), bufferSize(INLINE_BUFFER_SIZE) { stringBuffer[0] = 0; } AbstractString(size_type sizeL, char_type c); inline explicit AbstractString(MemoryPool& p) : AutoStorage(p), stringBuffer(inlineBuffer), stringLength(0), bufferSize(INLINE_BUFFER_SIZE) { stringBuffer[0] = 0; } inline AbstractString(MemoryPool& p, const AbstractString& v) : AutoStorage(p) { initialize(v.length()); memcpy(stringBuffer, v.c_str(), stringLength); } inline AbstractString(MemoryPool& p, const char_type* s, size_type l) : AutoStorage(p) { initialize(l); memcpy(stringBuffer, s, l); } pointer Modify(void) { return stringBuffer; } static void AdjustRange(size_type length, size_type& pos, size_type& n); pointer baseAssign(size_type n); pointer baseAppend(size_type n); pointer baseInsert(size_type p0, size_type n); void baseErase(size_type p0, size_type n); enum TrimType {TrimLeft, TrimRight, TrimBoth}; void baseTrim(TrimType WhereTrim, const_pointer ToTrim); public: inline const_pointer c_str() const { return stringBuffer; } inline size_type length() const { return stringLength; } inline const_pointer nullStr() const { return stringLength ? stringBuffer : 0; } inline size_type recalculate_length() { stringLength = strlen(stringBuffer); return stringLength; } void reserve(size_type n = 0); void resize(size_type n, char_type c = ' '); inline size_type copy_from(pointer s, size_type n, size_type pos = 0) const { AdjustRange(length(), pos, n); memcpy(s, c_str() + pos, n); return n; } inline size_type find(const AbstractString& str, size_type pos = 0) const { return find(str.c_str(), pos); } inline size_type find(const_pointer s, size_type pos = 0) const { const_pointer p = strstr(c_str() + pos, s); return p ? p - c_str() : npos; } inline size_type find(char_type c, size_type pos = 0) const { const_pointer p = strchr(c_str() + pos, c); return p ? p - c_str() : npos; } inline size_type rfind(const AbstractString& str, size_type pos = npos) const { return rfind(str.c_str(), pos); } size_type rfind(const_pointer s, size_type pos = npos) const; size_type rfind(char_type c, size_type pos = npos) const; inline size_type find_first_of(const AbstractString& str, size_type pos = 0) const { return find_first_of(str.c_str(), pos, str.length()); } size_type find_first_of(const_pointer s, size_type pos, size_type n) const; inline size_type find_first_of(const_pointer s, size_type pos = 0) const { return find_first_of(s, pos, strlen(s)); } inline size_type find_first_of(char_type c, size_type pos = 0) const { return find(c, pos); } inline size_type find_last_of(const AbstractString& str, size_type pos = npos) const { return find_last_of(str.c_str(), pos, str.length()); } size_type find_last_of(const_pointer s, size_type pos, size_type n = npos) const; inline size_type find_last_of(const_pointer s, size_type pos = npos) const { return find_last_of(s, pos, strlen(s)); } inline size_type find_last_of(char_type c, size_type pos = npos) const { return rfind(c, pos); } inline size_type find_first_not_of(const AbstractString& str, size_type pos = 0) const { return find_first_not_of(str.c_str(), pos, str.length()); } size_type find_first_not_of(const_pointer s, size_type pos, size_type n) const; inline size_type find_first_not_of(const_pointer s, size_type pos = 0) const { return find_first_not_of(s, pos, strlen(s)); } inline size_type find_first_not_of(char_type c, size_type pos = 0) const { const char s[2] = {c, 0}; return find_first_not_of(s, pos, 1); } inline size_type find_last_not_of(const AbstractString& str, size_type pos = npos) const { return find_last_not_of(str.c_str(), pos, str.length()); } size_type find_last_not_of(const_pointer s, size_type pos, size_type n = npos) const; inline size_type find_last_not_of(const_pointer s, size_type pos = npos) const { return find_last_not_of(s, pos, strlen(s)); } inline size_type find_last_not_of(char_type c, size_type pos = npos) const { const char s[2] = {c, 0}; return find_last_not_of(s, pos, 1); } inline iterator begin() { return Modify(); } inline const_iterator begin() const { return c_str(); } inline iterator end() { return Modify() + length(); } inline const_iterator end() const { return c_str() + length(); } inline const_reference at(size_type pos) const { checkPos(pos); return c_str()[pos]; } inline reference at(size_type pos) { checkPos(pos); return Modify()[pos]; } inline const_reference operator[](size_type pos) const { return at(pos); } inline reference operator[](size_type pos) { return at(pos); } inline const_pointer data() const { return c_str(); } inline size_type size() const { return length(); } static inline size_type max_length() { return 0xfffe; } inline size_type capacity() const { return bufferSize - 1; } inline bool empty() const { return length() == 0; } inline bool hasData() const { return !empty(); } inline bool isEmpty() const { return empty(); } void upper(); void lower(); inline void ltrim(const_pointer ToTrim = " ") { baseTrim(TrimLeft, ToTrim); } inline void rtrim(const_pointer ToTrim = " ") { baseTrim(TrimRight, ToTrim); } inline void trim(const_pointer ToTrim = " ") { baseTrim(TrimBoth, ToTrim); } inline void alltrim(const_pointer ToTrim = " ") { baseTrim(TrimBoth, ToTrim); } bool LoadFromFile(FILE *file); void vprintf(const char* Format, va_list params); void printf(const char* Format, ...); inline int copyTo(pointer to, size_type toSize) const { {if (!(to)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 363); abort();}}; {if (!(toSize)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 364); abort();}}; if (--toSize > length()) { toSize = length(); } memcpy(to, c_str(), toSize); to[toSize] = 0; return toSize; } inline ~AbstractString() { if (stringBuffer != inlineBuffer) delete[] stringBuffer; } }; class StringComparator { public: static inline int compare(AbstractString::const_pointer s1, AbstractString::const_pointer s2, AbstractString::size_type n) { return memcmp(s1, s2, n); } }; class PathNameComparator { public: static int compare(AbstractString::const_pointer s1, AbstractString::const_pointer s2, AbstractString::size_type n); }; template class StringBase : public AbstractString { typedef StringBase StringType; protected: inline StringBase(const_pointer p1, size_type n1, const_pointer p2, size_type n2) : AbstractString(p1, n1, p2, n2) {} private: inline StringType add(const_pointer s, size_type n) const { return StringBase(c_str(), length(), s, n); } public: inline StringBase() : AbstractString() {} inline StringBase(const StringType& v) : AbstractString(v) {} inline StringBase(const_pointer s, size_type n) : AbstractString(n, s) {} inline StringBase(const_pointer s) : AbstractString(strlen(s), s) {} inline StringBase(const unsigned char* s) : AbstractString(strlen((char*)s), (char*)s) {} inline StringBase(size_type n, char_type c) : AbstractString(n, c) {} inline StringBase(char_type c) : AbstractString(1, c) {} inline StringBase(const_iterator first, const_iterator last) : AbstractString(last - first, first) {} inline explicit StringBase(MemoryPool& p) : AbstractString(p) {} inline StringBase(MemoryPool& p, const AbstractString& v) : AbstractString(p, v) {} inline StringBase(MemoryPool& p, const char_type* s, size_type l) : AbstractString(p, s, l) {} inline StringType& append(const StringType& str) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 416); abort();}}; return append(str.c_str(), str.length()); } inline StringType& append(const StringType& str, size_type pos, size_type n) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 420); abort();}}; AdjustRange(str.length(), pos, n); return append(str.c_str() + pos, n); } inline StringType& append(const_pointer s, size_type n) { memcpy(baseAppend(n), s, n); return *this; } inline StringType& append(const_pointer s) { return append(s, strlen(s)); } inline StringType& append(size_type n, char_type c) { memset(baseAppend(n), c, n); return *this; } inline StringType& append(const_iterator first, const_iterator last) { return append(first, last - first); } inline StringType& assign(const StringType& str) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 440); abort();}}; return assign(str.c_str(), str.length()); } inline StringType& assign(const StringType& str, size_type pos, size_type n) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 444); abort();}}; AdjustRange(str.length(), pos, n); return assign(&str.c_str()[pos], n); } inline StringType& assign(const_pointer s, size_type n) { memcpy(baseAssign(n), s, n); return *this; } inline StringType& assign(const_pointer s) { return assign(s, strlen(s)); } inline StringType& assign(size_type n, char_type c) { memset(baseAssign(n), c, n); return *this; } inline StringType& assign(const_iterator first, const_iterator last) { return assign(first, last - first); } inline StringType& operator=(const StringType& v) { {if (!(&v != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 464); abort();}}; return assign(v); } inline StringType& operator=(const_pointer s) { return assign(s, strlen(s)); } inline StringType& operator=(char_type c) { return assign(&c, 1); } inline StringType& operator+=(const StringType& v) { {if (!(&v != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 474); abort();}}; return append(v); } inline StringType& operator+=(const_pointer s) { return append(s); } inline StringType& operator+=(char_type c) { return append(1, c); } inline StringType operator+(const StringType& v) const { {if (!(&v != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 484); abort();}}; return add(v.c_str(), v.length()); } inline StringType operator+(const_pointer s) const { return add(s, strlen(s)); } inline StringType operator+(char_type c) const { return add(&c, 1); } inline StringBase ToString() const { return StringBase(c_str()); } inline StringBase ToPathName() const { return StringBase(c_str()); } inline StringType& insert(size_type p0, const StringType& str) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 502); abort();}}; return insert(p0, str.c_str(), str.length()); } inline StringType& insert(size_type p0, const StringType& str, size_type pos, size_type n) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 506); abort();}}; AdjustRange(str.length(), pos, n); return insert(p0, &str.c_str()[pos], n); } inline StringType& insert(size_type p0, const_pointer s, size_type n) { if (p0 >= length()) { return append(s, n); } memcpy(baseInsert(p0, n), s, n); return *this; } inline StringType& insert(size_type p0, const_pointer s) { return insert(p0, s, strlen(s)); } inline StringType& insert(size_type p0, size_type n, char_type c) { if (p0 >= length()) { return append(n, c); } memset(baseInsert(p0, n), c, n); return *this; } inline void insert(iterator it, size_type n, char_type c) { insert(it - c_str(), n, c); } inline void insert(iterator it, const_iterator first, const_iterator last) { insert(it - c_str(), first, last - first); } inline StringType& erase(size_type p0 = 0, size_type n = npos) { baseErase(p0, n); return *this; } inline iterator erase(iterator it) { erase(it - c_str(), 1); return it; } inline iterator erase(iterator first, iterator last) { erase(first - c_str(), last - first); return first; } inline StringType& replace(size_type p0, size_type n0, const StringType& str) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 549); abort();}}; return replace(p0, n0, str.c_str(), str.length()); } inline StringType& replace(size_type p0, size_type n0, const StringType& str, size_type pos, size_type n) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 553); abort();}}; AdjustRange(str.length(), pos, n); return replace(p0, n0, &str.c_str()[pos], n); } inline StringType& replace(size_type p0, size_type n0, const_pointer s, size_type n) { erase(p0, n0); return insert(p0, s, n); } inline StringType& replace(size_type p0, size_type n0, const_pointer s) { return replace(p0, n0, s, strlen(s)); } inline StringType& replace(size_type p0, size_type n0, size_type n, char_type c) { erase(p0, n0); return insert(p0, n, c); } inline StringType& replace(iterator first0, iterator last0, const StringType& str) { {if (!(&str != this)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/include/../common/classes/fb_string.h", 569); abort();}}; return replace(first0 - c_str(), last0 - first0, str); } inline StringType& replace(iterator first0, iterator last0, const_pointer s, size_type n) { return replace(first0 - c_str(), last0 - first0, s, n); } inline StringType& replace(iterator first0, iterator last0, const_pointer s) { return replace(first0 - c_str(), last0 - first0, s); } inline StringType& replace(iterator first0, iterator last0, size_type n, char_type c) { return replace(first0 - c_str(), last0 - first0, n, c); } inline StringType& replace(iterator first0, iterator last0, const_iterator first, const_iterator last) { return replace(first0 - c_str(), last0 - first0, first, last - first); } inline StringType substr(size_type pos = 0, size_type n = npos) const { AdjustRange(length(), pos, n); return StringType(&c_str()[pos], n); } inline int compare(const StringType& str) const { return compare(str.c_str(), str.length()); } inline int compare(size_type p0, size_type n0, const StringType& str) { return compare(p0, n0, str.c_str(), str.length()); } inline int compare(size_type p0, size_type n0, const StringType& str, size_type pos, size_type n) { AdjustRange(str.length(), pos, n); return compare(p0, n0, &str.c_str()[pos], n); } inline int compare(const_pointer s) const { return compare(s, strlen(s)); } int compare(size_type p0, size_type n0, const_pointer s, size_type n) const { AdjustRange(length(), p0, n0); const size_type ml = n0 < n ? n0 : n; const int rc = Comparator::compare(&c_str()[p0], s, ml); return rc ? rc : n0 - n; } int compare(const_pointer s, size_type n) const { const size_type ml = length() < n ? length() : n; const int rc = Comparator::compare(c_str(), s, ml); return rc ? rc : length() - n; } inline bool operator< (const StringType& str) const {return compare(str) < 0;} inline bool operator<=(const StringType& str) const {return compare(str) <= 0;} inline bool operator==(const StringType& str) const {return compare(str) == 0;} inline bool operator>=(const StringType& str) const {return compare(str) >= 0;} inline bool operator> (const StringType& str) const {return compare(str) > 0;} inline bool operator!=(const StringType& str) const {return compare(str) != 0;} inline bool operator< (const char_type* str) const {return compare(str) < 0;} inline bool operator<=(const char_type* str) const {return compare(str) <= 0;} inline bool operator==(const char_type* str) const {return compare(str) == 0;} inline bool operator>=(const char_type* str) const {return compare(str) >= 0;} inline bool operator> (const char_type* str) const {return compare(str) > 0;} inline bool operator!=(const char_type* str) const {return compare(str) != 0;} }; typedef StringBase string; inline string operator+(string::const_pointer s, const string& str) { string rc(s); rc += str; return rc; } inline string operator+(string::char_type c, const string& str) { string rc(c); rc += str; return rc; } typedef StringBase PathName; inline PathName operator+(PathName::const_pointer s, const PathName& str) { PathName rc(s); rc += str; return rc; } inline PathName operator+(PathName::char_type c, const PathName& str) { PathName rc(c); rc += str; return rc; } } # 35 "../src/include/../common/classes/ClumpletReader.h" 2 namespace Firebird { class ClumpletReader : protected AutoStorage { public: enum Kind {Tagged, UnTagged, SpbAttach, SpbStart, Tpb }; ClumpletReader(Kind k, const UCHAR* buffer, size_t buffLen); virtual ~ClumpletReader() { } bool isEof() const { return cur_offset >= getBufferLength(); } void moveNext(); void rewind(); bool find(UCHAR tag); UCHAR getClumpTag() const; size_t getClumpLength() const; SLONG getInt() const; bool getBoolean() const; SINT64 getBigInt() const; string& getString(string& str) const; PathName& getPath(PathName& str) const; const UCHAR* getBytes() const; UCHAR getBufferTag() const; size_t getBufferLength() const { size_t rc = getBufferEnd() - getBuffer(); if (rc == 1 && kind != UnTagged && kind != SpbStart) { rc = 0; } return rc; } size_t getCurOffset() const { return cur_offset; } void setCurOffset(size_t newOffset) { cur_offset = newOffset; } void dump() const; protected: enum ClumpletType {TraditionalDpb, SingleTpb, StringSpb, IntSpb, ByteSpb}; ClumpletType getClumpletType(UCHAR tag) const; size_t getClumpletSize(bool wTag, bool wLength, bool wData) const; void adjustSpbState(); size_t cur_offset; const Kind kind; UCHAR spbState; virtual const UCHAR* getBuffer() const { return static_buffer; } virtual const UCHAR* getBufferEnd() const { return static_buffer_end; } virtual void usage_mistake(const char* what) const; virtual void invalid_structure(const char* what) const; private: ClumpletReader(const ClumpletReader& from); ClumpletReader& operator=(const ClumpletReader& from); const UCHAR* static_buffer; const UCHAR* static_buffer_end; }; } # 32 "../src/common/classes/ClumpletReader.cpp" 2 # 1 "../src/include/fb_exception.h" 1 # 33 "../src/common/classes/ClumpletReader.cpp" 2 # 1 "../src/include/../jrd/ibase.h" 1 # 65 "../src/include/../jrd/ibase.h" typedef FB_API_HANDLE isc_att_handle; typedef FB_API_HANDLE isc_blob_handle; typedef FB_API_HANDLE isc_db_handle; typedef FB_API_HANDLE isc_req_handle; typedef FB_API_HANDLE isc_stmt_handle; typedef FB_API_HANDLE isc_svc_handle; typedef FB_API_HANDLE isc_tr_handle; typedef void (* isc_callback) (); typedef ISC_LONG isc_resv_handle; typedef void (*ISC_PRINT_CALLBACK) (void*, ISC_SHORT, const char*); typedef void (*ISC_VERSION_CALLBACK)(void*, const char*); typedef void (*ISC_EVENT_CALLBACK)(void*, ISC_USHORT, const ISC_UCHAR*); # 87 "../src/include/../jrd/ibase.h" typedef struct { short array_bound_lower; short array_bound_upper; } ISC_ARRAY_BOUND; typedef struct { ISC_UCHAR array_desc_dtype; ISC_SCHAR array_desc_scale; unsigned short array_desc_length; ISC_SCHAR array_desc_field_name[32]; ISC_SCHAR array_desc_relation_name[32]; short array_desc_dimensions; short array_desc_flags; ISC_ARRAY_BOUND array_desc_bounds[16]; } ISC_ARRAY_DESC; typedef struct { short blob_desc_subtype; short blob_desc_charset; short blob_desc_segment_size; ISC_UCHAR blob_desc_field_name[32]; ISC_UCHAR blob_desc_relation_name[32]; } ISC_BLOB_DESC; typedef struct isc_blob_ctl { ISC_STATUS (* ctl_source)(); struct isc_blob_ctl* ctl_source_handle; short ctl_to_sub_type; short ctl_from_sub_type; unsigned short ctl_buffer_length; unsigned short ctl_segment_length; unsigned short ctl_bpb_length; ISC_SCHAR* ctl_bpb; ISC_UCHAR* ctl_buffer; ISC_LONG ctl_max_segment; ISC_LONG ctl_number_segments; ISC_LONG ctl_total_length; ISC_STATUS* ctl_status; long ctl_data[8]; } * ISC_BLOB_CTL; typedef struct bstream { isc_blob_handle bstr_blob; ISC_SCHAR * bstr_buffer; ISC_SCHAR * bstr_ptr; short bstr_length; short bstr_cnt; char bstr_mode; } BSTREAM; # 172 "../src/include/../jrd/ibase.h" enum blob_lseek_mode {blb_seek_relative = 1, blb_seek_from_tail = 2}; enum blob_get_result {blb_got_fragment = -1, blb_got_eof = 0, blb_got_full_segment = 1}; typedef struct blobcallback { short (*blob_get_segment) (void* hnd, ISC_UCHAR* buffer, ISC_USHORT buf_size, ISC_USHORT* result_len); void* blob_handle; ISC_LONG blob_number_segments; ISC_LONG blob_max_segment; ISC_LONG blob_total_length; void (*blob_put_segment) (void* hnd, const ISC_UCHAR* buffer, ISC_USHORT buf_size); ISC_LONG (*blob_lseek) (void* hnd, ISC_USHORT mode, ISC_LONG offset); } *BLOBCALLBACK; # 203 "../src/include/../jrd/ibase.h" typedef struct paramdsc { ISC_UCHAR dsc_dtype; signed char dsc_scale; ISC_USHORT dsc_length; short dsc_sub_type; ISC_USHORT dsc_flags; ISC_UCHAR *dsc_address; } PARAMDSC; typedef struct paramvary { ISC_USHORT vary_length; ISC_UCHAR vary_string[1]; } PARAMVARY; # 1 "../src/include/../jrd/../jrd/dsc_pub.h" 1 # 221 "../src/include/../jrd/ibase.h" 2 # 1 "../src/include/../jrd/../dsql/sqlda_pub.h" 1 # 34 "../src/include/../jrd/../dsql/sqlda_pub.h" typedef struct { ISC_SHORT sqltype; ISC_SHORT sqlscale; ISC_SHORT sqlsubtype; ISC_SHORT sqllen; ISC_SCHAR* sqldata; ISC_SHORT* sqlind; ISC_SHORT sqlname_length; ISC_SCHAR sqlname[32]; ISC_SHORT relname_length; ISC_SCHAR relname[32]; ISC_SHORT ownname_length; ISC_SCHAR ownname[32]; ISC_SHORT aliasname_length; ISC_SCHAR aliasname[32]; } XSQLVAR; typedef struct { ISC_SHORT version; ISC_SCHAR sqldaid[8]; ISC_LONG sqldabc; ISC_SHORT sqln; ISC_SHORT sqld; XSQLVAR sqlvar[1]; } XSQLDA; # 229 "../src/include/../jrd/ibase.h" 2 extern "C" { ISC_STATUS isc_attach_database(ISC_STATUS*, short, const ISC_SCHAR*, isc_db_handle*, short, const ISC_SCHAR*); ISC_STATUS isc_array_gen_sdl(ISC_STATUS*, const ISC_ARRAY_DESC*, ISC_SHORT*, ISC_UCHAR*, ISC_SHORT*); ISC_STATUS isc_array_get_slice(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, ISC_QUAD*, const ISC_ARRAY_DESC*, void*, ISC_LONG*); ISC_STATUS isc_array_lookup_bounds(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, const ISC_SCHAR*, const ISC_SCHAR*, ISC_ARRAY_DESC*); ISC_STATUS isc_array_lookup_desc(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, const ISC_SCHAR*, const ISC_SCHAR*, ISC_ARRAY_DESC*); ISC_STATUS isc_array_set_desc(ISC_STATUS*, const ISC_SCHAR*, const ISC_SCHAR*, const short*, const short*, const short*, ISC_ARRAY_DESC*); ISC_STATUS isc_array_put_slice(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, ISC_QUAD*, const ISC_ARRAY_DESC*, void*, ISC_LONG *); void isc_blob_default_desc(ISC_BLOB_DESC*, const ISC_UCHAR*, const ISC_UCHAR*); ISC_STATUS isc_blob_gen_bpb(ISC_STATUS*, const ISC_BLOB_DESC*, const ISC_BLOB_DESC*, unsigned short, ISC_UCHAR*, unsigned short*); ISC_STATUS isc_blob_info(ISC_STATUS*, isc_blob_handle*, short, const ISC_SCHAR*, short, ISC_SCHAR*); ISC_STATUS isc_blob_lookup_desc(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, const ISC_UCHAR*, const ISC_UCHAR*, ISC_BLOB_DESC*, ISC_UCHAR*); ISC_STATUS isc_blob_set_desc(ISC_STATUS*, const ISC_UCHAR*, const ISC_UCHAR*, short, short, short, ISC_BLOB_DESC*); ISC_STATUS isc_cancel_blob(ISC_STATUS *, isc_blob_handle *); ISC_STATUS isc_cancel_events(ISC_STATUS *, isc_db_handle *, ISC_LONG *); ISC_STATUS isc_close_blob(ISC_STATUS *, isc_blob_handle *); ISC_STATUS isc_commit_retaining(ISC_STATUS *, isc_tr_handle *); ISC_STATUS isc_commit_transaction(ISC_STATUS *, isc_tr_handle *); ISC_STATUS isc_create_blob(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, isc_blob_handle*, ISC_QUAD*); ISC_STATUS isc_create_blob2(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, isc_blob_handle*, ISC_QUAD*, short, const ISC_SCHAR*); ISC_STATUS isc_create_database(ISC_STATUS*, short, const ISC_SCHAR*, isc_db_handle*, short, const ISC_SCHAR*, short); ISC_STATUS isc_database_info(ISC_STATUS*, isc_db_handle*, short, const ISC_SCHAR*, short, ISC_SCHAR*); void isc_decode_date(const ISC_QUAD*, void*); void isc_decode_sql_date(const ISC_DATE*, void*); void isc_decode_sql_time(const ISC_TIME*, void*); void isc_decode_timestamp(const ISC_TIMESTAMP*, void*); ISC_STATUS isc_detach_database(ISC_STATUS *, isc_db_handle *); ISC_STATUS isc_drop_database(ISC_STATUS *, isc_db_handle *); ISC_STATUS isc_dsql_allocate_statement(ISC_STATUS *, isc_db_handle *, isc_stmt_handle *); ISC_STATUS isc_dsql_alloc_statement2(ISC_STATUS *, isc_db_handle *, isc_stmt_handle *); ISC_STATUS isc_dsql_describe(ISC_STATUS *, isc_stmt_handle *, unsigned short, XSQLDA *); ISC_STATUS isc_dsql_describe_bind(ISC_STATUS *, isc_stmt_handle *, unsigned short, XSQLDA *); ISC_STATUS isc_dsql_exec_immed2(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, unsigned short, const ISC_SCHAR*, unsigned short, XSQLDA*, XSQLDA*); ISC_STATUS isc_dsql_execute(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, unsigned short, XSQLDA*); ISC_STATUS isc_dsql_execute2(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, unsigned short, XSQLDA*, XSQLDA*); ISC_STATUS isc_dsql_execute_immediate(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, unsigned short, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_dsql_fetch(ISC_STATUS *, isc_stmt_handle *, unsigned short, XSQLDA *); ISC_STATUS isc_dsql_finish(isc_db_handle *); ISC_STATUS isc_dsql_free_statement(ISC_STATUS *, isc_stmt_handle *, unsigned short); ISC_STATUS isc_dsql_insert(ISC_STATUS*, isc_stmt_handle*, unsigned short, XSQLDA*); ISC_STATUS isc_dsql_prepare(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, unsigned short, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_dsql_set_cursor_name(ISC_STATUS*, isc_stmt_handle*, const ISC_SCHAR*, unsigned short); ISC_STATUS isc_dsql_sql_info(ISC_STATUS*, isc_stmt_handle*, short, const ISC_SCHAR*, short, ISC_SCHAR*); void isc_encode_date(const void*, ISC_QUAD*); void isc_encode_sql_date(const void*, ISC_DATE*); void isc_encode_sql_time(const void*, ISC_TIME*); void isc_encode_timestamp(const void*, ISC_TIMESTAMP*); ISC_LONG isc_event_block(ISC_UCHAR**, ISC_UCHAR**, unsigned short, ...); void isc_event_counts(ISC_ULONG*, short, ISC_UCHAR*, const ISC_UCHAR *); void __attribute__((__deprecated__)) isc_expand_dpb(ISC_SCHAR**, short*, ...); int isc_modify_dpb(ISC_SCHAR**, short*, unsigned short, const ISC_SCHAR*, short); ISC_LONG isc_free(ISC_SCHAR *); ISC_STATUS isc_get_segment(ISC_STATUS *, isc_blob_handle *, unsigned short *, unsigned short, ISC_SCHAR *); ISC_STATUS isc_get_slice(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, ISC_QUAD*, short, const ISC_SCHAR*, short, const ISC_LONG*, ISC_LONG, void*, ISC_LONG*); ISC_LONG __attribute__((__deprecated__)) isc_interprete(ISC_SCHAR*, ISC_STATUS**); ISC_LONG fb_interpret(ISC_SCHAR*, unsigned int, const ISC_STATUS**); ISC_STATUS isc_open_blob(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, isc_blob_handle*, ISC_QUAD*); ISC_STATUS isc_open_blob2(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, isc_blob_handle*, ISC_QUAD*, ISC_USHORT, const ISC_UCHAR*); ISC_STATUS isc_prepare_transaction2(ISC_STATUS*, isc_tr_handle*, ISC_USHORT, const ISC_UCHAR*); void isc_print_sqlerror(ISC_SHORT, const ISC_STATUS*); ISC_STATUS isc_print_status(const ISC_STATUS*); ISC_STATUS isc_put_segment(ISC_STATUS*, isc_blob_handle*, unsigned short, const ISC_SCHAR*); ISC_STATUS isc_put_slice(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, ISC_QUAD*, short, const ISC_SCHAR*, short, const ISC_LONG*, ISC_LONG, void*); ISC_STATUS isc_que_events(ISC_STATUS*, isc_db_handle*, ISC_LONG*, short, const ISC_UCHAR*, ISC_EVENT_CALLBACK, void*); ISC_STATUS isc_rollback_retaining(ISC_STATUS *, isc_tr_handle *); ISC_STATUS isc_rollback_transaction(ISC_STATUS *, isc_tr_handle *); ISC_STATUS isc_start_multiple(ISC_STATUS *, isc_tr_handle *, short, void *); ISC_STATUS isc_start_transaction(ISC_STATUS *, isc_tr_handle *, short, ...); ISC_LONG isc_sqlcode(const ISC_STATUS*); void isc_sql_interprete(short, ISC_SCHAR *, short); ISC_STATUS isc_transaction_info(ISC_STATUS*, isc_tr_handle*, short, const ISC_SCHAR*, short, ISC_SCHAR*); ISC_STATUS isc_transact_request(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, unsigned short, const ISC_SCHAR*, unsigned short, ISC_SCHAR*, unsigned short, ISC_SCHAR*); ISC_LONG isc_vax_integer(const ISC_SCHAR*, short); ISC_INT64 isc_portable_integer(const ISC_UCHAR*, short); # 642 "../src/include/../jrd/ibase.h" typedef struct { short sec_flags; int uid; int gid; int protocol; ISC_SCHAR *server; ISC_SCHAR *user_name; ISC_SCHAR *password; ISC_SCHAR *group_name; ISC_SCHAR *first_name; ISC_SCHAR *middle_name; ISC_SCHAR *last_name; ISC_SCHAR *dba_user_name; ISC_SCHAR *dba_password; } USER_SEC_DATA; ISC_STATUS isc_add_user(ISC_STATUS*, const USER_SEC_DATA*); ISC_STATUS isc_delete_user(ISC_STATUS*, const USER_SEC_DATA*); ISC_STATUS isc_modify_user(ISC_STATUS*, const USER_SEC_DATA*); ISC_STATUS isc_compile_request(ISC_STATUS*, isc_db_handle*, isc_req_handle*, short, const ISC_SCHAR*); ISC_STATUS isc_compile_request2(ISC_STATUS*, isc_db_handle*, isc_req_handle*, short, const ISC_SCHAR*); ISC_STATUS isc_ddl(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, short, const ISC_SCHAR*); ISC_STATUS isc_prepare_transaction(ISC_STATUS*, isc_tr_handle*); ISC_STATUS isc_receive(ISC_STATUS*, isc_req_handle*, short, short, void*, short); ISC_STATUS isc_reconnect_transaction(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, short, const ISC_SCHAR*); ISC_STATUS isc_release_request(ISC_STATUS*, isc_req_handle*); ISC_STATUS isc_request_info(ISC_STATUS*, isc_req_handle*, short, short, const ISC_SCHAR*, short, ISC_SCHAR*); ISC_STATUS isc_seek_blob(ISC_STATUS*, isc_blob_handle*, short, ISC_LONG, ISC_LONG*); ISC_STATUS isc_send(ISC_STATUS*, isc_req_handle*, short, short, const void*, short); ISC_STATUS isc_start_and_send(ISC_STATUS*, isc_req_handle*, isc_tr_handle*, short, short, const void*, short); ISC_STATUS isc_start_request(ISC_STATUS *, isc_req_handle *, isc_tr_handle *, short); ISC_STATUS isc_unwind_request(ISC_STATUS *, isc_tr_handle *, short); ISC_STATUS isc_wait_for_event(ISC_STATUS*, isc_db_handle*, short, const ISC_UCHAR*, ISC_UCHAR*); ISC_STATUS isc_close(ISC_STATUS*, const ISC_SCHAR*); ISC_STATUS isc_declare(ISC_STATUS*, const ISC_SCHAR*, const ISC_SCHAR*); ISC_STATUS isc_describe(ISC_STATUS*, const ISC_SCHAR*, XSQLDA *); ISC_STATUS isc_describe_bind(ISC_STATUS*, const ISC_SCHAR*, XSQLDA*); ISC_STATUS isc_execute(ISC_STATUS*, isc_tr_handle*, const ISC_SCHAR*, XSQLDA*); ISC_STATUS isc_execute_immediate(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, short*, const ISC_SCHAR*); ISC_STATUS isc_fetch(ISC_STATUS*, const ISC_SCHAR*, XSQLDA*); ISC_STATUS isc_open(ISC_STATUS*, isc_tr_handle*, const ISC_SCHAR*, XSQLDA*); ISC_STATUS isc_prepare(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, const ISC_SCHAR*, short*, const ISC_SCHAR*, XSQLDA*); ISC_STATUS isc_dsql_execute_m(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, ISC_SCHAR*); ISC_STATUS isc_dsql_execute2_m(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, const ISC_SCHAR*, unsigned short, ISC_SCHAR*, unsigned short, unsigned short, ISC_SCHAR*); ISC_STATUS isc_dsql_execute_immediate_m(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, ISC_SCHAR*); ISC_STATUS isc_dsql_exec_immed3_m(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, ISC_SCHAR*, unsigned short, ISC_SCHAR*, unsigned short, unsigned short, ISC_SCHAR*); ISC_STATUS isc_dsql_fetch_m(ISC_STATUS*, isc_stmt_handle*, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, ISC_SCHAR*); ISC_STATUS isc_dsql_insert_m(ISC_STATUS*, isc_stmt_handle*, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, const ISC_SCHAR*); ISC_STATUS isc_dsql_prepare_m(ISC_STATUS*, isc_tr_handle*, isc_stmt_handle*, unsigned short, const ISC_SCHAR*, unsigned short, unsigned short, const ISC_SCHAR*, unsigned short, ISC_SCHAR*); ISC_STATUS isc_dsql_release(ISC_STATUS*, const ISC_SCHAR*); ISC_STATUS isc_embed_dsql_close(ISC_STATUS*, const ISC_SCHAR*); ISC_STATUS isc_embed_dsql_declare(ISC_STATUS*, const ISC_SCHAR*, const ISC_SCHAR*); ISC_STATUS isc_embed_dsql_describe(ISC_STATUS*, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_describe_bind(ISC_STATUS*, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_execute(ISC_STATUS*, isc_tr_handle*, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_execute2(ISC_STATUS*, isc_tr_handle*, const ISC_SCHAR*, unsigned short, XSQLDA*, XSQLDA*); ISC_STATUS isc_embed_dsql_execute_immed(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, unsigned short, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_fetch(ISC_STATUS*, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_open(ISC_STATUS*, isc_tr_handle*, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_open2(ISC_STATUS*, isc_tr_handle*, const ISC_SCHAR*, unsigned short, XSQLDA*, XSQLDA*); ISC_STATUS isc_embed_dsql_insert(ISC_STATUS*, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_prepare(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, const ISC_SCHAR*, unsigned short, const ISC_SCHAR*, unsigned short, XSQLDA*); ISC_STATUS isc_embed_dsql_release(ISC_STATUS*, const ISC_SCHAR*); BSTREAM* BLOB_open(isc_blob_handle, ISC_SCHAR*, int); int BLOB_put(ISC_SCHAR, BSTREAM*); int BLOB_close(BSTREAM*); int BLOB_get(BSTREAM*); int BLOB_display(ISC_QUAD*, isc_db_handle, isc_tr_handle, const ISC_SCHAR*); int BLOB_dump(ISC_QUAD*, isc_db_handle, isc_tr_handle, const ISC_SCHAR*); int BLOB_edit(ISC_QUAD*, isc_db_handle, isc_tr_handle, const ISC_SCHAR*); int BLOB_load(ISC_QUAD*, isc_db_handle, isc_tr_handle, const ISC_SCHAR*); int BLOB_text_dump(ISC_QUAD*, isc_db_handle, isc_tr_handle, const ISC_SCHAR*); int BLOB_text_load(ISC_QUAD*, isc_db_handle, isc_tr_handle, const ISC_SCHAR*); BSTREAM* Bopen(ISC_QUAD*, isc_db_handle, isc_tr_handle, const ISC_SCHAR*); # 1022 "../src/include/../jrd/ibase.h" ISC_LONG isc_ftof(const ISC_SCHAR*, const unsigned short, ISC_SCHAR*, const unsigned short); ISC_STATUS isc_print_blr(const ISC_SCHAR*, ISC_PRINT_CALLBACK, void*, short); void isc_set_debug(int); void isc_qtoq(const ISC_QUAD*, ISC_QUAD*); void isc_vtof(const ISC_SCHAR*, ISC_SCHAR*, unsigned short); void isc_vtov(const ISC_SCHAR*, ISC_SCHAR*, short); int isc_version(isc_db_handle*, ISC_VERSION_CALLBACK, void*); ISC_LONG isc_reset_fpe(ISC_USHORT); # 1064 "../src/include/../jrd/ibase.h" ISC_STATUS isc_service_attach(ISC_STATUS*, unsigned short, const ISC_SCHAR*, isc_svc_handle*, unsigned short, const ISC_SCHAR*); ISC_STATUS isc_service_detach(ISC_STATUS *, isc_svc_handle *); ISC_STATUS isc_service_query(ISC_STATUS*, isc_svc_handle*, isc_resv_handle*, unsigned short, const ISC_SCHAR*, unsigned short, const ISC_SCHAR*, unsigned short, ISC_SCHAR*); ISC_STATUS isc_service_start(ISC_STATUS*, isc_svc_handle*, isc_resv_handle*, unsigned short, const ISC_SCHAR*); void isc_get_client_version ( ISC_SCHAR *); int isc_get_client_major_version (); int isc_get_client_minor_version (); } # 1121 "../src/include/../jrd/ibase.h" # 1 "../src/include/../jrd/blr.h" 1 # 1122 "../src/include/../jrd/ibase.h" 2 # 1354 "../src/include/../jrd/ibase.h" # 1 "../src/include/../jrd/../jrd/inf_pub.h" 1 # 42 "../src/include/../jrd/../jrd/inf_pub.h" enum db_info_types { isc_info_db_id = 4, isc_info_reads = 5, isc_info_writes = 6, isc_info_fetches = 7, isc_info_marks = 8, isc_info_implementation = 11, isc_info_isc_version = 12, isc_info_base_level = 13, isc_info_page_size = 14, isc_info_num_buffers = 15, isc_info_limbo = 16, isc_info_current_memory = 17, isc_info_max_memory = 18, isc_info_window_turns = 19, isc_info_license = 20, isc_info_allocation = 21, isc_info_attachment_id = 22, isc_info_read_seq_count = 23, isc_info_read_idx_count = 24, isc_info_insert_count = 25, isc_info_update_count = 26, isc_info_delete_count = 27, isc_info_backout_count = 28, isc_info_purge_count = 29, isc_info_expunge_count = 30, isc_info_sweep_interval = 31, isc_info_ods_version = 32, isc_info_ods_minor_version = 33, isc_info_no_reserve = 34, isc_info_logfile = 35, isc_info_cur_logfile_name = 36, isc_info_cur_log_part_offset = 37, isc_info_num_wal_buffers = 38, isc_info_wal_buffer_size = 39, isc_info_wal_ckpt_length = 40, isc_info_wal_cur_ckpt_interval = 41, isc_info_wal_prv_ckpt_fname = 42, isc_info_wal_prv_ckpt_poffset = 43, isc_info_wal_recv_ckpt_fname = 44, isc_info_wal_recv_ckpt_poffset = 45, isc_info_wal_grpc_wait_usecs = 47, isc_info_wal_num_io = 48, isc_info_wal_avg_io_size = 49, isc_info_wal_num_commits = 50, isc_info_wal_avg_grpc_size = 51, isc_info_forced_writes = 52, isc_info_user_names = 53, isc_info_page_errors = 54, isc_info_record_errors = 55, isc_info_bpage_errors = 56, isc_info_dpage_errors = 57, isc_info_ipage_errors = 58, isc_info_ppage_errors = 59, isc_info_tpage_errors = 60, isc_info_set_page_buffers = 61, isc_info_db_sql_dialect = 62, isc_info_db_read_only = 63, isc_info_db_size_in_pages = 64, frb_info_att_charset = 101, isc_info_db_class = 102, isc_info_firebird_version = 103, isc_info_oldest_transaction = 104, isc_info_oldest_active = 105, isc_info_oldest_snapshot = 106, isc_info_next_transaction = 107, isc_info_db_provider = 108, isc_info_active_transactions = 109, isc_info_active_tran_count = 110, isc_info_creation_date = 111, isc_info_db_last_value }; # 135 "../src/include/../jrd/../jrd/inf_pub.h" enum info_db_implementations { isc_info_db_impl_rdb_vms = 1, isc_info_db_impl_rdb_eln = 2, isc_info_db_impl_rdb_eln_dev = 3, isc_info_db_impl_rdb_vms_y = 4, isc_info_db_impl_rdb_eln_y = 5, isc_info_db_impl_jri = 6, isc_info_db_impl_jsv = 7, isc_info_db_impl_isc_apl_68K = 25, isc_info_db_impl_isc_vax_ultr = 26, isc_info_db_impl_isc_vms = 27, isc_info_db_impl_isc_sun_68k = 28, isc_info_db_impl_isc_os2 = 29, isc_info_db_impl_isc_sun4 = 30, isc_info_db_impl_isc_hp_ux = 31, isc_info_db_impl_isc_sun_386i = 32, isc_info_db_impl_isc_vms_orcl = 33, isc_info_db_impl_isc_mac_aux = 34, isc_info_db_impl_isc_rt_aix = 35, isc_info_db_impl_isc_mips_ult = 36, isc_info_db_impl_isc_xenix = 37, isc_info_db_impl_isc_dg = 38, isc_info_db_impl_isc_hp_mpexl = 39, isc_info_db_impl_isc_hp_ux68K = 40, isc_info_db_impl_isc_sgi = 41, isc_info_db_impl_isc_sco_unix = 42, isc_info_db_impl_isc_cray = 43, isc_info_db_impl_isc_imp = 44, isc_info_db_impl_isc_delta = 45, isc_info_db_impl_isc_next = 46, isc_info_db_impl_isc_dos = 47, isc_info_db_impl_m88K = 48, isc_info_db_impl_unixware = 49, isc_info_db_impl_isc_winnt_x86 = 50, isc_info_db_impl_isc_epson = 51, isc_info_db_impl_alpha_osf = 52, isc_info_db_impl_alpha_vms = 53, isc_info_db_impl_netware_386 = 54, isc_info_db_impl_win_only = 55, isc_info_db_impl_ncr_3000 = 56, isc_info_db_impl_winnt_ppc = 57, isc_info_db_impl_dg_x86 = 58, isc_info_db_impl_sco_ev = 59, isc_info_db_impl_i386 = 60, isc_info_db_impl_freebsd = 61, isc_info_db_impl_netbsd = 62, isc_info_db_impl_darwin = 63, isc_info_db_impl_sinixz = 64, isc_info_db_impl_linux_sparc = 65, isc_info_db_impl_linux_amd64 = 66, isc_info_db_impl_freebsd_amd64 = 67, isc_info_db_impl_last_value }; enum info_db_class { isc_info_db_class_access = 1, isc_info_db_class_y_valve = 2, isc_info_db_class_rem_int = 3, isc_info_db_class_rem_srvr = 4, isc_info_db_class_pipe_int = 7, isc_info_db_class_pipe_srvr = 8, isc_info_db_class_sam_int = 9, isc_info_db_class_sam_srvr = 10, isc_info_db_class_gateway = 11, isc_info_db_class_cache = 12, isc_info_db_class_classic_access = 13, isc_info_db_class_server_access = 14, isc_info_db_class_last_value }; enum info_db_provider { isc_info_db_code_rdb_eln = 1, isc_info_db_code_rdb_vms = 2, isc_info_db_code_interbase = 3, isc_info_db_code_firebird = 4, isc_info_db_code_last_value }; # 1355 "../src/include/../jrd/ibase.h" 2 # 1990 "../src/include/../jrd/ibase.h" # 1 "../src/include/gen/iberror.h" 1 # 38 "../src/include/gen/iberror.h" const ISC_LONG isc_facility = 20; const ISC_LONG isc_base = 335544320L; const ISC_LONG isc_factor = 1; const ISC_LONG isc_arg_end = 0; const ISC_LONG isc_arg_gds = 1; const ISC_LONG isc_arg_string = 2; const ISC_LONG isc_arg_cstring = 3; const ISC_LONG isc_arg_number = 4; const ISC_LONG isc_arg_interpreted = 5; const ISC_LONG isc_arg_vms = 6; const ISC_LONG isc_arg_unix = 7; const ISC_LONG isc_arg_domain = 8; const ISC_LONG isc_arg_dos = 9; const ISC_LONG isc_arg_mpexl = 10; const ISC_LONG isc_arg_mpexl_ipc = 11; const ISC_LONG isc_arg_next_mach = 15; const ISC_LONG isc_arg_netware = 16; const ISC_LONG isc_arg_win32 = 17; const ISC_LONG isc_arg_warning = 18; const ISC_LONG isc_arith_except = 335544321L; const ISC_LONG isc_bad_dbkey = 335544322L; const ISC_LONG isc_bad_db_format = 335544323L; const ISC_LONG isc_bad_db_handle = 335544324L; const ISC_LONG isc_bad_dpb_content = 335544325L; const ISC_LONG isc_bad_dpb_form = 335544326L; const ISC_LONG isc_bad_req_handle = 335544327L; const ISC_LONG isc_bad_segstr_handle = 335544328L; const ISC_LONG isc_bad_segstr_id = 335544329L; const ISC_LONG isc_bad_tpb_content = 335544330L; const ISC_LONG isc_bad_tpb_form = 335544331L; const ISC_LONG isc_bad_trans_handle = 335544332L; const ISC_LONG isc_bug_check = 335544333L; const ISC_LONG isc_convert_error = 335544334L; const ISC_LONG isc_db_corrupt = 335544335L; const ISC_LONG isc_deadlock = 335544336L; const ISC_LONG isc_excess_trans = 335544337L; const ISC_LONG isc_from_no_match = 335544338L; const ISC_LONG isc_infinap = 335544339L; const ISC_LONG isc_infona = 335544340L; const ISC_LONG isc_infunk = 335544341L; const ISC_LONG isc_integ_fail = 335544342L; const ISC_LONG isc_invalid_blr = 335544343L; const ISC_LONG isc_io_error = 335544344L; const ISC_LONG isc_lock_conflict = 335544345L; const ISC_LONG isc_metadata_corrupt = 335544346L; const ISC_LONG isc_not_valid = 335544347L; const ISC_LONG isc_no_cur_rec = 335544348L; const ISC_LONG isc_no_dup = 335544349L; const ISC_LONG isc_no_finish = 335544350L; const ISC_LONG isc_no_meta_update = 335544351L; const ISC_LONG isc_no_priv = 335544352L; const ISC_LONG isc_no_recon = 335544353L; const ISC_LONG isc_no_record = 335544354L; const ISC_LONG isc_no_segstr_close = 335544355L; const ISC_LONG isc_obsolete_metadata = 335544356L; const ISC_LONG isc_open_trans = 335544357L; const ISC_LONG isc_port_len = 335544358L; const ISC_LONG isc_read_only_field = 335544359L; const ISC_LONG isc_read_only_rel = 335544360L; const ISC_LONG isc_read_only_trans = 335544361L; const ISC_LONG isc_read_only_view = 335544362L; const ISC_LONG isc_req_no_trans = 335544363L; const ISC_LONG isc_req_sync = 335544364L; const ISC_LONG isc_req_wrong_db = 335544365L; const ISC_LONG isc_segment = 335544366L; const ISC_LONG isc_segstr_eof = 335544367L; const ISC_LONG isc_segstr_no_op = 335544368L; const ISC_LONG isc_segstr_no_read = 335544369L; const ISC_LONG isc_segstr_no_trans = 335544370L; const ISC_LONG isc_segstr_no_write = 335544371L; const ISC_LONG isc_segstr_wrong_db = 335544372L; const ISC_LONG isc_sys_request = 335544373L; const ISC_LONG isc_stream_eof = 335544374L; const ISC_LONG isc_unavailable = 335544375L; const ISC_LONG isc_unres_rel = 335544376L; const ISC_LONG isc_uns_ext = 335544377L; const ISC_LONG isc_wish_list = 335544378L; const ISC_LONG isc_wrong_ods = 335544379L; const ISC_LONG isc_wronumarg = 335544380L; const ISC_LONG isc_imp_exc = 335544381L; const ISC_LONG isc_random = 335544382L; const ISC_LONG isc_fatal_conflict = 335544383L; const ISC_LONG isc_badblk = 335544384L; const ISC_LONG isc_invpoolcl = 335544385L; const ISC_LONG isc_nopoolids = 335544386L; const ISC_LONG isc_relbadblk = 335544387L; const ISC_LONG isc_blktoobig = 335544388L; const ISC_LONG isc_bufexh = 335544389L; const ISC_LONG isc_syntaxerr = 335544390L; const ISC_LONG isc_bufinuse = 335544391L; const ISC_LONG isc_bdbincon = 335544392L; const ISC_LONG isc_reqinuse = 335544393L; const ISC_LONG isc_badodsver = 335544394L; const ISC_LONG isc_relnotdef = 335544395L; const ISC_LONG isc_fldnotdef = 335544396L; const ISC_LONG isc_dirtypage = 335544397L; const ISC_LONG isc_waifortra = 335544398L; const ISC_LONG isc_doubleloc = 335544399L; const ISC_LONG isc_nodnotfnd = 335544400L; const ISC_LONG isc_dupnodfnd = 335544401L; const ISC_LONG isc_locnotmar = 335544402L; const ISC_LONG isc_badpagtyp = 335544403L; const ISC_LONG isc_corrupt = 335544404L; const ISC_LONG isc_badpage = 335544405L; const ISC_LONG isc_badindex = 335544406L; const ISC_LONG isc_dbbnotzer = 335544407L; const ISC_LONG isc_tranotzer = 335544408L; const ISC_LONG isc_trareqmis = 335544409L; const ISC_LONG isc_badhndcnt = 335544410L; const ISC_LONG isc_wrotpbver = 335544411L; const ISC_LONG isc_wroblrver = 335544412L; const ISC_LONG isc_wrodpbver = 335544413L; const ISC_LONG isc_blobnotsup = 335544414L; const ISC_LONG isc_badrelation = 335544415L; const ISC_LONG isc_nodetach = 335544416L; const ISC_LONG isc_notremote = 335544417L; const ISC_LONG isc_trainlim = 335544418L; const ISC_LONG isc_notinlim = 335544419L; const ISC_LONG isc_traoutsta = 335544420L; const ISC_LONG isc_connect_reject = 335544421L; const ISC_LONG isc_dbfile = 335544422L; const ISC_LONG isc_orphan = 335544423L; const ISC_LONG isc_no_lock_mgr = 335544424L; const ISC_LONG isc_ctxinuse = 335544425L; const ISC_LONG isc_ctxnotdef = 335544426L; const ISC_LONG isc_datnotsup = 335544427L; const ISC_LONG isc_badmsgnum = 335544428L; const ISC_LONG isc_badparnum = 335544429L; const ISC_LONG isc_virmemexh = 335544430L; const ISC_LONG isc_blocking_signal = 335544431L; const ISC_LONG isc_lockmanerr = 335544432L; const ISC_LONG isc_journerr = 335544433L; const ISC_LONG isc_keytoobig = 335544434L; const ISC_LONG isc_nullsegkey = 335544435L; const ISC_LONG isc_sqlerr = 335544436L; const ISC_LONG isc_wrodynver = 335544437L; const ISC_LONG isc_funnotdef = 335544438L; const ISC_LONG isc_funmismat = 335544439L; const ISC_LONG isc_bad_msg_vec = 335544440L; const ISC_LONG isc_bad_detach = 335544441L; const ISC_LONG isc_noargacc_read = 335544442L; const ISC_LONG isc_noargacc_write = 335544443L; const ISC_LONG isc_read_only = 335544444L; const ISC_LONG isc_ext_err = 335544445L; const ISC_LONG isc_non_updatable = 335544446L; const ISC_LONG isc_no_rollback = 335544447L; const ISC_LONG isc_bad_sec_info = 335544448L; const ISC_LONG isc_invalid_sec_info = 335544449L; const ISC_LONG isc_misc_interpreted = 335544450L; const ISC_LONG isc_update_conflict = 335544451L; const ISC_LONG isc_unlicensed = 335544452L; const ISC_LONG isc_obj_in_use = 335544453L; const ISC_LONG isc_nofilter = 335544454L; const ISC_LONG isc_shadow_accessed = 335544455L; const ISC_LONG isc_invalid_sdl = 335544456L; const ISC_LONG isc_out_of_bounds = 335544457L; const ISC_LONG isc_invalid_dimension = 335544458L; const ISC_LONG isc_rec_in_limbo = 335544459L; const ISC_LONG isc_shadow_missing = 335544460L; const ISC_LONG isc_cant_validate = 335544461L; const ISC_LONG isc_cant_start_journal = 335544462L; const ISC_LONG isc_gennotdef = 335544463L; const ISC_LONG isc_cant_start_logging = 335544464L; const ISC_LONG isc_bad_segstr_type = 335544465L; const ISC_LONG isc_foreign_key = 335544466L; const ISC_LONG isc_high_minor = 335544467L; const ISC_LONG isc_tra_state = 335544468L; const ISC_LONG isc_trans_invalid = 335544469L; const ISC_LONG isc_buf_invalid = 335544470L; const ISC_LONG isc_indexnotdefined = 335544471L; const ISC_LONG isc_login = 335544472L; const ISC_LONG isc_invalid_bookmark = 335544473L; const ISC_LONG isc_bad_lock_level = 335544474L; const ISC_LONG isc_relation_lock = 335544475L; const ISC_LONG isc_record_lock = 335544476L; const ISC_LONG isc_max_idx = 335544477L; const ISC_LONG isc_jrn_enable = 335544478L; const ISC_LONG isc_old_failure = 335544479L; const ISC_LONG isc_old_in_progress = 335544480L; const ISC_LONG isc_old_no_space = 335544481L; const ISC_LONG isc_no_wal_no_jrn = 335544482L; const ISC_LONG isc_num_old_files = 335544483L; const ISC_LONG isc_wal_file_open = 335544484L; const ISC_LONG isc_bad_stmt_handle = 335544485L; const ISC_LONG isc_wal_failure = 335544486L; const ISC_LONG isc_walw_err = 335544487L; const ISC_LONG isc_logh_small = 335544488L; const ISC_LONG isc_logh_inv_version = 335544489L; const ISC_LONG isc_logh_open_flag = 335544490L; const ISC_LONG isc_logh_open_flag2 = 335544491L; const ISC_LONG isc_logh_diff_dbname = 335544492L; const ISC_LONG isc_logf_unexpected_eof = 335544493L; const ISC_LONG isc_logr_incomplete = 335544494L; const ISC_LONG isc_logr_header_small = 335544495L; const ISC_LONG isc_logb_small = 335544496L; const ISC_LONG isc_wal_illegal_attach = 335544497L; const ISC_LONG isc_wal_invalid_wpb = 335544498L; const ISC_LONG isc_wal_err_rollover = 335544499L; const ISC_LONG isc_no_wal = 335544500L; const ISC_LONG isc_drop_wal = 335544501L; const ISC_LONG isc_stream_not_defined = 335544502L; const ISC_LONG isc_wal_subsys_error = 335544503L; const ISC_LONG isc_wal_subsys_corrupt = 335544504L; const ISC_LONG isc_no_archive = 335544505L; const ISC_LONG isc_shutinprog = 335544506L; const ISC_LONG isc_range_in_use = 335544507L; const ISC_LONG isc_range_not_found = 335544508L; const ISC_LONG isc_charset_not_found = 335544509L; const ISC_LONG isc_lock_timeout = 335544510L; const ISC_LONG isc_prcnotdef = 335544511L; const ISC_LONG isc_prcmismat = 335544512L; const ISC_LONG isc_wal_bugcheck = 335544513L; const ISC_LONG isc_wal_cant_expand = 335544514L; const ISC_LONG isc_codnotdef = 335544515L; const ISC_LONG isc_xcpnotdef = 335544516L; const ISC_LONG isc_except = 335544517L; const ISC_LONG isc_cache_restart = 335544518L; const ISC_LONG isc_bad_lock_handle = 335544519L; const ISC_LONG isc_jrn_present = 335544520L; const ISC_LONG isc_wal_err_rollover2 = 335544521L; const ISC_LONG isc_wal_err_logwrite = 335544522L; const ISC_LONG isc_wal_err_jrn_comm = 335544523L; const ISC_LONG isc_wal_err_expansion = 335544524L; const ISC_LONG isc_wal_err_setup = 335544525L; const ISC_LONG isc_wal_err_ww_sync = 335544526L; const ISC_LONG isc_wal_err_ww_start = 335544527L; const ISC_LONG isc_shutdown = 335544528L; const ISC_LONG isc_existing_priv_mod = 335544529L; const ISC_LONG isc_primary_key_ref = 335544530L; const ISC_LONG isc_primary_key_notnull = 335544531L; const ISC_LONG isc_ref_cnstrnt_notfound = 335544532L; const ISC_LONG isc_foreign_key_notfound = 335544533L; const ISC_LONG isc_ref_cnstrnt_update = 335544534L; const ISC_LONG isc_check_cnstrnt_update = 335544535L; const ISC_LONG isc_check_cnstrnt_del = 335544536L; const ISC_LONG isc_integ_index_seg_del = 335544537L; const ISC_LONG isc_integ_index_seg_mod = 335544538L; const ISC_LONG isc_integ_index_del = 335544539L; const ISC_LONG isc_integ_index_mod = 335544540L; const ISC_LONG isc_check_trig_del = 335544541L; const ISC_LONG isc_check_trig_update = 335544542L; const ISC_LONG isc_cnstrnt_fld_del = 335544543L; const ISC_LONG isc_cnstrnt_fld_rename = 335544544L; const ISC_LONG isc_rel_cnstrnt_update = 335544545L; const ISC_LONG isc_constaint_on_view = 335544546L; const ISC_LONG isc_invld_cnstrnt_type = 335544547L; const ISC_LONG isc_primary_key_exists = 335544548L; const ISC_LONG isc_systrig_update = 335544549L; const ISC_LONG isc_not_rel_owner = 335544550L; const ISC_LONG isc_grant_obj_notfound = 335544551L; const ISC_LONG isc_grant_fld_notfound = 335544552L; const ISC_LONG isc_grant_nopriv = 335544553L; const ISC_LONG isc_nonsql_security_rel = 335544554L; const ISC_LONG isc_nonsql_security_fld = 335544555L; const ISC_LONG isc_wal_cache_err = 335544556L; const ISC_LONG isc_shutfail = 335544557L; const ISC_LONG isc_check_constraint = 335544558L; const ISC_LONG isc_bad_svc_handle = 335544559L; const ISC_LONG isc_shutwarn = 335544560L; const ISC_LONG isc_wrospbver = 335544561L; const ISC_LONG isc_bad_spb_form = 335544562L; const ISC_LONG isc_svcnotdef = 335544563L; const ISC_LONG isc_no_jrn = 335544564L; const ISC_LONG isc_transliteration_failed = 335544565L; const ISC_LONG isc_start_cm_for_wal = 335544566L; const ISC_LONG isc_wal_ovflow_log_required = 335544567L; const ISC_LONG isc_text_subtype = 335544568L; const ISC_LONG isc_dsql_error = 335544569L; const ISC_LONG isc_dsql_command_err = 335544570L; const ISC_LONG isc_dsql_constant_err = 335544571L; const ISC_LONG isc_dsql_cursor_err = 335544572L; const ISC_LONG isc_dsql_datatype_err = 335544573L; const ISC_LONG isc_dsql_decl_err = 335544574L; const ISC_LONG isc_dsql_cursor_update_err = 335544575L; const ISC_LONG isc_dsql_cursor_open_err = 335544576L; const ISC_LONG isc_dsql_cursor_close_err = 335544577L; const ISC_LONG isc_dsql_field_err = 335544578L; const ISC_LONG isc_dsql_internal_err = 335544579L; const ISC_LONG isc_dsql_relation_err = 335544580L; const ISC_LONG isc_dsql_procedure_err = 335544581L; const ISC_LONG isc_dsql_request_err = 335544582L; const ISC_LONG isc_dsql_sqlda_err = 335544583L; const ISC_LONG isc_dsql_var_count_err = 335544584L; const ISC_LONG isc_dsql_stmt_handle = 335544585L; const ISC_LONG isc_dsql_function_err = 335544586L; const ISC_LONG isc_dsql_blob_err = 335544587L; const ISC_LONG isc_collation_not_found = 335544588L; const ISC_LONG isc_collation_not_for_charset = 335544589L; const ISC_LONG isc_dsql_dup_option = 335544590L; const ISC_LONG isc_dsql_tran_err = 335544591L; const ISC_LONG isc_dsql_invalid_array = 335544592L; const ISC_LONG isc_dsql_max_arr_dim_exceeded = 335544593L; const ISC_LONG isc_dsql_arr_range_error = 335544594L; const ISC_LONG isc_dsql_trigger_err = 335544595L; const ISC_LONG isc_dsql_subselect_err = 335544596L; const ISC_LONG isc_dsql_crdb_prepare_err = 335544597L; const ISC_LONG isc_specify_field_err = 335544598L; const ISC_LONG isc_num_field_err = 335544599L; const ISC_LONG isc_col_name_err = 335544600L; const ISC_LONG isc_where_err = 335544601L; const ISC_LONG isc_table_view_err = 335544602L; const ISC_LONG isc_distinct_err = 335544603L; const ISC_LONG isc_key_field_count_err = 335544604L; const ISC_LONG isc_subquery_err = 335544605L; const ISC_LONG isc_expression_eval_err = 335544606L; const ISC_LONG isc_node_err = 335544607L; const ISC_LONG isc_command_end_err = 335544608L; const ISC_LONG isc_index_name = 335544609L; const ISC_LONG isc_exception_name = 335544610L; const ISC_LONG isc_field_name = 335544611L; const ISC_LONG isc_token_err = 335544612L; const ISC_LONG isc_union_err = 335544613L; const ISC_LONG isc_dsql_construct_err = 335544614L; const ISC_LONG isc_field_aggregate_err = 335544615L; const ISC_LONG isc_field_ref_err = 335544616L; const ISC_LONG isc_order_by_err = 335544617L; const ISC_LONG isc_return_mode_err = 335544618L; const ISC_LONG isc_extern_func_err = 335544619L; const ISC_LONG isc_alias_conflict_err = 335544620L; const ISC_LONG isc_procedure_conflict_error = 335544621L; const ISC_LONG isc_relation_conflict_err = 335544622L; const ISC_LONG isc_dsql_domain_err = 335544623L; const ISC_LONG isc_idx_seg_err = 335544624L; const ISC_LONG isc_node_name_err = 335544625L; const ISC_LONG isc_table_name = 335544626L; const ISC_LONG isc_proc_name = 335544627L; const ISC_LONG isc_idx_create_err = 335544628L; const ISC_LONG isc_wal_shadow_err = 335544629L; const ISC_LONG isc_dependency = 335544630L; const ISC_LONG isc_idx_key_err = 335544631L; const ISC_LONG isc_dsql_file_length_err = 335544632L; const ISC_LONG isc_dsql_shadow_number_err = 335544633L; const ISC_LONG isc_dsql_token_unk_err = 335544634L; const ISC_LONG isc_dsql_no_relation_alias = 335544635L; const ISC_LONG isc_indexname = 335544636L; const ISC_LONG isc_no_stream_plan = 335544637L; const ISC_LONG isc_stream_twice = 335544638L; const ISC_LONG isc_stream_not_found = 335544639L; const ISC_LONG isc_collation_requires_text = 335544640L; const ISC_LONG isc_dsql_domain_not_found = 335544641L; const ISC_LONG isc_index_unused = 335544642L; const ISC_LONG isc_dsql_self_join = 335544643L; const ISC_LONG isc_stream_bof = 335544644L; const ISC_LONG isc_stream_crack = 335544645L; const ISC_LONG isc_db_or_file_exists = 335544646L; const ISC_LONG isc_invalid_operator = 335544647L; const ISC_LONG isc_conn_lost = 335544648L; const ISC_LONG isc_bad_checksum = 335544649L; const ISC_LONG isc_page_type_err = 335544650L; const ISC_LONG isc_ext_readonly_err = 335544651L; const ISC_LONG isc_sing_select_err = 335544652L; const ISC_LONG isc_psw_attach = 335544653L; const ISC_LONG isc_psw_start_trans = 335544654L; const ISC_LONG isc_invalid_direction = 335544655L; const ISC_LONG isc_dsql_var_conflict = 335544656L; const ISC_LONG isc_dsql_no_blob_array = 335544657L; const ISC_LONG isc_dsql_base_table = 335544658L; const ISC_LONG isc_duplicate_base_table = 335544659L; const ISC_LONG isc_view_alias = 335544660L; const ISC_LONG isc_index_root_page_full = 335544661L; const ISC_LONG isc_dsql_blob_type_unknown = 335544662L; const ISC_LONG isc_req_max_clones_exceeded = 335544663L; const ISC_LONG isc_dsql_duplicate_spec = 335544664L; const ISC_LONG isc_unique_key_violation = 335544665L; const ISC_LONG isc_srvr_version_too_old = 335544666L; const ISC_LONG isc_drdb_completed_with_errs = 335544667L; const ISC_LONG isc_dsql_procedure_use_err = 335544668L; const ISC_LONG isc_dsql_count_mismatch = 335544669L; const ISC_LONG isc_blob_idx_err = 335544670L; const ISC_LONG isc_array_idx_err = 335544671L; const ISC_LONG isc_key_field_err = 335544672L; const ISC_LONG isc_no_delete = 335544673L; const ISC_LONG isc_del_last_field = 335544674L; const ISC_LONG isc_sort_err = 335544675L; const ISC_LONG isc_sort_mem_err = 335544676L; const ISC_LONG isc_version_err = 335544677L; const ISC_LONG isc_inval_key_posn = 335544678L; const ISC_LONG isc_no_segments_err = 335544679L; const ISC_LONG isc_crrp_data_err = 335544680L; const ISC_LONG isc_rec_size_err = 335544681L; const ISC_LONG isc_dsql_field_ref = 335544682L; const ISC_LONG isc_req_depth_exceeded = 335544683L; const ISC_LONG isc_no_field_access = 335544684L; const ISC_LONG isc_no_dbkey = 335544685L; const ISC_LONG isc_jrn_format_err = 335544686L; const ISC_LONG isc_jrn_file_full = 335544687L; const ISC_LONG isc_dsql_open_cursor_request = 335544688L; const ISC_LONG isc_ib_error = 335544689L; const ISC_LONG isc_cache_redef = 335544690L; const ISC_LONG isc_cache_too_small = 335544691L; const ISC_LONG isc_log_redef = 335544692L; const ISC_LONG isc_log_too_small = 335544693L; const ISC_LONG isc_partition_too_small = 335544694L; const ISC_LONG isc_partition_not_supp = 335544695L; const ISC_LONG isc_log_length_spec = 335544696L; const ISC_LONG isc_precision_err = 335544697L; const ISC_LONG isc_scale_nogt = 335544698L; const ISC_LONG isc_expec_short = 335544699L; const ISC_LONG isc_expec_long = 335544700L; const ISC_LONG isc_expec_ushort = 335544701L; const ISC_LONG isc_like_escape_invalid = 335544702L; const ISC_LONG isc_svcnoexe = 335544703L; const ISC_LONG isc_net_lookup_err = 335544704L; const ISC_LONG isc_service_unknown = 335544705L; const ISC_LONG isc_host_unknown = 335544706L; const ISC_LONG isc_grant_nopriv_on_base = 335544707L; const ISC_LONG isc_dyn_fld_ambiguous = 335544708L; const ISC_LONG isc_dsql_agg_ref_err = 335544709L; const ISC_LONG isc_complex_view = 335544710L; const ISC_LONG isc_unprepared_stmt = 335544711L; const ISC_LONG isc_expec_positive = 335544712L; const ISC_LONG isc_dsql_sqlda_value_err = 335544713L; const ISC_LONG isc_invalid_array_id = 335544714L; const ISC_LONG isc_extfile_uns_op = 335544715L; const ISC_LONG isc_svc_in_use = 335544716L; const ISC_LONG isc_err_stack_limit = 335544717L; const ISC_LONG isc_invalid_key = 335544718L; const ISC_LONG isc_net_init_error = 335544719L; const ISC_LONG isc_loadlib_failure = 335544720L; const ISC_LONG isc_network_error = 335544721L; const ISC_LONG isc_net_connect_err = 335544722L; const ISC_LONG isc_net_connect_listen_err = 335544723L; const ISC_LONG isc_net_event_connect_err = 335544724L; const ISC_LONG isc_net_event_listen_err = 335544725L; const ISC_LONG isc_net_read_err = 335544726L; const ISC_LONG isc_net_write_err = 335544727L; const ISC_LONG isc_integ_index_deactivate = 335544728L; const ISC_LONG isc_integ_deactivate_primary = 335544729L; const ISC_LONG isc_cse_not_supported = 335544730L; const ISC_LONG isc_tra_must_sweep = 335544731L; const ISC_LONG isc_unsupported_network_drive = 335544732L; const ISC_LONG isc_io_create_err = 335544733L; const ISC_LONG isc_io_open_err = 335544734L; const ISC_LONG isc_io_close_err = 335544735L; const ISC_LONG isc_io_read_err = 335544736L; const ISC_LONG isc_io_write_err = 335544737L; const ISC_LONG isc_io_delete_err = 335544738L; const ISC_LONG isc_io_access_err = 335544739L; const ISC_LONG isc_udf_exception = 335544740L; const ISC_LONG isc_lost_db_connection = 335544741L; const ISC_LONG isc_no_write_user_priv = 335544742L; const ISC_LONG isc_token_too_long = 335544743L; const ISC_LONG isc_max_att_exceeded = 335544744L; const ISC_LONG isc_login_same_as_role_name = 335544745L; const ISC_LONG isc_reftable_requires_pk = 335544746L; const ISC_LONG isc_usrname_too_long = 335544747L; const ISC_LONG isc_password_too_long = 335544748L; const ISC_LONG isc_usrname_required = 335544749L; const ISC_LONG isc_password_required = 335544750L; const ISC_LONG isc_bad_protocol = 335544751L; const ISC_LONG isc_dup_usrname_found = 335544752L; const ISC_LONG isc_usrname_not_found = 335544753L; const ISC_LONG isc_error_adding_sec_record = 335544754L; const ISC_LONG isc_error_modifying_sec_record = 335544755L; const ISC_LONG isc_error_deleting_sec_record = 335544756L; const ISC_LONG isc_error_updating_sec_db = 335544757L; const ISC_LONG isc_sort_rec_size_err = 335544758L; const ISC_LONG isc_bad_default_value = 335544759L; const ISC_LONG isc_invalid_clause = 335544760L; const ISC_LONG isc_too_many_handles = 335544761L; const ISC_LONG isc_optimizer_blk_exc = 335544762L; const ISC_LONG isc_invalid_string_constant = 335544763L; const ISC_LONG isc_transitional_date = 335544764L; const ISC_LONG isc_read_only_database = 335544765L; const ISC_LONG isc_must_be_dialect_2_and_up = 335544766L; const ISC_LONG isc_blob_filter_exception = 335544767L; const ISC_LONG isc_exception_access_violation = 335544768L; const ISC_LONG isc_exception_datatype_missalignment = 335544769L; const ISC_LONG isc_exception_array_bounds_exceeded = 335544770L; const ISC_LONG isc_exception_float_denormal_operand = 335544771L; const ISC_LONG isc_exception_float_divide_by_zero = 335544772L; const ISC_LONG isc_exception_float_inexact_result = 335544773L; const ISC_LONG isc_exception_float_invalid_operand = 335544774L; const ISC_LONG isc_exception_float_overflow = 335544775L; const ISC_LONG isc_exception_float_stack_check = 335544776L; const ISC_LONG isc_exception_float_underflow = 335544777L; const ISC_LONG isc_exception_integer_divide_by_zero = 335544778L; const ISC_LONG isc_exception_integer_overflow = 335544779L; const ISC_LONG isc_exception_unknown = 335544780L; const ISC_LONG isc_exception_stack_overflow = 335544781L; const ISC_LONG isc_exception_sigsegv = 335544782L; const ISC_LONG isc_exception_sigill = 335544783L; const ISC_LONG isc_exception_sigbus = 335544784L; const ISC_LONG isc_exception_sigfpe = 335544785L; const ISC_LONG isc_ext_file_delete = 335544786L; const ISC_LONG isc_ext_file_modify = 335544787L; const ISC_LONG isc_adm_task_denied = 335544788L; const ISC_LONG isc_extract_input_mismatch = 335544789L; const ISC_LONG isc_insufficient_svc_privileges = 335544790L; const ISC_LONG isc_file_in_use = 335544791L; const ISC_LONG isc_service_att_err = 335544792L; const ISC_LONG isc_ddl_not_allowed_by_db_sql_dial = 335544793L; const ISC_LONG isc_cancelled = 335544794L; const ISC_LONG isc_unexp_spb_form = 335544795L; const ISC_LONG isc_sql_dialect_datatype_unsupport = 335544796L; const ISC_LONG isc_svcnouser = 335544797L; const ISC_LONG isc_depend_on_uncommitted_rel = 335544798L; const ISC_LONG isc_svc_name_missing = 335544799L; const ISC_LONG isc_too_many_contexts = 335544800L; const ISC_LONG isc_datype_notsup = 335544801L; const ISC_LONG isc_dialect_reset_warning = 335544802L; const ISC_LONG isc_dialect_not_changed = 335544803L; const ISC_LONG isc_database_create_failed = 335544804L; const ISC_LONG isc_inv_dialect_specified = 335544805L; const ISC_LONG isc_valid_db_dialects = 335544806L; const ISC_LONG isc_sqlwarn = 335544807L; const ISC_LONG isc_dtype_renamed = 335544808L; const ISC_LONG isc_extern_func_dir_error = 335544809L; const ISC_LONG isc_date_range_exceeded = 335544810L; const ISC_LONG isc_inv_client_dialect_specified = 335544811L; const ISC_LONG isc_valid_client_dialects = 335544812L; const ISC_LONG isc_optimizer_between_err = 335544813L; const ISC_LONG isc_service_not_supported = 335544814L; const ISC_LONG isc_generator_name = 335544815L; const ISC_LONG isc_udf_name = 335544816L; const ISC_LONG isc_bad_limit_param = 335544817L; const ISC_LONG isc_bad_skip_param = 335544818L; const ISC_LONG isc_io_32bit_exceeded_err = 335544819L; const ISC_LONG isc_invalid_savepoint = 335544820L; const ISC_LONG isc_dsql_column_pos_err = 335544821L; const ISC_LONG isc_dsql_agg_where_err = 335544822L; const ISC_LONG isc_dsql_agg_group_err = 335544823L; const ISC_LONG isc_dsql_agg_column_err = 335544824L; const ISC_LONG isc_dsql_agg_having_err = 335544825L; const ISC_LONG isc_dsql_agg_nested_err = 335544826L; const ISC_LONG isc_exec_sql_invalid_arg = 335544827L; const ISC_LONG isc_exec_sql_invalid_req = 335544828L; const ISC_LONG isc_exec_sql_invalid_var = 335544829L; const ISC_LONG isc_exec_sql_max_call_exceeded = 335544830L; const ISC_LONG isc_conf_access_denied = 335544831L; const ISC_LONG isc_wrong_backup_state = 335544832L; const ISC_LONG isc_wal_backup_err = 335544833L; const ISC_LONG isc_cursor_not_open = 335544834L; const ISC_LONG isc_bad_shutdown_mode = 335544835L; const ISC_LONG isc_concat_overflow = 335544836L; const ISC_LONG isc_bad_substring_offset = 335544837L; const ISC_LONG isc_foreign_key_target_doesnt_exist = 335544838L; const ISC_LONG isc_foreign_key_references_present = 335544839L; const ISC_LONG isc_no_update = 335544840L; const ISC_LONG isc_cursor_already_open = 335544841L; const ISC_LONG isc_stack_trace = 335544842L; const ISC_LONG isc_ctx_var_not_found = 335544843L; const ISC_LONG isc_ctx_namespace_invalid = 335544844L; const ISC_LONG isc_ctx_too_big = 335544845L; const ISC_LONG isc_ctx_bad_argument = 335544846L; const ISC_LONG isc_identifier_too_long = 335544847L; const ISC_LONG isc_except2 = 335544848L; const ISC_LONG isc_malformed_string = 335544849L; const ISC_LONG isc_prc_out_param_mismatch = 335544850L; const ISC_LONG isc_command_end_err2 = 335544851L; const ISC_LONG isc_partner_idx_incompat_type = 335544852L; const ISC_LONG isc_bad_substring_length = 335544853L; const ISC_LONG isc_charset_not_installed = 335544854L; const ISC_LONG isc_collation_not_installed = 335544855L; const ISC_LONG isc_att_shutdown = 335544856L; const ISC_LONG isc_blobtoobig = 335544857L; const ISC_LONG isc_must_have_phys_field = 335544858L; const ISC_LONG isc_invalid_time_precision = 335544859L; const ISC_LONG isc_blob_convert_error = 335544860L; const ISC_LONG isc_array_convert_error = 335544861L; const ISC_LONG isc_record_lock_not_supp = 335544862L; const ISC_LONG isc_partner_idx_not_found = 335544863L; const ISC_LONG isc_tra_num_exc = 335544864L; const ISC_LONG isc_field_disappeared = 335544865L; const ISC_LONG isc_gfix_db_name = 335740929L; const ISC_LONG isc_gfix_invalid_sw = 335740930L; const ISC_LONG isc_gfix_incmp_sw = 335740932L; const ISC_LONG isc_gfix_replay_req = 335740933L; const ISC_LONG isc_gfix_pgbuf_req = 335740934L; const ISC_LONG isc_gfix_val_req = 335740935L; const ISC_LONG isc_gfix_pval_req = 335740936L; const ISC_LONG isc_gfix_trn_req = 335740937L; const ISC_LONG isc_gfix_full_req = 335740940L; const ISC_LONG isc_gfix_usrname_req = 335740941L; const ISC_LONG isc_gfix_pass_req = 335740942L; const ISC_LONG isc_gfix_subs_name = 335740943L; const ISC_LONG isc_gfix_wal_req = 335740944L; const ISC_LONG isc_gfix_sec_req = 335740945L; const ISC_LONG isc_gfix_nval_req = 335740946L; const ISC_LONG isc_gfix_type_shut = 335740947L; const ISC_LONG isc_gfix_retry = 335740948L; const ISC_LONG isc_gfix_retry_db = 335740951L; const ISC_LONG isc_gfix_exceed_max = 335740991L; const ISC_LONG isc_gfix_corrupt_pool = 335740992L; const ISC_LONG isc_gfix_mem_exhausted = 335740993L; const ISC_LONG isc_gfix_bad_pool = 335740994L; const ISC_LONG isc_gfix_trn_not_valid = 335740995L; const ISC_LONG isc_gfix_unexp_eoi = 335741012L; const ISC_LONG isc_gfix_recon_fail = 335741018L; const ISC_LONG isc_gfix_trn_unknown = 335741036L; const ISC_LONG isc_gfix_mode_req = 335741038L; const ISC_LONG isc_gfix_opt_SQL_dialect = 335741039L; const ISC_LONG isc_gfix_pzval_req = 335741042L; const ISC_LONG isc_dsql_dbkey_from_non_table = 336003074L; const ISC_LONG isc_dsql_transitional_numeric = 336003075L; const ISC_LONG isc_dsql_dialect_warning_expr = 336003076L; const ISC_LONG isc_sql_db_dialect_dtype_unsupport = 336003077L; const ISC_LONG isc_isc_sql_dialect_conflict_num = 336003079L; const ISC_LONG isc_dsql_warning_number_ambiguous = 336003080L; const ISC_LONG isc_dsql_warning_number_ambiguous1 = 336003081L; const ISC_LONG isc_dsql_warn_precision_ambiguous = 336003082L; const ISC_LONG isc_dsql_warn_precision_ambiguous1 = 336003083L; const ISC_LONG isc_dsql_warn_precision_ambiguous2 = 336003084L; const ISC_LONG isc_dsql_ambiguous_field_name = 336003085L; const ISC_LONG isc_dsql_udf_return_pos_err = 336003086L; const ISC_LONG isc_dsql_invalid_label = 336003087L; const ISC_LONG isc_dsql_datatypes_not_comparable = 336003088L; const ISC_LONG isc_dsql_cursor_invalid = 336003089L; const ISC_LONG isc_dsql_cursor_redefined = 336003090L; const ISC_LONG isc_dsql_cursor_not_found = 336003091L; const ISC_LONG isc_dsql_cursor_exists = 336003092L; const ISC_LONG isc_dsql_cursor_rel_ambiguous = 336003093L; const ISC_LONG isc_dsql_cursor_rel_not_found = 336003094L; const ISC_LONG isc_dsql_cursor_not_open = 336003095L; const ISC_LONG isc_dsql_type_not_supp_ext_tab = 336003096L; const ISC_LONG isc_dyn_role_does_not_exist = 336068796L; const ISC_LONG isc_dyn_no_grant_admin_opt = 336068797L; const ISC_LONG isc_dyn_user_not_role_member = 336068798L; const ISC_LONG isc_dyn_delete_role_failed = 336068799L; const ISC_LONG isc_dyn_grant_role_to_user = 336068800L; const ISC_LONG isc_dyn_inv_sql_role_name = 336068801L; const ISC_LONG isc_dyn_dup_sql_role = 336068802L; const ISC_LONG isc_dyn_kywd_spec_for_role = 336068803L; const ISC_LONG isc_dyn_roles_not_supported = 336068804L; const ISC_LONG isc_dyn_domain_name_exists = 336068812L; const ISC_LONG isc_dyn_field_name_exists = 336068813L; const ISC_LONG isc_dyn_dependency_exists = 336068814L; const ISC_LONG isc_dyn_dtype_invalid = 336068815L; const ISC_LONG isc_dyn_char_fld_too_small = 336068816L; const ISC_LONG isc_dyn_invalid_dtype_conversion = 336068817L; const ISC_LONG isc_dyn_dtype_conv_invalid = 336068818L; const ISC_LONG isc_dyn_zero_len_id = 336068820L; const ISC_LONG isc_gbak_unknown_switch = 336330753L; const ISC_LONG isc_gbak_page_size_missing = 336330754L; const ISC_LONG isc_gbak_page_size_toobig = 336330755L; const ISC_LONG isc_gbak_redir_ouput_missing = 336330756L; const ISC_LONG isc_gbak_switches_conflict = 336330757L; const ISC_LONG isc_gbak_unknown_device = 336330758L; const ISC_LONG isc_gbak_no_protection = 336330759L; const ISC_LONG isc_gbak_page_size_not_allowed = 336330760L; const ISC_LONG isc_gbak_multi_source_dest = 336330761L; const ISC_LONG isc_gbak_filename_missing = 336330762L; const ISC_LONG isc_gbak_dup_inout_names = 336330763L; const ISC_LONG isc_gbak_inv_page_size = 336330764L; const ISC_LONG isc_gbak_db_specified = 336330765L; const ISC_LONG isc_gbak_db_exists = 336330766L; const ISC_LONG isc_gbak_unk_device = 336330767L; const ISC_LONG isc_gbak_blob_info_failed = 336330772L; const ISC_LONG isc_gbak_unk_blob_item = 336330773L; const ISC_LONG isc_gbak_get_seg_failed = 336330774L; const ISC_LONG isc_gbak_close_blob_failed = 336330775L; const ISC_LONG isc_gbak_open_blob_failed = 336330776L; const ISC_LONG isc_gbak_put_blr_gen_id_failed = 336330777L; const ISC_LONG isc_gbak_unk_type = 336330778L; const ISC_LONG isc_gbak_comp_req_failed = 336330779L; const ISC_LONG isc_gbak_start_req_failed = 336330780L; const ISC_LONG isc_gbak_rec_failed = 336330781L; const ISC_LONG isc_gbak_rel_req_failed = 336330782L; const ISC_LONG isc_gbak_db_info_failed = 336330783L; const ISC_LONG isc_gbak_no_db_desc = 336330784L; const ISC_LONG isc_gbak_db_create_failed = 336330785L; const ISC_LONG isc_gbak_decomp_len_error = 336330786L; const ISC_LONG isc_gbak_tbl_missing = 336330787L; const ISC_LONG isc_gbak_blob_col_missing = 336330788L; const ISC_LONG isc_gbak_create_blob_failed = 336330789L; const ISC_LONG isc_gbak_put_seg_failed = 336330790L; const ISC_LONG isc_gbak_rec_len_exp = 336330791L; const ISC_LONG isc_gbak_inv_rec_len = 336330792L; const ISC_LONG isc_gbak_exp_data_type = 336330793L; const ISC_LONG isc_gbak_gen_id_failed = 336330794L; const ISC_LONG isc_gbak_unk_rec_type = 336330795L; const ISC_LONG isc_gbak_inv_bkup_ver = 336330796L; const ISC_LONG isc_gbak_missing_bkup_desc = 336330797L; const ISC_LONG isc_gbak_string_trunc = 336330798L; const ISC_LONG isc_gbak_cant_rest_record = 336330799L; const ISC_LONG isc_gbak_send_failed = 336330800L; const ISC_LONG isc_gbak_no_tbl_name = 336330801L; const ISC_LONG isc_gbak_unexp_eof = 336330802L; const ISC_LONG isc_gbak_db_format_too_old = 336330803L; const ISC_LONG isc_gbak_inv_array_dim = 336330804L; const ISC_LONG isc_gbak_xdr_len_expected = 336330807L; const ISC_LONG isc_gbak_open_bkup_error = 336330817L; const ISC_LONG isc_gbak_open_error = 336330818L; const ISC_LONG isc_gbak_missing_block_fac = 336330934L; const ISC_LONG isc_gbak_inv_block_fac = 336330935L; const ISC_LONG isc_gbak_block_fac_specified = 336330936L; const ISC_LONG isc_gbak_missing_username = 336330940L; const ISC_LONG isc_gbak_missing_password = 336330941L; const ISC_LONG isc_gbak_missing_skipped_bytes = 336330952L; const ISC_LONG isc_gbak_inv_skipped_bytes = 336330953L; const ISC_LONG isc_gbak_err_restore_charset = 336330965L; const ISC_LONG isc_gbak_err_restore_collation = 336330967L; const ISC_LONG isc_gbak_read_error = 336330972L; const ISC_LONG isc_gbak_write_error = 336330973L; const ISC_LONG isc_gbak_db_in_use = 336330985L; const ISC_LONG isc_gbak_sysmemex = 336330990L; const ISC_LONG isc_gbak_restore_role_failed = 336331002L; const ISC_LONG isc_gbak_role_op_missing = 336331005L; const ISC_LONG isc_gbak_page_buffers_missing = 336331010L; const ISC_LONG isc_gbak_page_buffers_wrong_param = 336331011L; const ISC_LONG isc_gbak_page_buffers_restore = 336331012L; const ISC_LONG isc_gbak_inv_size = 336331014L; const ISC_LONG isc_gbak_file_outof_sequence = 336331015L; const ISC_LONG isc_gbak_join_file_missing = 336331016L; const ISC_LONG isc_gbak_stdin_not_supptd = 336331017L; const ISC_LONG isc_gbak_stdout_not_supptd = 336331018L; const ISC_LONG isc_gbak_bkup_corrupt = 336331019L; const ISC_LONG isc_gbak_unk_db_file_spec = 336331020L; const ISC_LONG isc_gbak_hdr_write_failed = 336331021L; const ISC_LONG isc_gbak_disk_space_ex = 336331022L; const ISC_LONG isc_gbak_size_lt_min = 336331023L; const ISC_LONG isc_gbak_svc_name_missing = 336331025L; const ISC_LONG isc_gbak_not_ownr = 336331026L; const ISC_LONG isc_gbak_mode_req = 336331031L; const ISC_LONG isc_gbak_just_data = 336331033L; const ISC_LONG isc_gbak_data_only = 336331034L; const ISC_LONG isc_dsql_too_old_ods = 336397205L; const ISC_LONG isc_dsql_table_not_found = 336397206L; const ISC_LONG isc_dsql_view_not_found = 336397207L; const ISC_LONG isc_dsql_line_col_error = 336397208L; const ISC_LONG isc_dsql_unknown_pos = 336397209L; const ISC_LONG isc_dsql_no_dup_name = 336397210L; const ISC_LONG isc_dsql_too_many_values = 336397211L; const ISC_LONG isc_gsec_cant_open_db = 336723983L; const ISC_LONG isc_gsec_switches_error = 336723984L; const ISC_LONG isc_gsec_no_op_spec = 336723985L; const ISC_LONG isc_gsec_no_usr_name = 336723986L; const ISC_LONG isc_gsec_err_add = 336723987L; const ISC_LONG isc_gsec_err_modify = 336723988L; const ISC_LONG isc_gsec_err_find_mod = 336723989L; const ISC_LONG isc_gsec_err_rec_not_found = 336723990L; const ISC_LONG isc_gsec_err_delete = 336723991L; const ISC_LONG isc_gsec_err_find_del = 336723992L; const ISC_LONG isc_gsec_err_find_disp = 336723996L; const ISC_LONG isc_gsec_inv_param = 336723997L; const ISC_LONG isc_gsec_op_specified = 336723998L; const ISC_LONG isc_gsec_pw_specified = 336723999L; const ISC_LONG isc_gsec_uid_specified = 336724000L; const ISC_LONG isc_gsec_gid_specified = 336724001L; const ISC_LONG isc_gsec_proj_specified = 336724002L; const ISC_LONG isc_gsec_org_specified = 336724003L; const ISC_LONG isc_gsec_fname_specified = 336724004L; const ISC_LONG isc_gsec_mname_specified = 336724005L; const ISC_LONG isc_gsec_lname_specified = 336724006L; const ISC_LONG isc_gsec_inv_switch = 336724008L; const ISC_LONG isc_gsec_amb_switch = 336724009L; const ISC_LONG isc_gsec_no_op_specified = 336724010L; const ISC_LONG isc_gsec_params_not_allowed = 336724011L; const ISC_LONG isc_gsec_incompat_switch = 336724012L; const ISC_LONG isc_gsec_inv_username = 336724044L; const ISC_LONG isc_gsec_inv_pw_length = 336724045L; const ISC_LONG isc_gsec_db_specified = 336724046L; const ISC_LONG isc_gsec_db_admin_specified = 336724047L; const ISC_LONG isc_gsec_db_admin_pw_specified = 336724048L; const ISC_LONG isc_gsec_sql_role_specified = 336724049L; const ISC_LONG isc_license_no_file = 336789504L; const ISC_LONG isc_license_op_specified = 336789523L; const ISC_LONG isc_license_op_missing = 336789524L; const ISC_LONG isc_license_inv_switch = 336789525L; const ISC_LONG isc_license_inv_switch_combo = 336789526L; const ISC_LONG isc_license_inv_op_combo = 336789527L; const ISC_LONG isc_license_amb_switch = 336789528L; const ISC_LONG isc_license_inv_parameter = 336789529L; const ISC_LONG isc_license_param_specified = 336789530L; const ISC_LONG isc_license_param_req = 336789531L; const ISC_LONG isc_license_syntx_error = 336789532L; const ISC_LONG isc_license_dup_id = 336789534L; const ISC_LONG isc_license_inv_id_key = 336789535L; const ISC_LONG isc_license_err_remove = 336789536L; const ISC_LONG isc_license_err_update = 336789537L; const ISC_LONG isc_license_err_convert = 336789538L; const ISC_LONG isc_license_err_unk = 336789539L; const ISC_LONG isc_license_svc_err_add = 336789540L; const ISC_LONG isc_license_svc_err_remove = 336789541L; const ISC_LONG isc_license_eval_exists = 336789563L; const ISC_LONG isc_gstat_unknown_switch = 336920577L; const ISC_LONG isc_gstat_retry = 336920578L; const ISC_LONG isc_gstat_wrong_ods = 336920579L; const ISC_LONG isc_gstat_unexpected_eof = 336920580L; const ISC_LONG isc_gstat_open_err = 336920605L; const ISC_LONG isc_gstat_read_err = 336920606L; const ISC_LONG isc_gstat_sysmemex = 336920607L; const ISC_LONG isc_err_max = 763; # 1991 "../src/include/../jrd/ibase.h" 2 # 35 "../src/common/classes/ClumpletReader.cpp" 2 # 1 "../src/include/../jrd/gds_proto.h" 1 # 38 "../src/common/classes/ClumpletReader.cpp" 2 # 1 "/usr/include/ctype.h" 1 3 4 # 30 "/usr/include/ctype.h" 3 4 extern "C" { # 48 "/usr/include/ctype.h" 3 4 enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; # 81 "/usr/include/ctype.h" 3 4 extern __const unsigned short int **__ctype_b_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__const)); # 96 "/usr/include/ctype.h" 3 4 extern int isalnum (int) throw (); extern int isalpha (int) throw (); extern int iscntrl (int) throw (); extern int isdigit (int) throw (); extern int islower (int) throw (); extern int isgraph (int) throw (); extern int isprint (int) throw (); extern int ispunct (int) throw (); extern int isspace (int) throw (); extern int isupper (int) throw (); extern int isxdigit (int) throw (); extern int tolower (int __c) throw (); extern int toupper (int __c) throw (); extern int isblank (int) throw (); extern int isctype (int __c, int __mask) throw (); extern int isascii (int __c) throw (); extern int toascii (int __c) throw (); extern int _toupper (int) throw (); extern int _tolower (int) throw (); # 247 "/usr/include/ctype.h" 3 4 extern int isalnum_l (int, __locale_t) throw (); extern int isalpha_l (int, __locale_t) throw (); extern int iscntrl_l (int, __locale_t) throw (); extern int isdigit_l (int, __locale_t) throw (); extern int islower_l (int, __locale_t) throw (); extern int isgraph_l (int, __locale_t) throw (); extern int isprint_l (int, __locale_t) throw (); extern int ispunct_l (int, __locale_t) throw (); extern int isspace_l (int, __locale_t) throw (); extern int isupper_l (int, __locale_t) throw (); extern int isxdigit_l (int, __locale_t) throw (); extern int isblank_l (int, __locale_t) throw (); extern int __tolower_l (int __c, __locale_t __l) throw (); extern int tolower_l (int __c, __locale_t __l) throw (); extern int __toupper_l (int __c, __locale_t __l) throw (); extern int toupper_l (int __c, __locale_t __l) throw (); # 323 "/usr/include/ctype.h" 3 4 } # 39 "../src/common/classes/ClumpletReader.cpp" 2 namespace Firebird { void ClumpletReader::dump() const { static int dmp = 0; gds__log("*** DUMP ***"); if (dmp) { gds__log("recursion"); return; } dmp++; class ClumpletDump : public ClumpletReader { public: ClumpletDump(Kind k, const UCHAR* buffer, size_t buffLen) : ClumpletReader(k, buffer, buffLen) { } static string hexString(const UCHAR* b, size_t len) { string t1, t2; for (; len > 0; --len, ++b) { if (isprint(*b)) t2 += *b; else { t1.printf("<%02x>", *b); t2 += t1; } } return t2; } protected: virtual void usage_mistake(const char* what) const { fatal_exception::raiseFmt( "Internal error when using clumplet API: %s", what); } virtual void invalid_structure(const char* what) const { fatal_exception::raiseFmt( "Invalid clumplet buffer structure: %s", what); } }; try { ClumpletDump d(kind, getBuffer(), getBufferLength()); int t = (kind == SpbStart || kind == UnTagged) ? -1 : d.getBufferTag(); gds__log("Tag=%d Offset=%d Length=%d Eof=%d\n", t, getCurOffset(), getBufferLength(), isEof()); for (d.rewind(); !(d.isEof()); d.moveNext()) { gds__log("Clump %d at offset %d: %s", d.getClumpTag(), d.getCurOffset(), ClumpletDump::hexString(d.getBytes(), d.getClumpLength()).c_str()); } } catch(const fatal_exception& x) { gds__log("Fatal exception during clumplet dump: %s", x.what()); size_t l = getBufferLength() - getCurOffset(); const UCHAR *p = getBuffer() + getCurOffset(); gds__log("Plain dump starting with offset %d: %s", getCurOffset(), ClumpletDump::hexString(p, l).c_str()); } dmp--; } } namespace Firebird { ClumpletReader::ClumpletReader(Kind k, const UCHAR* buffer, size_t buffLen) : kind(k), static_buffer(buffer), static_buffer_end(buffer + buffLen) { rewind(); } void ClumpletReader::usage_mistake(const char* what) const { dump(); fatal_exception::raiseFmt( "Internal error when using clumplet API: %s", what); } void ClumpletReader::invalid_structure(const char* what) const { dump(); fatal_exception::raiseFmt( "Invalid clumplet buffer structure: %s", what); } UCHAR ClumpletReader::getBufferTag() const { const UCHAR* buffer_end = getBufferEnd(); const UCHAR* buffer_start = getBuffer(); switch (kind) { case Tpb: case Tagged: if (buffer_end - buffer_start == 0) { invalid_structure("empty buffer"); return 0; } return buffer_start[0]; case SpbStart: case UnTagged: usage_mistake("buffer is not tagged"); return 0; case SpbAttach: if (buffer_end - buffer_start == 0) { invalid_structure("empty buffer"); return 0; } switch (buffer_start[0]) { case 1: return buffer_start[0]; case 2: if (buffer_end - buffer_start == 1) { invalid_structure("buffer too short (1 byte)"); return 0; } return buffer_start[1]; default: invalid_structure("spb in service attach should begin with isc_spb_version1 or isc_spb_version"); return 0; } default: {if (!(false)) {fprintf (stderr, "GDS Assertion failure: %s %""d""\n", "../src/common/classes/ClumpletReader.cpp", 175); abort();}}; return 0; } } ClumpletReader::ClumpletType ClumpletReader::getClumpletType(UCHAR tag) const { switch (kind) { case Tagged: case UnTagged: case SpbAttach: return TraditionalDpb; case Tpb: switch (tag) { case 11: case 10: return TraditionalDpb; } return SingleTpb; case SpbStart: switch (spbState) { case 0: return SingleTpb; case 1: case 2: switch (tag) { case 5: case 106: return StringSpb; case 6: case 7: case 11: case 9: case 10: case 108: return IntSpb; case 107: return SingleTpb; case 12: return ByteSpb; } invalid_structure("unknown parameter for backup/restore"); break; case 3: switch (tag) { case 106: case 26: case 27: case 28: return StringSpb; case 108: case 18: case 19: case 20: case 15: case 34: case 17: return IntSpb; case 21: case 22: case 23: case 24: case 25: case 29: case 30: case 31: case 33: return SingleTpb; } invalid_structure("unknown parameter for repair"); break; case 4: case 5: case 6: case 7: switch (tag) { case 106: case 60: case 7: case 8: case 9: case 10: case 11: case 12: return StringSpb; case 5: case 6: return IntSpb; } invalid_structure("unknown parameter for security database operation"); break; case 8: switch (tag) { case 106: return StringSpb; case 5: case 6: case 7: case 9: case 10: case 14: case 108: return IntSpb; case 11: case 12: case 13: return ByteSpb; } invalid_structure("unknown parameter for setting database properties"); break; case 11: switch (tag) { case 106: case 105: return StringSpb; case 108: return IntSpb; } invalid_structure("unknown parameter for getting statistics"); break; case 12: invalid_structure("unknown parameter for getting log"); break; } invalid_structure("wrong spb state"); break; } invalid_structure("unknown reason"); return SingleTpb; } void ClumpletReader::adjustSpbState() { switch (kind) { case SpbStart: if (spbState == 0) { spbState = getClumpTag(); } break; default: break; } } size_t ClumpletReader::getClumpletSize(bool wTag, bool wLength, bool wData) const { const UCHAR* clumplet = getBuffer() + cur_offset; const UCHAR* buffer_end = getBufferEnd(); if (clumplet >= buffer_end) { usage_mistake("read past EOF"); return 0; } size_t rc = wTag ? 1 : 0; size_t lengthSize = 0; size_t dataSize = 0; switch (getClumpletType(clumplet[0])) { case TraditionalDpb: if (buffer_end - clumplet < 2) { invalid_structure("buffer end before end of clumplet - no length component"); return rc; } lengthSize = 1; dataSize = clumplet[1]; break; case SingleTpb: break; case StringSpb: if (buffer_end - clumplet < 3) { invalid_structure("buffer end before end of clumplet - no length component"); return rc; } lengthSize = 2; dataSize = clumplet[2]; dataSize <<= 8; dataSize += clumplet[1]; break; case IntSpb: dataSize = 4; break; case ByteSpb: dataSize = 1; break; } size_t total = 1 + lengthSize + dataSize; if (clumplet + total > buffer_end) { invalid_structure("buffer end before end of clumplet - clumplet too long"); size_t delta = total - (buffer_end - clumplet); if (delta > dataSize) dataSize = 0; else dataSize -= delta; } if (wLength) { rc += lengthSize; } if (wData) { rc += dataSize; } return rc; } void ClumpletReader::moveNext() { if (isEof()) return; size_t cs = getClumpletSize(true, true, true); adjustSpbState(); cur_offset += cs; } void ClumpletReader::rewind() { if (! getBuffer()) { cur_offset = 0; spbState = 0; return; } if (kind == UnTagged || kind == SpbStart) cur_offset = 0; else if (kind == SpbAttach && getBufferLength() > 0 && getBuffer()[0] != 1) cur_offset = 2; else cur_offset = 1; spbState = 0; } bool ClumpletReader::find(UCHAR tag) { const size_t co = getCurOffset(); for (rewind(); !isEof(); moveNext()) { if (tag == getClumpTag()) { return true; } } setCurOffset(co); return false; } UCHAR ClumpletReader::getClumpTag() const { const UCHAR* clumplet = getBuffer() + cur_offset; const UCHAR* buffer_end = getBufferEnd(); if (clumplet >= buffer_end) { usage_mistake("read past EOF"); return 0; } return clumplet[0]; } size_t ClumpletReader::getClumpLength() const { return getClumpletSize(false, false, true); } const UCHAR* ClumpletReader::getBytes() const { return getBuffer() + cur_offset + getClumpletSize(true, true, false); } SLONG ClumpletReader::getInt() const { const UCHAR* ptr = getBytes(); size_t length = getClumpLength(); if (length > 4) { invalid_structure("length of integer exceeds 4 bytes"); return 0; } SLONG value = 0; int shift = 0; while (length > 0) { --length; value += ((SLONG) *ptr++) << shift; shift += 8; } return value; } SINT64 ClumpletReader::getBigInt() const { const UCHAR* ptr = getBytes(); size_t length = getClumpLength(); if (length > 8) { invalid_structure("length of BigInt exceeds 8 bytes"); return 0; } SINT64 value = 0; int shift = 0; while (length > 0) { --length; value += ((SINT64) *ptr++) << shift; shift += 8; } return value; } string& ClumpletReader::getString(string& str) const { const UCHAR* ptr = getBytes(); size_t length = getClumpLength(); str.assign(reinterpret_cast(ptr), length); return str; } PathName& ClumpletReader::getPath(PathName& str) const { const UCHAR* ptr = getBytes(); size_t length = getClumpLength(); str.assign(reinterpret_cast(ptr), length); return str; } bool ClumpletReader::getBoolean() const { const UCHAR* ptr = getBytes(); size_t length = getClumpLength(); if (length > 1) { invalid_structure("length of boolean exceeds 1 byte"); return false; } return length && ptr[0]; } }